OMSClient to restore wallet state, issue ID tokens, and manage wallet access. Completed wallet sessions are persisted between app launches.
Get Wallet Address
Read the active wallet address after client creation and session restore.Promise<string | null>.
Get Session
Read completed wallet-session metadata.Promise<OmsClientSessionState>.
| Field | Type | Description |
|---|---|---|
walletAddress | string or null | Active wallet address, when a session is restored. |
expiresAt | string or null | Session expiration timestamp. |
loginType | 'Email', 'GoogleAuth', 'Oidc', or null | Login method for the session. |
sessionEmail | string or null | Email address associated with the session when available. |
On Session Expired
Subscribe to wallet session expiration events. The listener receives the expired session snapshot so your app can route the user back to sign-in or prefill re-authentication UI.subscription.remove() when that owner is disposed.
Parameters
| Parameter | Type | Description |
|---|---|---|
listener | (event: OmsClientSessionExpiredEvent) => void | Callback invoked when the active wallet session expires. |
{ remove(): void }.
| Field | Type | Description |
|---|---|---|
session | OmsClientSessionState | Expired session snapshot. |
expiredAt | string | Expiration event timestamp. |
Get ID Token
Request an ID token for the active wallet session. Send this token to your backend when using backend wallet verification.| Parameter | Type | Description |
|---|---|---|
ttlSeconds | number, null, or undefined | Optional token lifetime in seconds. |
customClaims | Record<string, unknown>, null, or undefined | Optional app-provided claims. Backends should treat them as client-provided context unless they control the values. |
Promise<string>.
List Access
List wallet access grants for account-management UI.| Parameter | Type | Description |
|---|---|---|
pageSize | number, null, or undefined | Optional page size for paginated access results. |
Promise<OmsCredentialInfo[]>.
List Access Pages
UselistAccessPages when your UI should render credential access one page at a time.
| Parameter | Type | Description |
|---|---|---|
pageSize | number, null, or undefined | Optional page size for each access-list request. |
AsyncGenerator<OmsListAccessResponse, void, void>.
List Access Page
Fetch one credential access page with an optional cursor.| Parameter | Type | Description |
|---|---|---|
pageSize | number, null, or undefined | Optional page size for this access-list request. |
cursor | string, null, or undefined | Cursor returned by a previous page. |
Promise<OmsListAccessResponse>.
| Field | Type | Description |
|---|---|---|
credentials | OmsCredentialInfo[] | Credentials returned for the page. |
page | OmsAccessPage or null | Pagination metadata, including limit and next cursor. |
Revoke Access
Revoke another credential’s access to the active wallet.| Parameter | Type | Description |
|---|---|---|
targetCredentialId | string | Credential ID returned by listAccess. |
Promise<void>.
Sign Out
Clear the active wallet session.Promise<void>.