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.

Use the React Native SDK session APIs after configure to restore wallet state, issue ID tokens, and manage credential access. The underlying native SDKs persist completed wallet-session metadata and signing state with platform storage.

Get Wallet Address

Read the active wallet address after configuration and session restore.
import { getWalletAddress } from 'oms-client-react-native-sdk'

const walletAddress = await getWalletAddress()

if (walletAddress) {
  console.log('Restored wallet:', walletAddress)
}
Parameters Takes no parameters. Returns Returns Promise<string | null>.

Get Session

Read completed wallet-session metadata.
import { getSession } from 'oms-client-react-native-sdk'

const session = await getSession()

console.log(session.walletAddress, session.expiresAt, session.loginType)
Parameters Takes no parameters. Returns Returns Promise<OmsClientSessionState>.
FieldTypeDescription
walletAddressstring or nullActive wallet address, when a session is restored.
expiresAtstring or nullSession expiration timestamp.
loginType'Email', 'GoogleAuth', 'Oidc', or nullLogin method for the session.
sessionEmailstring or nullEmail address associated with the session when available.

Get ID Token

Request an ID token for the active wallet session. Send this token to your backend when using backend wallet verification.
import { getIdToken } from 'oms-client-react-native-sdk'

const idToken = await getIdToken({
  ttlSeconds: 300,
})
Parameters
ParameterTypeDescription
ttlSecondsnumber, null, or undefinedOptional token lifetime in seconds.
customClaimsRecord<string, unknown>, null, or undefinedOptional custom claims to include in the token.
Returns Returns Promise<string>.

List Access

List credentials that currently have access to the active wallet.
import { listAccess } from 'oms-client-react-native-sdk'

const credentials = await listAccess({ pageSize: 25 })

for (const credential of credentials) {
  console.log(credential.credentialId, credential.expiresAt, credential.isCaller)
}
Parameters
ParameterTypeDescription
pageSizenumber, null, or undefinedOptional page size used while following Wallet API cursors.
Returns Returns Promise<OmsCredentialInfo[]>.

List Access Pages

Use listAccessPages when your UI should render credential access one page at a time.
import { listAccessPages } from 'oms-client-react-native-sdk'

for await (const page of listAccessPages({ pageSize: 25 })) {
  for (const credential of page.credentials) {
    console.log(credential.credentialId, credential.isCaller)
  }
}
Parameters
ParameterTypeDescription
pageSizenumber, null, or undefinedOptional page size for each Wallet API request.
Returns Returns AsyncGenerator<OmsListAccessResponse, void, void>.

List Access Page

Fetch one credential access page with an optional cursor.
import { listAccessPage } from 'oms-client-react-native-sdk'

const page = await listAccessPage({
  pageSize: 25,
  cursor: null,
})

console.log('Credential count:', page.credentials.length)
Parameters
ParameterTypeDescription
pageSizenumber, null, or undefinedOptional page size for this Wallet API request.
cursorstring, null, or undefinedCursor returned by a previous page.
Returns Returns Promise<OmsListAccessResponse>.
FieldTypeDescription
credentialsOmsCredentialInfo[]Credentials returned for the page.
pageOmsAccessPage or nullPagination metadata, including limit and next cursor.

Revoke Access

Revoke another credential’s access to the active wallet.
import { revokeAccess } from 'oms-client-react-native-sdk'

await revokeAccess('credential-id')
Parameters
ParameterTypeDescription
targetCredentialIdstringCredential ID returned by listAccess.
Returns Returns Promise<void>.

Sign Out

Clear the active wallet session.
import { signOut } from 'oms-client-react-native-sdk'

await signOut()
Parameters Takes no parameters. Returns Returns Promise<void>.