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

# TypeScript API reference

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

## OMSWallet

### `OMSWallet`

```typescript theme={null}
export declare class OMSWallet {
    readonly wallet: OMSWalletClient;
    readonly indexer: OMSWalletIndexerClient;
    constructor(params: OMSWalletParams);
}
```

### `OMSWalletParams`

```typescript theme={null}
export interface OMSWalletParams {
    publishableKey: string;
    storage?: StorageManager;
    redirectAuthStorage?: StorageManager;
    credentialSigner?: CredentialSigner;
}
```

## Authentication and sessions

### `OMSWalletClient.walletAddress`

```typescript theme={null}
readonly walletAddress: Address | undefined;
```

### `OMSWalletClient.session`

```typescript theme={null}
readonly session: OMSWalletSessionState;
```

### `OMSWalletClient.onSessionExpired`

```typescript theme={null}
onSessionExpired(listener: OMSWalletSessionExpiredListener): () => void;
```

### `OMSWalletClient.startEmailAuth`

```typescript theme={null}
startEmailAuth(params: StartEmailAuthParams): Promise<void>;
```

### `OMSWalletClient.completeEmailAuth`

```typescript theme={null}
completeEmailAuth(params: Omit<CompleteEmailAuthParams, "walletSelection"> & {
    walletSelection: "manual";
}): Promise<PendingWalletSelection>;
completeEmailAuth(params: Omit<CompleteEmailAuthParams, "walletSelection"> & {
    walletSelection?: "automatic";
}): Promise<CompleteEmailAuthResult>;
completeEmailAuth(params: CompleteEmailAuthParams): Promise<CompleteEmailAuthResult | PendingWalletSelection>;
```

### `OMSWalletClient.signInWithOidcIdToken`

```typescript theme={null}
signInWithOidcIdToken(params: Omit<SignInWithOidcIdTokenParams, "walletSelection"> & {
    walletSelection: "manual";
}): Promise<PendingWalletSelection>;
signInWithOidcIdToken(params: Omit<SignInWithOidcIdTokenParams, "walletSelection"> & {
    walletSelection?: "automatic";
}): Promise<CompleteOidcIdTokenAuthResult>;
signInWithOidcIdToken(params: SignInWithOidcIdTokenParams): Promise<CompleteOidcIdTokenAuthResult | PendingWalletSelection>;
```

### `OMSWalletClient.startOidcRedirectAuth`

```typescript theme={null}
startOidcRedirectAuth(params: StartOidcRedirectAuthParams): Promise<StartOidcRedirectAuthResult>;
```

### `OMSWalletClient.completeOidcRedirectAuth`

```typescript theme={null}
completeOidcRedirectAuth(): Promise<CompleteOidcRedirectAuthResult | PendingWalletSelection | void>;
completeOidcRedirectAuth(params: Omit<CompleteOidcRedirectAuthParams, "walletSelection"> & {
    walletSelection: "manual";
}): Promise<PendingWalletSelection | void>;
completeOidcRedirectAuth(params: Omit<CompleteOidcRedirectAuthParams, "walletSelection"> & {
    walletSelection?: "automatic";
}): Promise<CompleteOidcRedirectAuthResult | void>;
completeOidcRedirectAuth(params: CompleteOidcRedirectAuthParams): Promise<CompleteOidcRedirectAuthResult | PendingWalletSelection | void>;
```

### `OMSWalletClient.signInWithOidcRedirect`

```typescript theme={null}
signInWithOidcRedirect(params: SignInWithOidcRedirectParams): Promise<void>;
```

### `OMSWalletClient.signOut`

```typescript theme={null}
signOut(): Promise<void>;
```

### `OMSWalletClient.listWallets`

```typescript theme={null}
listWallets(): Promise<Array<WalletAccount>>;
```

### `OMSWalletClient.useWallet`

```typescript theme={null}
useWallet(params: {
    walletId: string;
}): Promise<WalletActivationResult>;
```

### `OMSWalletClient.createWallet`

```typescript theme={null}
createWallet(params?: {
    type?: WalletType;
    reference?: string;
}): Promise<WalletActivationResult>;
```

### `OMSWalletClient.getIdToken`

```typescript theme={null}
getIdToken(params?: GetIdTokenParams): Promise<string>;
```

### `OMSWalletClient.listAccess`

```typescript theme={null}
listAccess(params?: ListAccessParams): Promise<AccessGrant[]>;
```

### `OMSWalletClient.listAccessPages`

```typescript theme={null}
listAccessPages(params?: ListAccessParams): AsyncIterable<AccessGrantPage>;
```

### `OMSWalletClient.revokeAccess`

```typescript theme={null}
revokeAccess(params: {
    targetCredentialId: string;
}): Promise<void>;
```

### `StartEmailAuthParams`

```typescript theme={null}
export interface StartEmailAuthParams {
    email: string;
    sessionLifetimeSeconds?: number;
}
```

