AAWP:适用于 EVM 链的 AI 代理钱包协议 - Openclaw Skills
作者:互联网
2026-04-18
什么是 AAWP - AI 代理浅包协议?
AAWP (AI Agent Wallet Protocol) 是专为 Ethereum、Base 和 Polygon 等 EVM 兼容区块链上的 AI 代理构建的开创性基础设施层。与为人机交互设计的传统浅包不同,使用 AAWP 的 Openclaw Skills 强制执行一种不变性,即签名者必须是 AI 代理本身,并在创建时进行加密绑定。该协议利用基于守护进程 (Guardian) 的架构将 Gas 支付与资产管理分离,允许代理在通过本地签名守护程序维护安全性的同时,以高度自治的方式运行。
通过利用 AAWP,开发者可以为他们的代理配备管理自身链上生命周期的能力。该协议支持广泛的金融操作,包括代币交换、跨链桥接以及复杂的合约交互,且无需逐笔交易的人工审批。这使其成为在 Openclaw Skills 生态系统中创建真正自主的经济代理的重要工具。
下载入口:https://github.com/openclaw/skills/tree/main/skills/wfce/aawp
安装与下载
1. ClawHub CLI
从源直接安装技能的最快方式。
npx clawhub@latest install aawp
2. 手动安装
将技能文件夹复制到以下位置之一
全局模式~/.openclaw/skills/
工作区
/skills/
优先级:工作区 > 本地 > 内置
3. 提示词安装
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 aawp。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
AAWP - AI 代理浅包协议 应用场景
- AI 驱动实体的自主资产管理和代币转账。
- 自动化交易策略,包括 DEX 交换、限价单和定投 (DCA)。
- 跨主流 EVM 网络的跨链投资组合管理和桥接。
- 参与 DeFi,如在 Aave 上提供抵押品、借代和坚控健康系数。
- NFT 操作,包括铸造、转账和地板价跟踪。
- 通过 Clanker V4 集成进行程序化代币发行和管理。
- 系统初始化本地签名守护程序,该程序在运行期间将代理的签名密钥保存在内存中。
- 生成 Guardian Gas 中继浅包来处理所有交易费用支付,将其与代理的主要资产分开。
- 通过工厂代理部署智能合约浅包,将 AI 代理固定为不可变的签名者。
- AI 代理通过 CLI 或脚本与浅包交互,通过安全的 Unix 套接字向签名守护程序发送命令。
- 交易使用分片密钥方法在本地签名并广播到区块链,并在链上根据预先批准的二进制哈希进行验证。
AAWP - AI 代理浅包协议 配置指南
要开始在 Openclaw Skills 中使用 AAWP,请遵循以下配置步骤:
# 配置环境并初始化签名守护程序
bash scripts/provision.sh
# 在特定链上创建智能合约浅包(例如 Base)
node scripts/wallet-manager.js --chain base create
# 固定生成的浅包地址以确保安全
export AAWP_WALLET=0xYourWalletAddress
# 验证守护程序状态和系统就绪情况
bash scripts/doctor.sh
AAWP - AI 代理浅包协议 数据架构与分类体系
该协议通过以下结构组织其操作数据和元数据:
| 组件 | 描述 |
|---|---|
config/chains.json |
存储所有受支持 EVM 链的网络 RPC URL 和核心合约地址。 |
config/guardian.json |
包含支付 Gas 的 Guardian 浅包的私钥(自动生成)。 |
.agent-config/ |
存储代理加密的签名种子和链上权限元数据。 |
/tmp/.aawp-daemon.* |
用于代理与签名进程之间安全本地通信的 Unix 套接字。 |
config/limit-orders.json |
用于跟踪链下签名限价单及其状态的本地注册表。 |
name: aawp
version: 1.3.1
description: >
AAWP (AI Agent Wallet Protocol) — the only crypto wallet protocol built exclusively
for AI Agents on EVM-compatible blockchains. Not for humans. The signer is the AI Agent
itself, cryptographically bound at wallet creation. Supports wallet lifecycle management,
token transfers, DEX swaps, cross-chain bridging, arbitrary contract interactions,
DCA automation, and price alerts.
environment:
- name: AAWP_GUARDIAN_KEY
description: "Private key for the Guardian gas-relay wallet (auto-generated in config/guardian.json if not set)"
required: false
- name: AAWP_GAS_KEY
description: "Alias for AAWP_GUARDIAN_KEY"
required: false
- name: AAWP_WALLET
description: "Pinned wallet address — prevents accidental operations on wrong wallet"
required: false
- name: AAWP_CONFIG
description: "Override config directory path (default: ./config)"
required: false
- name: AAWP_CORE
description: "Override native addon directory path (default: ./core)"
required: false
- name: AAWP_SKILL
description: "Override skill root directory path"
required: false
- name: AAWP_AI_TOKEN
description: "Daemon auth token (auto-generated at startup, not user-supplied)"
required: false
credentials:
- name: "Guardian Key"
description: "ECDSA private key for the gas-relay wallet. Auto-generated on first provision and stored in config/guardian.json. Used ONLY to pay gas fees — never holds user assets."
- name: "Encrypted Seed"
description: "Agent signing seed, encrypted at rest. Generated during provisioning, stored in the .agent-config directory. This is the agent's on-chain signing authority."
persistence:
- type: daemon
description: "Local signing daemon (background process) listens on a Unix socket at /tmp/.aawp-daemon.*. Holds the signing key in memory during operation. Managed via ensure-daemon.sh / restart-daemon.sh."
- type: files
description: "Writes to config/ and .agent-config/ directories, plus a daemon PID lock under /tmp/."
- type: cron
description: "DCA strategies and price alerts register OpenClaw cron jobs for autonomous scheduled execution."
native_binary:
file: core/aawp-core.node
hash_file: core/aawp-core.node.hash
description: >
Precompiled Node.js N-API addon (linux-x64) for cryptographic operations.
Built from Rust via napi-rs. Hash recorded in aawp-core.node.hash.
source: "https://github.com/aawp-ai/aawp"
verification: "On-chain factory approveBinary(hash) — only whitelisted builds can operate wallets"
architecture: linux-x64
runtime: "Node.js N-API (ABI stable)"
risk_disclosure: >
This skill runs a persistent signing daemon and can autonomously submit
on-chain transactions as the AI Agent. It manages encrypted private key material
and a precompiled native binary. DCA/price-alert features register cron jobs.
The on-chain factory enforces both binary approval and AI-exclusive ownership —
only whitelisted AI Agent daemon builds can create or operate wallets. Humans
cannot be the signer. Review the guardian architecture and verify binary
provenance before installing.
AAWP — AI Agent Wallet Protocol
The only crypto wallet protocol built exclusively for AI Agents. Not for humans.
AAWP enforces a single invariant: the signer is the AI Agent itself — locked in at wallet creation, immutable, verifiable on-chain. AI Agents manage their own on-chain assets across EVM networks through a guardian-based architecture. Transactions are signed locally via a sharded-key daemon — no human approval per tx, with full recovery and freeze capabilities for the human guardian.
Networks: Ethereum · Base · BNB Chain · Polygon · Optimism · Arbitrum
Architecture Overview
┌─────────────────────────────────────────────────┐
│ AI Agent (OpenClaw) │
│ ┌───────────────┐ ┌──────────────────────┐ │
│ │ wallet-manager│───?│ Signing Daemon │ │
│ │ dca / alerts │ │ (Unix socket) │ │
│ └───────────────┘ │ ┌──────────────────┐ │ │
│ │ │ aawp-core.node │ │ │
│ │ │ (Rust N-API) │ │ │
│ │ └──────────────────┘ │ │
│ └──────────┬───────────┘ │
│ │ sign │
│ ┌───────────────┐ ▼ │
│ │ Guardian Key │──? Pay gas ──? EVM Chain │
│ │ (gas only) │ │ │
│ └───────────────┘ ┌──────────▼───────────┐ │
│ │ Smart Contract Wallet │ │
│ │ (holds assets) │ │
│ └──────────────────────┘ │
└─────────────────────────────────────────────────┘
Key separation: Guardian pays gas → Wallet holds assets → Daemon signs transactions.
Quick Reference
| Task | Command |
|---|---|
| Create wallet | wallet-manager.js --chain base create |
| Check balance | wallet-manager.js --chain base balance |
| Send ETH | wallet-manager.js --chain base send |
| Send ERC-20 | wallet-manager.js --chain base send-token USDC |
| Get swap quote | wallet-manager.js --chain base quote ETH USDC 0.01 |
| Execute swap | wallet-manager.js --chain base swap ETH USDC 0.01 |
| Bridge cross-chain | wallet-manager.js --chain base bridge ETH optimism 0.1 |
| Contract call | wallet-manager.js --chain base call |
| Contract read | wallet-manager.js --chain base read |
| DCA strategy | dca.js add --chain base --from ETH --to USDC --amount 0.01 --cron "0 9 * * *" |
| Price alert | price-alert.js add --chain base --from ETH --to USDC --above 2600 --notify |
| Cross-chain portfolio | portfolio.js |
| Single chain portfolio | portfolio.js --chain base |
| Limit order | limit-order.js --chain base create ETH USDC 0.1 2700 |
| List orders | limit-order.js --chain base list |
| List NFTs | nft.js --chain base balance |
| NFT transfer | nft.js --chain base transfer |
| NFT floor price | nft.js --chain eth floor |
| Yield rates | yield.js --chain base rates |
| Supply collateral | yield.js --chain base supply USDC 1000 |
| Borrow | yield.js --chain base borrow USDC 200 |
| Aave positions | yield.js --chain base positions |
| Diagnostics | bash scripts/doctor.sh |
| Backup | wallet-manager.js backup ./backup.tar.gz |
All commands: node scripts/wallet-manager.js --help
Getting Started
1. Provision
First run is automatic — ensure-daemon.sh detects a missing seed and provisions.
bash scripts/provision.sh # Initialize
bash scripts/provision.sh --reset # Full reset (?? destroys existing wallet)
2. Create Wallet
node scripts/wallet-manager.js --chain base create
If the Guardian needs gas, you'll see a funding guide with the Guardian address and private key.
3. Pin & Fund
export AAWP_WALLET=0x... # Pin your wallet address
# Send a small amount of native token to the wallet address
node scripts/wallet-manager.js --chain base balance
4. Test
node scripts/wallet-manager.js --chain base quote ETH USDC 0.001
node scripts/wallet-manager.js --chain base swap ETH USDC 0.001
After fresh provisioning, verify the daemon binary hash is approved on the factory contract. If not, the factory owner must call
approveBinary(hash).
Wallet Manager CLI
Entry point: node scripts/wallet-manager.js Chain flag: --chain
Wallet Lifecycle
wallet-manager.js --chain base status # Status overview
wallet-manager.js --chain base balance # Native + token balances
wallet-manager.js --chain base portfolio # Full portfolio view
wallet-manager.js compute-address # Predict wallet address
wallet-manager.js --chain base history # Transaction history
wallet-manager.js --chain base upgrade-signer # Rotate signer key
wallet-manager.js --chain base guardian-chains # Guardian chain info
Transfers
wallet-manager.js --chain base send
wallet-manager.js --chain base send-token
Trading
wallet-manager.js --chain base quote # Preview (no gas)
wallet-manager.js --chain base swap # Execute
wallet-manager.js --chain base bridge # Cross-chain
Approvals
wallet-manager.js --chain base approve
wallet-manager.js --chain base allowance
wallet-manager.js --chain base revoke
Contract Interaction
# Write (sends tx)
wallet-manager.js --chain base call "transfer(address,uint256)" 0xTo 1000
# Read (free)
wallet-manager.js --chain base read "balanceOf(address) returns (uint256)" 0xAddr
# Batch (atomic)
wallet-manager.js --chain base batch ./calls.json
Batch format:
[
{ "to": "0x...", "sig": "approve(address,uint256)", "args": ["0x...", "1000000"] },
{ "to": "0x...", "sig": "transfer(address,uint256)", "args": ["0x...", "500000"] }
]
Address Book
wallet-manager.js addr add
RPC & Backup
wallet-manager.js get-rpc
wallet-manager.js --chain base set-rpc
wallet-manager.js backup ./backup.tar.gz
wallet-manager.js restore ./backup.tar.gz
DCA Automation
Entry point: node scripts/dca.js
dca.js add --chain base --from ETH --to USDC --amount 0.01 --cron "0 9 * * *" --name "Daily ETH→USDC"
dca.js list
dca.js run
dca.js history
dca.js remove
Registers an OpenClaw cron job that executes swaps on schedule.
Price Alerts
Entry point: node scripts/price-alert.js
# Notification only
price-alert.js add --chain base --from ETH --to USDC --above 2600 --notify
# Auto-swap on trigger
price-alert.js add --chain base --from ETH --to USDC --below 2200 --notify --auto-swap 0.01
price-alert.js list
price-alert.js check
price-alert.js remove
Daemon Management
| Script | Purpose |
|---|---|
scripts/doctor.sh |
Full diagnostic check |
scripts/ensure-daemon.sh |
Start daemon if not running (auto-provisions on first run) |
scripts/restart-daemon.sh |
Force restart |
Run doctor.sh before sensitive operations or when signing seems off.
Cross-Chain Portfolio View
Entry point: node scripts/portfolio.js Supported chains: All 6 (base · eth · arb · op · polygon · bsc) — queried in parallel
Commands
portfolio.js # Full cross-chain summary with USD values
portfolio.js --chain base # Single chain only
portfolio.js --no-prices # Skip CoinGecko pricing (faster)
portfolio.js --hide-zero # Hide zero-balance tokens
portfolio.js --json # Raw JSON output (for automation)
Output Includes
- Native balance per chain (ETH / BNB / MATIC)
- All ERC-20 token balances via Multicall3 (1 RPC call per chain)
- USD value per token (CoinGecko public API)
- Total portfolio value across all chains
- Top 8 holdings ranked by USD value with % allocation
- Multi-chain holdings — same token aggregated across chains
Tokens tracked: USDC, USDT, WETH, DAI, WBTC, BNB/WBNB, MATIC, ARB, OP, CAKE, AERO, GMX, PEPE, and more per chain.
Limit Orders (CoW Protocol — Gasless)
Entry point: node scripts/limit-order.js Supported chains: eth · base · arb · op · polygon (CoW Protocol) · bsc (1inch Limit Orders)
Orders are signed off-chain (EIP-712) and settled by solvers — no gas on order creation (except BSC cancel which is on-chain).
Commands
limit-order.js --chain base create ETH USDC 0.1 2700 # Sell 0.1 ETH at ≥2700 USDC
limit-order.js --chain eth create USDC ETH 1000 0.00037 # Buy ETH with 1000 USDC
limit-order.js --chain base list # List open orders
limit-order.js --chain base history # All orders (filled/expired)
limit-order.js --chain base cancel # Cancel open order
limit-order.js --chain base create ETH USDC 0.1 2700 --expiry 48 # 48h validity
Notes:
- First-time use requires one ERC-20 approval transaction (CoW VaultRelayer)
price= amount of buyToken per 1 sellToken- Orders persist in
config/limit-orders.jsonfor local tracking
NFT Operations (ERC-721 & ERC-1155)
Entry point: node scripts/nft.js Supported chains: All 6 chains (BSC via BscScan NFT API)
Commands
nft.js --chain base balance # List all NFTs (via Alchemy public API)
nft.js --chain eth balance --contract 0xBC4C... # NFTs from specific collection
nft.js --chain eth info 0xBC4C... 1234 # Token metadata, owner, traits
nft.js --chain base transfer 0xNFT... 42 0xTo... # ERC-721 transfer
nft.js --chain base transfer 0xNFT... 42 0xTo... 5 # ERC-1155 transfer (amount=5)
nft.js --chain base approve 0xNFT... 0xOperator... # setApprovalForAll = true
nft.js --chain base revoke 0xNFT... 0xOperator... # setApprovalForAll = false
nft.js --chain base mint 0xContract... # Call mint() on contract
nft.js --chain base mint 0xContract... 0xcalldata # Mint with custom calldata
nft.js --chain eth floor 0xBC4C... # Floor price from OpenSea
Notes:
balanceauto-detects ERC-721 vs ERC-1155 and fetches metadatainforesolves IPFS URIs and displays traitsfloorqueries OpenSea public API; Blur link provided for ETH collections
Yield / DeFi (Aave V3)
Entry point: node scripts/yield.js Supported chains: base · eth · arb · op · polygon (Aave V3) · bsc (Venus Protocol)
Commands
yield.js --chain base rates # Show supply/borrow APY for all tokens
yield.js --chain base positions # Show active Aave positions & health factor
yield.js --chain base supply USDC 1000 # Supply 1000 USDC as collateral
yield.js --chain base withdraw USDC 500 # Withdraw 500 USDC
yield.js --chain base withdraw USDC max # Full withdrawal
yield.js --chain base borrow USDC 200 # Borrow 200 USDC (variable rate, default)
yield.js --chain base borrow USDC 200 --rate stable # Borrow at stable rate
yield.js --chain base repay USDC 200 # Repay partial debt
yield.js --chain base repay USDC max # Full repayment
Supported Tokens by Chain
| Chain | Tokens |
|---|---|
| base | USDC, WETH, cbBTC, USDbC |
| eth | USDC, USDT, DAI, WBTC, WETH |
| arb | USDC, USDT, WETH, WBTC, DAI |
| op | USDC, USDT, WETH, WBTC, DAI |
| polygon | USDC, USDT, WETH, WBTC, DAI, WMATIC |
Safety note: Always check your health factor after borrowing. Health factor < 1.0 triggers liquidation. Use
positionsto monitor.
Token Launch (Clanker V4)
Deploy a token via your AAWP wallet as the on-chain deployer, admin, and LP fee recipient.
Script: scripts/deploy-clanker.js
Supported chains
| Key | Chain | ChainId |
|---|---|---|
base |
Base | 8453 |
eth |
Ethereum | 1 |
arb |
Arbitrum | 42161 |
unichain |
Unichain | 130 |
bera |
Berachain | 143 |
bsc |
BSC | 56 |
Usage
# 1. Edit CONFIG at the top of the script
# 2. Preview (no broadcast)
node scripts/deploy-clanker.js --dry-run
# 3. Deploy
node scripts/deploy-clanker.js
CONFIG reference
const CONFIG = {
chain: 'base', // base | eth | arb | unichain | bera | bsc
name: 'My Token',
symbol: 'MTK',
image: 'https://...', // square image URL
description: '...',
website: '', // optional
twitter: '', // optional
initialMarketCap: 10, // ETH (min ~10 ≈ $25K FDV)
poolPositions: 'Standard', // Standard | Project | TwentyETH
feeConfig: 'StaticBasic', // StaticBasic (1%) | DynamicBasic | Dynamic3
devBuyEth: 0.003, // ETH to buy at launch (0 to skip)
vault: {
enabled: false, // true = lock a portion of supply
percentage: 20, // % of supply (1–90)
lockupDays: 7, // cliff (min 7 days)
vestingDays: 180, // linear unlock after cliff
},
tokenAdmin: null, // null = AAWP wallet
rewardRecipient: null, // null = AAWP wallet (receives LP fees)
};
How it works: the AAWP wallet calls
Clanker.deployToken()directly (gas limit 8M).tokenAdminand all LP fee rewards default to the AAWP wallet — the AI Agent owns its token end-to-end.
Deployment Reference
AAWP contracts share identical addresses across all chains via CREATE2 vanity deployment:
| Contract | Address |
|---|---|
| Factory Proxy | 0xAAAA3Df87F112c743BbC57c4de1700C72eB7aaAA |
| Identity Proxy | 0xAAAafBf6F88367C75A9B701fFb4684Df6bCA1D1d |
Verified on: Etherscan · BaseScan · BscScan · PolygonScan · Optimistic Etherscan · Arbiscan
Security
| Rule | Why |
|---|---|
| Fund the wallet, not the guardian | Guardian only pays gas — your assets live in the wallet contract |
| Pin wallet address | export AAWP_WALLET=0x... prevents operating on wrong address |
| Quote before swap | Preview rates and slippage before executing |
| Start small | Test with minimal amounts on new chains or operations |
| Never expose secrets | Seeds, keys, shards must never appear in logs or ch@t |
| Verify binary approval | Confirm daemon hash is approved on factory after provisioning |
Troubleshooting
| Error | Fix |
|---|---|
E_AI_GATE / hmac_mismatch |
Restart daemon: bash scripts/restart-daemon.sh |
InvalidSignature |
Verify signer alignment and binary approval on factory |
Call failed |
Check balance, gas, and transaction parameters |
E40 / E41 |
Kill duplicate daemon process, then restart |
BinaryNotApproved |
Factory owner must call approveBinary(hash) on all 6 chains |
| TX reverts with ~1M gas used | Add --gas-limit 8000000 — Clanker V4 / Uniswap V4 ops need up to 6M |
File Structure
aawp/
├── SKILL.md # This document
├── WALLET_SETUP.md # First-time setup guide
├── config/
│ ├── chains.json # Network RPC & contract addresses
│ └── guardian.json # Guardian wallet (auto-generated, gitignored)
├── scripts/
│ ├── wallet-manager.js # Primary CLI
│ ├── dca.js # DCA automation
│ ├── price-alert.js # Price alert system
│ ├── provision.sh # Initial provisioning
│ ├── doctor.sh # Diagnostics
│ ├── ensure-daemon.sh # Daemon lifecycle
│ └── restart-daemon.sh # Force restart
├── core/
│ ├── aawp-core.node # Native signing addon (linux-x64)
│ ├── aawp-core.node.hash # Binary integrity hash
│ ├── loader.js # Addon loader
│ └── index.d.ts # TypeScript declarations
└── daemon/ # Daemon implementation
相关推荐
专题
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
最新数据
相关文章
Minecraft 3D 建造计划生成器:AI 场景架构师 - Openclaw Skills
Scholar Search:自动化文献搜索与研究简报 - Openclaw Skills
issue-to-pr: 自动化 GitHub Issue 修复与 PR 生成 - Openclaw Skills
接班交班总结器:临床 EHR 自动化 - Openclaw Skills
Teacher AI 备课专家:K-12 自动化教案设计 - Openclaw Skills
专利权利要求映射器:生物技术与制药 IP 分析 - Openclaw Skills
生成 Tesla 车身改色膜:用于 3D 显示的 AI 图像生成 - Openclaw Skills
Taiwan MD:面向台湾的 AI 原生开放知识库 - Openclaw Skills
自学习与迭代演进:AI Agent 成长框架 - Openclaw Skills
HIPC Config Manager: 安全的 API 凭据处理器 - Openclaw Skills
AI精选
