WalletConnect Requester
Zero custody. Maximum security. User always in control.
Why This Skill?
Unlike walletconnect-agent which holds private keys and auto-signs, this skill takes a fundamentally different approach:
| walletconnect-agent | walletconnect-requester (this skill) |
|---|
| Private Keys | ⚠️ Stored in agent | ✅ Never touches agent |
| Signing |
⚠️ Auto-signs everything | ✅ User approves each tx |
|
Security Model | Custodial (agent has full control) |
Non-custodial (user has full control) |
|
If Agent is Compromised | ⚠️ Funds can be stolen | ✅ Funds are safe - no keys to steal |
This is the safest way for AI agents to interact with Web3.
What This Does
- - Connect to user wallets via WalletConnect v2
- Request transactions - user approves in their wallet
- Request signatures - user signs in their wallet
- Zero private key exposure - keys never leave the user's wallet
Security Guarantees
CODEBLOCK0
Installation
Step 1: Install Dependencies
This skill requires Node.js dependencies. Install them globally or locally:
CODEBLOCK1
Step 2: Get WalletConnect Project ID
- 1. Go to WalletConnect Cloud
- Create a new project
- Copy your Project ID
Step 3: Set Environment Variable
CODEBLOCK2
Step 4: Run the Skill
CODEBLOCK3
Quick Start
Step 1: Create a Session
CODEBLOCK4
Output:
CODEBLOCK5
Step 2: Request a Transaction
CODEBLOCK6
User sees in wallet:
CODEBLOCK7
Step 3: Request a Signature
CODEBLOCK8
Commands
connect - Create WalletConnect Session
CODEBLOCK9
request-tx - Request Transaction
CODEBLOCK10
request-sign - Request Signature
CODEBLOCK11
sessions - List Active Sessions
CODEBLOCK12
disconnect - End Session
CODEBLOCK13
Security Model
What Agent CAN Do
- - ✅ Request transactions (user must approve)
- ✅ Request signatures (user must approve)
- ✅ View connected wallet address
- ✅ View session metadata
What Agent CANNOT Do
- - ❌ Hold private keys
- ❌ Auto-sign anything
- ❌ Execute transactions without approval
- ❌ Access funds directly
If Agent is Compromised
- - ✅ Attacker cannot steal funds (no keys)
- ✅ Attacker cannot auto-sign transactions
- ✅ User can reject any suspicious request
- ✅ User can disconnect session anytime
Local Data Persistence
This skill writes files to ~/.walletconnect-requester/:
| File | Purpose | Sensitivity |
|---|
| INLINECODE7 | Active WalletConnect sessions | ⚠️ Contains session topics |
| INLINECODE8 |
Transaction audit log | ⚠️ Contains masked tx hashes |
Security recommendations:
- - Review
audit.log before sharing - Delete
sessions.json when no longer needed - Set appropriate file permissions: INLINECODE11
Sensitive Data Handling
| Data Type | How It's Handled |
|---|
| WalletConnect URI | Contains symKey - displayed once during connection, not logged |
| Session tokens |
Stored locally in
sessions.json, not transmitted externally |
|
Transaction hashes | Logged in
audit.log with masked addresses |
|
Private keys | ❌ Never handled by this skill |
Privacy Considerations
- - WalletConnect URI (with
symKey) is printed to stdout for QR code generation - Audit logs mask full addresses (e.g.,
0x8335... instead of full address) - No data is sent to external servers except WalletConnect relay network
Configuration
Environment Variables
| Variable | Required | Description |
|---|
| INLINECODE17 | Yes | WalletConnect Cloud Project ID |
| INLINECODE18 |
No | DApp name shown in wallet |
|
WC_METADATA_URL | No | DApp URL |
|
WC_METADATA_ICONS | No | DApp icon URL |
Namespaces Configuration
The skill requests minimal permissions by default:
CODEBLOCK14
Example Workflows
Connect and Request Payment
CODEBLOCK15
Verify Wallet Ownership
CODEBLOCK16
Comparison with Other Solutions
| Feature | This Skill | walletconnect-agent | MetaMask SDK |
|---|
| Private Key Storage | ❌ Never | ⚠️ In Agent | ❌ Never |
| Auto-sign |
❌ Never | ✅ Yes | ❌ No |
| User Approval Required | ✅ Always | ❌ No | ✅ Always |
| Multi-wallet Support | ✅ Any WC wallet | ✅ Any WC wallet | ❌ MetaMask only |
| Security Level |
Highest | Medium | High |
| Best For | User-controlled tx | Automated trading | MetaMask users |
Supported Wallets
Any wallet that supports WalletConnect v2:
- - MetaMask Mobile
- Rainbow
- Trust Wallet
- Coinbase Wallet
- Ledger Live
- And 500+ more...
Troubleshooting
"No active session"
Run
connect first to create a session.
"User rejected request"
User declined in their wallet. Ask if they want to retry.
"Session expired"
Sessions last 7 days by default. Reconnect to create a new session.
"Unsupported chain"
User's wallet doesn't support the requested chain. Ask them to switch networks.
Audit Log
All requests are logged (without sensitive data):
CODEBLOCK17
When to Use This vs walletconnect-agent
| Use This Skill When | Use walletconnect-agent When |
|---|
| User must approve every tx | Fully automated trading |
| Maximum security required |
You trust the agent completely |
| One-time or occasional tx | 24/7 unattended operation |
| User wants full control | User wants set-and-forget |
| Agent runs in untrusted env | Agent runs in secure env |
When in doubt, use this skill. It's always safer.
License
MIT — Built with security as the #1 priority.
Maintainer: Web3 Investor Team
Registry: https://clawhub.com/skills/walletconnect-requester
WalletConnect 请求器
零托管。最高安全性。用户始终掌控。
为什么选择这个技能?
与walletconnect-agent持有私钥并自动签名不同,本技能采用根本不同的方法:
| walletconnect-agent | walletconnect-requester(本技能) |
|---|
| 私钥 | ⚠️ 存储在代理中 | ✅ 绝不接触代理 |
| 签名 |
⚠️ 自动签署所有内容 | ✅ 用户批准每笔交易 |
|
安全模型 | 托管式(代理完全控制) |
非托管式(用户完全控制) |
|
若代理被攻破 | ⚠️ 资金可能被盗 | ✅ 资金安全 - 无密钥可窃取 |
这是AI代理与Web3交互的最安全方式。
功能说明
- - 连接用户钱包 通过WalletConnect v2
- 请求交易 - 用户在钱包中批准
- 请求签名 - 用户在钱包中签署
- 零私钥暴露 - 密钥永不离开用户钱包
安全保障
┌─────────────────┐ ┌─────────────────┐
│ AI 代理 │ │ 用户钱包 │
│ (请求方) │ ◄── WalletConnect ──► │ (签名方) │
│ │ 会话 │ │
└─────────────────┘ └─────────────────┘
│ │
│ 1. 请求交易 │
│ ─────────────────────────────────► │
│ │
│ 2. 用户审核并批准 │
│ (在钱包界面中) │
│ │
│ 3. 已签名交易 │
│ ◄───────────────────────────────── │
│ │
▼ ▼
无私钥 私钥
无自动签名 用户批准
用户掌控 一切
安装
步骤1:安装依赖
本技能需要Node.js依赖。全局或本地安装:
bash
安装依赖
npm install @walletconnect/sign-client @walletconnect/core qrcode
步骤2:获取WalletConnect项目ID
- 1. 前往 WalletConnect Cloud
- 创建新项目
- 复制您的项目ID
步骤3:设置环境变量
bash
export WCPROJECTID=yourprojectid_here
步骤4:运行技能
bash
node scripts/wc-requester.js connect
快速开始
步骤1:创建会话
bash
export WCPROJECTID=yourprojectid
node scripts/wc-requester.js connect
输出:
WalletConnect URI: wc:abc123...@2?relay-protocol=irn&symKey=xyz
使用钱包扫描此二维码:
[二维码]
等待钱包连接...
步骤2:请求交易
bash
node scripts/wc-requester.js request-tx \
--to 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 \
--data 0xa9059cbb... \
--value 0 \
--chain 8453
用户在钱包中看到:
发送 10 USDC 到 0x1F3A...?
[批准] [拒绝]
步骤3:请求签名
bash
node scripts/wc-requester.js request-sign \
--message 签署此消息以验证所有权 \
--chain 8453
命令
connect - 创建WalletConnect会话
bash
node scripts/wc-requester.js connect [选项]
选项:
--chains 逗号分隔的链ID(默认:8453,1)
--methods 逗号分隔的方法(默认:ethsendTransaction,personalsign)
--qr 生成二维码到文件
--json 以JSON格式输出
request-tx - 请求交易
bash
node scripts/wc-requester.js request-tx --to <地址> --data <十六进制> --value --chain
request-sign - 请求签名
bash
node scripts/wc-requester.js request-sign --message <文本> --chain
或用于类型化数据
node scripts/wc-requester.js request-sign --typed-data --chain
sessions - 列出活跃会话
bash
node scripts/wc-requester.js sessions
disconnect - 结束会话
bash
node scripts/wc-requester.js disconnect --topic <主题>
安全模型
代理可以做什么
- - ✅ 请求交易(用户必须批准)
- ✅ 请求签名(用户必须批准)
- ✅ 查看已连接的钱包地址
- ✅ 查看会话元数据
代理不能做什么
- - ❌ 持有私钥
- ❌ 自动签署任何内容
- ❌ 未经批准执行交易
- ❌ 直接访问资金
若代理被攻破
- - ✅ 攻击者无法窃取资金(无密钥)
- ✅ 攻击者无法自动签署交易
- ✅ 用户可以拒绝任何可疑请求
- ✅ 用户可以随时断开会话
本地数据持久化
本技能将文件写入~/.walletconnect-requester/:
| 文件 | 用途 | 敏感性 |
|---|
| sessions.json | 活跃的WalletConnect会话 | ⚠️ 包含会话主题 |
| audit.log |
交易审计日志 | ⚠️ 包含掩码交易哈希 |
安全建议:
- - 分享前检查audit.log
- 不再需要时删除sessions.json
- 设置适当的文件权限:chmod 600 ~/.walletconnect-requester/*
敏感数据处理
| 数据类型 | 处理方式 |
|---|
| WalletConnect URI | 包含symKey - 连接期间显示一次,不记录 |
| 会话令牌 |
本地存储在sessions.json中,不对外传输 |
|
交易哈希 | 记录在audit.log中,地址已掩码 |
|
私钥 | ❌ 本技能绝不处理 |
隐私考量
- - WalletConnect URI(含symKey)打印到标准输出用于生成二维码
- 审计日志掩码完整地址(例如0x8335...而非完整地址)
- 除WalletConnect中继网络外,不向外部服务器发送数据
配置
环境变量
| 变量 | 必需 | 描述 |
|---|
| WCPROJECTID | 是 | WalletConnect Cloud项目ID |
| WCMETADATANAME |
否 | 钱包中显示的DApp名称 |
| WC
METADATAURL | 否 | DApp URL |
| WC
METADATAICONS | 否 | DApp图标URL |
命名空间配置
本技能默认请求最小权限:
json
{
eip155: {
chains: [eip155:8453, eip155:1],
methods: [ethsendTransaction, personalsign],
events: [accountsChanged, chainChanged]
}
}
示例工作流
连接并请求支付
bash
1. 创建会话
node scripts/wc-requester.js connect --qr /tmp/qr.png
用户使用MetaMask扫描二维码
2. 请求USDC转账
node scripts/wc-requester.js request-tx \
--to 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 \
--data 0xa9059cbb0000... \
--chain 8453
用户看到:发送10 USDC? → 在钱包中批准
返回:tx_hash
验证钱包所有权
bash
1. 连接
node scripts/wc-requester.js connect
2. 请求签名
node scripts/wc-requester.js request-sign \
--message 我在2026年3月9日拥有此钱包
用户在钱包中签署
返回:签名
与其他解决方案对比
| 功能 | 本技能 | walletconnect-agent | MetaMask SDK |
|---|
| 私钥存储 | ❌ 从不 | ⚠️ 在代理中 | ❌ 从不 |
| 自动签名 |
❌ 从不 | ✅ 是 | ❌ 否 |
| 需要用户批准 | ✅ 始终 | ❌ 否 | ✅ 始终 |
| 多钱包