### `CompleteEmailAuthParams`

```typescript theme={null}
export interface CompleteEmailAuthParams {
    code: string;
    walletType?: WalletType;
    walletSelection?: WalletSelectionBehavior;
}
```

### `CompleteEmailAuthResult`

```typescript theme={null}
export interface CompleteEmailAuthResult {
    readonly walletAddress: Address;
    readonly wallet: WalletAccount;
    readonly wallets: ReadonlyArray<WalletAccount>;
    readonly credential: Readonly<WalletCredential>;
}
```

### `SignInWithOidcIdTokenParams`

```typescript theme={null}
export interface SignInWithOidcIdTokenParams {
    idToken: string;
    issuer: string;
    audience: string;
    walletType?: WalletType;
    walletSelection?: WalletSelectionBehavior;
    sessionLifetimeSeconds?: number;
    provider?: string;
    providerLabel?: string;
}
```

### `CompleteOidcIdTokenAuthResult`

```typescript theme={null}
export interface CompleteOidcIdTokenAuthResult {
    readonly walletAddress: Address;
    readonly wallet: WalletAccount;
    readonly wallets: ReadonlyArray<WalletAccount>;
    readonly credential: Readonly<WalletCredential>;
}
```

### `StartOidcRedirectAuthParams`

```typescript theme={null}
export type StartOidcRedirectAuthParams = {
    walletType?: WalletType;
    walletSelection?: WalletSelectionBehavior;
    sessionLifetimeSeconds?: number;
    loginHint?: string;
} & ({
    provider: OmsRelayOidcProvider;
    omsRelayReturnUri?: string;
    authorizeParams?: never;
} | {
    provider: CustomOidcProviderConfig;
    omsRelayReturnUri?: never;
    authorizeParams?: Record<string, string>;
});
```

### `StartOidcRedirectAuthResult`

```typescript theme={null}
export interface StartOidcRedirectAuthResult {
    authorizationUrl: string;
}
```

### `CompleteOidcRedirectAuthParams`

```typescript theme={null}
export interface CompleteOidcRedirectAuthParams {
    callbackUrl?: string;
    cleanUrl?: boolean;
    replaceUrl?: (url: string) => void;
    walletSelection?: WalletSelectionBehavior;
    sessionLifetimeSeconds?: number;
}
```

### `CompleteOidcRedirectAuthResult`

```typescript theme={null}
export interface CompleteOidcRedirectAuthResult {
    readonly walletAddress: Address;
    readonly wallet: WalletAccount;
    readonly wallets: ReadonlyArray<WalletAccount>;
    readonly credential: Readonly<WalletCredential>;
}
```

### `SignInWithOidcRedirectParams`

```typescript theme={null}
export type SignInWithOidcRedirectParams = {
    walletType?: WalletType;
    walletSelection?: WalletSelectionBehavior;
    sessionLifetimeSeconds?: number;
    loginHint?: string;
} & {
    currentUrl?: string;
    assignUrl?: (url: string) => void;
} & ({
    provider: OmsRelayOidcProvider;
    omsRelayReturnUri?: string;
    authorizeParams?: never;
} | {
    provider: CustomOidcProviderConfig;
    omsRelayReturnUri?: never;
    authorizeParams?: Record<string, string>;
});
```

### `OmsRelayOidcProviders`

Fixed OMS relay providers. Their OAuth configuration is not caller-editable.

```typescript theme={null}
export declare const OmsRelayOidcProviders: Readonly<{
    google: OmsRelayOidcProvider<"google">;
    apple: OmsRelayOidcProvider<"apple">;
}>;
```

### `OmsRelayOidcProvider`

An opaque SDK-owned OMS relay provider value.
Obtain values from OmsRelayOidcProviders; object literals are invalid.

```typescript theme={null}
export interface OmsRelayOidcProvider<Provider extends "google" | "apple" = "google" | "apple"> {
    readonly provider: Provider;
}
```

### `CustomOidcProviderConfig`

A caller-owned OIDC provider configuration.

```typescript theme={null}
export interface CustomOidcProviderConfig {
    readonly clientId: string;
    readonly issuer: string;
    readonly authorizationUrl: string;
    readonly providerRedirectUri: string;
    readonly provider?: string;
    readonly providerLabel?: string;
    readonly scopes?: readonly string[];
    readonly authorizeParams?: Readonly<Record<string, string>>;
    readonly authMode?: OidcAuthMode;
}
```

### `AuthMode`

```typescript theme={null}
export declare const AuthMode: Readonly<{
    readonly OTP: "otp";
    readonly IDToken: "id-token";
    readonly AuthCode: "auth-code";
    readonly AuthCodePKCE: "auth-code-pkce";
}>;
export type AuthMode = (typeof AuthMode)[keyof typeof AuthMode];
```

### `OidcAuthMode`

