Documentation Index Fetch the complete documentation index at: https://docs.polygon.technology/llms.txt
Use this file to discover all available pages before exploring further.
This quickstart walks through the minimum OMS Wallet SDK flow: install an SDK, create or configure the client, authenticate with email OTP, and send a first transaction from the embedded wallet.
Swift and Kotlin are native app SDKs. TypeScript is best for web, Node, and JavaScript apps.
1. Get project credentials
Contact us to have your project ID and access key manually provisioned before getting started.
2. Install an SDK
pnpm add @0xsequence/typescript-sdk viem
Add the package in Xcode with File -> Add Package Dependencies and enter the following git URL. https://github.com/0xsequence/swift-sdk.git
dependencies {
implementation ( "io.github.0xsequence:oms-client-kotlin-sdk:0.1.0-alpha.1" )
}
3. Create the client
Create the client once when your app starts, then reuse it for wallet operations.
import { OMSClient } from '@0xsequence/typescript-sdk'
const oms = new OMSClient ({
publicApiKey: 'YOUR_PROJECT_ACCESS_KEY' ,
projectId: 'YOUR_PROJECT_ID' ,
})
import OMS_SDK
let oms = OMSClient (
projectAccessKey : "YOUR_PROJECT_ACCESS_KEY" ,
projectId : "YOUR_PROJECT_ID"
)
import com.omsclient.kotlin_sdk.OMSClient
val client = OMSClient (
context = context,
publicApiKey = "YOUR_PROJECT_ACCESS_KEY" ,
projectId = "YOUR_PROJECT_ID" ,
)
4. Authenticate with email
Email authentication is a two-step OTP flow. Start auth, show your OTP input, then complete auth with the user-entered code.
await oms . wallet . startEmailAuth ({ email: 'user@example.com' })
const { walletAddress } = await oms . wallet . completeEmailAuth ({ code: '123456' })
console . log ( 'Wallet address:' , walletAddress )
try await oms. wallet . startEmailAuth ( email : "user@example.com" )
let result = try await oms. wallet . completeEmailAuth ( code : "123456" )
if case let . walletSelected (walletAddress, _ , _ , _ ) = result {
print ( "Wallet address:" , walletAddress)
}
import com.omsclient.kotlin_sdk.wallet.CompleteAuthResult
client.wallet. startEmailAuth ( "user@example.com" )
val result = client.wallet. completeEmailAuth ( "123456" )
check (result is CompleteAuthResult.WalletSelected)
println ( "Wallet address: ${ result.walletAddress } " )
5. Send a first transaction
Send a native token transaction on Polygon Amoy. Values are raw base-unit values. On supported testnets, fee options are automatically sponsored.
import { Networks } from '@0xsequence/typescript-sdk'
import { parseEther , type Address } from 'viem'
const recipient = '0xRecipient' as Address
const tx = await oms . wallet . sendTransaction ({
network: Networks . amoy ,
to: recipient ,
value: parseEther ( '0' ),
})
console . log ( 'Transaction:' , tx . txnHash ?? tx . txnId )
let tx = try await oms. wallet . sendTransaction (
network : . polygonAmoy ,
to : "0xRecipient" ,
value : "0"
)
print ( "Transaction:" , tx. txnHash ?? tx. txnId )
import com.omsclient.kotlin_sdk.Network
import java.math.BigInteger
val tx = client.wallet. sendTransaction (
network = Network.AMOY,
to = "0xRecipient" ,
value = BigInteger.ZERO,
)
println ( "Transaction id: ${ tx.txnId } " )
println ( "Transaction hash: ${ tx.txnHash } " )
Next steps
SDK Overview Compare supported SDKs and find the detailed reference for each one.
Send USDC Send an ERC-20 transfer from an embedded wallet.
Authentication Review auth options, wallet selection, and wallet creation where each SDK supports them.
Balances & History Read token balances and raw base-unit values through the SDK indexer clients.