> ## 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.

# Kotlin API reference

> Complete public API reference for the OMS Wallet Kotlin SDK.

## OMSWallet

### `OMSWallet`

Main entry point for OMS Wallet.

```kotlin theme={null}
class OMSWallet {
    val wallet: WalletClient

    val indexer: IndexerClient

    /**
     * Creates an Android-backed client with separate session metadata storage
     * and Android Keystore request signing.
     */
    constructor(
        context: Context,
        publishableKey: String,
        okHttpClient: OkHttpClient = OkHttpClient(),
    )
}
```

## Authentication and sessions

### `OMSWalletSessionAuth`

```kotlin theme={null}
sealed interface OMSWalletSessionAuth {
    val email: String?
}
```

### `OMSWalletEmailSessionAuth`

```kotlin theme={null}
data class OMSWalletEmailSessionAuth(
    override val email: String,
) : OMSWalletSessionAuth
```

### `OMSWalletOidcSessionAuthFlow`

```kotlin theme={null}
enum class OMSWalletOidcSessionAuthFlow {
    Redirect,
    IdToken,
}
```

### `OMSWalletOidcSessionAuth`

```kotlin theme={null}
data class OMSWalletOidcSessionAuth(
    val flow: OMSWalletOidcSessionAuthFlow,
    val issuer: String,
    val provider: String?,
    val providerLabel: String?,
    override val email: String?,
) : OMSWalletSessionAuth
```

### `OMSWalletSessionState`

Current durable wallet-session state for a `WalletClient`.

```kotlin theme={null}
data class OMSWalletSessionState(
    /**
     * Address of the selected wallet in a completed session, or null when the
     * SDK is signed out.
     */
    val walletAddress: String?,
    /**
     * ISO-8601 expiration time for the current completed wallet session, or null
     * when the SDK is signed out.
     */
    val expiresAt: String? = null,
    val auth: OMSWalletSessionAuth? = null,
)
```

### `OMSWalletSessionExpiredEvent`

Event delivered when a wallet session expires.

```kotlin theme={null}
data class OMSWalletSessionExpiredEvent(
    val session: OMSWalletSessionState,
    val expiredAt: String,
)
```

### `WalletType`

```kotlin theme={null}
enum class WalletType(
    val wireValue: String,
) {
    Ethereum("ethereum"),
    UNKNOWN_DEFAULT("UNKNOWN_DEFAULT"),
}
```

### `Wallet`

```kotlin theme={null}
data class Wallet(
    val id: String,
    val type: WalletType,
    val address: String,
    val reference: String? = null,
)
```

### `Page`

```kotlin theme={null}
data class Page(
    val limit: UInt? = null,
    val cursor: String? = null,
)
```

### `CredentialInfo`

```kotlin theme={null}
data class CredentialInfo(
    val credentialId: String,
    val expiresAt: String,
    val isCaller: Boolean,
)
```

### `ListAccessResponse`

```kotlin theme={null}
data class ListAccessResponse(
    val credentials: List<CredentialInfo>,
    val page: Page? = null,
)
```

### `CustomOidcProviderConfig`

Caller-owned OIDC provider configuration for authorization-code redirect auth.

```kotlin theme={null}
data class CustomOidcProviderConfig(
    val issuer: String,
    val clientId: String,
    val authorizationUrl: String,
    val providerRedirectUri: String,
    val provider: String? = null,
    val providerLabel: String? = null,
    val scopes: List<String> = emptyList(),
    val authorizeParams: Map<String, String> = emptyMap(),
    val authMode: OidcRedirectAuthMode = OidcRedirectAuthMode.AuthCodePKCE,
)
```

### `OmsRelayOidcProvider`

Opaque OIDC provider value whose OAuth callback is owned by the OMS relay.

```kotlin theme={null}
sealed interface OmsRelayOidcProvider
```

### `OmsRelayOidcProviders`

SDK-owned OMS relay provider values.

```kotlin theme={null}
object OmsRelayOidcProviders {
    val google: OmsRelayOidcProvider

    val apple: OmsRelayOidcProvider
}
```

### `OidcRedirectAuthMode`

WaaS redirect auth-code mode supported by OIDC redirect providers.

