crossmint_flutter_runtime library

Runtime configuration and storage adapters for the Crossmint SDK.

Re-exports the auth and core surfaces plus the platform-level pieces that apps may need to swap out:

Classes

CrossmintApiConfig
Base configuration shared by every Crossmint SDK client.
CrossmintApiVersions
Centralised API version path prefixes used by every Crossmint service.
CrossmintAuthAuthenticated
CrossmintAuthenticatedUser
CrossmintAuthInitializing
CrossmintAuthInProgress
CrossmintAuthLoggedOut
CrossmintAuthSession
CrossmintAuthSessionCodec
CrossmintAuthState
CrossmintAuthStorage
CrossmintClientConfig
Configuration for CrossmintClient.
CrossmintClientRuntimeOverrides
CrossmintEmailOtpChallenge
CrossmintHttpTransport
CrossmintLogger
CrossmintOrderCreateRequest
CrossmintOrderReadRequest
CrossmintOrderRecord
CrossmintOrdersClient
CrossmintOrderUpdateRequest
CrossmintPollingConfig
Configuration for exponential-backoff polling loops used throughout the SDK.
CrossmintRequestOptions
CrossmintSecureStorageAdapter
CrossmintTokenAvailabilityRecord
CrossmintTokenAvailabilityResult
CrossmintTokenQuery
CrossmintTokensClient
CrossmintTransport
CrossmintTransportResponse
CrossmintUser
CrossmintUserCreateRequest
CrossmintUserLookupRequest
CrossmintUsersClient
CrossmintWalletAuthChallenge
Challenge returned by CrossmintAuthClient.signInWithWallet that must be signed by the user's external wallet (MetaMask, Phantom, etc.).
CrossmintWorldstoreListingRecord
CrossmintWorldstoreListingSearchResult
CrossmintWorldstoreOrderCreateRequest
CrossmintWorldstoreSearchRequest
FlutterSecureStorageAdapter
InMemoryCrossmintAuthStorage
InMemoryCrossmintSecureStorageAdapter
NoopCrossmintLogger
SecureStorageCrossmintAuthStorage

Enums

CrossmintChain
Supported Crossmint blockchain chains.
CrossmintChainFamily
Top-level blockchain family discriminator.
CrossmintEnvironment
CrossmintErrorCode
Typed error codes for programmatic exception handling.
CrossmintOAuthProvider

Constants

kCrossmintFlutterSdkVersion → const String
Version of the crossmint_flutter SDK reported to the Crossmint backend (e.g. via sdkMetadata query parameters on embedded checkout).

Functions

crossmintApiBaseUriForConfig(CrossmintApiConfig config) Uri
crossmintApiBaseUriForEnvironment(CrossmintEnvironment environment) Uri
crossmintEnvironmentForConfig(CrossmintApiConfig config) CrossmintEnvironment
crossmintEnvironmentFromApiKey(String apiKey) CrossmintEnvironment
crossmintEnvironmentFromUri(Uri uri) CrossmintEnvironment
crossmintListEquals<T>(List<T>? a, List<T>? b) bool
Structural equality for two nullable lists. Both null → equal. One null → not equal. Otherwise length + element-wise == comparison.
crossmintListHash<T>(List<T>? list) int
Combines the hash codes of a list's elements in order. Null → 0.
crossmintMapEquals<K, V>(Map<K, V>? a, Map<K, V>? b) bool
Structural equality for two nullable maps. Both null → equal. One null → not equal. Otherwise length + key-wise == comparison.
crossmintMapHash<K, V>(Map<K, V>? map) int
Combines the hash codes of a map's entries. Null → 0. Entries are combined as (key, value) pairs so the result is sensitive to both keys and values but order-independent across maps with identical content.
crossmintPoll<T extends Object>({required Future<T?> action(int attempt), required Object onTimeout(), CrossmintPollingConfig config = const CrossmintPollingConfig()}) Future<T>
Polls action up to config.maxAttempts times with exponential backoff.
crossmintSignerBridgeUriForEnvironment(CrossmintEnvironment environment) Uri

Exceptions / Errors

CrossmintAuthException
Thrown by authentication flows — OTP failures, OAuth callback errors, session restore issues, JWT expiry, logout failures.
CrossmintConfigurationException
Thrown when the client is configured incorrectly — missing API key, invalid base URL, incompatible runtime overrides, etc.
CrossmintCredentialsException
Thrown by verifiable-credentials operations — malformed credential documents, verification failures, locator resolution errors.
CrossmintDeserializationException
Thrown when a JSON payload from the Crossmint API is missing a required field, contains the wrong type for a field, or otherwise cannot be parsed into a typed model. Carries the entity being parsed and the offending field so consumer code can react programmatically instead of pattern matching on the message string.
CrossmintException
Base class for every exception the Crossmint SDK throws.
CrossmintOrdersException
Thrown by checkout / order operations — invalid line items, payment method mismatches, order lookup failures.
CrossmintSignerException
Thrown by signer operations — missing host, rejected OTP, unsupported export, missing passkey callback, upstream signer-service errors.
CrossmintTokensException
Thrown by token-related operations — balance lookup failures, missing token metadata.
CrossmintUsersException
Thrown by user-profile operations — user lookup failures, profile update errors.
CrossmintWalletException
Thrown by wallet operations — lookup failures, unsupported chain, missing wallet, malformed transaction payloads.