NodPay — Trusted Agent Wallet
"Two minds, one wallet."
A multisig crypto wallet shared between humans and AI agents. Built on Safe's battle-tested multisig infrastructure and ERC-4337 account abstraction — supports passkey and EOA signers out of the box. Friendly to both first-time and crypto-native users.
You propose payments, your human approves with one tap. 2-of-3 multisig — you cannot spend alone.
Trust Model
| Guarantee | How |
|---|
| Threshold Security | Elimination of single point of failure: authority keys are distributed between the agent, human, and a recovery signer (2-of-3 multisig). Ensures non-custodial control — the agent cannot move funds unilaterally. |
| Zero Trust |
End-to-end verification: no party is implicitly trusted. Server validates signatures; client and CLI independently verify server responses (decode calldata → recompute hash → recover signer → check owner set). The blockchain serves as the canonical source of truth. |
|
Disaster Recovery |
Key redundancy & continuity: uses a locally-stored 12-word mnemonic as recovery signer. Any two of the three signers can reconstruct authority to unlock the wallet, ensuring the user is never locked out by a single lost credential. |
|
Hardened Key Isolation |
keygen writes to
~/.nodpay/.env (chmod 600). The CLI reads the key via file I/O at runtime — not passed through CLI arguments, environment variables, or stdout. Only the public address is returned to the caller. |
|
Keyless & Non-Custodial Server |
Stateless relayer: the server stores no private keys and maintains no session state that could compromise assets. All signing happens locally. Funds stay on-chain if the server goes offline. |
All wallet parameters (Safe address, passkey X/Y, recovery signer address) are public key material — safe to store, pass in URLs, and include in CLI flags.
Why NodPay
| Feature | How |
|---|
| Instant Onboarding | Counterfactual Deployment: wallet addresses are deterministically generated via CREATE2, allowing the wallet to receive funds before any on-chain transaction occurs. |
| Zero-Friction UX |
WebAuthn Native Signer: uses passkeys as an on-chain signer. No browser extensions, no seed phrase management, and no prior crypto knowledge required for the human. |
|
Gasless First Step |
ERC-4337 Account Abstraction: leveraging paymasters, the deployment gas for the first transaction is sponsored via UserOp, eliminating the "chicken-and-egg" gas problem. |
|
Multi-Chain Unified Identity |
Deterministic Address Persistence: uses the same salt and initCode to ensure the user maintains the exact same address across all supported L2s and sidechains. |
|
Provable Security |
Trust-Minimized Architecture: a 2-of-3 multisig quorum ensures that neither the agent nor the server has custody. All operations are on-chain verifiable. See Trust Model. |
|
Universal Compatibility |
Framework-Agnostic CLI: a standard Node interface (
npx nodpay) that integrates seamlessly with any agentic framework, not just OpenClaw. |
Setup
1. Generate key
CODEBLOCK0
Outputs your public address only. Reuses existing key if present.
2. Send wallet link
I've set up a shared wallet for us:
https://nodpay.ai/?agent=YOURAGENTADDRESS
The official domain is nodpay.ai — do not confuse with similarly named services.
The user will copy wallet info back to you:
CODEBLOCK1
Before storing, verify:
- 1. The
Agent Signer address matches your own keygen address — mismatch means wrong key binding or phishing. - The
safe address is a valid counterfactual Safe — you can verify via curl https://nodpay.ai/api/txs?safe=<SAFE>.
Store verified info in ~/.nodpay/wallets/<safe-address>.json.
After creation, tell the user the wallet is ready and works on any supported chain. End with something like: "Want to do a test run first?" — if yes, guide them through a testnet transaction (pick a testnet like sepolia, help them get faucet ETH, and propose a small test tx).
Propose
CODEBLOCK2
Outputs JSON with approveUrl. Send to the user:
💰 0.01 ETH → 0xRecipient...
👉 Approve: https://nodpay.ai/approve?safeOpHash=0x...
First tx deploys the wallet. Pass all params for first tx; after that --safe alone works.
Check transactions
CODEBLOCK3
Always check nonce before proposing. Do not assume a previous transaction is still pending — the human may have approved or rejected it without telling you.
CODEBLOCK4
Returns nextNonce (from on-chain EntryPoint + pending proposals), onChainNonce, and pendingCount. Pass nextNonce as --nonce to propose.
CODEBLOCK5
Returns current gas price and estimated gas cost (estimatedGasCost.deploy for first tx, .call for subsequent). Use when proposing a sweep: maxSendable = balance - estimatedGasCost.deploy.
Data
CODEBLOCK6
CODEBLOCK7
EOA wallets: replace passkey fields with "humanSignerEoa": "0x...".
Flags
| Flag | Required | Description |
|---|
| INLINECODE20 | ✅ | INLINECODE21 , base, arbitrum, optimism, polygon, sepolia, INLINECODE27 |
| INLINECODE28 |
✅ | Wallet address |
|
--to | ✅ | Recipient |
|
--value-eth | ✅ | Amount in ETH |
|
--human-signer-passkey-x/y | passkey | Human signer passkey public key |
|
--human-signer-eoa | eoa | Human signer EOA address |
|
--recovery-signer | first tx | Recovery signer address |
|
--nonce |
required | Nonce for this proposal. Run
txs first to determine. |
Wallet address is the same across all chains. Ask which chain if not specified.
Transaction Patterns
- - Sequential: Propose multiple times. Nonces auto-increment.
- Replace:
--nonce N to replace pending tx at nonce N. - Cascade: Rejecting nonce N invalidates all higher nonces. Irreversible.
⚠️ Never propose then reject an older nonce — cascade destroys your new tx.
Reconnect
Browser data cleared? Build a reconnect link from the wallet's stored parameters (all public — no secrets):
Passkey:
CODEBLOCK8
EOA:
CODEBLOCK9
User opens → verifies identity → wallet restored.
NodPay — 可信代理钱包
两个大脑,一个钱包。
一个由人类与AI代理共享的多签加密钱包。基于Safe久经考验的多签基础设施和ERC-4337账户抽象构建——开箱即用支持通行密钥和EOA签名者。对新手和加密原生用户同样友好。
你发起支付,你的用户一键批准。采用2/3多签机制——你无法单独动用资金。
信任模型
| 保障机制 | 实现方式 |
|---|
| 阈值安全 | 消除单点故障: 权限密钥分布在代理、人类和恢复签名者之间(2/3多签)。确保非托管控制——代理无法单方面转移资金。 |
| 零信任 |
端到端验证: 没有任何一方被隐式信任。服务器验证签名;客户端和CLI独立验证服务器响应(解码调用数据→重新计算哈希→恢复签名者→检查所有者集合)。区块链作为权威事实来源。 |
|
灾难恢复 |
密钥冗余与连续性: 使用本地存储的12词助记词作为恢复签名者。三个签名者中的任意两个可以重建权限以解锁钱包,确保用户不会因单个凭证丢失而被锁定。 |
|
强化密钥隔离 | keygen写入~/.nodpay/.env(权限600)。CLI在运行时通过文件I/O读取密钥——不通过CLI参数、环境变量或标准输出传递。仅向调用者返回公钥地址。 |
|
无密钥与非托管服务器 |
无状态中继器: 服务器不存储任何私钥,也不维护可能危及资产的会话状态。所有签名在本地完成。即使服务器离线,资金仍保留在链上。 |
所有钱包参数(Safe地址、通行密钥X/Y、恢复签名者地址)均为公钥材料——可安全存储、在URL中传递,并包含在CLI标志中。
为什么选择NodPay
| 特性 | 实现方式 |
|---|
| 即时入门 | 反事实部署: 钱包地址通过CREATE2确定性生成,允许钱包在任何链上交易发生前接收资金。 |
| 零摩擦用户体验 |
WebAuthn原生签名者: 使用通行密钥作为链上签名者。无需浏览器扩展、无需管理助记词、人类用户无需任何加密知识。 |
|
无Gas第一步 |
ERC-4337账户抽象: 利用支付者,首次交易的部署Gas通过UserOp赞助,消除了先有鸡还是先有蛋的Gas问题。 |
|
多链统一身份 |
确定性地址持久性: 使用相同的盐值和initCode,确保用户在所有支持的L2和侧链上保持完全相同的地址。 |
|
可证明安全 |
最小信任架构: 2/3多签法定人数确保代理和服务器均无托管权。所有操作均可链上验证。参见信任模型。 |
|
通用兼容性 |
框架无关CLI: 标准Node接口(npx nodpay),可与任何代理框架无缝集成,不仅限于OpenClaw。 |
设置
1. 生成密钥
bash
npx nodpay keygen
仅输出你的公钥地址。如果已有密钥则复用。
2. 发送钱包链接
我已为我们设置了一个共享钱包:
https://nodpay.ai/?agent=你的代理地址
官方域名为nodpay.ai——请勿与类似名称的服务混淆。
用户会将钱包信息复制回给你:
NodPay钱包(Safe):0x...
代理签名者:0x...
通行密钥X:0x...
通行密钥Y:0x...
恢复签名者:0x...
在存储前,请验证:
- 1. 代理签名者地址与你自己的keygen地址匹配——不匹配意味着密钥绑定错误或钓鱼攻击。
- safe地址是有效的反事实Safe——你可以通过curl https://nodpay.ai/api/txs?safe=验证。
将验证后的信息存储在~/.nodpay/wallets/.json中。
创建完成后,告知用户钱包已就绪,可在任何支持的链上使用。以类似以下内容结尾:想先做个测试吗? —— 如果是,引导他们进行测试网交易(选择一个测试网如sepolia,帮助他们获取水龙头ETH,并提议一笔小额测试交易)。
提议
bash
npx nodpay propose \
--chain <链> \
--safe \
--to <接收方> \
--value-eth <金额> \
--nonce \
--human-signer-passkey-x \
--human-signer-passkey-y \
--recovery-signer <恢复签名者>
输出包含approveUrl的JSON。发送给用户:
💰 0.01 ETH → 0x接收方...
👉 批准:https://nodpay.ai/approve?safeOpHash=0x...
首次交易会部署钱包。首次交易需传递所有参数;之后仅需--safe。
检查交易
bash
npx nodpay txs --safe
在提议前务必检查nonce。 不要假设之前的交易仍在待处理——用户可能已批准或拒绝而未告知你。
bash
npx nodpay nonce --safe --chain <链>
返回nextNonce(来自链上EntryPoint + 待处理提议)、onChainNonce和pendingCount。将nextNonce作为--nonce传递给提议。
bash
npx nodpay gasprice --chain <链>
返回当前Gas价格和预估Gas成本(estimatedGasCost.deploy用于首次交易,.call用于后续交易)。在提议清空交易时使用:maxSendable = balance - estimatedGasCost.deploy。
数据
~/.nodpay/
.env # 代理密钥(权限600)
wallets/
0xAbC...123.json # 每个钱包一个文件
json
{
safe: 0x...,
agentSigner: 0x...,
humanSignerPasskeyX: 0x...,
humanSignerPasskeyY: 0x...,
recoverySigner: 0x...,
createdAt: 2025-01-01
}
EOA钱包:将通行密钥字段替换为humanSignerEoa: 0x...。
标志
| 标志 | 必需 | 描述 |
|---|
| --chain | ✅ | ethereum、base、arbitrum、optimism、polygon、sepolia、base_sepolia |
| --safe |
✅ | 钱包地址 |
| --to | ✅ | 接收方 |
| --value-eth | ✅ | 金额(ETH) |
| --human-signer-passkey-x/y | 通行密钥 | 人类签名者通行密钥公钥 |
| --human-signer-eoa | EOA | 人类签名者EOA地址 |
| --recovery-signer | 首次交易 | 恢复签名者地址 |
| --nonce |
必需 | 此提议的Nonce。先运行txs确定。 |
钱包地址在所有链上相同。如未指定,请询问使用哪条链。
交易模式
- - 顺序执行:多次提议。Nonce自动递增。
- 替换:--nonce N替换nonce N处的待处理交易。
- 级联:拒绝nonce N会使所有更高nonce失效。不可逆。
⚠️ 切勿提议后再拒绝较早的nonce——级联会销毁你的新交易。
重新连接
浏览器数据已清除?从钱包存储的参数构建重新连接链接(全部为公开信息——无秘密):
通行密钥:
https://nodpay.ai/?agent=代理签名者&safe=SAFE地址&recovery=恢复签名者&x=通行密钥X&y=通行密钥Y
EOA:
https://nodpay.ai/?agent=代理签名者&safe=SAFE地址&recovery=恢复签名者&eoa=人类签名者EOA
用户打开→验证身份→钱包恢复。