```kotlin theme={null}
@Serializable
enum class OidcRedirectAuthMode {
    @SerialName("auth-code")
    AuthCode,
    @SerialName("auth-code-pkce")
    AuthCodePKCE,
}
```

### `StartOidcRedirectAuthResult`

Result returned after starting an OIDC authorization-code redirect flow.

```kotlin theme={null}
data class StartOidcRedirectAuthResult(
    val authorizationUrl: String,
)
```

### `OidcRedirectAuthResult`

Result of handling an incoming OIDC authorization-code redirect callback.

```kotlin theme={null}
sealed interface OidcRedirectAuthResult
```

### `OidcRedirectAuthResult.Completed`

```kotlin theme={null}
data class Completed(
    val result: CompleteAuthResult,
) : OidcRedirectAuthResult
```

### `OidcRedirectAuthResult.NotOidcRedirectCallback`

```kotlin theme={null}
data object NotOidcRedirectCallback : OidcRedirectAuthResult
```

### `OidcRedirectAuthResult.NoPendingAuth`

```kotlin theme={null}
data object NoPendingAuth : OidcRedirectAuthResult
```

### `WalletSelectionResult`

Result returned after selecting or creating a wallet.

```kotlin theme={null}
data class WalletSelectionResult(
    val walletAddress: String,
    val wallet: Wallet,
)
```

### `WalletSelectionBehavior`

Controls whether auth completion should select a wallet automatically or let
the app complete wallet selection.

```kotlin theme={null}
enum class WalletSelectionBehavior {
    /**
     * Selects the first existing wallet for the requested wallet type, or
     * creates and selects one when none exists. Use `Manual` when the app needs
     * to present wallet choices.
     */
    Automatic,
    /**
     * Completes auth and returns a `PendingWalletSelection` for app-driven
     * wallet selection.
     */
    Manual,
}
```

### `PendingWalletSelection`

Authenticated state waiting for the app to select or create a wallet.

```kotlin theme={null}
class PendingWalletSelection {
    val walletType: WalletType

    val wallets: List<Wallet>

    val credential: CredentialInfo

    /**
     * Selects one of `wallets` and persists it as the active wallet session.
     */
    suspend fun selectWallet(walletId: String): WalletSelectionResult

    /**
     * Creates a new wallet for `walletType`, selects it, and persists it as the
     * active wallet session.
     */
    suspend fun createAndSelectWallet(reference: String? = null): WalletSelectionResult
}
```

### `CompleteAuthResult`

Result returned by auth completion APIs when wallet selection can be automatic
or app-driven.

```kotlin theme={null}
sealed interface CompleteAuthResult
```

### `CompleteAuthResult.WalletSelected`

```kotlin theme={null}
data class WalletSelected(
    val walletAddress: String,
    val wallet: Wallet,
    val wallets: List<Wallet>,
    val credential: CredentialInfo,
) : CompleteAuthResult
```

### `CompleteAuthResult.WalletSelection`

```kotlin theme={null}
data class WalletSelection(
    val pendingSelection: PendingWalletSelection,
) : CompleteAuthResult
```

### `WalletClient`

```kotlin theme={null}
class WalletClient
```

### `WalletClient.DEFAULT_SESSION_LIFETIME_SECONDS`

Default requested WaaS wallet session lifetime in seconds.

```kotlin theme={null}
const val DEFAULT_SESSION_LIFETIME_SECONDS: Long = 604_800L
```

### `WalletClient.MAX_SESSION_LIFETIME_SECONDS`

Maximum requested WaaS wallet session lifetime in seconds.

```kotlin theme={null}
const val MAX_SESSION_LIFETIME_SECONDS: Long = 2_592_000L
```

### `WalletClient.walletAddress`

Address of the currently selected wallet, or null when no wallet is selected.

```kotlin theme={null}
val walletAddress: String?
```

### `WalletClient.session`

Snapshot of the current completed wallet-session state.

```kotlin theme={null}
val session: OMSWalletSessionState
```

### `WalletClient.onSessionExpired`

Registers a listener for expired wallet sessions.

```kotlin theme={null}
fun onSessionExpired(listener: (OMSWalletSessionExpiredEvent) -> Unit): () -> Unit
```

### `WalletClient.signOut`

