> ## 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
    /// Creating `OMSWallet` again for the same project and environment returns the same `wallet`:
    /// one session, active wallet, expiry timer, and set of observers per project in the process,
    /// so instances cannot drift apart. A publishable key with another key ID for the same project
    /// (a rotated key) keeps that session and is used for later requests. Another project or
    /// environment is a separate session.
    public convenience init(publishableKey: String) throws
}
```

### `WalletClient`

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

## Authentication and sessions

### `WalletClient.activeWallet`

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

The active wallet, or `nil` until auth completes or a session is restored, while a manual
wallet selection is pending, and after sign-out or session expiry. Same shape as
`listWallets()` entries.

### `WalletClient.session`

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

Expiry and auth metadata for the active wallet session. Non-`nil` exactly when
`activeWallet` is.

### `WalletClient.defaultSessionLifetimeSeconds`

```swift theme={null}
public static let defaultSessionLifetimeSeconds: UInt32
```

The session lifetime used when a sign-in call does not pass `sessionLifetimeSeconds`
(180 days, the maximum).

### `WalletClient.maxSessionLifetimeSeconds`

```swift theme={null}
public static let maxSessionLifetimeSeconds: UInt32
```

The largest `sessionLifetimeSeconds` the SDK accepts (180 days).

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

```swift theme={null}
public func addSessionChangeObserver(_ observer: @escaping @MainActor @Sendable (OMSWalletSessionChangeEvent) -> Void) -> OMSWalletSessionChangeObservation
```

Calls `observer` on the main actor after every change of `activeWallet` or `session`, in
order and after the change (never during the call that made it). Add the observer first,
then read `activeWallet` and `session`, so no change is missed. An observer added while signed
out first receives the last `.expired` change, if a session expired since the last sign-in or
sign-out (for example while the app was not running).

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

```swift theme={null}
public func startEmailAuth(email: String, sessionLifetimeSeconds: UInt32 = WalletClient.defaultSessionLifetimeSeconds) 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 = WalletClient.defaultSessionLifetimeSeconds, provider: String? = nil, providerLabel: String? = nil) async throws -> CompleteAuthResult
```

Signs in with an OIDC ID token.

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

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

Starts OIDC authorization-code redirect authentication.

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

```swift theme={null}
public func startOIDCRedirectAuth(provider: OMSRelayOIDCProvider, omsRelayReturnURI: String, walletType: WalletType = WalletType.ethereum, walletSelection: WalletSelectionBehavior? = nil, sessionLifetimeSeconds: UInt32? = nil, loginHint: String? = 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 -> WalletActivationResult
```

Activates an existing wallet by its WaaS wallet ID and persists the wallet 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 -> WalletActivationResult
```

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

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

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

Claims a wallet preallocated for the signed-in user and activates it, persisting the wallet
and signer metadata to the keychain.

### `WalletClient.importWallet(privateKey:reference:)`

```swift theme={null}
@discardableResult public func importWallet(privateKey: WalletImportPrivateKey, reference: String? = nil) async throws -> WalletActivationResult
```

Imports and activates an Ethereum, Solana, or Tron private key.

### `WalletClient.getWalletImportRecipientKey(cipherSuite:)`

```swift theme={null}
public func getWalletImportRecipientKey(cipherSuite: WalletImportCipherSuite) async throws -> WalletImportRecipientKey
```

Fetches an attested recipient key for advanced wallet-import encryption flows.

### `WalletClient.importEncryptedWallet(walletType:keyMaterial:reference:)`

```swift theme={null}
@discardableResult public func importEncryptedWallet(walletType: WalletType, keyMaterial: EncryptedWalletImportKeyMaterial, reference: String? = nil) async throws -> WalletActivationResult
```

Imports and activates key material encrypted by the caller for an attested WaaS recipient key.

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

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

### `WalletClient.inspectRemoteCredential(credentialId:)`

```swift theme={null}
public func inspectRemoteCredential(credentialId: String) async throws -> RemoteCredentialMetadata
```

Returns display metadata for a remote credential before the owner approves access.

### `WalletClient.authorizeRemoteAccess(credentialId:network:grants:expiresAt:sessionId:)`

```swift theme={null}
public func authorizeRemoteAccess(credentialId: String, network: Network, grants: [SmartSessionGrant], expiresAt: String, sessionId: String? = nil) async throws -> AuthorizedRemoteAccess
```

Authorizes owner-approved EVM smart-session grants for a remote credential. Omit `sessionId`
to create a session; pass an existing session ID to replace that session's grants and
requested expiry without changing its signer. WaaS caps the effective expiry at the remote
credential's expiry.

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

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

Returns all wallet access grants, following WaaS cursors automatically.

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

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

Returns one credential-access page for this wallet.

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

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

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

### `WalletClient.getRemoteAccessSession(sessionId:)`

```swift theme={null}
public func getRemoteAccessSession(sessionId: String) async throws -> RemoteAccessSession
```

Returns one owner-visible remote session and verifies that it belongs to the selected wallet.

### `WalletClient.getRemoteAccessSessionUsage(sessionId:network:)`

```swift theme={null}
public func getRemoteAccessSessionUsage(sessionId: String, network: Network) async throws -> [SmartSessionGrantUsage]
```

Returns the current usage for each bounded grant in an owner-visible remote session.

### `WalletClient.revokeAccess(credentialId:sessionId:)`

```swift theme={null}
public func revokeAccess(credentialId: String, sessionId: String? = nil) async throws
```

Revokes one access grant from the selected wallet. Use `listAccess()` or
`listAccessPage(pageSize:cursor:type:)` first to retrieve the direct or remote grant. Omit
`sessionId` for a direct grant; for a remote grant, pass its session ID to revoke exactly
that session.

### `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 {
    /// A wallet was activated. `wallets` lists the user's wallets, and `claimableWallets` lists
    /// the wallets preallocated for the user that this sign-in did not claim.
    case walletSelected(
        wallet: Wallet,
        wallets: [Wallet],
        claimableWallets: [Wallet],
        credential: WalletCredential
    )
    case walletSelection(PendingWalletSelection)
    public var credential: WalletCredential { get }
    public var wallet: Wallet? { get }
    /// Wallets preallocated for the user that they can claim with
    /// `WalletClient.claimWallet(walletId:)`: the unclaimed ones after `.walletSelected`, or
    /// `PendingWalletSelection.claimableWallets` for `.walletSelection`.
    public var claimableWallets: [Wallet] { get }
}
```

### `PendingWalletSelection`

```swift theme={null}
public final class PendingWalletSelection: @unchecked Sendable {
    public let walletType: WalletType
    public let wallets: [Wallet]
    /// Wallets of `walletType` preallocated for the signed-in user that they can claim with
    /// `WalletClient.claimWallet(walletId:)`.
    public let claimableWallets: [Wallet]
    public let credential: WalletCredential
    @discardableResult public func selectWallet(walletId: String) async throws -> WalletActivationResult
    @discardableResult public func createAndSelectWallet(reference: String? = nil) async throws -> WalletActivationResult
    /// Claims one of `claimableWallets` and selects it, completing this selection.
    @discardableResult public func claimAndSelectWallet(walletId: String) async throws -> WalletActivationResult
}
```

### `WalletActivationResult`

```swift theme={null}
public struct WalletActivationResult: Sendable {
    public let wallet: Wallet
    public init(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 let keyOrigin: WalletKeyOrigin
    public init(id: String, type: WalletType, address: String, reference: String? = nil, keyOrigin: WalletKeyOrigin)
    public init(from decoder: any Decoder) throws
}
```

### `WalletType`

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

### `WalletKeyOrigin`

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

### `WalletImportCipherSuite`

```swift theme={null}
public enum WalletImportCipherSuite: String, CaseIterable, Sendable {
    case x25519Sha256Aes256Gcm = "x25519-sha256-aes256gcm"
    case x25519Sha256ChaCha20Poly1305 = "x25519-sha256-chacha20poly1305"
    case p256Sha256Aes256Gcm = "p256-sha256-aes256gcm"
    case p256Sha256ChaCha20Poly1305 = "p256-sha256-chacha20poly1305"
    public init?(rawValue: String)
}
```

### `WalletImportPrivateKey`

```swift theme={null}
public enum WalletImportPrivateKey: Sendable, CustomStringConvertible, CustomDebugStringConvertible, CustomReflectable {
    case ethereum(String)
    case ethereumBytes(Data)
    case solana(String)
    case solanaBytes(Data)
    /// A secp256k1 private key as 64 hexadecimal characters, optionally `0x`-prefixed. Tron uses
    /// the same private key format as Ethereum.
    case tron(String)
    /// A 32-byte secp256k1 private key.
    case tronBytes(Data)
    public var walletType: WalletType { get }
    public var description: String { get }
    public var debugDescription: String { get }
    public var customMirror: Mirror { get }
}
```

### `WalletImportRecipientKey`

```swift theme={null}
public struct WalletImportRecipientKey: Equatable, Sendable {
    public let keyId: String
    public let cipherSuite: WalletImportCipherSuite
    public let publicKey: String
    public init(keyId: String, cipherSuite: WalletImportCipherSuite, publicKey: String)
}
```

### `EncryptedWalletImportKeyMaterial`

```swift theme={null}
public struct EncryptedWalletImportKeyMaterial: Equatable, Sendable {
    public let keyId: String
    public let cipherSuite: WalletImportCipherSuite
    public let encapsulatedKey: String
    public let ciphertext: String
    public init(keyId: String, cipherSuite: WalletImportCipherSuite, encapsulatedKey: String, ciphertext: String)
}
```

### `WalletCredential`

```swift theme={null}
public struct WalletCredential: Codable, Equatable, Sendable {
    public let credentialId: String
    /// The credential's current expiry when it was returned, as an ISO-8601 timestamp. The server
    /// extends it with use up to the requested session lifetime, and the SDK refreshes the active
    /// session's copy in `OMSWalletSession.expiresAt`.
    public let expiresAt: String
    public let isCaller: Bool
    public init(credentialId: String, expiresAt: String, isCaller: Bool)
    public init(from decoder: any Decoder) throws
}
```

### `RemoteCredentialMetadata`

```swift theme={null}
public struct RemoteCredentialMetadata: Codable, Equatable, Sendable {
    public let appUrl: String
    public let appName: String
    public let appLogoUrl: String
    public let custom: [String : String]
    public init(appUrl: String, appName: String, appLogoUrl: String, custom: [String : String])
    public init(from decoder: any Decoder) throws
}
```

### `SmartSessionGrant`

```swift theme={null}
public enum SmartSessionGrant: Equatable, Sendable {
    case nativeTransfer(to: String, limit: String)
    case erc20Transfer(token: String, to: String? = nil, limit: String, cumulative: Bool? = nil)
}
```

### `AccessGrantType`

```swift theme={null}
public enum AccessGrantType: String, Codable, Equatable, Sendable {
    case direct
    case remote
    public init?(rawValue: String)
}
```

### `RemoteAccessGrant`

```swift theme={null}
public struct RemoteAccessGrant: Equatable, Sendable {
    public let credential: WalletCredential
    public let sessionId: String
    public let metadata: RemoteCredentialMetadata
    public let grants: [SmartSessionGrant]
    public init(credential: WalletCredential, sessionId: String, metadata: RemoteCredentialMetadata, grants: [SmartSessionGrant])
}
```

### `AccessGrant`

```swift theme={null}
public enum AccessGrant: Equatable, Sendable {
    case direct(WalletCredential)
    case remote(RemoteAccessGrant)
    public var credential: WalletCredential { get }
}
```

### `AccessGrantPage`

```swift theme={null}
public struct AccessGrantPage: Equatable, Sendable {
    public let grants: [AccessGrant]
    public let page: Page?
    public init(grants: [AccessGrant], page: Page? = nil)
}
```

### `AuthorizedRemoteAccess`

```swift theme={null}
public struct AuthorizedRemoteAccess: Equatable, Sendable {
    public let walletId: String
    public let sessionId: String
    public let expiresAt: String
}
```

### `RemoteAccessSession`

```swift theme={null}
public struct RemoteAccessSession: Equatable, Sendable {
    public let sessionId: String
    public let walletId: String
    public let signerAddress: String
    public let grants: [SmartSessionGrant]
    public let chainId: Int
    public let expiresAt: String
}
```

### `SmartSessionGrantUsage`

```swift theme={null}
public struct SmartSessionGrantUsage: Equatable, Sendable {
    public let grant: SmartSessionGrant
    public let used: String?
}
```

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

### `OMSWalletSession`

```swift theme={null}
public struct OMSWalletSession: Equatable, Sendable {
    /// The current expiry of the active wallet session, as the ISO-8601 timestamp returned by the
    /// wallet API. The server extends it with use up to the requested session lifetime, and the
    /// SDK refreshes it, so it can be later than the sign-in `WalletCredential.expiresAt`.
    public let expiresAt: String
    /// Auth metadata for the active wallet session.
    public let auth: OMSWalletSessionAuth
    public init(expiresAt: String, auth: OMSWalletSessionAuth)
}
```

Expiry and auth metadata for the active wallet session. `WalletClient.session` is non-`nil`
exactly when `WalletClient.activeWallet` is.

### `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: Decoder) throws
    public func encode(to encoder: Encoder) throws
}
```

### `OMSWalletEmailSessionAuth`

```swift theme={null}
public struct OMSWalletEmailSessionAuth: Codable, Equatable, Sendable {
    public let email: String
    public init(email: String)
    public init(from decoder: Decoder) throws
    public func encode(to encoder: 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: Decoder) throws
    public func encode(to encoder: Encoder) throws
}
```

### `OMSWalletOidcSessionAuthFlow`

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

### `OMSWalletSessionChangeEvent`

```swift theme={null}
public enum OMSWalletSessionChangeEvent: Equatable, Sendable {
    /// A sign-in made a wallet active.
    case signedIn(wallet: Wallet, session: OMSWalletSession)
    /// A session saved on this device became active after the client was created, for example once
    /// the device was unlocked after a launch while it was locked. Treat it like `signedIn`; the
    /// user did not just sign in.
    case restored(wallet: Wallet, session: OMSWalletSession)
    /// Another wallet of the same sign-in became active.
    case walletChanged(wallet: Wallet, session: OMSWalletSession)
    /// `session.expiresAt` moved. Safe to ignore unless you show the expiry.
    case expiryUpdated(wallet: Wallet, session: OMSWalletSession)
    /// There is no session any more and it did not expire: `signOut()`, a sign-in started while
    /// signed in, or another process sharing the keychain signing in. Not necessarily the user's
    /// choice.
    case signedOut
    /// The session expired, or the wallet API no longer accepts it.
    case expired(OMSWalletExpiredSession)
    /// The active wallet after the change; `nil` for `signedOut` and `expired`.
    public var activeWallet: Wallet? { get }
    /// The session after the change; non-`nil` exactly when `activeWallet` is.
    public var session: OMSWalletSession? { get }
}
```

A change of `WalletClient.activeWallet` or `WalletClient.session`, with the state right after it.

### `OMSWalletExpiredSession`

```swift theme={null}
public struct OMSWalletExpiredSession: Equatable, Sendable {
    /// The wallet that was active when the session expired, or `nil` when the credential expired
    /// while a manual wallet selection was still pending.
    public let wallet: Wallet?
    public let session: OMSWalletSession
    /// The ISO-8601 time the session ended: its expiry, or, when the SDK found it ended before its
    /// expiry (for example after another process's session ended it), the time that was found.
    public let expiredAt: String
    public init(wallet: Wallet?, session: OMSWalletSession, expiredAt: String)
}
```

A session that expired, as reported by `OMSWalletSessionChangeEvent.expired`.

### `OMSWalletSessionChangeObservation`

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

### `ListAccessPages`

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

## 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.signSolanaMessage(message:)`

