CrossmintWallet, exposes lifecycle operations
(getWallet, createWallet, ensureLoaded, refresh, clear),
surfaces OTP challenges via otp, and provides create*Wallet*
convenience methods that wire a runtime wallet with a signer of your
choosing (device, non-custodial, external, passkey).
Obtain one from CrossmintClient.createWalletController and pair it with
CrossmintWalletHost (headless) or CrossmintWalletProvider
(opt-in Material UI) so the hidden signer bridge has a place to mount.
Extends ChangeNotifier — listen to the controller for wallet-state
changes. Mutations go through the controller’s public API; observation
can additionally go through state for a narrower, read-only surface.
The loaded wallet belongs to the user who is signed in on client. The
controller removes the wallet and the pending OTP challenge when that user
signs out. It also removes them when a different user signs in. A new
token for the same user keeps the wallet.
Two sessions are for the same user when they have the same JWT or the
same user ID. For CrossmintAuthClient.setJwt, the user ID is the sub
claim of the JWT. If a JWT has no sub claim, each new JWT loads the
wallet again.
Constructors
CrossmintWalletController
CrossmintClient.createWalletController over calling this directly.
Properties
client
config
otp
state
Listenable while still routing all mutations through the controller’s public API (getWallet, createWallet, refresh, clear, …).
currentWallet
null if none is loaded.
status
onAuthRequired
pendingOtpChallenge
CrossmintWalletOtpController.pendingChallenge.
otpChallengeListenable
CrossmintWalletOtpController.challengeListenable.
requireCurrentWallet
CrossmintWalletException when none is loaded.
Methods
getWallet
null when no wallet matches. Listeners fire on state changes.
loadWallet
getWallet instead.
createWallet
crossmintValidatePasskeySigners and fires CrossmintWalletLifecycleCallbacks.onWalletCreationStart if set.
ensureLoaded
refresh
null when nothing is loaded. Also returns null if the user signs out, or a different user signs in, before the result arrives. The controller does not keep that result.
clear
sendOtp
CrossmintWalletOtpController.sendOtp.
verifyOtp
CrossmintWalletOtpController.verifyOtp.
rejectOtp
CrossmintWalletOtpController.reject.
createEvmWallet
CrossmintEvmWallet. Throws CrossmintWalletException if no wallet is loaded.
createSolanaWallet
CrossmintSolanaWallet. On Solana, device signer support depends on the wallet type and is validated server-side. A default device signer is not auto-injected for Solana; it is registered reactively and falls back to the recovery signer when the server rejects it.
createStellarWallet
CrossmintStellarWallet.
createEvmWalletWithDeviceSigner
createEvmWalletWithNonCustodialSigner
CrossmintWalletHost (or CrossmintWalletProvider) mounted in the widget tree.
createSolanaWalletWithNonCustodialSigner
createStellarWalletWithNonCustodialSigner
createStellarWalletWithDeviceSigner
createEvmWalletWithExternalWalletSigner
onSign to perform signatures.
createSolanaWalletWithExternalWalletSigner
createStellarWalletWithExternalWalletSigner
createEvmWalletWithPasskeySigner
createSolanaWalletWithPasskeySigner
createEvmWalletWithPasskeySigner for passkey selection semantics.
createStellarWalletWithPasskeySigner
createEvmWalletWithPasskeySigner for passkey selection semantics.