```typescript theme={null}
export type OidcAuthMode = typeof AuthMode.AuthCode | typeof AuthMode.AuthCodePKCE;
```

### `WalletType`

```typescript theme={null}
export declare const WalletType: Readonly<{
    readonly Ethereum: "ethereum";
}>;
export type WalletType = (typeof WalletType)[keyof typeof WalletType];
```

### `WalletSelectionBehavior`

```typescript theme={null}
export type WalletSelectionBehavior = "automatic" | "manual";
```

### `WalletAccount`

```typescript theme={null}
export interface WalletAccount {
    readonly id: string;
    readonly type: WalletType;
    readonly address: Address;
    readonly reference?: string;
}
```

### `WalletActivationResult`

```typescript theme={null}
export interface WalletActivationResult {
    readonly walletAddress: Address;
    readonly wallet: WalletAccount;
}
```

### `PendingWalletSelection`

```typescript theme={null}
export interface PendingWalletSelection {
    readonly walletType: WalletType;
    readonly wallets: ReadonlyArray<WalletAccount>;
    readonly credential: Readonly<WalletCredential>;
    selectWallet(params: {
        walletId: string;
    }): Promise<WalletActivationResult>;
    createAndSelectWallet(params?: {
        reference?: string;
    }): Promise<WalletActivationResult>;
}
```

### `OMSWalletEmailSessionAuth`

```typescript theme={null}
export interface OMSWalletEmailSessionAuth {
    readonly type: "email";
    readonly email: string;
}
```

### `OMSWalletOidcSessionAuthFlow`

```typescript theme={null}
export type OMSWalletOidcSessionAuthFlow = "redirect" | "id-token";
```

### `OMSWalletOidcSessionAuth`

```typescript theme={null}
export interface OMSWalletOidcSessionAuth {
    readonly type: "oidc";
    readonly flow: OMSWalletOidcSessionAuthFlow;
    readonly issuer: string;
    readonly provider: string | undefined;
    readonly providerLabel: string | undefined;
    readonly email: string | undefined;
}
```

### `OMSWalletSessionAuth`

```typescript theme={null}
export type OMSWalletSessionAuth = OMSWalletEmailSessionAuth | OMSWalletOidcSessionAuth;
```

### `OMSWalletSessionState`

```typescript theme={null}
export interface OMSWalletSessionState {
    readonly walletAddress: Address | undefined;
    readonly expiresAt: string | undefined;
    readonly auth: OMSWalletSessionAuth | undefined;
}
```

### `OMSWalletSessionExpiredEvent`

```typescript theme={null}
export interface OMSWalletSessionExpiredEvent {
    readonly session: OMSWalletSessionState;
    readonly expiredAt: string;
}
```

### `OMSWalletSessionExpiredListener`

```typescript theme={null}
export type OMSWalletSessionExpiredListener = (event: OMSWalletSessionExpiredEvent) => void | Promise<void>;
```

### `GetIdTokenParams`

```typescript theme={null}
export interface GetIdTokenParams {
    ttlSeconds?: number;
    customClaims?: Record<string, unknown>;
}
```

### `WalletCredential`

```typescript theme={null}
export interface WalletCredential {
    credentialId: string;
    expiresAt: string;
    isCaller: boolean;
}
```

### `AccessGrant`

```typescript theme={null}
export type AccessGrant = WalletCredential;
```

### `ListAccessParams`

```typescript theme={null}
export interface ListAccessParams {
    pageSize?: number;
}
```

### `AccessGrantPage`

```typescript theme={null}
export interface AccessGrantPage {
    grants: AccessGrant[];
}
```

### `StorageManager`

```typescript theme={null}
export interface StorageManager {
    get(key: string): string | null;
    set(key: string, value: string): void;
    delete(key: string): void;
}
```

### `LocalStorageManager`

Browser implementation backed by localStorage.
For Node.js or custom runtimes, supply your own StorageManager to OMSWallet.

```typescript theme={null}
export declare class LocalStorageManager implements StorageManager {
    static isAvailable(): boolean;
    get(key: string): string | null;
    set(key: string, value: string): void;
    delete(key: string): void;
}
```

### `SessionStorageManager`

```typescript theme={null}
export declare class SessionStorageManager implements StorageManager {
    static isAvailable(): boolean;
    get(key: string): string | null;
    set(key: string, value: string): void;
    delete(key: string): void;
}
```

### `MemoryStorageManager`

```typescript theme={null}
export declare class MemoryStorageManager implements StorageManager {
    get(key: string): string | null;
    set(key: string, value: string): void;
    delete(key: string): void;
}
```

### `createDefaultStorage`

```typescript theme={null}
export declare function createDefaultStorage(): StorageManager;
```

### `CredentialSigningAlgorithm`

```typescript theme={null}
export type CredentialSigningAlgorithm = "ecdsa-p256-sha256" | "ecdsa-p256k-eip191";
```

