Restore the completed session
The native SDK persists completed sessions. Reuse the singleOMSWallet instance with the same publishable key when the app starts, then read its state:
OMSWalletSessionState contains:
Email metadata contains
type: 'email' and email. OIDC metadata contains type: 'oidc', flow: 'id-token' | 'redirect', issuer, and optional provider, label, and email values.
Use getWalletAddress() when you only need the selected address:
Observe expiration
Subscribe where your application owns wallet-session state and remove the subscription during cleanup:List and activate wallets
An access credential can have multiple wallets.useWallet changes the selected wallet for the active session:
walletType: 'solana':
Import and activate a wallet
0x prefix. Solana imports accept a 32-byte seed or 64-byte keypair as raw bytes, or the base58 encoding of either. The native SDK encrypts the key locally for the attested import transport and does not persist the plaintext key. Returned wallets identify keyOrigin as 'enclave' or 'imported'.
Attestation failures reject with SDK error code OMS_ATTESTATION_VERIFICATION_FAILED.
Issue a wallet ID token
A wallet ID token is short-lived proof for the currently active wallet. It is not the provider ID token used to authenticate and it is not the access credential that authorizes wallet API calls.Inspect access grants
Access grants authorize wallet operations and have their own credential IDs and expiry timestamps. A grant hastype: 'direct' or type: 'remote'; remote grants also include a session ID, display metadata, and bounded smart-session grants. isCaller identifies the credential currently authorizing the list request.
For a short list:
listAccessPage when your UI owns cursor pagination. Omit cursor for the first page, then pass the returned cursor when it is defined:
Revoke access safely
CheckisCaller before revocation. Revoking the caller removes the credential being used for the request and can end the current app’s ability to perform protected operations.
sessionId is required and revokes exactly that session.
Authorize remote access
Remote access grants are bounded EVM smart sessions. Inspect the remote credential and show its returned metadata to the wallet owner before requesting approval: This example uses Polygon Amoy. Grant limits are raw EVM base-unit amounts. A native-transfer limit is cumulative, so1000000000000000 wei authorizes up to 0.001 POL across the session.
Sign out
revokeAccess to remove access from another credential.