When to Use Crossmint
Use Crossmint when:- You need custodial wallet management
- You want to avoid handling private keys
- You’re building enterprise applications with compliance requirements
- You need wallet recovery and account management features
- You need full control over keys
- You’re building non-custodial applications
- You want to minimize third-party dependencies
Full Example
Step-by-Step Breakdown
1. Get Crossmint Credentials
- CROSSMINT_WALLET: Your Crossmint wallet address (obtained from the Crossmint dashboard)
- CROSSMINT_API_KEY: Your Crossmint API key with the
walletsscope
2. Create Crossmint Wallet
- Fetches your wallet using the API key
- Exposes the same interface as local wallets
- Handles transaction signing through Crossmint’s infrastructure
3. Create Payment Handler
Crossmint vs Local Wallets
- Crossmint: No key management, recovery features, but requires API key and internet connection
- Local: Full control, no external dependencies, but you manage keys and security
Environment Variables
CROSSMINT_WALLET: Your Crossmint wallet addressCROSSMINT_API_KEY: Your Crossmint API key withwalletsscope
Setting Up Crossmint
- Sign up at crossmint.com
- Create a wallet through their dashboard or API
- Generate an API key with wallet permissions
- Add credentials to your
.envfile
Related Resources
- Solana Exact Payment - Local wallet example
- Package Reference - Crossmint wallet adapter
- Crossmint Documentation - Official Crossmint docs