### `CredentialSigner`

```typescript theme={null}
export interface CredentialSigner {
    readonly signingAlgorithm: CredentialSigningAlgorithm;
    credentialId(): Promise<string>;
    nextNonce(): Promise<string>;
    sign(preimage: string): Promise<string>;
    hasCredential?(): Promise<boolean>;
    clear?(): Promise<void>;
}
```

### `WebCryptoP256CredentialSigner`

```typescript theme={null}
export declare class WebCryptoP256CredentialSigner implements CredentialSigner {
    readonly signingAlgorithm: "ecdsa-p256-sha256";
    constructor(id?: string);
    credentialId(): Promise<string>;
    nextNonce(): Promise<string>;
    sign(preimage: string): Promise<string>;
    hasCredential(): Promise<boolean>;
    clear(): Promise<void>;
}
```

### `EthereumPrivateKeyCredentialSigner`

```typescript theme={null}
export declare class EthereumPrivateKeyCredentialSigner implements CredentialSigner {
    readonly signingAlgorithm: "ecdsa-p256k-eip191";
    constructor(privateKey: Uint8Array);
    credentialId(): Promise<string>;
    nextNonce(): Promise<string>;
    sign(preimage: string): Promise<string>;
}
```

## Transactions and signing

### `OMSWalletClient.signMessage`

```typescript theme={null}
signMessage(params: SignMessageParams): Promise<string>;
```

### `OMSWalletClient.signTypedData`

```typescript theme={null}
signTypedData(params: SignTypedDataParams): Promise<string>;
```

### `OMSWalletClient.isValidMessageSignature`

```typescript theme={null}
isValidMessageSignature(params: IsValidMessageSignatureParams): Promise<boolean>;
```

### `OMSWalletClient.isValidTypedDataSignature`

```typescript theme={null}
isValidTypedDataSignature(params: IsValidTypedDataSignatureParams): Promise<boolean>;
```

### `OMSWalletClient.sendTransaction`

```typescript theme={null}
sendTransaction(params: SendNativeTransactionParams): Promise<SendTransactionResponse>;
sendTransaction(params: SendDataTransactionParams): Promise<SendTransactionResponse>;
sendTransaction<const abi extends Abi | readonly unknown[], functionName extends ContractFunctionName<abi> | undefined = ContractFunctionName<abi>>(params: SendContractTransactionParams<abi, functionName>): Promise<SendTransactionResponse>;
sendTransaction(params: SendTransactionParams): Promise<SendTransactionResponse>;
```

### `OMSWalletClient.callContract`

```typescript theme={null}
callContract(params: {
    network: Network;
    contractAddress: Address;
    method: string;
    args?: Array<AbiArg>;
    mode?: TransactionMode;
    selectFeeOption?: FeeOptionSelector;
    waitForStatus?: boolean;
    statusPolling?: TransactionStatusPollingOptions;
}): Promise<SendTransactionResponse>;
```

### `OMSWalletClient.getTransactionStatus`

```typescript theme={null}
getTransactionStatus(params: {
    txnId: string;
}): Promise<TransactionStatusResponse>;
```

### `SignMessageParams`

```typescript theme={null}
export interface SignMessageParams {
    network: Network;
    message: string;
}
```

### `SignTypedDataParams`

```typescript theme={null}
export interface SignTypedDataParams {
    network: Network;
    typedData: unknown;
}
```

### `IsValidMessageSignatureParams`

```typescript theme={null}
export interface IsValidMessageSignatureParams {
    network?: Network;
    walletAddress?: Address;
    walletId?: string;
    message: string;
    signature: string;
}
```

### `IsValidTypedDataSignatureParams`

```typescript theme={null}
export interface IsValidTypedDataSignatureParams {
    network?: Network;
    walletAddress?: Address;
    walletId?: string;
    typedData: unknown;
    signature: string;
}
```

### `AbiArg`

```typescript theme={null}
export interface AbiArg {
    type: string;
    value: unknown;
}
```

### `SendTransactionBase`

```typescript theme={null}
export type SendTransactionBase = {
    network: Network;
    to: Address;
    value?: bigint;
    mode?: TransactionMode;
    selectFeeOption?: FeeOptionSelector;
    waitForStatus?: boolean;
    statusPolling?: TransactionStatusPollingOptions;
};
```

### `SendNativeTransactionParams`

```typescript theme={null}
export type SendNativeTransactionParams = SendTransactionBase & {
    value: bigint;
    data?: never;
    abi?: never;
};
```

### `SendDataTransactionParams`

```typescript theme={null}
export type SendDataTransactionParams = SendTransactionBase & {
    data: Hex;
    abi?: never;
};
```

### `SendContractTransactionParams`

```typescript theme={null}
export type SendContractTransactionParams<abi extends Abi | readonly unknown[] = Abi, functionName extends ContractFunctionName<abi> | undefined = ContractFunctionName<abi>> = SendTransactionBase & EncodeFunctionDataParameters<abi, functionName> & {
    data?: never;
};
```

