nodpay 0.2.22 → 0.2.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +45 -41
  2. package/SKILL.md +11 -14
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,66 +1,70 @@
1
- # nodpay
1
+ # NodPay — Trusted Agent Wallet
2
2
 
3
- Agent toolkit for [NodPay](https://nodpay.ai) — propose on-chain payments from a shared wallet.
3
+ > "Two minds, one wallet."
4
4
 
5
- > **This package is for AI agents.** If you're a human, visit [nodpay.ai](https://nodpay.ai).
5
+ A multisig crypto wallet shared between humans and AI agents. Built on [Safe](https://safe.global)'s battle-tested multisig infrastructure and ERC-4337 account abstraction — supports passkey and EOA signers out of the box.
6
6
 
7
- ## What NodPay does
7
+ **For the full agent integration guide, see [nodpay.ai/skill.md](https://nodpay.ai/skill.md).**
8
8
 
9
- You (an AI agent) and your human share a 2-of-3 multisig wallet. You propose transactions; the human approves or rejects each one. You cannot spend without their approval.
9
+ ## Package Structure
10
10
 
11
- ## Usage
11
+ This npm package (`nodpay`) is the **agent-facing CLI**. It is also published as a skill on [ClawHub](https://clawhub.ai/xhyumiracle/nodpay).
12
12
 
13
- ```bash
14
- # No install needed
15
- NODPAY_AGENT_KEY=0x... npx nodpay propose \
16
- --safe 0xWALLET --to 0xRECIPIENT --value-eth 0.01 \
17
- --signer-type passkey --passkey-x 0x... --passkey-y 0x...
18
- ```
19
-
20
- ## Full guide
13
+ | Distribution | Contains | Audience |
14
+ |--------------|----------|----------|
15
+ | **npm** (`npx nodpay`) | CLI scripts + `SKILL.md` | Any AI agent |
16
+ | **ClawHub** (`clawhub install nodpay`) | `SKILL.md` only | OpenClaw agents |
17
+ | **nodpay.ai/skill.md** | `SKILL.md` via CDN proxy | All agent frameworks |
21
18
 
22
- **[nodpay.ai/skill.md](https://nodpay.ai/skill.md)** complete setup + integration guide for agents (key generation, wallet creation, proposing, error handling).
19
+ The CLI provides three commands:
23
20
 
24
- ## How it works
25
-
26
- 1. Agent generates a key sends user a wallet creation link
27
- 2. User creates a passkey wallet at nodpay.ai (30 seconds)
28
- 3. Agent proposes transactions with `npx nodpay propose`
29
- 4. User approves/rejects on their phone
21
+ ```
22
+ nodpay keygen # Generate agent keypair (~/.nodpay/.env, chmod 600)
23
+ nodpay propose # Propose a transaction for human approval
24
+ nodpay txs # List and verify transactions for a wallet
25
+ ```
30
26
 
31
- ## Key generation
27
+ ## Quick Start
32
28
 
33
29
  ```bash
34
- npx nodpay keygen --env-file .env
30
+ # 1. Generate key (public address only in stdout; key never exposed)
31
+ npx nodpay keygen
32
+
33
+ # 2. Propose a payment
34
+ npx nodpay propose \
35
+ --chain base \
36
+ --safe 0xWALLET \
37
+ --to 0xRECIPIENT \
38
+ --value-eth 0.01 \
39
+ --human-signer-passkey-x 0x... \
40
+ --human-signer-passkey-y 0x... \
41
+ --recovery-signer 0x...
42
+
43
+ # 3. Check pending transactions (with verification)
44
+ npx nodpay txs --safe 0xWALLET
35
45
  ```
36
46
 
37
- Outputs the agent's **public address only**. The private key is written directly to `.env` — it never appears in stdout, logs, or the agent's context window.
47
+ ## Security
38
48
 
39
- If a key already exists, it reuses it and prints the address.
49
+ All config lives in `~/.nodpay/` zero `process.env` references in code.
40
50
 
41
- ### Security design
51
+ - **Hardened Key Isolation:** private key written directly to `~/.nodpay/.env` (chmod 600), strictly excluded from stdout and agent context.
52
+ - **Zero Trust:** `txs` independently verifies every server response (decode calldata → recompute hash → recover signer → check owner set).
53
+ - **Threshold Security:** 2-of-3 multisig — agent cannot move funds unilaterally.
42
54
 
43
- The agent (LLM) **never sees the private key**. `keygen` writes the secret directly to disk; the `propose` command reads it from the environment at runtime. This means:
55
+ See [SKILL.md](./SKILL.md) for the complete Trust Model.
44
56
 
45
- - No private key in conversation history or context window
46
- - No risk of leaking the key through prompt injection
47
- - The agent only needs the public address (for wallet links)
48
-
49
- ## Env
57
+ ## Related
50
58
 
51
- | Variable | Required | Description |
52
- |----------|----------|-------------|
53
- | `NODPAY_AGENT_KEY` | | Agent's private key use `npx nodpay keygen` to generate securely |
59
+ | Package | Description |
60
+ |---------|-------------|
61
+ | [`@nodpay/core`](https://www.npmjs.com/package/@nodpay/core) | Protocol primitiveshash, decode, verify (identity-agnostic) |
62
+ | [nodpay.ai](https://nodpay.ai) | Web app — wallet creation & transaction approval |
54
63
 
55
- ## Supported chains
64
+ ## Supported Chains
56
65
 
57
66
  Ethereum · Base · Arbitrum · Optimism · Polygon · Sepolia · Base Sepolia
58
67
 
59
- ## Related
60
-
61
- - [`@nodpay/core`](https://www.npmjs.com/package/@nodpay/core) — Protocol primitives (hash, decode, verify)
62
- - [nodpay.ai](https://nodpay.ai) — Web app
63
-
64
68
  ## License
65
69
 
66
70
  MIT
package/SKILL.md CHANGED
@@ -27,27 +27,24 @@ You propose payments, your human approves with one tap. 2-of-3 multisig — you
27
27
 
28
28
  | Guarantee | How |
29
29
  |-----------|-----|
30
- | **2-of-3 multisig custody** | Agent (EOA), human (passkey), and recovery signer each hold one key. Any 2 can authorize — agent alone cannot move funds. Human + recovery signer can operate without agent. |
31
- | **Recovery by design** | Recovery signer is a user-held 12-word mnemonic stored locally. If the agent key or passkey is lost, any 2 of the 3 signers can still unlock the wallet. |
32
- | **Agent key isolated from context** | `keygen` writes directly to `~/.nodpay/.env` (chmod 600). The CLI loads the key internally at runtime it never appears in stdout, command output, or agent context. |
33
- | **Zero trust** | Every party verifies every other. Server validates agent signatures before accepting proposals; client and CLI independently verify server responses (decode calldata recompute hash recover signer check owner set). The chain is the sole source of truth. |
34
- | **Stateless server, client-side crypto** | The server relays signed operations and stores pending UserOps no private keys, no custody, no accounts. All signing happens locally (agent CLI or user passkey). Funds stay on-chain if the server goes offline. |
30
+ | **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 controlthe agent cannot move funds unilaterally. |
31
+ | **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. |
32
+ | **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. |
33
+ | **Hardened Key Isolation** | `keygen` writes directly to `~/.nodpay/.env` (chmod 600). The CLI loads the key internally at runtime. **Runtime Isolation:** it is strictly excluded from stdout and agent context to prevent accidental leakage. |
34
+ | **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. |
35
35
 
36
36
  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.
37
37
 
38
- **DO:** Use `npx nodpay keygen` to generate keys. Store wallet info in `~/.nodpay/wallets/`. Let the human approve every transaction.
39
- **DON'T:** Generate keys manually. Put private keys in chat or code. Trust wallet info without verifying the agent address.
40
-
41
38
  ## Why NodPay
42
39
 
43
40
  | Feature | How |
44
41
  |---------|-----|
45
- | Instant setup | Counterfactual Safe wallet address exists before any on-chain tx |
46
- | Zero barrier to entry | WebAuthn passkey as on-chain signer no extensions, no seed phrases, no prior crypto knowledge |
47
- | Gasless first transaction | ERC-4337 account abstraction bundler sponsors deployment gas via UserOp |
48
- | Chain-agnostic | CREATE2 deterministic deploy same address across all supported chains |
49
- | Trustless by design | 2-of-3 multisig, stateless relay, on-chain verifiable see Trust Model |
50
- | Agent-agnostic | Standard CLI (`npx nodpay`) works with any agent framework, not just OpenClaw |
42
+ | **Instant Onboarding** | **Counterfactual Deployment:** wallet addresses are deterministically generated via CREATE2, allowing the wallet to receive funds before any on-chain transaction occurs. |
43
+ | **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. |
44
+ | **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. |
45
+ | **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. |
46
+ | **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. |
47
+ | **Universal Compatibility** | **Framework-Agnostic CLI:** a standard Node interface (`npx nodpay`) that integrates seamlessly with any agentic framework, not just OpenClaw. |
51
48
 
52
49
  ---
53
50
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodpay",
3
- "version": "0.2.22",
3
+ "version": "0.2.24",
4
4
  "description": "NodPay CLI — propose on-chain payments from agent-human shared wallets",
5
5
  "type": "module",
6
6
  "bin": {