EVM Crypto Wallet for Your Agent
by @surfer77
Self-sovereign EVM wallet for AI agents. Use when the user wants to create a crypto wallet, check balances, send ETH or ERC20 tokens, swap tokens, or interact with smart contracts. Supports Base, Ethereum, Polygon, Arbitrum, and Optimism. Private keys stored locally β no cloud custody, no API keys required.
clawhub install evm-walletπ About This Skill
name: evm-wallet-skill description: Self-sovereign EVM wallet for AI agents. Use when the user wants to create a crypto wallet, check balances, send ETH or ERC20 tokens, swap tokens, or interact with smart contracts. Supports Base, Ethereum, Polygon, Arbitrum, and Optimism. Private keys stored locally β no cloud custody, no API keys required. metadata: {"clawdbot":{"emoji":"π°","homepage":"https://github.com/surfer77/evm-wallet-skill","requires":{"bins":["node","git"]}}}
EVM Wallet Skill
Self-sovereign EVM wallet. Private keys stored locally, no external API dependencies.
β οΈ SECURITY WARNING
NEVER expose your private key!
~/.evm-wallet.json with anyoneThe private key file (~/.evm-wallet.json) should only be accessed directly via SSH on your server.
Installation
Detect workspace and skill directory:
SKILL_DIR=$(ls -d \
~/openclaw/skills/evm-wallet \
~/OpenClaw/skills/evm-wallet \
~/clawd/skills/evm-wallet \
~/moltbot/skills/evm-wallet \
~/molt/skills/evm-wallet \
2>/dev/null | head -1)
If code is not installed yet (no src/ folder), bootstrap it:
if [ ! -d "$SKILL_DIR/src" ]; then
git clone https://github.com/surfer77/evm-wallet-skill.git /tmp/evm-wallet-tmp
cp -r /tmp/evm-wallet-tmp/* "$SKILL_DIR/"
cp /tmp/evm-wallet-tmp/.gitignore "$SKILL_DIR/" 2>/dev/null
rm -rf /tmp/evm-wallet-tmp
cd "$SKILL_DIR" && npm install
fi
For all commands below, always cd "$SKILL_DIR" first.
First-Time Setup
Generate a wallet (only needed once):
node src/setup.js --json
Returns: { "success": true, "address": "0x..." }
The private key is stored at ~/.evm-wallet.json (chmod 600). Never share this file.
Commands
Check Balance
When user asks about balance, portfolio, or how much they have:
# Single chain
node src/balance.js base --jsonAll chains at once
node src/balance.js --all --jsonSpecific ERC20 token
node src/balance.js base 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 --json
Always use --json for parsing. Present results in a human-readable format.
Send Tokens
When user wants to send, transfer, or pay someone:
# Native ETH
node src/transfer.js --yes --jsonERC20 token
node src/transfer.js --yes --json
β οΈ ALWAYS confirm with the user before executing transfers. Show them:
Only add --yes after the user explicitly confirms.
Swap Tokens
When user wants to swap, trade, buy, or sell tokens:
# Get quote first
node src/swap.js --quote-only --jsonExecute swap (after user confirms)
node src/swap.js --yes --json
eth for native ETH/POL, or pass a contract address--slippage β οΈ ALWAYS show the quote first and get user confirmation before executing.
Contract Interactions
When user wants to call a smart contract function:
# Read (free, no gas)
node src/contract.js \
"" [args...] --jsonWrite (costs gas β confirm first)
node src/contract.js \
"" [args...] --yes --json
Examples:
# Check USDC balance
node src/contract.js base \
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 \
"balanceOf(address)" 0xWALLET --jsonApprove token spending
node src/contract.js base \
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 \
"approve(address,uint256)" 0xSPENDER 1000000 --yes --json
Check for Updates
node src/check-update.js --json
If an update is available, inform the user and offer to run:
cd "$SKILL_DIR" && git pull && npm install
Supported Chains
| Chain | Native Token | Use For | |-------|-------------|---------| | base | ETH | Cheapest fees β default for testing | | ethereum | ETH | Mainnet, highest fees | | polygon | POL | Low fees | | arbitrum | ETH | Low fees | | optimism | ETH | Low fees |
Always recommend Base for first-time users (lowest gas fees).
Common Token Addresses
Base
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA029130x4200000000000000000000000000000000000006Ethereum
0xA0b86a33E6441b8a46a59DE4c4C5E8F5a6a7A8d00xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2Safety Rules
1. Never execute transfers or swaps without user confirmation
2. Never expose the private key from ~/.evm-wallet.json
3. Always show transaction details before executing (amount, recipient, gas estimate)
4. Recommend Base for testing and small amounts
5. Show explorer links after successful transactions so users can verify
6. If a command fails, show the error clearly and suggest fixes
Error Handling
node src/setup.js --json first