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

# Swift API reference

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

## OMSWallet

### `OMSWallet`

```swift theme={null}
public final class OMSWallet: Sendable {
    public let wallet: WalletClient
    public let indexer: IndexerClient
    public convenience init(publishableKey: String) throws
}
```

### `WalletClient`

```swift theme={null}
public final class WalletClient: @unchecked Sendable
```

## Authentication and sessions

### `WalletClient.walletAddress`

```swift theme={null}
public internal(set) var walletAddress: String? { get set }
```

### `WalletClient.walletId`

```swift theme={null}
public internal(set) var walletId: String { get set }
```

### `WalletClient.session`

```swift theme={null}
public var session: OMSWalletSessionState { get }
```

Snapshot of the current durable wallet-session state.

### `WalletClient.addSessionExpiredObserver(_:)`

```swift theme={null}
@discardableResult public func addSessionExpiredObserver(_ observer: @escaping @MainActor @Sendable (OMSWalletSessionExpiredEvent) -> Void) -> OMSWalletSessionExpiredObservation
```

### `WalletClient.startEmailAuth(email:sessionLifetimeSeconds:)`

```swift theme={null}
public func startEmailAuth(email: String, sessionLifetimeSeconds: UInt32 = 604_800) async throws
```

Initiates email-based OTP authentication by sending a one-time code to the given address.

### `WalletClient.completeEmailAuth(code:walletSelection:walletType:)`

```swift theme={null}
@discardableResult public func completeEmailAuth(code: String, walletSelection: WalletSelectionBehavior = .automatic, walletType: WalletType = WalletType.ethereum) async throws -> CompleteAuthResult
```

Completes the email OTP authentication flow.

### `WalletClient.signInWithOidcIdToken(idToken:issuer:audience:walletType:walletSelection:sessionLifetimeSeconds:provider:providerLabel:)`

```swift theme={null}
@discardableResult public func signInWithOidcIdToken(idToken: String, issuer: String, audience: String, walletType: WalletType = WalletType.ethereum, walletSelection: WalletSelectionBehavior = .automatic, sessionLifetimeSeconds: UInt32 = 604_800, provider: String? = nil, providerLabel: String? = nil) async throws -> CompleteAuthResult
```

Signs in with an OIDC ID token.

### `WalletClient.startOIDCRedirectAuth(provider:walletType:loginHint:authorizeParams:walletSelection:sessionLifetimeSeconds:)`

```swift theme={null}
public func startOIDCRedirectAuth(provider: CustomOIDCProviderConfiguration, walletType: WalletType = WalletType.ethereum, loginHint: String? = nil, authorizeParams: [String : String] = [:], walletSelection: WalletSelectionBehavior? = nil, sessionLifetimeSeconds: UInt32? = nil) async throws -> StartOIDCRedirectAuthResult
```

Starts OIDC authorization-code redirect authentication.

### `WalletClient.startOIDCRedirectAuth(provider:omsRelayReturnURI:walletType:loginHint:walletSelection:sessionLifetimeSeconds:)`

```swift theme={null}
public func startOIDCRedirectAuth(provider: OMSRelayOIDCProvider, omsRelayReturnURI: String, walletType: WalletType = WalletType.ethereum, loginHint: String? = nil, walletSelection: WalletSelectionBehavior? = nil, sessionLifetimeSeconds: UInt32? = nil) async throws -> StartOIDCRedirectAuthResult
```

Starts OIDC authorization-code redirect authentication through the built-in
OMS relay for the fixed Google and Apple provider values.

### `WalletClient.handleOIDCRedirectCallback(_:walletSelection:sessionLifetimeSeconds:)`

```swift theme={null}
public func handleOIDCRedirectCallback(_ callbackURL: String?, walletSelection: WalletSelectionBehavior? = nil, sessionLifetimeSeconds: UInt32? = nil) async throws -> OIDCRedirectAuthResult
```

Safely handles an incoming OIDC authorization-code redirect callback.

### `WalletClient.listWallets()`

```swift theme={null}
public func listWallets() async throws -> [Wallet]
```

Lists all wallets available to the authenticated credential.

### `WalletClient.useWallet(walletId:)`

```swift theme={null}
@discardableResult public func useWallet(walletId: String) async throws -> WalletSelectionResult
```

Activates an existing wallet by its WaaS wallet ID and persists its address and
signer metadata to the keychain.

### `WalletClient.createWallet(walletType:reference:)`

```swift theme={null}
@discardableResult public func createWallet(walletType: WalletType = WalletType.ethereum, reference: String? = nil) async throws -> WalletSelectionResult
```

Creates a new wallet of the specified type for the authenticated user and persists
its address and signer metadata to the keychain.

### `WalletClient.getIdToken(ttlSeconds:customClaims:)`

```swift theme={null}
public func getIdToken(ttlSeconds: UInt32? = nil, customClaims: [String : JSONValue]? = nil) async throws -> String
```

### `WalletClient.listAccess(pageSize:)`

