Overview
The@crossmint/wallets-sdk provides smart wallet functionality for AI agents in the Agentic Finance platform. Crossmint wallets are smart contract wallets that support ERC-6492 pre-deployment signatures and work seamlessly with the x402 payment protocol.
Installation
Core Concepts
Wallet Types
- Smart Contract Wallets: Crossmint creates smart contract wallets that can be pre-deployed (ERC-6492) or fully deployed on-chain
- API Key Signer: Wallets use API key-based signing for autonomous agent operation
- Multi-chain Support: Supports Base Sepolia and other EVM chains
Wallet States
- Pre-deployed: Wallet exists but contract is not yet deployed on-chain (uses ERC-6492 signatures)
- Deployed: Wallet contract is deployed on-chain (uses EIP-1271 signatures)
Creating a Crossmint Client
Basic Setup
Creating Wallets
Create a Wallet with API Key Signer
Wallet Locator Pattern
Use consistent locators to ensure the same wallet is retrieved:EVM Wallet Operations
Converting to EVMWallet
Signing Typed Data
Sign EIP-712 typed data for payment authorizations:Sending Transactions
Deploy Pre-deployed Wallet
Deploy a pre-deployed wallet with a minimal self-transfer:Complete Examples
Guest Agent Wallet Setup
Fromevents-concierge/src/agents/guest.ts:91-113:
Host Agent Wallet Setup
Fromevents-concierge/src/agents/host.ts:241-265:
Type Definitions
Wallet Interface
EVMWallet Methods
Best Practices
Use Consistent Locators
Always use consistent owner locators to ensure the same wallet is retrieved:Handle Wallet Deployment
Check if a wallet is deployed before making payments:Deploy Before Settlement
For x402 payments, deploy pre-deployed wallets before settlement:Error Handling
Insufficient Balance
See Also
- x402Adapter - Convert Crossmint wallets to viem accounts
- Crossmint Documentation - Official Crossmint docs