Overview
This guide will walk you through creating a simple application that creates a wallet for a user and allows them to check their balance and send tokens. You’ll learn the core concepts of the Crossmint SDK.Time to complete: ~5 minutesWhat you’ll build: A wallet creation app with balance checking and token transfers
Prerequisites
Crossmint API Key
Get your API key from the Crossmint Console.Make sure your API key has these scopes enabled:
- Wallet API (all permissions)
- Users (all permissions)
Choose Your Path
React Application
Build with React hooks and providers
Vanilla TypeScript
Use the core SDK without a framework
React Quickstart
Step 1: Install Dependencies
Step 2: Set Up Environment Variables
Create a.env.local file in your project root:
.env.local
Step 3: Configure Providers
Wrap your application with Crossmint providers:app/layout.tsx
What’s happening here?
CrossmintProvider- Initializes the SDK with your API keyCrossmintAuthProvider- Handles user authenticationCrossmintWalletProvider- Automatically creates a wallet when users log in
Step 4: Create Your Wallet Component
Build a component that displays wallet information and allows token transfers:components/WalletDemo.tsx
Step 5: Run Your Application
Success! You now have a working wallet application with:
- User authentication via email OTP
- Automatic wallet creation
- Balance checking
- Token transfers
Vanilla TypeScript Quickstart
For non-React applications or programmatic wallet management.Step 1: Install Dependencies
Step 2: Set Up Environment Variables
Create a.env file:
.env
You can use either a client-side or server-side API key. For server-side, you have access to additional features.
Step 3: Create a Wallet
Here’s a complete example that creates a wallet and performs operations:index.ts
Step 4: Check Balances
Retrieve wallet balances:Step 5: Send Tokens
Transfer tokens to another address:Step 6: Advanced Operations
For chain-specific operations:Step 7: Run Your Script
Success! You can now create and manage wallets programmatically.
Understanding Key Concepts
Wallet Signers
Wallet Signers
Signers determine how wallet transactions are authorized. Crossmint supports:
- Email - User authenticates via email OTP
- Passkey - WebAuthn/biometric authentication
- API Key - Programmatic access (server-side only)
- External Wallet - Use existing wallet for signing
Multi-Chain Support
Multi-Chain Support
The same code works across all supported chains:Solana:
solana(mainnet)solana-devnet
polygon,polygon-amoybase,base-sepoliaethereum,sepoliaarbitrum,arbitrum-sepolia- And 15+ more…
Authentication Flow
Authentication Flow
For email-based authentication:
- User provides email address
- Crossmint sends OTP code
- User enters OTP
- Wallet is created/accessed
When using React SDK, this is handled automatically by the provider!
Wallet Activity
Wallet Activity
Track all wallet transactions:
Delegated Signers
Delegated Signers
Allow other addresses to sign transactions on behalf of the wallet:
Next Steps
Wallets SDK Deep Dive
Explore advanced wallet features and multi-chain support
Authentication Guide
Learn about authentication options and security
React Components
Discover all available React hooks and components
API Reference
Browse the complete API documentation
Common Patterns
Troubleshooting
OTP not received
OTP not received
If the OTP email isn’t arriving:
- Check spam/junk folder
- Verify email address is correct
- Ensure API key has “Users” scope enabled
- Check Crossmint console for rate limits
Transaction failing
Transaction failing
Common reasons for transaction failures:
- Insufficient balance - Check wallet has enough tokens + gas
- Invalid address - Verify recipient address format
- Wrong chain - Ensure recipient address matches chain
- Network issues - Try again after a moment
Wallet not creating
Wallet not creating
If wallet creation fails:
- Verify API key is valid and has correct scopes
- Check that chain name is spelled correctly
- Ensure JWT is provided for client-side calls
- Review error message for specific details
Need Help?
Join our Discord community or check the full documentation for more assistance.