```swift theme={null}
public func listAccess(pageSize: UInt32? = nil) async throws -> [CredentialInfo]
```

Returns a list of credentials that currently have access to this wallet.

### `WalletClient.listAccessPage(pageSize:cursor:)`

```swift theme={null}
public func listAccessPage(pageSize: UInt32? = nil, cursor: String? = nil) async throws -> ListAccessResponse
```

Returns one credential-access page for this wallet.

### `WalletClient.listAccessPages(pageSize:)`

```swift theme={null}
public func listAccessPages(pageSize: UInt32? = nil) -> ListAccessPages
```

Returns credential-access pages for this wallet until WaaS stops returning a cursor.

### `WalletClient.revokeAccess(targetCredentialId:)`

```swift theme={null}
public func revokeAccess(targetCredentialId: String) async throws
```

Revokes access for a specific credential, preventing it from interacting
with this wallet going forward.

### `WalletClient.signOut()`

```swift theme={null}
public func signOut() throws
```

Clears the wallet session from the device keychain.

### `WalletSelectionBehavior`

```swift theme={null}
public enum WalletSelectionBehavior: String, Codable, Equatable, Sendable {
    case automatic
    case manual
    public init?(rawValue: String)
}
```

### `CompleteAuthResult`

```swift theme={null}
public enum CompleteAuthResult: Sendable {
    case walletSelected(
        walletAddress: String,
        wallet: Wallet,
        wallets: [Wallet],
        credential: CredentialInfo
    )
    case walletSelection(PendingWalletSelection)
    public var credential: CredentialInfo { get }
    public var walletAddress: String? { get }
    public var wallet: Wallet? { get }
}
```

### `PendingWalletSelection`

```swift theme={null}
public final class PendingWalletSelection: @unchecked Sendable {
    public let walletType: WalletType
    public let wallets: [Wallet]
    public let credential: CredentialInfo
    @discardableResult public func selectWallet(walletId: String) async throws -> WalletSelectionResult
    @discardableResult public func createAndSelectWallet(reference: String? = nil) async throws -> WalletSelectionResult
}
```

### `WalletSelectionResult`

```swift theme={null}
public struct WalletSelectionResult: Sendable {
    public let walletAddress: String
    public let wallet: Wallet
    public init(walletAddress: String, wallet: Wallet)
}
```

### `Wallet`

```swift theme={null}
public struct Wallet: Codable, Equatable, Sendable {
    public let id: String
    public let type: WalletType
    public let address: String
    public let reference: String?
    public init(id: String, type: WalletType, address: String, reference: String? = nil)
    public init(from decoder: any Decoder) throws
}
```

### `WalletType`

```swift theme={null}
public enum WalletType: Codable, Equatable, Hashable, Sendable {
    case ethereum
    case unknown(String)
    public var wireValue: String { get }
    public init(wireValue: String)
    public init(from decoder: any Decoder) throws
    public func encode(to encoder: any Encoder) throws
}
```

### `CredentialInfo`

```swift theme={null}
public struct CredentialInfo: Codable, Equatable, Sendable {
    public let credentialId: String
    public let expiresAt: String
    public let isCaller: Bool
    public init(credentialId: String, expiresAt: String, isCaller: Bool)
    public init(from decoder: any Decoder) throws
}
```

### `CustomOIDCProviderConfiguration`

```swift theme={null}
public struct CustomOIDCProviderConfiguration: Sendable {
    public let issuer: String
    public let clientID: String
    public let authorizationURL: String
    public let provider: String?
    public let providerLabel: String?
    public let scopes: [String]
    public let providerRedirectURI: String
    public let authorizeParams: [String : String]
    public let authMode: OIDCAuthMode
    public init(issuer: String, clientID: String, authorizationURL: String, providerRedirectURI: String, provider: String? = nil, providerLabel: String? = nil, scopes: [String] = [], authorizeParams: [String : String] = [:], authMode: OIDCAuthMode = .authCodePKCE)
}
```

A caller-owned OIDC provider configuration for authorization-code redirect auth.

### `OIDCAuthMode`

```swift theme={null}
public enum OIDCAuthMode: String, Codable, Equatable, Sendable {
    case authCode = "auth-code"
    case authCodePKCE = "auth-code-pkce"
    public init?(rawValue: String)
}
```

OIDC redirect auth-code mode.

### `OMSRelayOIDCProvider`

```swift theme={null}
public struct OMSRelayOIDCProvider: Equatable, Hashable, Sendable
```

A fixed OIDC provider whose OAuth callback is owned by the OMS relay.

### `OMSRelayOIDCProviders`

```swift theme={null}
public enum OMSRelayOIDCProviders {
    public static let google: OMSRelayOIDCProvider
    public static let apple: OMSRelayOIDCProvider
}
```

SDK-owned OMS relay provider values.

### `StartOIDCRedirectAuthResult`

