OMSWallet again.
Read restored session state
OMSWalletSessionState contains completed-session metadata: walletAddress, expiresAt, and authentication metadata in auth. For OIDC, the metadata identifies .idToken or .redirect, the issuer, optional provider details, and an email when OMS returns one.
The request-signing credential is separate. Its non-extractable P-256 private key remains Keychain-managed and is not serialized into OMSWalletSessionState. Restoration succeeds only when the completed metadata is unexpired and its Keychain credential can be restored.
A manual
PendingWalletSelection is not completed session metadata. It remains in memory only until your app activates a wallet.Observe expiration
Expired sessions are not activated. Keep the returned observation alive while you need notifications. The callback runs onMainActor.
List, switch, and create wallets
These operations require the authenticated credential.listWallets() follows all server cursors and returns the complete list.
useWallet and createWallet replace the active wallet while preserving the current session expiry and authentication metadata.
Pass walletType: .solana to create a Solana wallet:
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 SDK encrypts the key locally for the attested import transport and does not persist the plaintext key. The current WaaS key origins are .enclave and .imported; Swift preserves an unrecognized future value as .unknown(String).
Attestation failures throw OMSWalletError with code .attestationVerificationFailed.
Understand access objects
Keep these three objects distinct:
The OIDC provider ID token used during authentication is a fourth object: it is app-owned identity proof consumed as auth input, not an OMS wallet token.
Request a wallet ID token
CallgetIdToken() only after a wallet is active. Send the returned string to a backend that verifies it using the OMS issuer and JWKS flow described in backend wallet verification.
List and revoke access grants
UselistAccess() to load all access-grant pages for account-management UI.
listAccessPage(pageSize:cursor:type:). Revoke only a grant whose credential has isCaller == false:
sessionId is required and revokes exactly that session. Revocation cannot be undone. Revoking the caller invalidates the credential making the current request and prevents subsequent protected operations from that session. Keep caller revocation out of the normal access-management UI.
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.