### `SendTransactionParams`

```typescript theme={null}
export type SendTransactionParams = SendNativeTransactionParams | SendDataTransactionParams | SendContractTransactionParams;
```

### `SendTransactionResponse`

```typescript theme={null}
export type SendTransactionResponse = {
    txnId: string;
    status: TransactionStatus;
    txnHash?: string;
    statusResolution: "not-requested" | "resolved" | "timed-out";
};
```

### `TransactionMode`

```typescript theme={null}
export declare const TransactionMode: Readonly<{
    readonly Native: "native";
    readonly Relayer: "relayer";
}>;
export type TransactionMode = (typeof TransactionMode)[keyof typeof TransactionMode];
```

### `TransactionStatus`

```typescript theme={null}
export declare const TransactionStatus: Readonly<{
    readonly Quoted: "quoted";
    readonly Pending: "pending";
    readonly Executed: "executed";
    readonly Failed: "failed";
    readonly Unknown: "unknown";
}>;
export type TransactionStatus = (typeof TransactionStatus)[keyof typeof TransactionStatus];
```

### `TransactionStatusResponse`

```typescript theme={null}
export interface TransactionStatusResponse {
    status: TransactionStatus;
    txnHash?: string;
}
```

### `TransactionStatusPollingOptions`

```typescript theme={null}
export type TransactionStatusPollingOptions = {
    timeoutMs?: number;
    intervalMs?: number;
    fastIntervalMs?: number;
    fastPollCount?: number;
};
```

### `FeeOption`

```typescript theme={null}
export interface FeeOption {
    token: {
        network: string;
        name: string;
        symbol: string;
        type: string;
        decimals?: number;
        logoURL?: string;
        contractAddress?: string;
        tokenID?: string;
    };
    value: string;
    displayValue: string;
}
```

### `FeeOptionSelection`

```typescript theme={null}
export interface FeeOptionSelection {
    token: string;
}
```

### `FeeOptionWithBalance`

```typescript theme={null}
export type FeeOptionWithBalance = {
    feeOption: FeeOption;
    selection: FeeOptionSelection;
    balance?: TokenBalance;
    available?: string;
    availableRaw?: string;
    decimals?: number;
};
```

### `FeeOptionSelector`

```typescript theme={null}
export interface FeeOptionSelector {
    (feeOptions: FeeOptionWithBalance[]): FeeOptionSelection | undefined | Promise<FeeOptionSelection | undefined>;
}
export declare namespace FeeOptionSelector {
    const firstAvailable: FeeOptionSelector;
}
```

## Indexer

### `OMSWalletIndexerClient`

```typescript theme={null}
export interface OMSWalletIndexerClient {
    getBalances(params: GetBalancesParams): Promise<BalancesResult>;
    getTransactionHistory(params: GetTransactionHistoryParams): Promise<TransactionHistoryResult>;
}
```

### `GetBalancesParams`

```typescript theme={null}
export interface GetBalancesParams {
    walletAddress: string;
    networks?: Network[];
    networkType?: IndexerNetworkType;
    contractAddresses?: string[];
    includeMetadata?: boolean;
    omitPrices?: boolean;
    tokenIds?: string[];
    contractStatus?: ContractVerificationStatus;
    page?: TokenBalancesPageRequest;
}
```

### `BalancesResult`

```typescript theme={null}
export interface BalancesResult {
    status: number;
    page?: TokenBalancesPage;
    nativeBalances: NativeTokenBalance[];
    balances: ContractTokenBalance[];
}
```

### `GetTransactionHistoryParams`

```typescript theme={null}
export interface GetTransactionHistoryParams {
    walletAddress: string;
    networks?: Network[];
    networkType?: IndexerNetworkType;
    contractAddresses?: string[];
    transactionHashes?: string[];
    metaTransactionIds?: string[];
    fromBlock?: number;
    toBlock?: number;
    tokenId?: string;
    includeMetadata?: boolean;
    omitPrices?: boolean;
    metadataOptions?: MetadataOptions;
    page?: TokenBalancesPageRequest;
}
```

### `TransactionHistoryResult`

```typescript theme={null}
export interface TransactionHistoryResult {
    status: number;
    page?: TokenBalancesPage;
    transactions: Transaction[];
}
```

### `IndexerNetworkType`

```typescript theme={null}
export type IndexerNetworkType = "MAINNETS" | "TESTNETS" | "ALL";
```

### `ContractVerificationStatus`

```typescript theme={null}
export type ContractVerificationStatus = "VERIFIED" | "UNVERIFIED" | "ALL";
```

### `MetadataOptions`

```typescript theme={null}
export interface MetadataOptions {
    verifiedOnly?: boolean;
    unverifiedOnly?: boolean;
    includeContracts?: string[];
}
```

