← 返回 Skills 市场
temrjan

Rustok Wallet

作者 Temrjan · GitHub ↗ · v0.1.2 · MIT-0
cross-platform ⚠ pending
55
总下载
0
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install rustok-wallet
功能描述
Self-custody Ethereum Agent Wallet. Read context, preview/execute ETH sends with hard policy limits, track DeFi positions (Aave v3, ERC-4626 vaults). All act...
使用说明 (SKILL.md)

rustok-wallet

You are connected to an isolated Ethereum Agent Wallet via the internal rustok-agent-mcp service (http://rustok-agent-mcp:3000).

This wallet is separate from the user's main wallet. All spending limits, address blocklists, and daily budgets are enforced in code — you cannot negotiate them away.

When to use

  • User asks about wallet balance, address, or holdings
  • User wants to send ETH or check transaction status
  • User asks about DeFi positions (Aave, vaults)
  • User asks to preview a transaction before executing

Quick Start

1. Check wallet context

curl -fsS -X POST http://rustok-agent-mcp:3000/context \
  -H "Authorization: Bearer ${MCP_API_KEY}" | jq

2. Preview a transaction (always preview before execute)

curl -fsS -X POST http://rustok-agent-mcp:3000/preview \
  -H "Authorization: Bearer ${MCP_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{"to":"0x0000000000000000000000000000000000000001","amount_wei":"100000000000000000","chain_id":1}' | jq

3. Execute a transaction (requires preview_id from step 2)

curl -fsS -X POST http://rustok-agent-mcp:3000/execute \
  -H "Authorization: Bearer ${MCP_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{"to":"0x0000000000000000000000000000000000000001","amount_wei":"100000000000000000","chain_id":1,"preview_id":"PASTE_PREVIEW_ID_HERE"}' | jq

API Reference

POST /context — Wallet state

Returns: address, cross-chain balances, policy limits, gas estimates.

curl -fsS -X POST http://rustok-agent-mcp:3000/context \
  -H "Authorization: Bearer ${MCP_API_KEY}" | jq

POST /positions — DeFi positions

Get Aave v3 + ERC-4626 positions for an address. Omit address to use the agent wallet's own address.

curl -fsS -X POST http://rustok-agent-mcp:3000/positions \
  -H "Authorization: Bearer ${MCP_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{"address":"0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B"}' | jq

POST /preview — Simulate + risk analysis

Runs policy + budget checks and txguard risk analysis. Returns a preview_id that must be passed to /execute.

Body: PreviewRequest

{
  "to": "0x0000000000000000000000000000000000000001",
  "amount_wei": "100000000000000000",
  "chain_id": 1
}
curl -fsS -X POST http://rustok-agent-mcp:3000/preview \
  -H "Authorization: Bearer ${MCP_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{"to":"0x0000000000000000000000000000000000000001","amount_wei":"100000000000000000","chain_id":1}' | jq

Response: PreviewResponse

{
  "preview_id": "550e8400-e29b-41d4-a716-446655440000",
  "verdict": {
    "action": "allow",
    "risk_score": 15,
    "findings": [],
    "description": "Send 0.1 ETH to 0x0000...0001",
    "simulation": {
      "eth_change": -100000000000000000,
      "token_changes": [],
      "approval_changes": [],
      "gas_used": 21000,
      "reverted": false
    }
  },
  "route": {
    "chain_id": 1,
    "chain_name": "Ethereum",
    "estimated_gas": 21000,
    "max_fee_per_gas": "25000000000",
    "max_priority_fee_per_gas": "1500000000",
    "estimated_cost": "525000000000000",
    "available_balance": "1000000000000000000"
  },
  "explanation": "Send 0.1 ETH on Ethereum. Estimated cost: 0.000525 ETH (21k gas @ 25 gwei)."
}

POST /execute — Sign and broadcast

Requires a valid preview_id from the preceding /preview call. Re-runs policy and budget checks as defense-in-depth.

Body: ExecuteRequest

{
  "to": "0x0000000000000000000000000000000000000001",
  "amount_wei": "100000000000000000",
  "chain_id": 1,
  "preview_id": "550e8400-e29b-41d4-a716-446655440000"
}
curl -fsS -X POST http://rustok-agent-mcp:3000/execute \
  -H "Authorization: Bearer ${MCP_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{"to":"0x0000000000000000000000000000000000000001","amount_wei":"100000000000000000","chain_id":1,"preview_id":"PASTE_PREVIEW_ID_HERE"}' | jq

Response on success: SendResult

{
  "tx_hash": "0xabc123...",
  "chain_id": 1,
  "chain_name": "Ethereum",
  "from": "0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B",
  "to": "0x0000000000000000000000000000000000000001",
  "amount_wei": "100000000000000000",
  "estimated_gas_cost": "525000000000000"
}

Response on policy block (HTTP 403):

policy blocked: exceeds max_single_tx_eth

Response on budget exceeded (HTTP 403):

daily budget exceeded: 0.450000 / 0.500000 ETH

Response on preview expired (HTTP 400):

preview expired

Response on preview mismatch (HTTP 400):

preview mismatch

Safety Guarantees

Guarantee Mechanism
Spending limits AgentPolicy — code-level checks before every tx
Daily budget Rolling 24h accumulator in SQLite
Address blocklist Exact match + checksum check
Unlimited approvals blocked block_unlimited_approvals = true rejects type(uint256).max
Audit immutability Append-only agent_audit_log table
Wallet isolation Separate ~/.rustok/agent/ directory
No prompt injection bypass Limits are not in system prompt; they are in code

Behavioral Guidelines

  1. Always preview before execute. Never call /execute without a fresh /preview.
  2. Respect policy blocks. If the API returns 403, explain why to the user — do not retry.
  3. Show the preview to the user. Before executing, summarize the preview (amount, destination, estimated cost, risk score).
  4. Use /context first. Before any operation, check wallet state so you do not hallucinate balances or chain availability.
  5. Handle errors gracefully. If rustok-agent-mcp is unreachable, inform the user that the wallet service is offline.

Changelog

0.1.0

  • Initial release
  • Wallet context, ETH send (preview + execute)
  • Aave v3 + ERC-4626 position tracking
  • Hard policy gates and audit logging
  • Verified on-chain: First agent-executed ETH transfer via Telegram (Sepolia, 2026-05-21) — tx hash 0x495e…13653

Support Development

If this skill helps you, consider sending ETH to support development:

Ethereum: 0xb9d2497e5356d75d0ddd6d806cfe13cafe65f6eb

Every transaction helps improve agent wallet security. ☕

能力标签
cryptofinancial-authorityrequires-walletcan-sign-transactionsrequires-sensitive-credentials
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install rustok-wallet
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /rustok-wallet 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.2
Remove testnet mentions from donation section
v0.1.1
Add donation address and support call-to-action
v0.1.0
Initial release: wallet context, ETH send preview+execute, DeFi positions, hard policy gates
元数据
Slug rustok-wallet
版本 0.1.2
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 3
常见问题

Rustok Wallet 是什么?

Self-custody Ethereum Agent Wallet. Read context, preview/execute ETH sends with hard policy limits, track DeFi positions (Aave v3, ERC-4626 vaults). All act... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 55 次。

如何安装 Rustok Wallet?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install rustok-wallet」即可一键安装,无需额外配置。

Rustok Wallet 是免费的吗?

是的,Rustok Wallet 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Rustok Wallet 支持哪些平台?

Rustok Wallet 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Rustok Wallet?

由 Temrjan(@temrjan)开发并维护,当前版本 v0.1.2。

💬 留言讨论