```swift theme={null}
public struct StartOIDCRedirectAuthResult: Sendable {
    public let authorizationURL: String
    public init(authorizationURL: String)
}
```

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

### `OIDCRedirectAuthResult`

```swift theme={null}
public enum OIDCRedirectAuthResult: Sendable {
    case completed(CompleteAuthResult)
    case notOIDCRedirectCallback
    case noPendingAuth
}
```

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

### `OMSWalletSessionState`

```swift theme={null}
public struct OMSWalletSessionState: Equatable, Sendable {
    /// Address of the selected wallet in a completed session, or `nil` when the SDK is signed out.
    public let walletAddress: String?
    /// Expiration time for the current completed wallet session, or `nil` when unavailable.
    public let expiresAt: Date?
    /// Auth metadata for the current completed wallet session.
    public let auth: OMSWalletSessionAuth?
    public init(walletAddress: String?, expiresAt: Date? = nil, auth: OMSWalletSessionAuth? = nil)
}
```

### `OMSWalletSessionAuth`

```swift theme={null}
public enum OMSWalletSessionAuth: Codable, Equatable, Sendable {
    case email(OMSWalletEmailSessionAuth)
    case oidc(OMSWalletOidcSessionAuth)
    public var email: String? { get }
    public init(from decoder: any Decoder) throws
    public func encode(to encoder: any Encoder) throws
}
```

### `OMSWalletEmailSessionAuth`

```swift theme={null}
public struct OMSWalletEmailSessionAuth: Codable, Equatable, Sendable {
    public let email: String
    public init(email: String)
    public init(from decoder: any Decoder) throws
    public func encode(to encoder: any Encoder) throws
}
```

### `OMSWalletOidcSessionAuth`

```swift theme={null}
public struct OMSWalletOidcSessionAuth: Codable, Equatable, Sendable {
    public let flow: OMSWalletOidcSessionAuthFlow
    public let issuer: String
    public let provider: String?
    public let providerLabel: String?
    public let email: String?
    public init(flow: OMSWalletOidcSessionAuthFlow, issuer: String, provider: String? = nil, providerLabel: String? = nil, email: String? = nil)
    public init(from decoder: any Decoder) throws
    public func encode(to encoder: any Encoder) throws
}
```

### `OMSWalletOidcSessionAuthFlow`

```swift theme={null}
public enum OMSWalletOidcSessionAuthFlow: String, Codable, Equatable, Sendable {
    case redirect
    case idToken = "id-token"
    public init?(rawValue: String)
}
```

### `OMSWalletSessionExpiredEvent`

```swift theme={null}
public struct OMSWalletSessionExpiredEvent: Equatable, Sendable {
    public let session: OMSWalletSessionState
    public let expiredAt: Date
    public init(session: OMSWalletSessionState, expiredAt: Date)
}
```

### `OMSWalletSessionExpiredObservation`

```swift theme={null}
public final class OMSWalletSessionExpiredObservation: @unchecked Sendable {
    public func cancel()
}
```

### `ListAccessResponse`

```swift theme={null}
public struct ListAccessResponse: Codable, Equatable, Sendable {
    public let credentials: [CredentialInfo]
    public let page: Page?
    public init(credentials: [CredentialInfo], page: Page? = nil)
    public init(from decoder: any Decoder) throws
}
```

### `ListAccessPages`

```swift theme={null}
public struct ListAccessPages: AsyncSequence {
    public typealias Element = ListAccessResponse
    public func makeAsyncIterator() -> ListAccessPages.AsyncIterator
    public struct AsyncIterator: AsyncIteratorProtocol {
        public mutating func next() async throws -> ListAccessResponse?
    }
}
```

## Transactions and signing

### `WalletClient.signMessage(network:message:)`

```swift theme={null}
public func signMessage(network: Network, message: String) async throws -> String
```

Signs an arbitrary message using the wallet's session key.

### `WalletClient.signTypedData(network:typedData:)`

```swift theme={null}
public func signTypedData(network: Network, typedData: JSONValue) async throws -> String
```

### `WalletClient.isValidMessageSignature(network:walletAddress:message:signature:)`

```swift theme={null}
public func isValidMessageSignature(network: Network, walletAddress: String, message: String, signature: String) async throws -> Bool
```

### `WalletClient.isValidTypedDataSignature(network:walletAddress:typedData:signature:)`

```swift theme={null}
public func isValidTypedDataSignature(network: Network, walletAddress: String, typedData: JSONValue, signature: String) async throws -> Bool
```

### `WalletClient.sendTransaction(network:to:value:selectFeeOption:mode:waitForStatus:statusPolling:)`

```swift theme={null}
public func sendTransaction(network: Network, to: String, value: String, selectFeeOption: FeeOptionSelector? = nil, mode: TransactionMode = .relayer, waitForStatus: Bool = true, statusPolling: TransactionStatusPollingOptions = TransactionStatusPollingOptions()) async throws -> SendTransactionResponse
```

### `WalletClient.sendTransaction(network:request:selectFeeOption:waitForStatus:statusPolling:)`