### `SortBy`

```typescript theme={null}
export interface SortBy {
    column: string;
    order: "DESC" | "ASC";
}
```

### `TokenBalancesPageRequest`

```typescript theme={null}
export interface TokenBalancesPageRequest {
    page?: number;
    column?: string;
    before?: unknown;
    after?: unknown;
    sort?: SortBy[];
    pageSize?: number;
}
```

### `TokenBalancesPage`

```typescript theme={null}
export interface TokenBalancesPage {
    page: number;
    column?: string;
    before?: unknown;
    after?: unknown;
    sort?: SortBy[];
    pageSize: number;
    more: boolean;
}
```

### `TokenBalance`

```typescript theme={null}
export type TokenBalance = NativeTokenBalance | ContractTokenBalance;
```

### `NativeTokenBalance`

```typescript theme={null}
export interface NativeTokenBalance {
    accountAddress: string;
    balance: string;
    chainId: number;
    balanceUSD?: string;
    priceUSD?: string;
    priceUpdatedAt?: string;
    contractType: "NATIVE";
    name: string;
    symbol: string;
    contractAddress?: undefined;
    tokenId?: undefined;
}
```

### `ContractTokenBalance`

```typescript theme={null}
export interface ContractTokenBalance {
    contractType: string;
    accountAddress: string;
    balance: string;
    chainId: number;
    balanceUSD?: string;
    priceUSD?: string;
    priceUpdatedAt?: string;
    contractAddress: string;
    tokenId: string;
    blockHash: string;
    blockNumber: number;
    uniqueCollectibles?: string;
    isSummary?: boolean;
    contractInfo?: TokenContractInfo;
    tokenMetadata?: TokenMetadata;
}
```

### `TokenContractInfo`

```typescript theme={null}
export interface TokenContractInfo {
    chainId: number;
    address: string;
    source: string;
    name: string;
    type: string;
    symbol: string;
    decimals?: number;
    logoURI?: string;
    deployed: boolean;
    bytecodeHash: string;
    extensions: Record<string, unknown>;
    updatedAt: string;
    queuedAt?: string;
    status: string;
}
```

### `TokenMetadata`

```typescript theme={null}
export interface TokenMetadata {
    chainId?: number;
    contractAddress?: string;
    tokenId: string;
    source: string;
    name: string;
    description?: string;
    image?: string;
    video?: string;
    audio?: string;
    properties?: Record<string, unknown>;
    attributes: Record<string, unknown>[];
    imageData?: string;
    externalUrl?: string;
    backgroundColor?: string;
    animationUrl?: string;
    decimals?: number;
    updatedAt?: string;
    assets?: TokenMetadataAsset[];
    status: string;
    queuedAt?: string;
    lastFetched?: string;
}
```

### `TokenMetadataAsset`

```typescript theme={null}
export interface TokenMetadataAsset {
    id?: number;
    collectionId?: number;
    tokenId?: string;
    url?: string;
    metadataField?: string;
    name?: string;
    filesize?: number;
    mimeType?: string;
    width?: number;
    height?: number;
    updatedAt?: string;
}
```

### `Transaction`

```typescript theme={null}
export interface Transaction {
    txnHash: string;
    blockNumber: number;
    blockHash: string;
    chainId: number;
    metaTxnId?: string;
    transfers: TransactionTransfer[];
    timestamp: string;
}
```

### `TransactionTransfer`

```typescript theme={null}
export interface TransactionTransfer {
    transferType: string;
    contractAddress: string;
    contractType: string;
    from: string;
    to: string;
    tokenIds?: string[];
    amounts: string[];
    logIndex: number;
    amountsUSD?: string[];
    pricesUSD?: string[];
    contractInfo?: TokenContractInfo;
    tokenMetadata?: Record<string, TokenMetadata>;
}
```

## Networks, types, and errors

### `Network`

```typescript theme={null}
export interface Network {
    readonly id: number;
    readonly name: string;
    readonly nativeTokenSymbol: string;
    readonly explorerUrl: string;
    readonly displayName: string;
}
```

### `Networks`