```kotlin theme={null}
fun signOut()
```

### `WalletClient.startEmailAuth`

```kotlin theme={null}
suspend fun startEmailAuth(
    email: String,
    sessionLifetimeSeconds: Long = DEFAULT_SESSION_LIFETIME_SECONDS,
): Unit
```

### `WalletClient.signInWithOidcIdToken`

```kotlin theme={null}
suspend fun signInWithOidcIdToken(
    idToken: String,
    issuer: String,
    audience: String,
    walletSelection: WalletSelectionBehavior = WalletSelectionBehavior.Automatic,
    walletType: WalletType = WalletType.Ethereum,
    sessionLifetimeSeconds: Long = DEFAULT_SESSION_LIFETIME_SECONDS,
    provider: String? = null,
    providerLabel: String? = null,
): CompleteAuthResult
```

### `WalletClient.startOidcRedirectAuth`

```kotlin theme={null}
suspend fun startOidcRedirectAuth(
    provider: OmsRelayOidcProvider,
    omsRelayReturnUri: String,
    walletType: WalletType = WalletType.Ethereum,
    walletSelection: WalletSelectionBehavior? = null,
    sessionLifetimeSeconds: Long? = null,
    loginHint: String? = null,
): StartOidcRedirectAuthResult

suspend fun startOidcRedirectAuth(
    provider: CustomOidcProviderConfig,
    walletType: WalletType = WalletType.Ethereum,
    walletSelection: WalletSelectionBehavior? = null,
    sessionLifetimeSeconds: Long? = null,
    authorizeParams: Map<String, String> = emptyMap(),
    loginHint: String? = null,
): StartOidcRedirectAuthResult
```

### `WalletClient.handleOidcRedirectCallback`

```kotlin theme={null}
suspend fun handleOidcRedirectCallback(
    callbackUrl: String?,
    walletSelection: WalletSelectionBehavior? = null,
    sessionLifetimeSeconds: Long? = null,
): OidcRedirectAuthResult
```

### `WalletClient.completeEmailAuth`

```kotlin theme={null}
suspend fun completeEmailAuth(
    code: String,
    walletSelection: WalletSelectionBehavior = WalletSelectionBehavior.Automatic,
    walletType: WalletType = WalletType.Ethereum,
): CompleteAuthResult
```

### `WalletClient.useWallet`

Selects an existing wallet by its WaaS wallet id.

```kotlin theme={null}
suspend fun useWallet(walletId: String): WalletSelectionResult
```

### `WalletClient.createWallet`

Creates and selects a new wallet for the authenticated user.

```kotlin theme={null}
suspend fun createWallet(
    walletType: WalletType = WalletType.Ethereum,
    reference: String? = null,
): WalletSelectionResult
```

### `WalletClient.listWallets`

Lists all wallets available to the authenticated credential.

```kotlin theme={null}
suspend fun listWallets(): List<Wallet>
```

### `WalletClient.listAccess`

Returns all credentials that currently have access to the selected wallet.

```kotlin theme={null}
suspend fun listAccess(pageSize: UInt? = null): List<CredentialInfo>
```

### `WalletClient.listAccessPages`

Emits credential-access pages for the selected wallet until WaaS stops
returning a cursor.

```kotlin theme={null}
fun listAccessPages(pageSize: UInt? = null): Flow<ListAccessResponse>
```

### `WalletClient.listAccessPage`

Returns one credential-access page for the selected wallet.

```kotlin theme={null}
suspend fun listAccessPage(
    pageSize: UInt? = null,
    cursor: String? = null,
): ListAccessResponse
```

### `WalletClient.getIdToken`

Returns an ID token for the currently selected wallet.

```kotlin theme={null}
suspend fun getIdToken(
    ttlSeconds: UInt? = null,
    customClaims: Map<String, JsonElement>? = null,
): String
```

### `WalletClient.revokeAccess`

Revokes a credential's access to the selected wallet.

```kotlin theme={null}
suspend fun revokeAccess(targetCredentialId: String): Unit
```

## Transactions and signing

### `TransactionMode`

```kotlin theme={null}
enum class TransactionMode(
    val wireValue: String,
) {
    Native("native"),
    Relayer("relayer"),
    UNKNOWN_DEFAULT("UNKNOWN_DEFAULT"),
}
```

