crossmint_client library

Top-level client surface for the Crossmint SDK.

Exposes CrossmintClient — the facade that owns auth, wallets, credentials, orders, tokens, users, and the hidden signer bridge — along with the auth, core, wallets, bridge, runtime, and credentials barrels that most apps need.

Typical use:

import 'package:crossmint_flutter/crossmint_client.dart';

final client = CrossmintClient(
  config: const CrossmintClientConfig(
    apiKey: 'YOUR_STAGING_API_KEY',
    appScheme: 'com.your.app',
  ),
);
await client.initialize();
await client.auth.restoreSession();

This surface is headless — it does not import Flutter Material or Cupertino. Pair with crossmint_flutter_controllers.dart when you need CrossmintWalletController, or crossmint_flutter_ui.dart for the opt-in default UI widgets.

Classes

AppLinksCrossmintAuthLinkProvider
CredentialsApiService
CredentialService
CrossmintApiConfig
Base configuration shared by every Crossmint SDK client.
CrossmintApiKeySigner
A signer that delegates all signing to the Crossmint backend via API key authentication.
CrossmintApiKeySignerConfig
CrossmintApiVersions
Centralised API version path prefixes used by every Crossmint service.
CrossmintAuthAuthenticated
CrossmintAuthCallbackRouter
CrossmintAuthClient
Authentication sub-client — email OTP, OAuth, wallet sign-in, and session lifecycle. Exposed on CrossmintClient.auth.
CrossmintAuthenticatedUser
CrossmintAuthInitializing
CrossmintAuthInProgress
CrossmintAuthLauncher
CrossmintAuthLinkProvider
CrossmintAuthLoggedOut
CrossmintAuthSession
CrossmintAuthSessionCodec
CrossmintAuthState
CrossmintAuthStorage
CrossmintClient
Top-level facade for the Crossmint SDK.
CrossmintClientConfig
Configuration for CrossmintClient.
CrossmintClientRuntimeOverrides
CrossmintContractMetadataService
Fetches and validates on-chain contract metadata (ERC-7572) for verifiable credential collections.
CrossmintCreateOnLoginConfig
CrossmintCredentialDecryptRequest
CrossmintCredentialFilter
CrossmintCredentialLocator
CrossmintCredentialMetadata
CrossmintCredentialNftLookupResult
CrossmintCredentialQuery
CrossmintCredentialRecord
CrossmintCredentialRetrievalProcedure
CrossmintCredentialsClient
CrossmintCredentialsCollection
CrossmintCredentialType
CrossmintCredentialVerificationResult
CrossmintCredentialWalletAuthChallenge
CrossmintDecrypt
CrossmintDecryptedCredential
CrossmintDelegationSignatureService
Fetches a Lit Protocol capacity delegation signature from the Crossmint API.
CrossmintDeviceSignerConfig
CrossmintDeviceSignerDescriptor
CrossmintDeviceWalletSigner
Hardware-backed approval signer — keys live in Secure Enclave (iOS) or Android Keystore, never in Dart memory.
CrossmintEmailOtpChallenge
CrossmintEmailSignerConfig
CrossmintEncryptedVerifiableCredential
CrossmintEvmExternalWalletSigner
EVM variant of CrossmintExternalWalletSigner. Signs both arbitrary messages (via the EIP-191 personal-message path the SDK assembles) and raw transaction payloads.
CrossmintEvmNonCustodialSigner
EVM variant of CrossmintNonCustodialSigner. Signs with secp256k1 keys using hex encoding. Applies the EIP-191 personal-message prefix when signing arbitrary strings.
CrossmintEvmTransactionCall
CrossmintEvmTransactionRequest
CrossmintEvmWallet
Runtime wallet for EVM chains (Base, Ethereum, Polygon, Optimism, etc.).
CrossmintExportableWalletSigner
Marker interface for signers that can hand back the raw private key to the user — primarily non-custodial email and phone signers.
CrossmintExportSignerBridge
CrossmintExportSignerBridgeClient
CrossmintExportSignerBridgeRuntimeController
CrossmintExternalWalletSigner
Base class for external-wallet delegated signers — wallets the user owns (e.g. MetaMask, Rainbow, Phantom) where the SDK never holds keys. In Crossmint terminology, an external wallet is a flavor of delegated signer that approves operations through the user's own wallet UI.
CrossmintExternalWalletSignerConfig
CrossmintHttpTransport
CrossmintLogger
CrossmintNftRecord
CrossmintNftService
On-chain NFT service for VC operations: burn checks, token URIs, and contract metadata URIs.
CrossmintNonCustodialSigner
Base class for email / phone non-custodial signers.
CrossmintOrderCreateRequest
CrossmintOrderReadRequest
CrossmintOrderRecord
CrossmintOrdersClient
CrossmintOrderUpdateRequest
CrossmintOtpChallenge
CrossmintPasskeyApprovalSigner
Passkey-based CrossmintWalletApprovalSigner that delegates signing to a caller-supplied callback.
CrossmintPasskeyConfig
CrossmintPasskeyCredential
CrossmintPasskeySignerConfig
CrossmintPasskeySignerFactory
Experimental factory for creating a passkey signer config.
CrossmintPasskeySignMetadata
CrossmintPasskeySignResult
CrossmintPendingSignerOperation
CrossmintPhoneSignerConfig
CrossmintPollingConfig
Configuration for exponential-backoff polling loops used throughout the SDK.
CrossmintRequestOptions
CrossmintRuntimeWalletBase
CrossmintSecureStorageAdapter
CrossmintServerSignerConfig
CrossmintSignatureRecord
CrossmintSignerBridgeClient
CrossmintSignerBridgePublicKey
CrossmintSignerBridgeSignature
CrossmintSignerBridgeSignResult
CrossmintSignerBridgeStatusResult
CrossmintSignerConfig
CrossmintSolanaExternalWalletSigner
Solana variant of CrossmintExternalWalletSigner. Signs transactions only — raw-message signing is not supported on Solana.
CrossmintSolanaNonCustodialSigner
Solana variant of CrossmintNonCustodialSigner. Signs with ed25519 keys using base58 encoding. signMessage is intentionally unsupported — Solana only supports transaction signing.
CrossmintSolanaTransactionRequest
CrossmintSolanaWallet
Runtime wallet for Solana.
CrossmintStellarContractCallRequest
CrossmintStellarExternalWalletSigner
Stellar variant of CrossmintExternalWalletSigner. Signs transactions only — raw-message signing is not supported on Stellar.
CrossmintStellarNonCustodialSigner
Stellar variant of CrossmintNonCustodialSigner. Signs with ed25519 keys using base64 encoding. signMessage is intentionally unsupported — Stellar only supports transaction signing.
CrossmintStellarSerializedTransactionRequest
CrossmintStellarTransactionRequest
CrossmintStellarWallet
Runtime wallet for Stellar — including Soroban smart-contract calls.
CrossmintTokenAvailabilityRecord
CrossmintTokenAvailabilityResult
CrossmintTokenQuery
CrossmintTokensClient
CrossmintTransactionRecord
CrossmintTransport
CrossmintTransportResponse
CrossmintTypedData
CrossmintUser
CrossmintUserCreateRequest
CrossmintUserLookupRequest
CrossmintUsersClient
CrossmintVcConfig
Configuration for VC on-chain services: RPC endpoints, IPFS gateways, and timeouts.
CrossmintVcIssuer
CrossmintVcNft
CrossmintVcRpcClient
Minimal JSON-RPC client for read-only Ethereum contract calls.
CrossmintVerifiableCredential
CrossmintVerifiableCredentialEncryption
CrossmintWallet
CrossmintWalletAddSignerResult
CrossmintWalletApprovalSigner
CrossmintWalletApprovedSignatureResult
CrossmintWalletApprovedTransactionResult
CrossmintWalletApproveRequest
CrossmintWalletApproveResult
CrossmintWalletAuthChallenge
Challenge returned by CrossmintAuthClient.signInWithWallet that must be signed by the user's external wallet (MetaMask, Phantom, etc.).
CrossmintWalletBalanceSnapshot
CrossmintWalletCreateRequest
CrossmintWalletFundRequest
CrossmintWalletFundResult
CrossmintWalletLookupRequest
CrossmintWalletNftPage
CrossmintWallets
Stateless convenience facade for wallet operations.
CrossmintWalletsClient
CrossmintWalletSignatureApproveRequest
CrossmintWalletSignatureCreateRequest
CrossmintWalletSignatureListRequest
CrossmintWalletSignatureLookupRequest
CrossmintWalletSigner
CrossmintWalletTokenTransferRequest
CrossmintWorldstoreListingRecord
CrossmintWorldstoreListingSearchResult
CrossmintWorldstoreOrderCreateRequest
CrossmintWorldstoreSearchRequest
DeviceSignerKeyStorage
DeviceSignerKeyStorageInternal
Eip712VerificationInvalid
The proof was rejected. reason is a short, non-user-facing label describing which structural check failed.
Eip712VerificationResult
Outcome of an EIP-712 proof verification attempt.
Eip712VerificationStructuralOnly
The proof's envelope is well-formed (issuer DID parses, signature is 65 bytes) but the signature was not cryptographically verified.
Eip712VerificationValid
The proof was cryptographically verified against the issuer's address.
FlutterSecureStorageAdapter
HiddenSignerBridge
HiddenSignerBridgeConfig
HiddenSignerBridgeHost
HiddenSignerBridgePort
HiddenSignerBridgeRuntimeController
HiddenSignerBridgeState
InMemoryCrossmintAuthStorage
InMemoryCrossmintSecureStorageAdapter
NoopCrossmintLogger
SecureStorageCrossmintAuthStorage
SoftwareDeviceSignerKeyStorage
Software-backed device signer key storage for dev/test environments.
UnsupportedPasskeySignerFactory
Fallback factory used when the Flutter runtime does not provide a concrete passkey implementation.
UrlLauncherCrossmintAuthLauncher
WalletAuthService
WalletsApiService