```typescript theme={null}
export declare const Networks: Readonly<{
    mainnet: Readonly<{
        readonly id: 1;
        readonly name: "mainnet";
        readonly nativeTokenSymbol: "ETH";
        readonly explorerUrl: "https://etherscan.io";
        readonly displayName: "Ethereum";
    }> & Network;
    sepolia: Readonly<{
        readonly id: 11155111;
        readonly name: "sepolia";
        readonly nativeTokenSymbol: "ETH";
        readonly explorerUrl: "https://sepolia.etherscan.io";
        readonly displayName: "Sepolia";
    }> & Network;
    polygon: Readonly<{
        readonly id: 137;
        readonly name: "polygon";
        readonly nativeTokenSymbol: "POL";
        readonly explorerUrl: "https://polygonscan.com";
        readonly displayName: "Polygon";
    }> & Network;
    amoy: Readonly<{
        readonly id: 80002;
        readonly name: "amoy";
        readonly nativeTokenSymbol: "POL";
        readonly explorerUrl: "https://amoy.polygonscan.com";
        readonly displayName: "Polygon Amoy";
    }> & Network;
    arbitrum: Readonly<{
        readonly id: 42161;
        readonly name: "arbitrum";
        readonly nativeTokenSymbol: "ETH";
        readonly explorerUrl: "https://arbiscan.io";
        readonly displayName: "Arbitrum";
    }> & Network;
    arbitrumSepolia: Readonly<{
        readonly id: 421614;
        readonly name: "arbitrum-sepolia";
        readonly nativeTokenSymbol: "ETH";
        readonly explorerUrl: "https://sepolia.arbiscan.io";
        readonly displayName: "Arbitrum Sepolia";
    }> & Network;
    optimism: Readonly<{
        readonly id: 10;
        readonly name: "optimism";
        readonly nativeTokenSymbol: "ETH";
        readonly explorerUrl: "https://optimistic.etherscan.io";
        readonly displayName: "Optimism";
    }> & Network;
    optimismSepolia: Readonly<{
        readonly id: 11155420;
        readonly name: "optimism-sepolia";
        readonly nativeTokenSymbol: "ETH";
        readonly explorerUrl: "https://sepolia-optimism.etherscan.io";
        readonly displayName: "Optimism Sepolia";
    }> & Network;
    base: Readonly<{
        readonly id: 8453;
        readonly name: "base";
        readonly nativeTokenSymbol: "ETH";
        readonly explorerUrl: "https://basescan.org";
        readonly displayName: "Base";
    }> & Network;
    baseSepolia: Readonly<{
        readonly id: 84532;
        readonly name: "base-sepolia";
        readonly nativeTokenSymbol: "ETH";
        readonly explorerUrl: "https://sepolia.basescan.org";
        readonly displayName: "Base Sepolia";
    }> & Network;
    bsc: Readonly<{
        readonly id: 56;
        readonly name: "bsc";
        readonly nativeTokenSymbol: "BNB";
        readonly explorerUrl: "https://bscscan.com";
        readonly displayName: "BSC";
    }> & Network;
    bscTestnet: Readonly<{
        readonly id: 97;
        readonly name: "bsc-testnet";
        readonly nativeTokenSymbol: "BNB";
        readonly explorerUrl: "https://testnet.bscscan.com";
        readonly displayName: "BSC Testnet";
    }> & Network;
    arbitrumNova: Readonly<{
        readonly id: 42170;
        readonly name: "arbitrum-nova";
        readonly nativeTokenSymbol: "ETH";
        readonly explorerUrl: "https://nova.arbiscan.io";
        readonly displayName: "Arbitrum Nova";
    }> & Network;
    avalanche: Readonly<{
        readonly id: 43114;
        readonly name: "avalanche";
        readonly nativeTokenSymbol: "AVAX";
        readonly explorerUrl: "https://subnets.avax.network/c-chain";
        readonly displayName: "Avalanche";
    }> & Network;
    avalancheTestnet: Readonly<{
        readonly id: 43113;
        readonly name: "avalanche-testnet";
        readonly nativeTokenSymbol: "AVAX";
        readonly explorerUrl: "https://subnets-test.avax.network/c-chain";
        readonly displayName: "Avalanche Testnet";
    }> & Network;
    katana: Readonly<{
        readonly id: 747474;
        readonly name: "katana";
        readonly nativeTokenSymbol: "ETH";
        readonly explorerUrl: "https://katanascan.com";
        readonly displayName: "Katana";
    }> & Network;
}>;
```

### `findNetworkById`

```typescript theme={null}
export declare function findNetworkById(chainId: number): Network | undefined;
```

### `findNetworkByName`

```typescript theme={null}
export declare function findNetworkByName(name: string): Network | undefined;
```

### `OMSWalletErrorCode`

```typescript theme={null}
export type OMSWalletErrorCode = "OMS_HTTP_ERROR" | "OMS_INVALID_RESPONSE" | "OMS_REQUEST_FAILED" | "OMS_AUTH_COMMITMENT_CONSUMED" | "OMS_SESSION_MISSING" | "OMS_SESSION_EXPIRED" | "OMS_WALLET_SELECTION_STALE" | "OMS_WALLET_SELECTION_UNAVAILABLE" | "OMS_WALLET_SELECTION_IN_FLIGHT" | "OMS_TRANSACTION_EXECUTION_UNCONFIRMED" | "OMS_TRANSACTION_STATUS_LOOKUP_FAILED" | "OMS_VALIDATION_ERROR" | "OMS_STORAGE_ERROR";
```

### `OMSWalletUpstreamError`