### `TransactionStatus`

```kotlin theme={null}
enum class TransactionStatus(
    val wireValue: String,
) {
    Quoted("quoted"),
    Pending("pending"),
    Executed("executed"),
    Failed("failed"),
    UNKNOWN_DEFAULT("UNKNOWN_DEFAULT"),
}
```

### `FeeToken`

```kotlin theme={null}
data class FeeToken(
    val network: String,
    val name: String,
    val symbol: String,
    val type: String,
    val decimals: UInt? = null,
    val logoUrl: String? = null,
    val contractAddress: String? = null,
    val tokenId: String? = null,
)
```

### `FeeOption`

```kotlin theme={null}
data class FeeOption(
    val token: FeeToken,
    val value: String,
    val displayValue: String,
)
```

### `FeeOptionSelection`

```kotlin theme={null}
data class FeeOptionSelection(
    val token: String,
) {
    constructor(feeOption: FeeOption)
}
```

### `AbiArg`

```kotlin theme={null}
data class AbiArg(
    val type: String,
    val value: JsonElement,
)
```

### `TransactionStatusResponse`

```kotlin theme={null}
data class TransactionStatusResponse(
    val status: TransactionStatus,
    val txnHash: String? = null,
)
```

### `FeeOptionSelector`

```kotlin theme={null}
fun interface FeeOptionSelector {
    suspend fun select(feeOptions: List<FeeOptionWithBalance>): FeeOptionSelection?

    companion object {
        /**
         * Selects the first fee option whose available raw balance covers the
         * quoted fee value. Returns null when no option has sufficient balance.
         */
        val firstAvailable: FeeOptionSelector
    }
}
```

### `FeeOptionWithBalance`

```kotlin theme={null}
data class FeeOptionWithBalance(
    val feeOption: FeeOption,
    val balance: TokenBalance?,
    val available: String?,
    val availableRaw: String?,
    val decimals: Int?,
) {
    val selection: FeeOptionSelection
}
```

### `SendTransactionRequest`

```kotlin theme={null}
data class SendTransactionRequest(
    val to: String,
    /**
     * Raw base-unit transaction value. Use
     * `technology.polygon.omswallet.utils.parseUnits` to convert decimal display
     * values before sending.
     */
    val value: BigInteger,
    val data: String? = null,
    val mode: TransactionMode = TransactionMode.Relayer,
)
```

### `SendTransactionResponse`

```kotlin theme={null}
data class SendTransactionResponse(
    val txnId: String,
    val status: TransactionStatus,
    val txnHash: String?,
    val statusResolution: TransactionStatusResolution,
)
```

### `TransactionStatusResolution`

```kotlin theme={null}
enum class TransactionStatusResolution {
    NotRequested,
    Resolved,
    TimedOut,
}
```

### `TransactionStatusPollingOptions`

```kotlin theme={null}
data class TransactionStatusPollingOptions(
    val fastPollIntervalMillis: Long = 400L,
    val fastPollCount: Int = 5,
    val pollIntervalMillis: Long = 2_000L,
    val timeoutMillis: Long = 60_000L,
)
```

### `WalletClient.signMessage`

Signs `message` with the currently selected wallet on `network`.

```kotlin theme={null}
suspend fun signMessage(
    network: Network,
    message: String,
): String
```

### `WalletClient.signTypedData`

Signs EIP-712 `typedData` with the currently selected wallet on `network`.

```kotlin theme={null}
suspend fun signTypedData(
    network: Network,
    typedData: JsonElement,
): String
```

### `WalletClient.isValidMessageSignature`

Validates `signature` for `message` through the WaaS public wallet RPC.

```kotlin theme={null}
suspend fun isValidMessageSignature(
    network: Network,
    message: String,
    signature: String,
): Boolean
```

### `WalletClient.isValidTypedDataSignature`

Validates `signature` for EIP-712 `typedData` through the WaaS public wallet RPC.

```kotlin theme={null}
suspend fun isValidTypedDataSignature(
    network: Network,
    typedData: JsonElement,
    signature: String,
): Boolean
```

### `WalletClient.sendTransaction`

Sends a transaction from the currently selected wallet on `network`.