```swift theme={null}
public func sendTransaction(network: Network, request: SendTransactionRequest, selectFeeOption: FeeOptionSelector? = nil, waitForStatus: Bool = true, statusPolling: TransactionStatusPollingOptions = TransactionStatusPollingOptions()) async throws -> SendTransactionResponse
```

### `WalletClient.callContract(network:contract:method:args:selectFeeOption:mode:waitForStatus:statusPolling:)`

```swift theme={null}
public func callContract(network: Network, contract: String, method: String, args: [AbiArg]?, selectFeeOption: FeeOptionSelector? = nil, mode: TransactionMode = .relayer, waitForStatus: Bool = true, statusPolling: TransactionStatusPollingOptions = TransactionStatusPollingOptions()) async throws -> SendTransactionResponse
```

### `WalletClient.getTransactionStatus(txnId:)`

```swift theme={null}
public func getTransactionStatus(txnId: String) async throws -> TransactionStatusResponse
```

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

### `SendTransactionRequest`

```swift theme={null}
public struct SendTransactionRequest: Sendable {
    public let to: String
    public let value: String
    public let data: String?
    public let mode: TransactionMode
    public init(to: String, value: String, data: String? = nil, mode: TransactionMode = .relayer)
}
```

### `SendTransactionResponse`

```swift theme={null}
public struct SendTransactionResponse: Codable, Sendable, Equatable {
    public let txnId: String
    public let status: TransactionStatus
    public let txnHash: String?
    public let statusResolution: TransactionStatusResolution
    public init(txnId: String, status: TransactionStatus, txnHash: String? = nil, statusResolution: TransactionStatusResolution)
    public init(from decoder: any Decoder) throws
}
```

### `TransactionMode`

```swift theme={null}
public enum TransactionMode: Codable, Equatable, Hashable, Sendable {
    case native
    case relayer
    case unknown(String)
    public var wireValue: String { get }
    public init(wireValue: String)
    public init(from decoder: any Decoder) throws
    public func encode(to encoder: any Encoder) throws
}
```

### `TransactionStatusPollingOptions`

```swift theme={null}
public struct TransactionStatusPollingOptions: Sendable, Equatable {
    public let timeoutMs: UInt64?
    public let intervalMs: UInt64?
    public let fastIntervalMs: UInt64?
    public let fastPollCount: Int?
    public init(timeoutMs: UInt64? = nil, intervalMs: UInt64? = nil, fastIntervalMs: UInt64? = nil, fastPollCount: Int? = nil)
}
```

### `TransactionStatusResponse`

```swift theme={null}
public struct TransactionStatusResponse: Codable, Equatable, Sendable {
    public let status: TransactionStatus
    public let txnHash: String?
    public init(status: TransactionStatus, txnHash: String? = nil)
    public init(from decoder: any Decoder) throws
}
```

### `TransactionStatus`

```swift theme={null}
public enum TransactionStatus: Codable, Equatable, Hashable, Sendable {
    case quoted
    case pending
    case executed
    case failed
    case unknown(String)
    public var wireValue: String { get }
    public init(wireValue: String)
    public init(from decoder: any Decoder) throws
    public func encode(to encoder: any Encoder) throws
}
```

### `TransactionStatusResolution`

```swift theme={null}
public enum TransactionStatusResolution: String, Codable, Sendable, Equatable {
    case notRequested
    case resolved
    case timedOut
    public init?(rawValue: String)
}
```

### `FeeOptionSelector`

```swift theme={null}
public struct FeeOptionSelector: Sendable {
    public typealias Select = @Sendable ([FeeOptionWithBalance]) async throws -> FeeOptionSelection?
    public init(_ select: @escaping FeeOptionSelector.Select)
    public func callAsFunction(_ options: [FeeOptionWithBalance]) async throws -> FeeOptionSelection?
    public func callAsFunction(_ options: [FeeOption]) async throws -> FeeOptionSelection?
    public static let firstAvailable: FeeOptionSelector
    public static func custom(_ pick: @escaping FeeOptionSelector.Select) -> FeeOptionSelector
}
```

### `FeeOptionWithBalance`

```swift theme={null}
public struct FeeOptionWithBalance: Sendable {
    public let feeOption: FeeOption
    public let balance: TokenBalance?
    public let available: String?
    public let availableRaw: String?
    public let decimals: Int?
    public init(feeOption: FeeOption, balance: TokenBalance? = nil, available: String? = nil, availableRaw: String? = nil, decimals: Int? = nil)
    public var selection: FeeOptionSelection { get }
}
```

### `FeeOption`

```swift theme={null}
public struct FeeOption: Codable, Equatable, Sendable {
    public let token: FeeToken
    public let value: String
    public let displayValue: String
    public init(token: FeeToken, value: String, displayValue: String)
    public init(from decoder: any Decoder) throws
}
```

### `FeeOptionSelection`