```swift theme={null}
public func signSolanaMessage(message: String) async throws -> String
```

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

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

### `WalletClient.signTronMessage(message:)`

```swift theme={null}
public func signTronMessage(message: String) async throws -> String
```

### `WalletClient.signTronTypedData(typedData:)`

```swift theme={null}
public func signTronTypedData(typedData: JSONValue) async throws -> String
```

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

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

### `WalletClient.isValidSolanaMessageSignature(walletAddress:message:signature:)`

```swift theme={null}
public func isValidSolanaMessageSignature(walletAddress: String? = nil, message: String, signature: String) async throws -> Bool
```

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

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

### `WalletClient.isValidTronMessageSignature(walletAddress:message:signature:)`

```swift theme={null}
public func isValidTronMessageSignature(walletAddress: String? = nil, message: String, signature: String) async throws -> Bool
```

### `WalletClient.isValidTronTypedDataSignature(walletAddress:typedData:signature:)`

```swift theme={null}
public func isValidTronTypedDataSignature(walletAddress: String? = nil, 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.sendSolanaTransfer(network:asset:to:amount:selectFeeOption:mode:waitForStatus:statusPolling:)`

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

### `WalletClient.sendTronTransaction(network:to:value:data:selectFeeOption:waitForStatus:statusPolling:)`