```kotlin theme={null}
suspend fun sendTransaction(
    network: Network,
    to: String,
    value: BigInteger,
    waitForStatus: Boolean = true,
    statusPolling: TransactionStatusPollingOptions? = null,
    selectFeeOption: FeeOptionSelector? = null,
): ClientSendTransactionResponse

suspend fun sendTransaction(
    network: Network,
    request: ClientSendTransactionRequest,
    waitForStatus: Boolean = true,
    statusPolling: TransactionStatusPollingOptions? = null,
    selectFeeOption: FeeOptionSelector? = null,
): ClientSendTransactionResponse
```

### `WalletClient.callContract`

Calls a state-changing smart contract function through the WaaS
prepare/execute flow.

```kotlin theme={null}
suspend fun callContract(
    network: Network,
    contract: String,
    method: String,
    args: List<AbiArg>? = null,
    mode: TransactionMode = TransactionMode.Relayer,
    waitForStatus: Boolean = true,
    statusPolling: TransactionStatusPollingOptions? = null,
    selectFeeOption: FeeOptionSelector? = null,
): ClientSendTransactionResponse
```

### `WalletClient.getTransactionStatus`

Returns the current WaaS execution status for a prepared or submitted
transaction.

```kotlin theme={null}
suspend fun getTransactionStatus(txnId: String): TransactionStatusResponse
```

## Indexer

### `IndexerClient`

```kotlin theme={null}
class IndexerClient
```

### `IndexerClient.getBalances`

Gets token and native balances for `walletAddress`.

```kotlin theme={null}
suspend fun getBalances(
    walletAddress: String,
    networks: List<Network> = emptyList(),
    networkType: IndexerNetworkType = IndexerNetworkType.MAINNETS,
    contractAddresses: List<String> = emptyList(),
    includeMetadata: Boolean = true,
    omitPrices: Boolean? = null,
    tokenIds: List<String> = emptyList(),
    contractStatus: ContractVerificationStatus? = null,
    page: TokenBalancesPageRequest = TokenBalancesPageRequest(),
): TokenBalancesResult
```

### `IndexerClient.getTransactionHistory`

Gets transaction history for `walletAddress`.

```kotlin theme={null}
suspend fun getTransactionHistory(
    walletAddress: String,
    networks: List<Network> = emptyList(),
    networkType: IndexerNetworkType = IndexerNetworkType.MAINNETS,
    contractAddresses: List<String> = emptyList(),
    transactionHashes: List<String> = emptyList(),
    metaTransactionIds: List<String> = emptyList(),
    fromBlock: Long? = null,
    toBlock: Long? = null,
    tokenId: String? = null,
    includeMetadata: Boolean = true,
    omitPrices: Boolean? = null,
    metadataOptions: MetadataOptions? = null,
    page: TokenBalancesPageRequest = TokenBalancesPageRequest(),
): TransactionHistoryResult
```

### `TokenBalancesPageRequest`

```kotlin theme={null}
data class TokenBalancesPageRequest(
    val page: Int = 0,
    val pageSize: Int = 40,
)
```

### `IndexerNetworkType`

```kotlin theme={null}
enum class IndexerNetworkType(
    val wireValue: String,
) {
    MAINNETS("MAINNETS"),
    TESTNETS("TESTNETS"),
    ALL("ALL"),
}
```

### `ContractVerificationStatus`

```kotlin theme={null}
enum class ContractVerificationStatus(
    val wireValue: String,
) {
    VERIFIED("VERIFIED"),
    UNVERIFIED("UNVERIFIED"),
    ALL("ALL"),
}
```

### `TokenBalancesPage`

```kotlin theme={null}
data class TokenBalancesPage(
    val page: Int,
    val pageSize: Int,
    val more: Boolean,
)
```

### `MetadataOptions`

```kotlin theme={null}
data class MetadataOptions(
    val verifiedOnly: Boolean? = null,
    val unverifiedOnly: Boolean? = null,
    val includeContracts: List<String> = emptyList(),
)
```

### `TokenContractInfo`

