Java console app demonstrating Crossmint wallet operations with EVM keypair signer.
- Generate EVM keypair using web3j
- Create smart wallet via Crossmint API with external wallet signer
- Fund wallet with test USDC tokens
- Create USDC transfer transaction
- Sign the transaction message hash with EVM keypair
- Approve transaction with signature
- Poll transaction status until completion
src/
├── Main.java # Main demo orchestrator
├── services/
│ ├── KeypairService.java # EVM keypair generation and signing
│ └── CrossmintService.java # Crossmint API client
└── utils/
├── Config.java # Configuration management
└── Logger.java # Logging utilities
- Java 17+ (tested with Java 21)
- Gradle (or use the included wrapper)
Create a .env file in the project root and add your api key:
# Crossmint API Configuration
CROSSMINT_API_KEY=your_crossmint_api_key_here
CROSSMINT_BASE_URL=https://staging.crossmint.com
# Network Configuration
NETWORK=base-sepolia
# Logging Configuration
LOG_LEVEL=info
# Demo Configuration
DEMO_RECIPIENT_ADDRESS=0x6671f7552df0fbAF762Bd40aEd1cA3ec670d6161
DEMO_AMOUNT_USDC=1
FUND_AMOUNT=10./gradlew run- POST
/api/2025-06-09/wallets
- POST
/api/v1-alpha2/wallets/{walletLocator}/balances
- POST
/api/2025-06-09/wallets/{walletLocator}/tokens/{chain}:usdc/transfers
- POST
/api/2025-06-09/wallets/{walletLocator}/transactions/{transactionId}/approvals
- GET
/api/2025-06-09/wallets/{walletLocator}/transactions/{transactionId}
- web3j: EVM keypair generation and message signing
- OkHttp: HTTP client for API calls
- Jackson: JSON processing
- dotenv-java: Environment variable loading
- SLF4J: Logging
- Replace
CROSSMINT_API_KEYwith your actual Crossmint API key - The demo uses
base-sepoliatestnet by default - It uses USDXM (crossmint's test usdc) instead of USDC to be able to fund via API