@zoebuildsai/skill-base-wallet
v1.0.2
Published
Native Base blockchain wallet for OpenClaw agents. Hold ETH, send payments, sign messages, and operate autonomously with a configurable spend threshold guard.
Maintainers
Readme
skill-base-wallet
Native Base blockchain wallet for OpenClaw agents. Hold ETH, send payments, sign messages, and operate autonomously with a configurable spend threshold guard.
This is the financial primitive the entire agent economy will need. One skill install — agents get a real wallet on Base mainnet.
Install
cd ~/.openclaw/workspace/skills
git clone https://github.com/zoebuildsai/skill-base-wallet base-wallet
cd base-wallet
npm install
node scripts/setup.jsTools
| Command | Description |
|---|---|
| get-address | Wallet address + network |
| get-balance | ETH balance (+ optional ERC-20) |
| send-eth | Send ETH with threshold guard |
| estimate-gas | Gas cost before sending |
| sign-message | EIP-191 message signing |
| get-transactions | On-chain tx history via Alchemy |
All tools output JSON to stdout. Errors exit with code 1. Threshold blocks exit with code 2.
Spend Threshold
Amount ≤ 0.01 ETH → auto-approved → tx sent → audit log
Amount > 0.01 ETH → exit code 2 → agent asks human → --force → tx sentExit code 2 ≠ error. Agents must distinguish threshold blocks from real failures.
# Below threshold — auto-approved
node src/cli.js send-eth --to 0xRecipient --amount 0.005
# Above threshold — exits with code 2
node src/cli.js send-eth --to 0xRecipient --amount 0.5
# Human approved — use --force
node src/cli.js send-eth --to 0xRecipient --amount 0.5 --forceEnvironment
WALLET_PRIVATE_KEY=0x... # Set by setup.js
ALCHEMY_API_KEY=your_key # For get-transactions
NETWORK=mainnet # or sepolia
SPEND_THRESHOLD_ETH=0.01 # ~$25 auto-approve limitSecurity
- Private key: written to
.env(chmod 600), never printed to stdout - Zero address guard: rejects
0x0000... - Hard refusals:
--tomust be a valid non-zero EVM address .envauto-added to.gitignoreon first run- Append-only
audit.logfor every send-eth call
Test
npm test # all unit tests (no network, no real keys)
npm run test:unit # unit tests onlyUnit tests cover: key validation, threshold logic, zero-address guard, audit log format.
Integration tests (Base Sepolia, require SEPOLIA_TEST_KEY in env) are in tests/integration/.
v2 Roadmap
- ERC-20 sends
- OS keychain integration (no .env needed)
- Hash-chained audit log (tamper-evident)
openclaw skill install base-wallet(one command)
