Skip to main content

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.

The React Native SDK wraps the native OMS Wallet SDKs for iOS and Android. It exposes module-level functions for wallet auth, session state, signing, transactions, ID tokens, access management, balance reads, and unit conversion.

Install

Install the React Native wrapper package from npm.
pnpm add oms-client-react-native-sdk@0.1.0-alpha.1
For npm or yarn projects:
npm install oms-client-react-native-sdk@0.1.0-alpha.1
yarn add oms-client-react-native-sdk@0.1.0-alpha.1
React Native autolinking links the included native modules. Android resolves io.github.0xsequence:oms-client-kotlin-sdk:0.1.0-alpha.1, and iOS resolves oms-client-swift-sdk 0.1.0-alpha.1. Bare React Native apps are supported through normal autolinking. Expo apps need a development build, Expo prebuild/EAS Build, or the bare workflow because Expo Go cannot load custom native code. Android apps need minSdk 26, compileSdk 34 or newer, and Java 17 compile options. iOS apps need deployment target 15.0 or newer.

Configure The SDK

Call configure once before using wallet, signing, transaction, balance, or access APIs.
import { configure } from 'oms-client-react-native-sdk'

await configure({
  projectAccessKey: 'YOUR_PROJECT_ACCESS_KEY',
  projectId: 'YOUR_PROJECT_ID',
})
The package exposes:
API AreaUse
AuthenticationEmail OTP, OIDC ID-token auth, OIDC redirect auth, wallet selection, and wallet creation.
SessionWallet address lookup, session metadata, ID tokens, access management, and sign out.
BlockchainSupported-network listing, native token transactions, contract calls, signing, verification, fee selection, and transaction status checks.
Balances & HistoryToken balance and native token balance reads.
Unit helpersparseUnits and formatUnits for raw base-unit string conversion.

Authenticate With Email

Email auth is a two-step OTP flow.
import {
  completeEmailAuth,
  startEmailAuth,
} from 'oms-client-react-native-sdk'

await startEmailAuth('user@example.com')

// Show your OTP input, then complete auth with the user-entered code.
const result = await completeEmailAuth({ code: '123456' })

if (result.type !== 'walletSelected') {
  throw new Error('Select or create a wallet before continuing')
}

console.log('Wallet address:', result.walletAddress)
completeEmailAuth verifies the OTP, loads an existing wallet for the user, or creates one when needed. Wallet metadata and session state are persisted by the underlying native SDKs.

Send A Transaction

After authentication, send a native token transaction with sendTransaction. Values are raw base-unit integer strings. On testnets, fee options are automatically sponsored, so Polygon Amoy is a good first network for testing.
import { sendTransaction } from 'oms-client-react-native-sdk'

const tx = await sendTransaction({
  chainId: '80002',
  to: '0xRecipient',
  value: '0',
})

console.log('Transaction:', tx.txnHash ?? tx.txnId)