```swift theme={null}
public struct FeeOptionSelection: Codable, Equatable, Sendable {
    public let token: String
    public init(token: String)
    public init(feeOption: FeeOption)
    public init(from decoder: any Decoder) throws
}
```

### `FeeToken`

```swift theme={null}
public struct FeeToken: Codable, Equatable, Sendable {
    public let network: String
    public let name: String
    public let symbol: String
    public let type: String
    public let decimals: UInt32?
    public let logoUrl: String?
    public let contractAddress: String?
    public let tokenId: String?
    public init(network: String, name: String, symbol: String, type: String, decimals: UInt32? = nil, logoUrl: String? = nil, contractAddress: String? = nil, tokenId: String? = nil)
    public init(from decoder: any Decoder) throws
}
```

### `AbiArg`

```swift theme={null}
public struct AbiArg: Codable, Equatable, Sendable {
    public let type: String
    public let value: JSONValue
    public init(type: String, value: JSONValue)
    public init(from decoder: any Decoder) throws
}
```

## Indexer

### `IndexerClient`

```swift theme={null}
public final class IndexerClient: Sendable
```

### `IndexerClient.getBalances(_:)`

```swift theme={null}
public func getBalances(_ params: GetBalancesParams) async throws -> BalancesResult
```

### `IndexerClient.getTransactionHistory(_:)`

```swift theme={null}
public func getTransactionHistory(_ params: GetTransactionHistoryParams) async throws -> TransactionHistoryResult
```

### `GetBalancesParams`

```swift theme={null}
public struct GetBalancesParams: Sendable {
    public let walletAddress: String
    public let networks: [Network]?
    public let networkType: IndexerNetworkType?
    public let contractAddresses: [String]?
    public let includeMetadata: Bool
    public let omitPrices: Bool?
    public let tokenIds: [String]?
    public let contractStatus: ContractVerificationStatus?
    public let page: TokenBalancesPageRequest?
    public init(walletAddress: String, networks: [Network]? = nil, networkType: IndexerNetworkType? = nil, contractAddresses: [String]? = nil, includeMetadata: Bool = true, omitPrices: Bool? = nil, tokenIds: [String]? = nil, contractStatus: ContractVerificationStatus? = nil, page: TokenBalancesPageRequest? = nil)
}
```

### `BalancesResult`

```swift theme={null}
public struct BalancesResult: Sendable {
    public let status: Int
    public let page: TokenBalancesPage?
    public let nativeBalances: [NativeTokenBalance]
    public let balances: [ContractTokenBalance]
    public init(status: Int, page: TokenBalancesPage?, nativeBalances: [NativeTokenBalance], balances: [ContractTokenBalance])
}
```

### `NativeTokenBalance`

```swift theme={null}
public struct NativeTokenBalance: Codable, Sendable {
    public let contractType: String
    public let accountAddress: String
    public let name: String
    public let symbol: String
    public let balance: String
    public let chainId: Int64
    public let balanceUSD: String?
    public let priceUSD: String?
    public let priceUpdatedAt: String?
    public init(accountAddress: String, name: String, symbol: String, balance: String, chainId: Int64, balanceUSD: String? = nil, priceUSD: String? = nil, priceUpdatedAt: String? = nil)
    public init(from decoder: any Decoder) throws
    public func encode(to encoder: any Encoder) throws
}
```

### `ContractTokenBalance`

```swift theme={null}
public struct ContractTokenBalance: Codable, Sendable {
    public let contractType: String
    public let contractAddress: String
    public let accountAddress: String
    public let tokenId: String
    public let balance: String
    public let blockHash: String
    public let blockNumber: Int64
    public let chainId: Int64
    public let balanceUSD: String?
    public let priceUSD: String?
    public let priceUpdatedAt: String?
    public let uniqueCollectibles: String?
    public let isSummary: Bool?
    public let contractInfo: TokenContractInfo?
    public let tokenMetadata: TokenMetadata?
    public init(contractType: String, contractAddress: String, accountAddress: String, tokenId: String, balance: String, blockHash: String, blockNumber: Int64, chainId: Int64, balanceUSD: String? = nil, priceUSD: String? = nil, priceUpdatedAt: String? = nil, uniqueCollectibles: String? = nil, isSummary: Bool? = nil, contractInfo: TokenContractInfo? = nil, tokenMetadata: TokenMetadata? = nil)
    public init(from decoder: any Decoder) throws
    public func encode(to encoder: any Encoder) throws
}
```

### `TokenBalance`

```swift theme={null}
public enum TokenBalance: Sendable {
    case native(NativeTokenBalance)
    case contract(ContractTokenBalance)
    public var contractType: String { get }
    public var accountAddress: String { get }
    public var balance: String { get }
    public var chainId: Int64 { get }
    public var balanceUSD: String? { get }
    public var priceUSD: String? { get }
    public var priceUpdatedAt: String? { get }
}
```

### `TokenBalancesPage`