```swift theme={null}
public func sendTronTransaction(network: TronNetwork, to: String, value: String = "0", data: String? = nil, selectFeeOption: FeeOptionSelector? = nil, waitForStatus: Bool = true, statusPolling: TransactionStatusPollingOptions = TransactionStatusPollingOptions()) async throws -> SendTransactionResponse
```

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

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

### `WalletClient.callTronContract(network:contractAddress:method:args:selectFeeOption:waitForStatus:statusPolling:)`

```swift theme={null}
public func callTronContract(network: TronNetwork, contractAddress: String, method: String, args: [AbiArg]? = nil, selectFeeOption: FeeOptionSelector? = nil, 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: Decoder) throws
    public func encode(to encoder: 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: Decoder) throws
    public func encode(to encoder: 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 {
    /// Sponsored transactions pass an empty array. Returning `nil` acknowledges the free fee;
    /// throw to stop execution.
    public typealias Select = @Sendable (_ options: [FeeOptionWithBalance]) async throws -> FeeOptionSelection?
    public init(_ select: @escaping 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 Select) -> FeeOptionSelector
}
```

### `FeeOptionWithBalance`

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

### `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 let index: UInt32?
    public init(token: String, index: UInt32? = nil)
    public init(feeOption: FeeOption, index: UInt32? = nil)
    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