Constants

kContractUriSelector → const String
ERC-7572 contractURI() selector.
kCrossmintFlutterSdkVersion → const String
Version of the crossmint_flutter SDK reported to the Crossmint backend (e.g. via sdkMetadata query parameters on embedded checkout).
kOwnerOfSelector → const String
ERC-721 ownerOf(uint256) selector.
kTokenUriSelector → const String
ERC-721 tokenURI(uint256) selector.
kZeroAddress → const String
Ethereum zero address.

Functions

abiDecodeAddress(String hexData) String
Decodes an ABI-encoded address (last 20 bytes of a 32-byte word).
abiDecodeString(String hexData) String
Decodes an ABI-encoded dynamic string (offset + length + data).
abiEncodeUint256(String tokenId) String
Encodes a uint256 token ID as a 32-byte hex word (no 0x prefix).
createDefaultDeviceSignerKeyStorage() DeviceSignerKeyStorage
Creates the default device signer key storage.
createSoftwareDeviceSignerKeyStorage() DeviceSignerKeyStorage
Creates a software-only device signer for dev/test use.
crossmintAliasFromWalletLocator(String locator) String?
crossmintApiBaseUriForConfig(CrossmintApiConfig config) Uri
crossmintApiBaseUriForEnvironment(CrossmintEnvironment environment) Uri
crossmintAssertBridgeHosted(HiddenSignerBridge bridge) → void
Throws if bridge is the SDK's default runtime controller and no HiddenSignerBridgeHost has ever attached a port to it.
crossmintConfigSignersFromWallet(CrossmintWallet wallet) List<CrossmintJsonMap>
crossmintDedupeSigners(List<CrossmintWalletApprovalSigner> signers) List<CrossmintWalletApprovalSigner>
Deduplicates a list of approval signers by locator, keeping the first occurrence of each. Used when composing a runtime wallet's primary + additional signers so the same signer can never appear twice.
crossmintEnvironmentForConfig(CrossmintApiConfig config) CrossmintEnvironment
crossmintEnvironmentFromApiKey(String apiKey) CrossmintEnvironment
crossmintEnvironmentFromUri(Uri uri) CrossmintEnvironment
crossmintExportSignerBridgeUriForConfig(CrossmintClientConfig config) Uri
crossmintHasInlineApprovals(CrossmintWalletApproveRequest request) bool
crossmintIsRawHexApprovalMessage(String value) bool
crossmintIsRecoverySigner(CrossmintWallet wallet, CrossmintWalletApprovalSigner signer) bool
crossmintIsSolanaChain(String chain) bool
crossmintIsStellarChain(String chain) bool
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.
crossmintNormalizeConfiguredSigner(Object? value) CrossmintJsonMap?
crossmintNormalizeMap(Map<Object?, Object?> value) CrossmintJsonMap
crossmintOutputSignature(CrossmintJsonMap raw) String?
crossmintPendingApprovalMessage(CrossmintJsonMap pendingApproval) String
crossmintPendingApprovals(CrossmintJsonMap raw) List<CrossmintJsonMap>
crossmintPendingSignerLocator(CrossmintJsonMap pendingApproval) String
crossmintPendingSignerOperation(CrossmintWalletSigner signer, String chain) CrossmintPendingSignerOperation?
Returns the pending operation blocking a signer's approval on the given chain, or null if none. Mirrors getPendingSignerOperation in the JS SDK: Solana/Stellar surface pending transactions via signer.raw['transaction']; EVM chains surface pending per-chain signatures via signer.raw['chains'][chain].
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.
crossmintReadSignerLocator(CrossmintJsonMap configSigner) String?
crossmintRecoverySignerLocator(CrossmintWallet wallet) String?
crossmintRequireMap(Object? value, String label) CrossmintJsonMap
crossmintRequireString(Object? value, String label) String
crossmintRetrievalProcedure(CrossmintCredentialsClient client) CrossmintCredentialRetrievalProcedure
crossmintSignerBridgeUriForEnvironment(CrossmintEnvironment environment) Uri
crossmintSignerConfigLocator(CrossmintSignerConfig signer) String?
crossmintStatusOf(CrossmintJsonMap raw) String?
crossmintTokenLocator(String token, {required String chain}) String
crossmintTypeFromLocator(String locator) String
crossmintValidatePasskeySigners(CrossmintWalletCreateRequest request) → void
Validates that any passkey signers in a wallet creation request have a usable signing implementation (callbacks or, in the future, native platform support).
crossmintWalletJsonValue(Object? value) Object?
decryptSymmetricCredential(CrossmintEncryptedVerifiableCredential credential, Uint8List secretKey) CrossmintVerifiableCredential
Decrypts an AES-256-GCM encrypted Verifiable Credential.
getCredentialNFTFromLocator(String locator, {CrossmintCredentialCollectionProvider? collectionProvider, Future<Object?> metadataLoader(CrossmintCredentialLocator locator)?}) Future<CrossmintCredentialNftLookupResult>
getCredentialNfts(CrossmintVcChain chain, String wallet, {required CrossmintWalletCredentialNftProvider walletNftsProvider, required CrossmintCredentialCollectionProvider collectionProvider, CrossmintCredentialFilter filter = const CrossmintCredentialFilter()}) Future<List<CrossmintCredentialsCollection>>
ipfsRetrievalProcedure({CrossmintCredentialDocumentLoader? documentLoader}) CrossmintCredentialRetrievalProcedure
isCredentialType(Object? value) bool
isEncryptedVerifiableCredential(Object? value) bool
isVcChain(String chain) bool
isVerifiableCredential(Object? value) bool
parseCredentialLocator(String locator) CrossmintCredentialLocator
recoverEthereumAddress(Uint8List messageHash, Uint8List signature) String?
Recovers an Ethereum address from a secp256k1 signature and message hash.
tryParseCredentialType(Object? value) CrossmintCredentialType?
tryParseEncryptedVerifiableCredential(Object? value) CrossmintEncryptedVerifiableCredential?
tryParseVcIssuer(Object? value) CrossmintVcIssuer?
tryParseVcNft(Object? value) CrossmintVcNft?
tryParseVerifiableCredential(Object? value) CrossmintVerifiableCredential?
verifyCredential(CrossmintVerifiableCredential credential, {CrossmintCredentialProofVerifier? proofVerifier, CrossmintCredentialRevocationChecker? revocationChecker, DateTime? now}) Future<CrossmintCredentialVerificationResult>
verifyEip712Proof(CrossmintVerifiableCredential credential) bool
Backward-compatible boolean wrapper for verifyEip712ProofDetailed.
verifyEip712ProofDetailed(CrossmintVerifiableCredential credential) Eip712VerificationResult
Verifies an EIP-712 typed data signature on a Verifiable Credential.