```kotlin theme={null}
data class TokenContractInfo(
    val chainId: Long,
    val address: String,
    val source: String,
    val name: String,
    val type: String,
    val symbol: String,
    val decimals: Int? = null,
    val logoURI: String? = null,
    val deployed: Boolean,
    val bytecodeHash: String,
    val extensions: Map<String, JsonElement>,
    val updatedAt: String,
    val queuedAt: String? = null,
    val status: String,
)
```

### `TokenMetadataAsset`

```kotlin theme={null}
data class TokenMetadataAsset(
    val id: Long? = null,
    val collectionId: Long? = null,
    val tokenId: String? = null,
    val url: String? = null,
    val metadataField: String? = null,
    val name: String? = null,
    val filesize: Long? = null,
    val mimeType: String? = null,
    val width: Int? = null,
    val height: Int? = null,
    val updatedAt: String? = null,
)
```

### `TokenMetadata`

```kotlin theme={null}
data class TokenMetadata(
    val chainId: Long? = null,
    val contractAddress: String? = null,
    val tokenId: String,
    val source: String,
    val name: String,
    val description: String? = null,
    val image: String? = null,
    val video: String? = null,
    val audio: String? = null,
    val properties: Map<String, JsonElement>? = null,
    val attributes: List<Map<String, JsonElement>>,
    val imageData: String? = null,
    val externalUrl: String? = null,
    val backgroundColor: String? = null,
    val animationUrl: String? = null,
    val decimals: Int? = null,
    val updatedAt: String? = null,
    val assets: List<TokenMetadataAsset>? = null,
    val status: String,
    val queuedAt: String? = null,
    val lastFetched: String? = null,
)
```

### `TokenBalance`

```kotlin theme={null}
sealed interface TokenBalance {
    val contractType: String

    val accountAddress: String

    val balance: String

    val chainId: Long

    val balanceUSD: String?

    val priceUSD: String?

    val priceUpdatedAt: String?
}
```

### `NativeTokenBalance`

```kotlin theme={null}
data class NativeTokenBalance(
    override val accountAddress: String,
    val name: String,
    val symbol: String,
    override val balance: String,
    override val chainId: Long,
    override val balanceUSD: String? = null,
    override val priceUSD: String? = null,
    override val priceUpdatedAt: String? = null,
) : TokenBalance {
    override val contractType: String
}
```

### `ContractTokenBalance`

```kotlin theme={null}
data class ContractTokenBalance(
    override val contractType: String,
    val contractAddress: String,
    override val accountAddress: String,
    val tokenId: String,
    override val balance: String,
    val blockHash: String,
    val blockNumber: Long,
    override val chainId: Long,
    override val balanceUSD: String? = null,
    override val priceUSD: String? = null,
    override val priceUpdatedAt: String? = null,
    val uniqueCollectibles: String? = null,
    val isSummary: Boolean? = null,
    val contractInfo: TokenContractInfo? = null,
    val tokenMetadata: TokenMetadata? = null,
) : TokenBalance
```

### `TokenBalancesResult`

```kotlin theme={null}
data class TokenBalancesResult(
    val status: Int,
    val page: TokenBalancesPage?,
    val balances: List<ContractTokenBalance>,
    val nativeBalances: List<NativeTokenBalance> = emptyList(),
)
```

### `TransactionTransfer`

```kotlin theme={null}
data class TransactionTransfer(
    val transferType: String,
    val contractAddress: String,
    val contractType: String,
    val from: String,
    val to: String,
    val tokenIds: List<String>? = null,
    val amounts: List<String>,
    val logIndex: Long,
    val amountsUSD: List<String>? = null,
    val pricesUSD: List<String>? = null,
    val contractInfo: TokenContractInfo? = null,
    val tokenMetadata: Map<String, TokenMetadata>? = null,
)
```

### `Transaction`

```kotlin theme={null}
data class Transaction(
    val txnHash: String,
    val blockNumber: Long,
    val blockHash: String,
    val chainId: Long,
    val metaTxnId: String? = null,
    val transfers: List<TransactionTransfer> = emptyList(),
    val timestamp: String,
)
```

### `TransactionHistoryResult`

```kotlin theme={null}
data class TransactionHistoryResult(
    val status: Int,
    val page: TokenBalancesPage?,
    val transactions: List<Transaction>,
)
```

## Networks, types, and errors

### `Network`

A network supported by the OMS Wallet SDK.

