@byreal-io/evm-cli
v0.1.1
Published
Minimal EVM wallet transfer CLI (native + ERC-20), Privy proxy signing.
Readme
evm-cli
A minimal EVM wallet transfer CLI: supports native coin (ETH, etc.) and ERC-20 transfers, signing via the Privy proxy (for managed wallets whose private key cannot be exported).
Current supported chains: ethereum · mantle.
1. Install
Users (published to npm):
npm install -g @byreal-io/evm-cli
evm-cli --version
evm-cli skill # full docs (commands/config/safety), versioned with the CLILocal development:
npm install
cp .env.example .env # local dev only; in claw, credentials come from ~/.openclaw/*
npm run cli -- <command> [options] # = tsx src/index.ts ...
npm run build # esbuild-bundle to dist/index.cjs (for publishing)Examples below use the global
evm-cli; in dev, replace it withnpm run cli --.
2. Commands
send — send a transfer
Requires --dry-run (preview) or --confirm (execute); neither → refuse, both → error. --from is optional — it defaults to the single evm wallet in realclaw-config.json; pass it explicitly only when multiple evm wallets are configured (or when credentials come from a bare AGENT_TOKEN, which can't reveal its address).
# Preview (no broadcast, no credentials needed); --from omitted → uses the configured wallet
evm-cli send --chain ethereum --to 0xRECV --amount 0.05 --dry-run
evm-cli send --chain ethereum --to 0xRECV --amount 100 --token USDC --dry-run
# Execute (sign + broadcast via proxy, irreversible)
evm-cli send --chain mantle --to 0xRECV --amount 0.05 --confirm
evm-cli send --chain mantle --to 0xRECV --amount 100 --token 0xTokenAddr --confirm
# Multiple wallets configured → disambiguate with --from
evm-cli send --chain mantle --to 0xRECV --amount 0.05 --from 0xWALLET --confirmThe preview prints the full to / value / data / chainId and a token detail block (contract address + on-chain symbol/decimals); a symbol that disagrees with the on-chain symbol triggers a prominent warning — verify the contract before executing.
balance — query balance (read-only)
--address is optional — it defaults to the single evm wallet in realclaw-config.json; pass it to query any other address.
evm-cli balance --chain ethereum # the configured wallet
evm-cli balance --chain ethereum --token USDC # + an ERC-20 balance
evm-cli balance --chain ethereum --address 0xOTHER # any other addressskill — print the full documentation
evm-cli skill3. Privy proxy prerequisites
The CLI does not implement Privy login/issuance — it only consumes a pre-issued agent token. The team issues it via agent-wallet-privy-proxy-server: POST /signer-grants/create (signer grant), then POST /agent-tokens/create-one (token, shown once).
In claw the token + base URL are written to ~/.openclaw/* (§2) and read automatically; for local dev set PRIVY_PROXY_URL + AGENT_TOKEN in .env. --from defaults to the configured evm wallet (pass it only to disambiguate multiple wallets). The CLI submits the fully-built tx with broadcast:true to POST {proxyUrl}{apiBasePath}/sign/evm-transaction; the proxy signs, broadcasts, and returns the hash.