Typedefs

CrossmintCredentialCollectionProvider = Future<CrossmintCredentialsCollection?> Function(CrossmintVcChain chain, String contractAddress)
CrossmintCredentialDocumentLoader = Future<Object?> Function(Uri retrievalUri)
CrossmintCredentialProofVerifier = FutureOr<bool> Function(CrossmintVerifiableCredential credential)
CrossmintCredentialRevocationChecker = FutureOr<bool> Function(CrossmintVcNft nft)
CrossmintExternalWalletSignCallback = Future<String> Function(String payload)
Callback signature for user-owned external-wallet signers.
CrossmintJsonMap = Map<String, Object?>
CrossmintOtpRejectCallback = void Function([Object? error])
Called to cancel a pending OTP challenge, optionally with an error cause.
CrossmintOtpSendCallback = Future<void> Function()
Called by non-custodial signers to (re-)send an OTP to the user.
CrossmintOtpVerifyCallback = Future<void> Function(String otp)
Called by non-custodial signers to verify the OTP the user entered.
CrossmintSignerAuthRequiredCallback = Future<void> Function(String signerType, String signerLocator, bool needsAuth, CrossmintOtpSendCallback sendOtp, CrossmintOtpVerifyCallback verifyOtp, CrossmintOtpRejectCallback reject)
Callback fired when a non-custodial signer needs the user to authenticate.
CrossmintTransactionDetails = CrossmintTransactionRecord
CrossmintTransactionSummary = CrossmintTransactionRecord
CrossmintVcDocumentLoader = Future<Object?> Function(Uri uri)
CrossmintWalletChallengeSigner = Future<String> Function(String wallet, String challengePayload)
CrossmintWalletCredentialNftProvider = Future<List<CrossmintVcNft>> Function(CrossmintVcChain chain, String wallet)
CrossmintWalletSignature = CrossmintSignatureRecord
HiddenSignerBridgeMessageListener = void Function(CrossmintJsonMap message)
HiddenSignerDispatchScriptBuilder = String Function(String payloadJson)

Exceptions / Errors

CrossmintAuthException
Thrown by authentication flows — OTP failures, OAuth callback errors, session restore issues, JWT expiry, logout failures.
CrossmintAuthRejectedException
Thrown when the user cancels an OTP challenge (via CrossmintWalletOtpController.reject or equivalent).
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.