nodpay 0.2.6 → 0.2.7

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodpay",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "description": "NodPay CLI — propose on-chain payments from agent-human shared wallets",
5
5
  "type": "module",
6
6
  "bin": {
@@ -6,11 +6,7 @@
6
6
  * The agent signs first (1 of 2). The serialized SafeOperation is
7
7
  * output so the web app can have the user co-sign and submit.
8
8
  *
9
- * Env vars:
10
- * NODPAY_AGENT_KEY - Agent signer private key
11
- * SAFE_ADDRESS - Deployed Safe address (can be overridden with --safe)
12
- * RPC_URL - RPC endpoint
13
- * CHAIN_ID - Chain ID (required, no default)
9
+ * Agent key is read from .nodpay/.env (run `npx nodpay keygen` to generate).
14
10
  *
15
11
  * Args:
16
12
  * --to <address> - Recipient address
@@ -66,9 +62,8 @@ if (!RPC_URL || !CHAIN_ID) {
66
62
  }
67
63
  const ENTRYPOINT_ADDRESS = ENTRYPOINT;
68
64
 
69
- // Read agent key: env var first, then .nodpay/.env file
65
+ // Read agent key from .nodpay/.env
70
66
  function loadAgentKey() {
71
- if (process.env.NODPAY_AGENT_KEY) return process.env.NODPAY_AGENT_KEY;
72
67
  try {
73
68
  const envPath = join(process.cwd(), '.nodpay', '.env');
74
69
  const lines = readFileSync(envPath, 'utf8').split('\n');
@@ -97,7 +92,7 @@ const BUNDLER_URL = PIMLICO_API_KEY
97
92
  : `${opStoreBase}/bundler/${CHAIN_ID}`;
98
93
 
99
94
  if (!NODPAY_AGENT_KEY) {
100
- console.error(JSON.stringify({ error: 'Missing NODPAY_AGENT_KEY env var' }));
95
+ console.error(JSON.stringify({ error: 'Missing NODPAY_AGENT_KEY in .nodpay/.env — run npx nodpay keygen first' }));
101
96
  process.exit(1);
102
97
  }
103
98