```typescript theme={null}
export interface OMSWalletUpstreamError {
    service: "waas" | "indexer";
    name?: string;
    code?: number | string;
    message?: string;
    status?: number;
}
```

### `OMSWalletError`

```typescript theme={null}
export declare abstract class OMSWalletError extends Error {
    readonly code: OMSWalletErrorCode;
    readonly operation?: string;
    readonly status?: number;
    readonly txnId?: string;
    readonly retryable?: boolean;
    readonly upstreamError?: OMSWalletUpstreamError;
    protected constructor(params: {
        code: OMSWalletErrorCode;
        message: string;
        operation?: string;
        status?: number;
        txnId?: string;
        retryable?: boolean;
        upstreamError?: OMSWalletUpstreamError;
        cause?: unknown;
    });
}
```

### `OMSWalletRequestError`

```typescript theme={null}
export declare class OMSWalletRequestError extends OMSWalletError {
    constructor(params: Omit<{
        code: "OMS_HTTP_ERROR" | "OMS_REQUEST_FAILED" | "OMS_AUTH_COMMITMENT_CONSUMED";
        message: string;
        operation?: string;
        status?: number;
        txnId?: string;
        retryable?: boolean;
        upstreamError?: OMSWalletUpstreamError;
        cause?: unknown;
    }, "code"> & {
        code?: "OMS_HTTP_ERROR" | "OMS_REQUEST_FAILED" | "OMS_AUTH_COMMITMENT_CONSUMED";
    });
}
```

### `OMSWalletResponseError`

```typescript theme={null}
export declare class OMSWalletResponseError extends OMSWalletError {
    constructor(params: Omit<{
        code: "OMS_INVALID_RESPONSE";
        message: string;
        operation?: string;
        status?: number;
        txnId?: string;
        retryable?: boolean;
        upstreamError?: OMSWalletUpstreamError;
        cause?: unknown;
    }, "code"> & {
        code?: "OMS_INVALID_RESPONSE";
    });
}
```

### `OMSWalletSessionError`

```typescript theme={null}
export declare class OMSWalletSessionError extends OMSWalletError {
    constructor(params: Omit<{
        code: "OMS_SESSION_MISSING" | "OMS_SESSION_EXPIRED";
        message: string;
        operation?: string;
        status?: number;
        txnId?: string;
        retryable?: boolean;
        upstreamError?: OMSWalletUpstreamError;
        cause?: unknown;
    }, "code"> & {
        code?: "OMS_SESSION_MISSING" | "OMS_SESSION_EXPIRED";
    });
}
```

### `OMSWalletTransactionError`

```typescript theme={null}
export declare class OMSWalletTransactionError extends OMSWalletError {
    constructor(params: Omit<{
        code: "OMS_TRANSACTION_EXECUTION_UNCONFIRMED" | "OMS_TRANSACTION_STATUS_LOOKUP_FAILED";
        message: string;
        operation?: string;
        status?: number;
        txnId?: string;
        retryable?: boolean;
        upstreamError?: OMSWalletUpstreamError;
        cause?: unknown;
    }, "code"> & {
        code?: "OMS_TRANSACTION_EXECUTION_UNCONFIRMED" | "OMS_TRANSACTION_STATUS_LOOKUP_FAILED";
    });
}
```

### `OMSWalletSelectionError`

```typescript theme={null}
export declare class OMSWalletSelectionError extends OMSWalletError {
    constructor(params: {
        code: "OMS_WALLET_SELECTION_STALE" | "OMS_WALLET_SELECTION_UNAVAILABLE" | "OMS_WALLET_SELECTION_IN_FLIGHT";
        message: string;
        operation?: string;
        status?: number;
        txnId?: string;
        retryable?: boolean;
        upstreamError?: OMSWalletUpstreamError;
        cause?: unknown;
    });
}
```

### `OMSWalletValidationError`

```typescript theme={null}
export declare class OMSWalletValidationError extends OMSWalletError {
    constructor(params: Omit<{
        code: "OMS_VALIDATION_ERROR";
        message: string;
        operation?: string;
        status?: number;
        txnId?: string;
        retryable?: boolean;
        upstreamError?: OMSWalletUpstreamError;
        cause?: unknown;
    }, "code"> & {
        code?: "OMS_VALIDATION_ERROR";
    });
}
```

### `OMSWalletStorageError`

```typescript theme={null}
export declare class OMSWalletStorageError extends OMSWalletError {
    constructor(params: Omit<{
        code: "OMS_STORAGE_ERROR";
        message: string;
        operation?: string;
        status?: number;
        txnId?: string;
        retryable?: boolean;
        upstreamError?: OMSWalletUpstreamError;
        cause?: unknown;
    }, "code"> & {
        code?: "OMS_STORAGE_ERROR";
    });
}
```

### `isOMSWalletError`

```typescript theme={null}
export declare function isOMSWalletError(error: unknown): error is OMSWalletError;
```
