Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.crossmint.com/llms.txt

Use this file to discover all available pages before exploring further.

Final Class Bridges a CrossmintEvmWallet into the checkout payer contract.
final class CrossmintEvmWalletCheckoutPayer implements CrossmintCheckoutPayer
This adapter is intentionally EVM-only. The embedded checkout sends raw serialized EVM transactions, and the runtime wallet forwards those through the wallet transaction APIs using the same raw-transaction shape as the JS wallet SDK.

Constructors

CrossmintEvmWalletCheckoutPayer

CrossmintEvmWalletCheckoutPayer({
  required CrossmintEvmWallet wallet,
  List<String>? supportedChains,
  String? initialChain,
})
Creates an EVM payer backed by wallet.

Properties

supportedChains

final List<String> supportedChains
EVM chains the wallet can sign transactions on. Computed from the supportedChains argument (defaulting to [wallet.chain]) and normalized to drop duplicates and blanks.

address

String get address
EVM address of the backing CrossmintEvmWallet.

walletProviderKey

String? get walletProviderKey
Always null — this adapter wraps an SDK-owned CrossmintEvmWallet rather than a third-party wallet provider, so there is no provider key to report.

initialChain

String get initialChain
Chain currently selected for outgoing transactions. Starts at the initialChain constructor argument (defaulting to wallet.chain) and updates when the hosted checkout calls switchChain.

Methods

signAndSendTransaction

Future<CrossmintCheckoutTransactionResult> signAndSendTransaction(
  String serializedTransaction,
)
Signs and broadcasts a raw serialized EVM transaction received from the hosted checkout via the backing CrossmintEvmWallet. Returns CrossmintCheckoutTransactionSuccess with the transaction id on success. Errors are caught and surfaced as CrossmintCheckoutTransactionFailure — this method never throws so the hosted checkout can render a user-facing message.

switchChain

Future<void> switchChain(String chain)
Switches the selected chain used for subsequent transactions. Throws ArgumentError when chain is not in supportedChains. Called by the hosted checkout when the user changes chain in the UI.

signMessage

Future<String> signMessage(String message)
Signs an arbitrary message with the backing EVM wallet’s approval signer. Returns the hex-encoded signature.