```swift theme={null}
public struct TokenBalancesPage: Codable, Sendable {
    public let page: Int
    public let column: String?
    public let before: JSONValue?
    public let after: JSONValue?
    public let sort: [SortBy]?
    public let pageSize: Int
    public let more: Bool
    public init(page: Int, column: String? = nil, before: JSONValue? = nil, after: JSONValue? = nil, sort: [SortBy]? = nil, pageSize: Int, more: Bool)
    public init(from decoder: any Decoder) throws
}
```

### `TokenBalancesPageRequest`

```swift theme={null}
public struct TokenBalancesPageRequest: Codable, Sendable {
    public let page: Int?
    public let column: String?
    public let before: JSONValue?
    public let after: JSONValue?
    public let sort: [SortBy]?
    public let pageSize: Int?
    public init(page: Int? = nil, column: String? = nil, before: JSONValue? = nil, after: JSONValue? = nil, sort: [SortBy]? = nil, pageSize: Int? = nil)
    public init(from decoder: any Decoder) throws
}
```

### `TokenContractInfo`

```swift theme={null}
public struct TokenContractInfo: Codable, Sendable {
    public let chainId: Int64
    public let address: String
    public let source: String
    public let name: String
    public let type: String
    public let symbol: String
    public let decimals: Int?
    public let logoURI: String?
    public let deployed: Bool
    public let bytecodeHash: String
    public let extensions: [String : JSONValue]
    public let updatedAt: String
    public let queuedAt: String?
    public let status: String
    public init(chainId: Int64, address: String, source: String, name: String, type: String, symbol: String, decimals: Int? = nil, logoURI: String? = nil, deployed: Bool, bytecodeHash: String, extensions: [String : JSONValue], updatedAt: String, queuedAt: String? = nil, status: String)
    public init(from decoder: any Decoder) throws
}
```

### `TokenMetadata`

```swift theme={null}
public struct TokenMetadata: Codable, Sendable {
    public let chainId: Int64?
    public let contractAddress: String?
    public let tokenId: String
    public let source: String
    public let name: String
    public let description: String?
    public let image: String?
    public let video: String?
    public let audio: String?
    public let properties: [String : JSONValue]?
    public let attributes: [[String : JSONValue]]
    public let imageData: String?
    public let externalUrl: String?
    public let backgroundColor: String?
    public let animationUrl: String?
    public let decimals: Int?
    public let updatedAt: String?
    public let assets: [TokenMetadataAsset]?
    public let status: String
    public let queuedAt: String?
    public let lastFetched: String?
    public init(chainId: Int64? = nil, contractAddress: String? = nil, tokenId: String, source: String, name: String, description: String? = nil, image: String? = nil, video: String? = nil, audio: String? = nil, properties: [String : JSONValue]? = nil, attributes: [[String : JSONValue]], imageData: String? = nil, externalUrl: String? = nil, backgroundColor: String? = nil, animationUrl: String? = nil, decimals: Int? = nil, updatedAt: String? = nil, assets: [TokenMetadataAsset]? = nil, status: String, queuedAt: String? = nil, lastFetched: String? = nil)
    public init(from decoder: any Decoder) throws
    public func encode(to encoder: any Encoder) throws
}
```

### `TokenMetadataAsset`

```swift theme={null}
public struct TokenMetadataAsset: Codable, Sendable {
    public let id: Int64?
    public let collectionId: Int64?
    public let tokenId: String?
    public let url: String?
    public let metadataField: String?
    public let name: String?
    public let filesize: Int64?
    public let mimeType: String?
    public let width: Int?
    public let height: Int?
    public let updatedAt: String?
    public init(id: Int64? = nil, collectionId: Int64? = nil, tokenId: String? = nil, url: String? = nil, metadataField: String? = nil, name: String? = nil, filesize: Int64? = nil, mimeType: String? = nil, width: Int? = nil, height: Int? = nil, updatedAt: String? = nil)
    public init(from decoder: any Decoder) throws
    public func encode(to encoder: any Encoder) throws
}
```

### `GetTransactionHistoryParams`

```swift theme={null}
public struct GetTransactionHistoryParams: Sendable {
    public let walletAddress: String
    public let networks: [Network]?
    public let networkType: IndexerNetworkType?
    public let contractAddresses: [String]?
    public let transactionHashes: [String]?
    public let metaTransactionIds: [String]?
    public let fromBlock: Int?
    public let toBlock: Int?
    public let tokenId: String?
    public let includeMetadata: Bool
    public let omitPrices: Bool?
    public let metadataOptions: MetadataOptions?
    public let page: TokenBalancesPageRequest?
    public init(walletAddress: String, networks: [Network]? = nil, networkType: IndexerNetworkType? = nil, contractAddresses: [String]? = nil, transactionHashes: [String]? = nil, metaTransactionIds: [String]? = nil, fromBlock: Int? = nil, toBlock: Int? = nil, tokenId: String? = nil, includeMetadata: Bool = true, omitPrices: Bool? = nil, metadataOptions: MetadataOptions? = nil, page: TokenBalancesPageRequest? = nil)
}
```