```kotlin theme={null}
class Network {
    val id: Int

    val name: String

    val nativeTokenSymbol: String

    val explorerUrl: String

    val displayName: String

    override fun equals(other: Any?): Boolean

    override fun hashCode(): Int

    override fun toString(): String

    companion object {
        val MAINNET: Network

        val SEPOLIA: Network

        val POLYGON: Network

        val AMOY: Network

        val ARBITRUM: Network

        val ARBITRUM_SEPOLIA: Network

        val OPTIMISM: Network

        val OPTIMISM_SEPOLIA: Network

        val BASE: Network

        val BASE_SEPOLIA: Network

        val BSC: Network

        val BSC_TESTNET: Network

        val ARBITRUM_NOVA: Network

        val AVALANCHE: Network

        val AVALANCHE_TESTNET: Network

        val KATANA: Network

        val entries: List<Network>
    }
}
```

### `OMSWalletNetworks`

Networks currently supported by this SDK build.

```kotlin theme={null}
object OMSWalletNetworks {
    /**
     * All networks currently supported by this SDK build.
     */
    val supportedNetworks: List<Network>

    /**
     * Returns a supported network by chain id.
     */
    fun findById(id: Int): Network?

    /**
     * Returns a supported network by registry name.
     */
    fun findByName(name: String): Network?
}
```

### `OMSWalletErrorCode`

Stable SDK-level error categories for app-facing error handling.

```kotlin theme={null}
enum class OMSWalletErrorCode(
    val id: String,
) {
    HttpError("OMS_HTTP_ERROR"),
    InvalidResponse("OMS_INVALID_RESPONSE"),
    RequestFailed("OMS_REQUEST_FAILED"),
    AuthCommitmentConsumed("OMS_AUTH_COMMITMENT_CONSUMED"),
    SessionMissing("OMS_SESSION_MISSING"),
    SessionExpired("OMS_SESSION_EXPIRED"),
    WalletSelectionStale("OMS_WALLET_SELECTION_STALE"),
    WalletSelectionUnavailable("OMS_WALLET_SELECTION_UNAVAILABLE"),
    WalletSelectionInFlight("OMS_WALLET_SELECTION_IN_FLIGHT"),
    TransactionExecutionUnconfirmed("OMS_TRANSACTION_EXECUTION_UNCONFIRMED"),
    TransactionStatusLookupFailed("OMS_TRANSACTION_STATUS_LOOKUP_FAILED"),
    ValidationError("OMS_VALIDATION_ERROR"),
    StorageError("OMS_STORAGE_ERROR"),
}
```

### `OMSWalletOperation`

Stable identifiers for SDK operations that can appear on `OMSWalletException`.

```kotlin theme={null}
enum class OMSWalletOperation(
    val id: String,
) {
    PendingWalletSelection("wallet.pendingWalletSelection"),
    PendingWalletSelectionCreateAndSelectWallet("wallet.pendingWalletSelection.createAndSelectWallet"),
    PendingWalletSelectionSelectWallet("wallet.pendingWalletSelection.selectWallet"),
    IndexerGetBalances("indexer.getBalances"),
    IndexerGetTransactionHistory("indexer.getTransactionHistory"),
    WalletCallContract("wallet.callContract"),
    WalletCompleteEmailAuth("wallet.completeEmailAuth"),
    WalletCreateWallet("wallet.createWallet"),
    WalletExecute("wallet.execute"),
    WalletGetIdToken("wallet.getIdToken"),
    WalletHandleOidcRedirectCallback("wallet.handleOidcRedirectCallback"),
    WalletGetTransactionStatus("wallet.getTransactionStatus"),
    WalletIsValidMessageSignature("wallet.isValidMessageSignature"),
    WalletIsValidTypedDataSignature("wallet.isValidTypedDataSignature"),
    WalletListAccess("wallet.listAccess"),
    WalletListAccessPage("wallet.listAccessPage"),
    WalletListAccessPages("wallet.listAccessPages"),
    WalletListWallets("wallet.listWallets"),
    WalletRevokeAccess("wallet.revokeAccess"),
    WalletSendTransaction("wallet.sendTransaction"),
    WalletSignInWithOidcIdToken("wallet.signInWithOidcIdToken"),
    WalletSignMessage("wallet.signMessage"),
    WalletSignOut("wallet.signOut"),
    WalletSignTypedData("wallet.signTypedData"),
    WalletStartEmailAuth("wallet.startEmailAuth"),
    WalletStartOidcRedirectAuth("wallet.startOidcRedirectAuth"),
    WalletTransactionStatus("wallet.transactionStatus"),
    WalletUseWallet("wallet.useWallet"),
}
```

