← 返回
未分类 中文

cdnsoft-wallet

EVM wallet tool for autonomous agents with built-in accountability. Creates, signs, and broadcasts ETH and ERC20 transfers on any EVM-compatible chain, then...
用于自主代理的EVM钱包工具,具备内置问责功能。能在任意EVM兼容链上创建、签名并广播ETH及ERC20转账,随后...
cromatikap cromatikap 来源
未分类 clawhub v0.3.4 1 版本 100000 Key: 无需
★ 2
Stars
📥 462
下载
💾 0
安装
1
版本
#latest

概述

agentwallet

EVM wallet with accountability for autonomous agents. Every transaction — create, sign, broadcast — is immediately logged to agentwallet.json. The log is logically append-only: past entries are never modified or deleted, though the file is rewritten on each append.

> ⚠️ High-impact tool. These scripts sign on-chain transactions and contact external RPC endpoints and x402-gated APIs. Only run with wallet keys and output paths explicitly provided by your human. Always confirm --max-amount is set for x402 flows.

Install

This skill is distributed via ClawHub. The scripts are included in the installed skill directory — no external code fetch required.

Dependencies (install once if not present):

pip install eth-account requests

Usage

Arbitrary contract call (e.g. bridge, custom protocol):

python3 agentwallet/scripts/log_transaction.py 0.004 ETH Linea 0xBridgeContract "bridge to Base" \
    --wallet-key ~/.secrets/eth_wallet.json \
    --rpc https://rpc.linea.build \
    --calldata 0x1234abcd... \
    --output ~/website/treasury.json

Signs and broadcasts a raw contract call with custom calldata. Logs the transaction automatically.

x402 payment to a gated API (e.g. Actors.dev email, GateSkip):

python3 agentwallet/scripts/x402_request.py \
    --url https://actors.dev/emails \
    --wallet-key ~/.secrets/eth_wallet.json \
    --rpc https://mainnet.base.org \
    --output ~/website/treasury.json \
    --purpose "email to Verso" \
    --header "Authorization: Bearer YOUR_API_KEY" \
    --body '{"to": "agent@mail.actors.dev", "subject": "Hi", "body": "Hello!"}' \
    --max-amount 0.02 \
    --pay-to 0x3604712bd95ba2ff36b624f3ffeb6b73b34604ea

Handles full 402→sign EIP-712→retry flow. Logs USDC spend automatically.

Always set --max-amount. Use --pay-to only when the facilitator address is stable — some providers (e.g. Actors.dev via Stripe) rotate it per request by design, so --pay-to would always abort.

Uniswap V3 swap (e.g. ETH → USDC on Base):

python3 agentwallet/scripts/log_transaction.py 0.0012 ETH Base - "swap ETH to USDC" \
    --wallet-key ~/.secrets/eth_wallet.json \
    --rpc https://mainnet.base.org \
    --swap-to 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 \
    --asset-out USDC --decimals-out 6

Logs two entries automatically: ETH out + USDC in.

python3 agentwallet/scripts/log_transaction.py <amount> <asset> <network> <to> <purpose> [options]

Send ETH:

python3 agentwallet/scripts/log_transaction.py 0.001 ETH Base 0xRecipient "fund wallet" \
    --wallet-key ~/.secrets/eth_wallet.json \
    --rpc https://mainnet.base.org

Send ERC20 (e.g. USDC on Base, 6 decimals):

python3 agentwallet/scripts/log_transaction.py 0.02 USDC Base 0xRecipient "GateSkip captcha" \
    --wallet-key ~/.secrets/eth_wallet.json \
    --rpc https://mainnet.base.org \
    --contract 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 \
    --decimals 6

Log only (no broadcast):

python3 agentwallet/scripts/log_transaction.py 0.02 USDC Base 0xRecipient "manual payment" \
    --tx-hash 0xabc123...

Options

OptionDescription
---------------------
--wallet-key JSON file with "private_key" field. Required for broadcasting.
--rpc EVM-compatible RPC endpoint. Required for broadcasting.
--contract ERC20 contract address. Omit for native ETH.
--decimals Token decimals. Default: 18. USDC = 6.
--output Path to agentwallet.json. Required — ask your human if unsure.
--tx-hash Skip broadcast, log an existing hash only.
`--direction received>`Direction of the transaction. Default: sent. Use received to log incoming transactions (requires --tx-hash).
--calldata Raw calldata hex (with or without 0x prefix) — triggers arbitrary contract call instead of transfer.
--swap-to Output token contract address — triggers Uniswap V3 swap instead of transfer.
--asset-out Output asset symbol for the log (default: TOKEN).
--decimals-out Output token decimals (default: 6).
--fee Uniswap V3 pool fee tier in bps (default: 500 = 0.05%).
--min-out Minimum output amount in human units (e.g. 2.4). Enables slippage protection — swap reverts if output is below this. Recommended for larger swaps.

Wallet JSON format

{ "private_key": "0x..." }

Keep at chmod 600. Never commit to git.

Log format

{
  "transactions": [
    {
      "date": "2026-04-01T10:00:00Z",
      "amount": "0.02",
      "asset": "USDC",
      "network": "Base",
      "to": "0xRecipient...",
      "purpose": "GateSkip captcha solve",
      "tx_hash": "0xabc123..."
    }
  ]
}

Rules

  • Log before or immediately after every transaction — never batch or defer
  • Use "pending" for tx hash if not yet confirmed
  • Never modify or delete past log entries — the log is a permanent audit trail
  • If --wallet-key or --output are not known, ask your human before proceeding
  • For x402 flows, always confirm --max-amount is set to prevent signing unexpected amounts

Docs

Full documentation: https://cdnsoft.github.io/agentwallet

版本历史

共 1 个版本

  • v0.3.4 当前
    2026-05-03 07:00 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

self-improving agent

pskoett
记录自身发现以实现自我改进的技能
★ 4,135 📥 909,593
ai-agent

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,424 📥 326,520
ai-agent

Agent Browser

rez0
用于 AI 代理的浏览器自动化 CLI。当用户需要与网站交互(包括浏览页面、填写表单、点击按钮、截图等)时使用。
★ 851 📥 333,480