### `TransactionHistoryResult`

```swift theme={null}
public struct TransactionHistoryResult: Sendable {
    public let status: Int
    public let page: TokenBalancesPage?
    public let transactions: [Transaction]
    public init(status: Int, page: TokenBalancesPage?, transactions: [Transaction])
}
```

### `Transaction`

```swift theme={null}
public struct Transaction: Codable, Sendable {
    public let txnHash: String
    public let blockNumber: Int64
    public let blockHash: String
    public let chainId: Int64
    public let metaTxnId: String?
    public let transfers: [TransactionTransfer]
    public let timestamp: String
    public init(txnHash: String, blockNumber: Int64, blockHash: String, chainId: Int64, metaTxnId: String? = nil, transfers: [TransactionTransfer] = [], timestamp: String)
    public init(from decoder: any Decoder) throws
    public func encode(to encoder: any Encoder) throws
}
```

### `TransactionTransfer`

```swift theme={null}
public struct TransactionTransfer: Codable, Sendable {
    public let transferType: String
    public let contractAddress: String
    public let contractType: String
    public let from: String
    public let to: String
    public let tokenIds: [String]?
    public let amounts: [String]
    public let logIndex: Int
    public let amountsUSD: [String]?
    public let pricesUSD: [String]?
    public let contractInfo: TokenContractInfo?
    public let tokenMetadata: [String : TokenMetadata]?
    public init(transferType: String, contractAddress: String, contractType: String, from: String, to: String, tokenIds: [String]? = nil, amounts: [String], logIndex: Int, amountsUSD: [String]? = nil, pricesUSD: [String]? = nil, contractInfo: TokenContractInfo? = nil, tokenMetadata: [String : TokenMetadata]? = nil)
    public init(from decoder: any Decoder) throws
    public func encode(to encoder: any Encoder) throws
}
```

### `IndexerNetworkType`

```swift theme={null}
public enum IndexerNetworkType: String, Codable, Sendable {
    case mainnets = "MAINNETS"
    case testnets = "TESTNETS"
    case all = "ALL"
    public init?(rawValue: String)
}
```

### `ContractVerificationStatus`

```swift theme={null}
public enum ContractVerificationStatus: String, Codable, Sendable {
    case verified = "VERIFIED"
    case unverified = "UNVERIFIED"
    case all = "ALL"
    public init?(rawValue: String)
}
```

### `MetadataOptions`

```swift theme={null}
public struct MetadataOptions: Codable, Sendable {
    public let verifiedOnly: Bool?
    public let unverifiedOnly: Bool?
    public let includeContracts: [String]?
    public init(verifiedOnly: Bool? = nil, unverifiedOnly: Bool? = nil, includeContracts: [String]? = nil)
    public init(from decoder: any Decoder) throws
}
```

### `Page`

```swift theme={null}
public struct Page: Codable, Equatable, Sendable {
    public let limit: UInt32?
    public let cursor: String?
    public init(limit: UInt32? = nil, cursor: String? = nil)
    public init(from decoder: any Decoder) throws
}
```

### `SortBy`

```swift theme={null}
public struct SortBy: Codable, Sendable {
    public let column: String
    public let order: SortOrder
    public init(column: String, order: SortOrder)
    public init(from decoder: any Decoder) throws
}
```

### `SortOrder`

```swift theme={null}
public enum SortOrder: String, Codable, Sendable {
    case descending = "DESC"
    case ascending = "ASC"
    public init?(rawValue: String)
}
```

## Networks, types, and errors

### `Network`

```swift theme={null}
public enum Network: String, CaseIterable, Sendable, CustomStringConvertible {
    case mainnet
    case sepolia
    case polygon
    case polygonAmoy = "amoy"
    case arbitrum
    case arbitrumSepolia = "arbitrum-sepolia"
    case optimism
    case optimismSepolia = "optimism-sepolia"
    case base
    case baseSepolia = "base-sepolia"
    case bsc
    case bscTestnet = "bsc-testnet"
    case arbitrumNova = "arbitrum-nova"
    case avalanche
    case avalancheTestnet = "avalanche-testnet"
    case katana
    public static let amoy: Network
    public var id: Int { get }
    public var chainId: String { get }
    public var name: String { get }
    public var nativeTokenSymbol: String { get }
    public var explorerUrl: String { get }
    public var explorerURL: URL { get }
    public var displayName: String { get }
    public var description: String { get }
    public static var supportedNetworks: [Network] { get }
    public static func findById(_ chainId: Int) -> Network?
    public static func findByName(_ name: String) -> Network?
    public init?(rawValue: String)
}
```

### `JSONValue`

```swift theme={null}
public enum JSONValue: Codable, Equatable, Sendable {
    case object([String: JSONValue])
    case array([JSONValue])
    case string(String)
    case integer(Int64)
    case unsignedInteger(UInt64)
    case number(Double)
    case bool(Bool)
    case null
    public init(from decoder: any Decoder) throws
    public func encode(to encoder: any Encoder) throws
}
```

