crossmint-agentic-wallet
v1.3.0
Published
Non-custodial Solana wallet creation for AI agents using Crossmint MPC infrastructure
Maintainers
Readme
Crossmint Agentic Wallet Skill
Create and manage non-custodial Solana wallets for AI agents using Crossmint's MPC infrastructure.
Features
- Non-custodial wallets: Agents get their own Solana wallets without managing private keys
- MPC security: Wallets are secured by Crossmint's multi-party computation
- Identifier-based: Create wallets using email, phone, or custom agent IDs
- Full token support: Transfer SOL, USDC, and any SPL token
- Staging mode: Test with devnet and free testnet tokens (USDXM)
Setup
1. Get Crossmint API Keys
- Go to Crossmint Console
- Create a new project (or use existing)
- Get your Server-side API key (starts with
sk_staging_orsk_production_)
2. Configure Environment
export CROSSMINT_SERVERSIDE_API_KEY=sk_staging_your-key-hereOr add to your .env:
CROSSMINT_SERVERSIDE_API_KEY=sk_staging_your-key-here3. Build the Skill
cd skills/crossmint-agentic-wallet
npm install
npm run buildUsage
As a Skill (OpenClaw/Agent Framework)
{
"skills": {
"entries": {
"crossmint-agentic-wallet": {
"enabled": true,
"env": {
"CROSSMINT_SERVERSIDE_API_KEY": "sk_staging_your-key"
}
}
}
}
}Direct TypeScript Usage
import { CrossmintAgentWallet, createSkill } from '@mawdos/crossmint-agentic-wallet';
// Option 1: Direct client usage
const wallet = new CrossmintAgentWallet('sk_staging_your-key');
// Create a wallet for an AI agent
const result = await wallet.createWallet({
identifier: 'trading-agent-001',
chain: 'solana-devnet',
alias: 'trading'
});
console.log('Wallet created:', result.data?.address);
// Fund with testnet tokens
await wallet.fundWalletStaging('trading-agent-001', 100);
// Check balances
const balances = await wallet.getBalances('trading-agent-001', 'solana-devnet');
console.log('SOL balance:', balances.data?.nativeToken.amount);
// Transfer tokens
await wallet.transferSol({
fromIdentifier: 'trading-agent-001',
toAddress: 'RecipientAddress...',
amount: '0.1',
chain: 'solana-devnet'
});
// Option 2: Skill-based usage (for agent frameworks)
const skill = createSkill('sk_staging_your-key');
// Execute tools by name
const walletResult = await skill.execute('create_wallet', {
identifier: 'my-agent',
chain: 'solana-devnet'
});Via REST API (MAWDos Terminal)
The skill is also exposed via REST endpoints at /api/wallets:
# Create a wallet
curl -X POST http://localhost:3001/api/wallets/create \
-H "Content-Type: application/json" \
-d '{
"identifier": "[email protected]",
"chain": "solana-devnet"
}'
# Get or create (idempotent)
curl -X POST http://localhost:3001/api/wallets/get-or-create \
-H "Content-Type: application/json" \
-d '{
"identifier": "trading-agent-001",
"chain": "solana-devnet",
"alias": "trading"
}'
# Get balances
curl http://localhost:3001/api/wallets/trading-agent-001/balances?chain=solana-devnet
# Fund with testnet tokens
curl -X POST http://localhost:3001/api/wallets/trading-agent-001/fund \
-H "Content-Type: application/json" \
-d '{"amount": 100}'
# Transfer SOL
curl -X POST http://localhost:3001/api/wallets/trading-agent-001/transfer-sol \
-H "Content-Type: application/json" \
-d '{
"toAddress": "RecipientAddress...",
"amount": "0.1",
"chain": "solana-devnet"
}'Available Tools
| Tool | Description |
|------|-------------|
| create_wallet | Create a new wallet for an agent |
| get_or_create_wallet | Get existing or create new (idempotent) |
| get_wallet | Get wallet by identifier |
| get_balances | Get SOL and token balances |
| transfer_sol | Transfer native SOL |
| transfer_tokens | Transfer SPL tokens (USDC, etc.) |
| fund_wallet_staging | Fund with testnet USDXM (staging only) |
Wallet Identifiers
Wallets can be created using different identifier types:
| Type | Example | Use Case |
|------|---------|----------|
| Email | [email protected] | User-linked agents |
| Phone | +14155551234 | SMS-verified agents |
| Agent ID | trading-agent-001 | Autonomous agents |
Chains
| Chain | Environment | Use |
|-------|-------------|-----|
| solana-devnet | Staging | Testing with free tokens |
| solana | Production | Real transactions |
Security
- Non-custodial: Crossmint uses MPC (Multi-Party Computation) - no single party holds the full private key
- API Key authentication: All operations require server-side API key
- No private key exposure: Agents never see or manage raw private keys
License
MIT