### `OMSWalletUpstreamService`

Remote OMS service that produced diagnostic failure details.

```kotlin theme={null}
enum class OMSWalletUpstreamService {
    Waas,
    Indexer,
}
```

### `OMSWalletUpstreamError`

Normalized diagnostic detail from a remote OMS service response or transport failure.

```kotlin theme={null}
data class OMSWalletUpstreamError(
    val service: OMSWalletUpstreamService,
    val name: String? = null,
    val code: String? = null,
    val message: String? = null,
    val status: Int? = null,
)
```

### `OMSWalletException`

Base exception type thrown by public OMS Wallet SDK APIs.

```kotlin theme={null}
sealed class OMSWalletException(
    val code: OMSWalletErrorCode,
    val operation: OMSWalletOperation? = null,
    val status: Int? = null,
    val txnId: String? = null,
    val retryable: Boolean? = null,
    val upstreamError: OMSWalletUpstreamError? = null,
    message: String,
    cause: Throwable? = null,
) : RuntimeException
```

### `OMSWalletSessionException`

```kotlin theme={null}
class OMSWalletSessionException(
    code: OMSWalletErrorCode = OMSWalletErrorCode.SessionMissing,
    operation: OMSWalletOperation? = null,
    message: String = "No active wallet session",
    cause: Throwable? = null,
) : OMSWalletException
```

### `OMSWalletRequestException`

```kotlin theme={null}
class OMSWalletRequestException(
    code: OMSWalletErrorCode = OMSWalletErrorCode.RequestFailed,
    operation: OMSWalletOperation? = null,
    status: Int? = null,
    retryable: Boolean? = status == null || status >= 500,
    upstreamError: OMSWalletUpstreamError? = null,
    message: String = "OMS request failed",
    cause: Throwable? = null,
) : OMSWalletException
```

### `OMSWalletResponseException`

```kotlin theme={null}
class OMSWalletResponseException(
    operation: OMSWalletOperation? = null,
    status: Int? = null,
    upstreamError: OMSWalletUpstreamError? = null,
    message: String = "OMS response was invalid",
    cause: Throwable? = null,
) : OMSWalletException
```

### `OMSWalletTransactionException`

```kotlin theme={null}
class OMSWalletTransactionException(
    code: OMSWalletErrorCode = OMSWalletErrorCode.TransactionStatusLookupFailed,
    operation: OMSWalletOperation? = null,
    status: Int? = null,
    txnId: String? = null,
    retryable: Boolean? = true,
    upstreamError: OMSWalletUpstreamError? = null,
    message: String = "Transaction status lookup failed",
    cause: Throwable? = null,
) : OMSWalletException
```

### `OMSWalletSelectionException`

```kotlin theme={null}
class OMSWalletSelectionException(
    code: OMSWalletErrorCode,
    operation: OMSWalletOperation? = null,
    message: String,
    cause: Throwable? = null,
) : OMSWalletException
```

### `OMSWalletValidationException`

```kotlin theme={null}
class OMSWalletValidationException(
    operation: OMSWalletOperation? = null,
    message: String,
    cause: Throwable? = null,
) : OMSWalletException
```

### `OMSWalletStorageException`

```kotlin theme={null}
class OMSWalletStorageException(
    operation: OMSWalletOperation? = null,
    message: String,
    cause: Throwable? = null,
) : OMSWalletException
```

### `formatUnits`

Divides `value` by 10^`decimals` and formats it as a decimal string.

```kotlin theme={null}
fun formatUnits(
    value: BigInteger,
    decimals: Int,
): String
```

### `parseUnits`

Multiplies the decimal string `value` by 10^`decimals`.

```kotlin theme={null}
fun parseUnits(
    value: String,
    decimals: Int,
): BigInteger
```