JSON value used by SDK APIs that accept or return dynamic JSON payloads.

### `OMSWalletError`

```swift theme={null}
public struct OMSWalletError: Error, LocalizedError, @unchecked Sendable {
    public let code: OMSWalletErrorCode
    public let operation: OMSWalletOperation?
    public let status: Int?
    public let txnId: String?
    public let retryable: Bool?
    public let upstreamError: OMSWalletUpstreamError?
    public let underlyingError: (any Error)?
    public var errorDescription: String? { get }
}
```

### `OMSWalletErrorCode`

```swift theme={null}
public enum OMSWalletErrorCode: String, Sendable {
    case httpError = "OMS_HTTP_ERROR"
    case invalidResponse = "OMS_INVALID_RESPONSE"
    case requestFailed = "OMS_REQUEST_FAILED"
    case authCommitmentConsumed = "OMS_AUTH_COMMITMENT_CONSUMED"
    case sessionMissing = "OMS_SESSION_MISSING"
    case sessionExpired = "OMS_SESSION_EXPIRED"
    case walletSelectionStale = "OMS_WALLET_SELECTION_STALE"
    case walletSelectionUnavailable = "OMS_WALLET_SELECTION_UNAVAILABLE"
    case walletSelectionInFlight = "OMS_WALLET_SELECTION_IN_FLIGHT"
    case transactionExecutionUnconfirmed = "OMS_TRANSACTION_EXECUTION_UNCONFIRMED"
    case transactionStatusLookupFailed = "OMS_TRANSACTION_STATUS_LOOKUP_FAILED"
    case validationError = "OMS_VALIDATION_ERROR"
    case storageError = "OMS_STORAGE_ERROR"
    public init?(rawValue: String)
}
```

### `OMSWalletOperation`

```swift theme={null}
public enum OMSWalletOperation: String, Sendable {
    case pendingWalletSelection = "wallet.pendingWalletSelection"
    case pendingWalletSelectionSelectWallet = "wallet.pendingWalletSelection.selectWallet"
    case pendingWalletSelectionCreateAndSelectWallet = "wallet.pendingWalletSelection.createAndSelectWallet"
    case walletStartEmailAuth = "wallet.startEmailAuth"
    case walletCompleteEmailAuth = "wallet.completeEmailAuth"
    case walletSignInWithOidcIdToken = "wallet.signInWithOidcIdToken"
    case walletStartOIDCRedirectAuth = "wallet.startOIDCRedirectAuth"
    case walletHandleOIDCRedirectCallback = "wallet.handleOIDCRedirectCallback"
    case walletUseWallet = "wallet.useWallet"
    case walletCreateWallet = "wallet.createWallet"
    case walletListWallets = "wallet.listWallets"
    case walletSignOut = "wallet.signOut"
    case walletListAccess = "wallet.listAccess"
    case walletListAccessPage = "wallet.listAccessPage"
    case walletListAccessPages = "wallet.listAccessPages"
    case walletGetIdToken = "wallet.getIdToken"
    case walletRevokeAccess = "wallet.revokeAccess"
    case walletSignMessage = "wallet.signMessage"
    case walletSignTypedData = "wallet.signTypedData"
    case walletIsValidMessageSignature = "wallet.isValidMessageSignature"
    case walletIsValidTypedDataSignature = "wallet.isValidTypedDataSignature"
    case walletSendTransaction = "wallet.sendTransaction"
    case walletCallContract = "wallet.callContract"
    case walletExecute = "wallet.execute"
    case walletGetTransactionStatus = "wallet.getTransactionStatus"
    case walletTransactionStatus = "wallet.transactionStatus"
    case indexerGetBalances = "indexer.getBalances"
    case indexerGetTransactionHistory = "indexer.getTransactionHistory"
    public init?(rawValue: String)
}
```

### `OMSWalletUpstreamError`

```swift theme={null}
public struct OMSWalletUpstreamError: Equatable, Sendable {
    public let service: OMSWalletUpstreamService
    public let name: String?
    public let code: String?
    public let message: String?
    public let status: Int?
}
```

### `OMSWalletUpstreamService`

```swift theme={null}
public enum OMSWalletUpstreamService: String, Sendable {
    case waas = "Waas"
    case indexer = "Indexer"
    public init?(rawValue: String)
}
```

### `UnitConversionError`

```swift theme={null}
public enum UnitConversionError: Error, Equatable {
    case invalidDecimals(Int)
    case invalidValue(String)
    case fractionalComponentExceedsDecimals(value: String, decimals: Int)
}
```

### `parseUnits(value:decimals:)`

```swift theme={null}
public func parseUnits(value: String, decimals: Int = 18) throws -> String
```

### `formatUnits(value:decimals:)`

```swift theme={null}
public func formatUnits(value: String, decimals: Int = 18) throws -> String
```
