CrossmintClient owns every sub-client (auth, wallets, credentials,
orders, tokens, users), the shared transport, the auth session store,
and the hidden WebView signer bridge. All sub-clients share a closure that
reads the live JWT from auth, so token refresh works without rebuilding
the dependency graph.
Lifecycle
- Construct the client with a
CrossmintClientConfig. await client.initialize()— validates config and auto-resolves the app ID from platform metadata if not supplied.await client.auth.restoreSession()— restores any persisted JWT.- Use sub-clients or factory helpers (
createWalletController,createEvmWallet, etc.) for the rest of your session. await client.dispose()when tearing down — shuts down the signer bridges and releases the auth client.
Typical bootstrap
auth, wallets, transport,
runtimeOverrides, etc.) are injection points primarily used by tests and
advanced integrations. Leave them null in production to get the default
HTTP transport, secure-storage-backed auth, and platform-resolved app ID.
Constructors
CrossmintClient
CrossmintClient.
Properties
config
auth
wallets
credentials
orders
tokens
users
appId
CrossmintClientConfig.appId if set, otherwise the value auto-resolved from platform metadata during initialize. May be null until initialize has completed.
isInitialized
initialize has completed successfully.
isDisposed
dispose has been called. Once disposed, the client cannot be reused — construct a new one.
hiddenSignerBridgeController
authStorage
CrossmintClientConfig.authStorage or the default flutter_secure_storage-backed implementation.
transport
Methods
createWalletController
CrossmintWalletController bound to this client.
createHiddenSignerBridge
HiddenSignerBridgeRuntimeController instance — used internally by hiddenSignerBridgeController. Override the bridge config to point at a custom signer URL (e.g. for testing).
createExportSignerBridge
CrossmintExportSignerBridgeRuntimeController instance. Used internally by exportSignerBridgeController.
createEvmNonCustodialSigner
HiddenSignerBridge. Produces secp256k1 signatures inside the WebView without exposing keys to Dart.
createSolanaNonCustodialSigner
HiddenSignerBridge. Produces ed25519 signatures inside the WebView.
createStellarNonCustodialSigner
HiddenSignerBridge. Produces ed25519 signatures inside the WebView.
createEvmWallet
CrossmintWallet in a runtime CrossmintEvmWallet.
createSolanaWallet
CrossmintWallet in a runtime CrossmintSolanaWallet.
createStellarWallet
CrossmintWallet in a runtime CrossmintStellarWallet.
createDeviceWalletSigner
createEvmExternalWalletSigner
CrossmintExternalWalletSignCallback. Use for wallets owned by the user (e.g. MetaMask, Rainbow) where the SDK only needs to request signatures.
createSolanaExternalWalletSigner
CrossmintExternalWalletSignCallback.
createStellarExternalWalletSigner
CrossmintExternalWalletSignCallback.
createPasskeyApprovalSigner
onSign — a callback that performs the WebAuthn / platform-native passkey assertion and returns a CrossmintPasskeySignResult. Native platform passkey support is pending (Stage 2); today every passkey signer requires an explicit callback or CrossmintSignerException(code: passkeyCallbackMissing) is thrown during signing.
dispose
CrossmintClient rather than reusing this one.

