Cryptocurrency wallet system for AI agents - Bitcoin, USDT, USDC, x402 payments, Binance/Coinbase trading
agent-crypto-wallet is an early-stage JavaScript project in the AI payments / x402 ecosystem. It currently has 1 GitHub stars and 0 forks.
Cryptocurrency wallet system for AI agents. Enables secure storage and management of Bitcoin (BTC), USDT (ERC20/TRC20), and USDC (Base), with support for agent-to-agent payments via x402 protocol and trading on major exchanges.
npm install -g agent-crypto-wallet
import AgentWallet from 'agent-crypto-wallet';
// Create or load wallet
const wallet = new AgentWallet({
agentId: 'my-agent',
mpc: { provider: 'cdp' }
});
// Initialize with existing wallet or generate new
await wallet.initialize({
password: 'secure-password',
generateSeed: true // Set to false to load existing
});
// Get all addresses
const addresses = wallet.getAllAddresses();
console.log(addresses);
// { bitcoin: 'bc1q...', ethereum: '0x...', base: '0x...', tron: 'T...' }
// Get balance for specific asset
const btcBalance = await wallet.getBalance('BTC');
console.log(`BTC: ${btcBalance}`);
// Send payment via x402 protocol
await wallet.sendPayment({
to: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
amount: '100',
asset: 'USDC-Base',
protocol: 'x402'
});
// Send native payment
await wallet.sendPayment({
to: 'bc1q...',
amount: '0.001',
asset: 'BTC',
protocol: 'native'
});
// Buy BTC on Binance
await wallet.createOrder({
exchange: 'binance',
symbol: 'BTC/USDT',
side: 'buy',
amount: 0.001,
type: 'market'
});
// Sell on Coinbase
await wallet.createOrder({
exchange: 'coinbase',
symbol: 'BTC-USD',
side: 'sell',
amount: 0.001,
type: 'limit',
price: 45000
});
# MPC Wallet (Coinbase CDP)
COINBASE_CDP_API_KEY=your_api_key
COINBASE_CDP_API_SECRET=your_secret
# Exchange APIs
BINANCE_API_KEY=your_key
BINANCE_API_SECRET=your_secret
COINBASE_API_KEY=your_key
COINBASE_API_SECRET=your_secret
# Node URLs (optional)
ETHEREUM_NODE=https://eth-mainnet.alchemyapi.io/v2/YOUR_KEY
BASE_NODE=https://mainnet.base.org
TRON_NODE=https://api.trongrid.io
| Asset | Network | Address |
|---|---|---|
| BTC | Bitcoin | Native |
| USDT | Ethereum (ERC20) | 0xdAC17F958D2ee523a2206206994597C13D831ec7 |
| USDT | TRON (TRC20) | TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t |
| USDC | Base | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 |
After installation, the wallet skill is automatically registered with OpenClaw. Use these commands:
"Initialize my crypto wallet"
"Show my wallet addresses"
"Check my BTC balance"
"Send 100 USDC to 0x742d..."
"Buy 0.001 BTC on Binance"
new AgentWallet(options)
Options:
agentId (string): Unique identifier for the agentmpc.provider (string): MPC provider ('cdp' or 'agentpayy')mpc.enabled (boolean): Enable MPC wallet (default: true)initialize(options)Initialize the wallet.
Options:
password (string, required): Encryption passwordseedPhrase (string, optional): Existing seed phrasegenerateSeed (boolean, optional): Generate new seed (default: false)forceNew (boolean, optional): Create new wallet even if existsgetAddress(chain)Get address for specific chain.
Parameters:
chain (string): 'bitcoin', 'ethereum', 'base', 'tron'getBalance(asset)Get balance for specific asset.
Parameters:
asset (string): 'BTC', 'USDT-ERC20', 'USDT-TRC20', 'USDC-Base'sendPayment(params)Send payment to another address.
Parameters:
to (string, required): Recipient addressamount (string|number, required): Amount to sendasset (string, required): Asset to sendprotocol (string): 'x402' or 'native' (default: 'x402')createOrder(params)Create trading order on exchange.
Parameters:
exchange (string, required): 'binance' or 'coinbase'symbol (string, required): Trading pair (e.g., 'BTC/USDT')side (string, required): 'buy' or 'sell'amount (number, required): Order amounttype (string): 'market' or 'limit' (default: 'market')price (number): Required for limit orders# Clone repository
git clone https://github.com/clawfin/agent-crypto-wallet.git
cd agent-crypto-wallet
# Install dependencies
npm install
# Run tests
npm test
# Link for local development
npm link
MIT
Contributions welcome! Please read our contributing guidelines.
The AI agent with a wallet — spends USDC autonomously to get real work done. Apache-2.0, TypeScript.
Daydreams is a set of tools for building agents for commerce
A decentralized micro-settlement protocol enabling autonomous AI agents to pay publishers for premium content via Circle Programmable Wallets and x402 nanopayments.
The best way to monetize AI applications & MCP, using x402, CDP Smart Wallets & Paymaster
Command-line wallet and HTTP client for the Tempo blockchain, with built-in Machine Payments Protocol support.
Autonomous AI Agent Swarm framework with x402 self-executing wallets. Empowers LLM-driven agents to trade, bridge, and manage crypto treasuries without human intervention. The ultimate Agentic DeFi toolkit for 2026.