```

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

```swift theme={null}
public func getSolanaBalances(_ params: GetSolanaBalancesParams) async throws -> SolanaBalancesResult
```

### `GetSolanaBalancesParams`

```swift theme={null}
public struct GetSolanaBalancesParams: Sendable {
    public let walletAddress: String
    public let networks: [SolanaNetwork]
    public let includeMetadata: Bool
    public let omitNativeBalances: Bool?
    public let mintAddresses: [String]
    public let excludedMintAddresses: [String]
    public init(walletAddress: String, networks: [SolanaNetwork] = [.mainnet, .devnet], includeMetadata: Bool = true, omitNativeBalances: Bool? = nil, mintAddresses: [String] = [], excludedMintAddresses: [String] = [])
}
```

### `SolanaBalancesResult`

```swift theme={null}
public struct SolanaBalancesResult: Sendable {
    public let status: Int
    public let balances: [SolanaBalance]
    public let errors: [SolanaNetworkError]
}
```

### `SolanaBalance`

```swift theme={null}
public enum SolanaBalance: Decodable, Sendable {
    case native(SolanaNativeBalance)
    case fungibleToken(SolanaFungibleTokenBalance)
    public init(from decoder: Decoder) throws
    public var network: SolanaNetwork { get }
    public var accountAddress: String { get }
    public var name: String { get }
    public var symbol: String { get }
    public var decimals: Int { get }
    public var balance: String { get }
    public var formattedBalance: String { get }
    public var imageUrl: String? { get }
    public var metadataUri: String? { get }
    public var verificationStatus: SolanaVerificationStatus { get }
    public var verificationSource: SolanaVerificationSource { get }
    public var priceUSD: String? { get }
    public var balanceUSD: String? { get }
}
```

### `SolanaNativeBalance`

```swift theme={null}
public struct SolanaNativeBalance: Codable, Sendable {
    public let network: SolanaNetwork
    public let accountAddress: String
    public let name: String
    public let symbol: String
    public let decimals: Int
    public let balance: String
    public let formattedBalance: String
    public let imageUrl: String?
    public let metadataUri: String?
    public let verificationStatus: SolanaVerificationStatus
    public let verificationSource: SolanaVerificationSource
    public let priceUSD: String?
    public let balanceUSD: String?
    public init(from decoder: any Decoder) throws
}
```

### `SolanaFungibleTokenBalance`

```swift theme={null}
public struct SolanaFungibleTokenBalance: Codable, Sendable {
    public let network: SolanaNetwork
    public let accountAddress: String
    public let tokenProgram: SolanaTokenProgram
    public let mintAddress: String
    public let name: String
    public let symbol: String
    public let decimals: Int
    public let balance: String
    public let formattedBalance: String
    public let imageUrl: String?
    public let metadataUri: String?
    public let verificationStatus: SolanaVerificationStatus
    public let verificationSource: SolanaVerificationSource
    public let priceUSD: String?
    public let balanceUSD: String?
    public init(from decoder: any Decoder) throws
}
```

### `SolanaNetworkError`

```swift theme={null}
public struct SolanaNetworkError: Codable, Sendable {
    public let network: SolanaNetwork
    public let reason: String
    public init(from decoder: any Decoder) throws
}
```

### `SolanaVerificationStatus`

```swift theme={null}
public enum SolanaVerificationStatus: String, Codable, Sendable {
    case verified
    case unverified
    case unknown
    public init?(rawValue: String)
}
```

### `SolanaVerificationSource`

```swift theme={null}
public enum SolanaVerificationSource: String, Codable, Sendable {
    case jupiter
    case solflareUtl = "solflare-utl"
    case none
    public init?(rawValue: String)
}
```

### `SolanaTokenProgram`

```swift theme={null}
public enum SolanaTokenProgram: String, Codable, Sendable {
    case splToken = "spl-token"
    case token2022 = "token-2022"
    public init?(rawValue: String)
}
```

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

```swift theme={null}
public func getTronBalances(_ params: GetTronBalancesParams) async throws -> TronBalancesResult
```

### `GetTronBalancesParams`

```swift theme={null}
public struct GetTronBalancesParams: Sendable {
    /// Base58Check (`T…`) wallet address.
    public let walletAddress: String
    public let networks: [TronNetwork]
    public let includeMetadata: Bool
    public let omitNativeBalances: Bool?
    /// Only return these TRC-20 contracts (`T…`).
    public let contractAddresses: [String]
    /// Exclude these TRC-20 contracts (`T…`).
    public let excludedContractAddresses: [String]
    public init(walletAddress: String, networks: [TronNetwork] = [.mainnet, .nile], includeMetadata: Bool = true, omitNativeBalances: Bool? = nil, contractAddresses: [String] = [], excludedContractAddresses: [String] = [])
}
```

### `TronBalancesResult`

```swift theme={null}
public struct TronBalancesResult: Sendable {
    public let status: Int
    public let balances: [TronBalance]
    public let errors: [TronNetworkError]
}
```

### `TronBalance`

```swift theme={null}
public enum TronBalance: Decodable, Sendable {
    case native(TronNativeBalance)
    case fungibleToken(TronFungibleTokenBalance)
    public init(from decoder: Decoder) throws
    public var network: TronNetwork { get }
    public var accountAddress: String { get }
    public var name: String { get }
    public var symbol: String { get }
    public var decimals: Int { get }
    public var balance: String { get }
    public var formattedBalance: String { get }
    public var imageUrl: String? { get }
    public var metadataUri: String? { get }
    public var verificationStatus: TronVerificationStatus { get }
    public var verificationSource: String { get }
    public var priceUSD: String? { get }
    public var balanceUSD: String? { get }
}
```

### `TronNativeBalance`

```swift theme={null}
public struct TronNativeBalance: Codable, Sendable {
    public let network: TronNetwork
    /// Base58Check (`T…`) account address.
    public let accountAddress: String
    public let name: String
    public let symbol: String
    public let decimals: Int
    /// Raw balance in sun (1 TRX = 1,000,000 sun).
    public let balance: String
    public let formattedBalance: String
    public let imageUrl: String?
    public let metadataUri: String?
    public let verificationStatus: TronVerificationStatus
    public let verificationSource: String
    public let priceUSD: String?
    public let balanceUSD: String?
    public init(from decoder: Decoder) throws
}
```

### `TronFungibleTokenBalance`

```swift theme={null}
public struct TronFungibleTokenBalance: Codable, Sendable {
    public let network: TronNetwork
    /// Base58Check (`T…`) account address.
    public let accountAddress: String
    public let tokenStandard: TronTokenStandard
    /// Base58Check (`T…`) TRC-20 contract address.
    public let contractAddress: String
    public let name: String
    public let symbol: String
    public let decimals: Int
    /// Raw balance in the token's base units.
    public let balance: String
    public let formattedBalance: String
    public let imageUrl: String?
    public let metadataUri: String?
    public let verificationStatus: TronVerificationStatus
    public let verificationSource: String
    public let priceUSD: String?
    public let balanceUSD: String?
    public init(from decoder: Decoder) throws
}
```

### `TronNetworkError`

```swift theme={null}
public struct TronNetworkError: Codable, Sendable {
    public let network: TronNetwork
    public let reason: String
    public init(from decoder: any Decoder) throws
}
```

### `TronVerificationStatus`

```swift theme={null}
public enum TronVerificationStatus: String, Codable, Sendable {
    case verified
    case unverified
    case unknown
    public init?(rawValue: String)
}
```

### `TronTokenStandard`

```swift theme={null}
public enum TronTokenStandard: String, Codable, Sendable {
    case trc20
    public init?(rawValue: String)
}
```

### `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: Decoder) throws
    public func encode(to encoder: 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: Decoder) throws
    public func encode(to encoder: 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: Decoder) throws
    public func encode(to encoder: 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: Decoder) throws
    public func encode(to encoder: 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: Decoder) throws
    public func encode(to encoder: 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: Decoder) throws
    public func encode(to encoder: 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 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 var id: Int { 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)
}
```

### `SolanaNetwork`

```swift theme={null}
public enum SolanaNetwork: String, CaseIterable, Codable, Sendable, CustomStringConvertible {
    case devnet = "solana:devnet"
    case mainnet = "solana:mainnet"
    public var description: String { get }
    public init?(rawValue: String)
}
```

### `SolanaNetworks`

```swift theme={null}
public enum SolanaNetworks {
    public static let devnet: SolanaNetwork
    public static let mainnet: SolanaNetwork
}
```

### `TronNetwork`

```swift theme={null}
public enum TronNetwork: String, CaseIterable, Codable, Sendable, CustomStringConvertible {
    case mainnet = "tron:mainnet"
    case nile = "tron:nile"
    public var description: String { get }
    public init?(rawValue: String)
}
```

### `TronNetworks`

```swift theme={null}
public enum TronNetworks {
    public static let mainnet: TronNetwork
    public static let nile: TronNetwork
}
```

### `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: Decoder) throws
    public func encode(to encoder: 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"
    case attestationVerificationFailed = "OMS_ATTESTATION_VERIFICATION_FAILED"
    case walletAddressAlreadyImported = "OMS_WALLET_ADDRESS_ALREADY_IMPORTED"
    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 pendingWalletSelectionClaimAndSelectWallet = "wallet.pendingWalletSelection.claimAndSelectWallet"
    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 walletClaimWallet = "wallet.claimWallet"
    case walletImportWallet = "wallet.importWallet"
    case walletGetImportRecipientKey = "wallet.getWalletImportRecipientKey"
    case walletImportEncryptedWallet = "wallet.importEncryptedWallet"
    case walletListWallets = "wallet.listWallets"
    case walletSignOut = "wallet.signOut"
    case walletListAccess = "wallet.listAccess"
    case walletListAccessPage = "wallet.listAccessPage"
    case walletListAccessPages = "wallet.listAccessPages"
    case walletInspectRemoteCredential = "wallet.inspectRemoteCredential"
    case walletAuthorizeRemoteAccess = "wallet.authorizeRemoteAccess"
    case walletGetRemoteAccessSession = "wallet.getRemoteAccessSession"
    case walletGetRemoteAccessSessionUsage = "wallet.getRemoteAccessSessionUsage"
    case walletGetIdToken = "wallet.getIdToken"
    case walletRevokeAccess = "wallet.revokeAccess"
    case walletSignMessage = "wallet.signMessage"
    case walletSignSolanaMessage = "wallet.signSolanaMessage"
    case walletSignTypedData = "wallet.signTypedData"
    case walletIsValidMessageSignature = "wallet.isValidMessageSignature"
    case walletIsValidSolanaMessageSignature = "wallet.isValidSolanaMessageSignature"
    case walletIsValidTypedDataSignature = "wallet.isValidTypedDataSignature"
    case walletSignTronMessage = "wallet.signTronMessage"
    case walletSignTronTypedData = "wallet.signTronTypedData"
    case walletIsValidTronMessageSignature = "wallet.isValidTronMessageSignature"
    case walletIsValidTronTypedDataSignature = "wallet.isValidTronTypedDataSignature"
    case walletSendTransaction = "wallet.sendTransaction"
    case walletSendSolanaTransfer = "wallet.sendSolanaTransfer"
    case walletSendTronTransaction = "wallet.sendTronTransaction"
    case walletCallTronContract = "wallet.callTronContract"
    case walletCallContract = "wallet.callContract"
    case walletExecute = "wallet.execute"
    case walletGetTransactionStatus = "wallet.getTransactionStatus"
    case walletTransactionStatus = "wallet.transactionStatus"
    case indexerGetBalances = "indexer.getBalances"
    case indexerGetSolanaBalances = "indexer.getSolanaBalances"
    case indexerGetTronBalances = "indexer.getTronBalances"
    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?
    /// The service's reason for this error, when it gives one, for example why a request was invalid.
    public let cause: 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) throws -> String
```

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

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