Skip to main content
Final Class Runtime wallet for EVM chains (Base, Ethereum, Polygon, Optimism, etc.).
final class CrossmintEvmWallet extends CrossmintRuntimeWalletBase
Adds EVM-specific entry points on top of CrossmintRuntimeWalletBase: create + sign transactions, sign arbitrary messages, and sign EIP-712 typed data. Every entry point calls preAuthIfNeeded() first, so recovery flows and pending device-signer registrations are handled automatically before the request hits the Crossmint API. The default chain is base-sepolia on staging environments and base on production — override per-call via CrossmintEvmTransactionRequest.chain.

Constructors

CrossmintEvmWallet

CrossmintEvmWallet({
  required super.client,
  required super.wallet,
  super.recoverySigner,
  super.signer,
  super.additionalSigners,
  super.deviceSignerKeyStorage,
  super.onAuthRequired,
})
Creates a runtime EVM wallet. Use CrossmintClient.createEvmWallet or the wallet controller instead of constructing this directly.

Properties

defaultChain

String get defaultChain

Methods

createTransaction

Future<CrossmintTransactionDetails> createTransaction(
  CrossmintEvmTransactionRequest request,
)
Submits a transaction request to the Crossmint API without waiting for approval or confirmation. Use this when you want to inspect the created record before approving — most callers should use sendTransaction.

sendTransaction

Future<CrossmintTransactionDetails> sendTransaction(
  CrossmintEvmTransactionRequest request,
)
End-to-end: creates the transaction, approves it with the active signer, polls for confirmation (exponential backoff 1s → 8s, up to 60 attempts, with jitter), and returns the final CrossmintTransactionDetails.

signMessage

Future<String> signMessage(String message)
Signs an arbitrary UTF-8 string as a personal message (EIP-191). Returns the hex-encoded signature. Calls preAuthIfNeeded() first.

signTypedData

Future<String> signTypedData(CrossmintTypedData typedData)
Signs an EIP-712 typed data payload. Requires domain.name, domain.version, domain.chainId, domain.verifyingContract, primaryType, types, and message. Throws CrossmintWalletException on malformed input.