@catena/cli 0.9.0 → 0.11.0

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/README.md CHANGED
@@ -7,12 +7,12 @@ and submit policy-checked money movement intents.
7
7
  Run it without installing:
8
8
 
9
9
  ```bash
10
- pnpm dlx @catena/cli <command> [args]
10
+ npx @catena/cli <command> [args]
11
11
  ```
12
12
 
13
- The package exposes the `catena` binary. Examples use `pnpm dlx @catena/cli` so
14
- they work directly from npm; pnpm selects `catena` because it is the package's
15
- only executable.
13
+ The package exposes the `catena` binary. Examples use `npx @catena/cli` so they
14
+ work directly from npm; npx selects `catena` because it is the package's only
15
+ executable.
16
16
 
17
17
  ## How it works
18
18
 
@@ -31,7 +31,7 @@ browser, so `link` cannot store a credential there. Set `CATENA_SECRET_KEY` to
31
31
  the agent's P-256 secret key instead:
32
32
 
33
33
  ```bash
34
- CATENA_SECRET_KEY="<64 hex characters>" pnpm dlx @catena/cli whoami
34
+ CATENA_SECRET_KEY="<64 hex characters>" npx @catena/cli whoami
35
35
  ```
36
36
 
37
37
  Create the key in the Catena console: open the agent, select the **Secret keys**
@@ -57,14 +57,14 @@ agent id. Use `--name` to suggest a name when the console creates a new agent;
57
57
  the approving operator can edit it before approval.
58
58
 
59
59
  ```bash
60
- pnpm dlx @catena/cli link --name "Hermes Runtime"
60
+ npx @catena/cli link --name "Hermes Runtime"
61
61
  ```
62
62
 
63
63
  To link a specific existing agent, ask the Catena customer for the agent id
64
64
  shown in the Catena console. It looks like `agent_...`.
65
65
 
66
66
  ```bash
67
- pnpm dlx @catena/cli link <agent-id>
67
+ npx @catena/cli link <agent-id>
68
68
  ```
69
69
 
70
70
  The browser approval window stays open for up to 5 minutes. If the approval is
@@ -85,8 +85,8 @@ Connect the selected profile to an agent. Omit `agent-id` to create or choose an
85
85
  agent from the Catena console.
86
86
 
87
87
  ```bash
88
- pnpm dlx @catena/cli link --name "Hermes Runtime"
89
- pnpm dlx @catena/cli link <agent-id>
88
+ npx @catena/cli link --name "Hermes Runtime"
89
+ npx @catena/cli link <agent-id>
90
90
  ```
91
91
 
92
92
  ### `unlink`
@@ -94,7 +94,7 @@ pnpm dlx @catena/cli link <agent-id>
94
94
  Disconnect the selected profile from its agent and remove its local credential.
95
95
 
96
96
  ```bash
97
- pnpm dlx @catena/cli unlink
97
+ npx @catena/cli unlink
98
98
  ```
99
99
 
100
100
  ### `profiles current`
@@ -102,7 +102,7 @@ pnpm dlx @catena/cli unlink
102
102
  Show the selected credential profile and its routing metadata.
103
103
 
104
104
  ```bash
105
- pnpm dlx @catena/cli profiles current
105
+ npx @catena/cli profiles current
106
106
  ```
107
107
 
108
108
  ### `profiles list`
@@ -110,7 +110,7 @@ pnpm dlx @catena/cli profiles current
110
110
  List linked credential profiles and mark the selected default profile.
111
111
 
112
112
  ```bash
113
- pnpm dlx @catena/cli profiles list
113
+ npx @catena/cli profiles list
114
114
  ```
115
115
 
116
116
  ### `profiles use <profile>`
@@ -118,7 +118,7 @@ pnpm dlx @catena/cli profiles list
118
118
  Set the selected default profile. The profile must already be linked.
119
119
 
120
120
  ```bash
121
- pnpm dlx @catena/cli profiles use mcp
121
+ npx @catena/cli profiles use mcp
122
122
  ```
123
123
 
124
124
  ### `whoami`
@@ -126,7 +126,7 @@ pnpm dlx @catena/cli profiles use mcp
126
126
  Show which agent the selected profile is linked to.
127
127
 
128
128
  ```bash
129
- pnpm dlx @catena/cli whoami
129
+ npx @catena/cli whoami
130
130
  ```
131
131
 
132
132
  ### `policy show`
@@ -135,7 +135,7 @@ Show the policy assigned to the linked agent. Read this before creating
135
135
  counterparties or submitting intents.
136
136
 
137
137
  ```bash
138
- pnpm dlx @catena/cli policy show
138
+ npx @catena/cli policy show
139
139
  ```
140
140
 
141
141
  The policy includes `policyCapabilities` rows. Each row grants one `read`,
@@ -148,7 +148,7 @@ counterparty creation.
148
148
  Ask a person to approve a temporary increase to one policy limit.
149
149
 
150
150
  ```bash
151
- pnpm dlx @catena/cli policy request-override \
151
+ npx @catena/cli policy request-override \
152
152
  --account acct_... \
153
153
  --amount 500 \
154
154
  --duration 4h \
@@ -175,12 +175,14 @@ Fetch an MPP-protected HTTP endpoint and pay a supported USDC charge from a
175
175
  wallet account:
176
176
 
177
177
  ```bash
178
- pnpm dlx @catena/cli mpp --url https://api.example.com/paid \
178
+ npx @catena/cli mpp --url https://api.example.com/paid \
179
179
  --account acct_... --max-amount 0.25
180
180
  ```
181
181
 
182
- Initial support covers `evm/charge` and `usdc/charge` for native USDC on Base
183
- and Base Sepolia. Payments use the agent's normal send capability, counterparty
182
+ The CLI recognizes structurally valid EVM `evm/charge` and `usdc/charge`
183
+ challenges and leaves network and canonical USDC support to the connected
184
+ server. Base and Base Sepolia are supported where enabled. Arc support is
185
+ rolling out. Payments use the agent's normal send capability, counterparty
184
186
  allowlist, spend limits, and approval flow. The recipient must already be a
185
187
  saved counterparty wallet rail.
186
188
 
@@ -195,7 +197,7 @@ retrying so the resource is not paid twice.
195
197
  List the accounts available under the agent's policy.
196
198
 
197
199
  ```bash
198
- pnpm dlx @catena/cli accounts list
200
+ npx @catena/cli accounts list
199
201
  ```
200
202
 
201
203
  ### `counterparties list`
@@ -204,7 +206,7 @@ List counterparties, their status, and their rails. Use rail ids from this
204
206
  output with `send`.
205
207
 
206
208
  ```bash
207
- pnpm dlx @catena/cli counterparties list
209
+ npx @catena/cli counterparties list
208
210
  ```
209
211
 
210
212
  ### `counterparties create`
@@ -214,7 +216,7 @@ saves the counterparty without sending an email. The command returns an intent
214
216
  envelope; policy may complete it, block it, or route it to approval.
215
217
 
216
218
  ```bash
217
- pnpm dlx @catena/cli counterparties create \
219
+ npx @catena/cli counterparties create \
218
220
  --name "Acme Vendor" \
219
221
  --email billing@acme.test
220
222
  ```
@@ -232,7 +234,7 @@ Request creation of a bank-rail counterparty. The command returns an intent
232
234
  envelope; policy may complete it, block it, or route it to approval.
233
235
 
234
236
  ```bash
235
- pnpm dlx @catena/cli counterparties create bank \
237
+ npx @catena/cli counterparties create bank \
236
238
  --name "Acme Vendor" \
237
239
  --bank-name "Chase" \
238
240
  --routing-number 021000021 \
@@ -256,15 +258,15 @@ Request creation of a wallet-rail counterparty. The command returns an intent
256
258
  envelope; policy may complete it, block it, or route it to approval.
257
259
 
258
260
  ```bash
259
- pnpm dlx @catena/cli counterparties create wallet \
261
+ npx @catena/cli counterparties create wallet \
260
262
  --name "DAO Treasury" \
261
263
  --address 0xAbC123...
262
264
  ```
263
265
 
264
266
  Required flags: `--name`, `--address`.
265
267
 
266
- Optional flags: `--network` (defaults to `base`; Base is the only supported
267
- wallet network), `--email`, `--idempotency-key`.
268
+ Optional flags: `--network` (defaults to `base`; availability depends on the
269
+ connected environment), `--email`, `--idempotency-key`.
268
270
 
269
271
  ### `counterparties request-details`
270
272
 
@@ -272,7 +274,7 @@ Ask an existing counterparty to provide bank details, wallet details, or both.
272
274
  The request follows policy and may require human approval.
273
275
 
274
276
  ```bash
275
- pnpm dlx @catena/cli counterparties request-details cp_... --bank
277
+ npx @catena/cli counterparties request-details cp_... --bank
276
278
  ```
277
279
 
278
280
  Pass at least one of `--bank` or `--wallet`. `--idempotency-key` is optional.
@@ -283,7 +285,7 @@ The outstanding-invitation conflict remains independent of idempotency.
283
285
  Request a USD send to a counterparty rail.
284
286
 
285
287
  ```bash
286
- pnpm dlx @catena/cli send \
288
+ npx @catena/cli send \
287
289
  --rail cprl_... \
288
290
  --amount 125.00 \
289
291
  --method ach
@@ -318,7 +320,7 @@ when its inputs match an earlier command.
318
320
  Request a USD transfer between two accounts visible to the agent.
319
321
 
320
322
  ```bash
321
- pnpm dlx @catena/cli transfer \
323
+ npx @catena/cli transfer \
322
324
  --from acct_... \
323
325
  --to acct_... \
324
326
  --amount 125.00
@@ -332,12 +334,44 @@ To check whether a transfer completed, run `intents get <id>` with the returned
332
334
  intent id. A separate invocation without an explicit key is a new transfer, even
333
335
  when its inputs match an earlier command.
334
336
 
337
+ ### Sends that cross chains
338
+
339
+ A `send` to a counterparty wallet on the other side of the Base and Arc lane is
340
+ an ordinary `send`. When the account cannot pay it from its balance on the
341
+ rail's network, the send crosses chains under the same intent: the first
342
+ signature burns the amount toward the account's own address on the other chain,
343
+ and `intents continue` signs the send to the counterparty once the funds land.
344
+ One intent covers the whole payment, so policy, spend limits and any approval
345
+ are evaluated once. Gas on both legs is paid by Catena.
346
+
347
+ ```bash
348
+ npx @catena/cli send --rail cprl_... --amount 250.00 --method on-chain
349
+ npx @catena/cli intents get int_...
350
+ npx @catena/cli intents continue int_...
351
+ ```
352
+
353
+ The result carries `crossChain` when the send crossed. Its `nextStep` says what
354
+ to do: `wait` and poll `intents get`, `continue` and run `intents continue`,
355
+ `done`, or `blocked` with `failureReason` set. A network the provider does not
356
+ sponsor yet answers `wallet_send_action_not_yet_enabled` rather than charging
357
+ the agent; on `intents continue` the intent stays at `continue`, so try again
358
+ later.
359
+
360
+ ### `intents continue`
361
+
362
+ Sign the second leg of a send that crossed chains, once `intents get` shows
363
+ `crossChain.nextStep` as `continue`. Optional: `--idempotency-key`.
364
+
365
+ ```bash
366
+ npx @catena/cli intents continue int_...
367
+ ```
368
+
335
369
  ### `accounts balance`
336
370
 
337
371
  Read an account balance through the policy engine.
338
372
 
339
373
  ```bash
340
- pnpm dlx @catena/cli accounts balance acct_...
374
+ npx @catena/cli accounts balance acct_...
341
375
  ```
342
376
 
343
377
  ### `accounts transactions`
@@ -347,7 +381,7 @@ same read access as `accounts balance` and never creates an intent. Returns
347
381
  `{ accountId, transactions, total }` newest-first.
348
382
 
349
383
  ```bash
350
- pnpm dlx @catena/cli accounts transactions acct_...
384
+ npx @catena/cli accounts transactions acct_...
351
385
  ```
352
386
 
353
387
  Optional flags: `--start` / `--end` (ISO 8601 bounds), `--limit` (default 50,
@@ -360,7 +394,7 @@ Read an account deposit address through the policy engine. `--network` and
360
394
  `--asset` default to `base` and `usdc`.
361
395
 
362
396
  ```bash
363
- pnpm dlx @catena/cli accounts deposit-address acct_... --network base --asset usdc
397
+ npx @catena/cli accounts deposit-address acct_... --network base --asset usdc
364
398
  ```
365
399
 
366
400
  ### `intents get`
@@ -368,7 +402,7 @@ pnpm dlx @catena/cli accounts deposit-address acct_... --network base --asset us
368
402
  Look up the current state of an intent created by this agent.
369
403
 
370
404
  ```bash
371
- pnpm dlx @catena/cli intents get int_...
405
+ npx @catena/cli intents get int_...
372
406
  ```
373
407
 
374
408
  The response includes a `data` field carrying the associated result once one
@@ -389,9 +423,9 @@ stdin. Use stdin (or `--` before the argument) when the message starts with `-`
389
423
  or spans multiple lines.
390
424
 
391
425
  ```bash
392
- pnpm dlx @catena/cli feedback "The transfer flow worked great"
426
+ npx @catena/cli feedback "The transfer flow worked great"
393
427
 
394
- pnpm dlx @catena/cli feedback <<'EOF'
428
+ npx @catena/cli feedback <<'EOF'
395
429
  - transfer failed
396
430
  - policy was confusing
397
431
  EOF
@@ -404,8 +438,8 @@ with code 1.
404
438
 
405
439
  `send` and `transfer` exit as soon as the intent is created and any immediate
406
440
  next action is submitted. Inspect the returned `.status` and `.reasons` fields,
407
- then use `pnpm dlx @catena/cli intents get <intent-id>` to check whether it
408
- later completes, requires approval, or fails.
441
+ then use `npx @catena/cli intents get <intent-id>` to check whether it later
442
+ completes, requires approval, or fails.
409
443
 
410
444
  ## Configuration
411
445
 
@@ -419,11 +453,11 @@ later completes, requires approval, or fails.
419
453
  Every command supports `--help`.
420
454
 
421
455
  ```bash
422
- pnpm dlx @catena/cli --help
423
- pnpm dlx @catena/cli send --help
424
- pnpm dlx @catena/cli counterparties create --help
425
- pnpm dlx @catena/cli counterparties create email --help
426
- pnpm dlx @catena/cli counterparties create bank --help
427
- pnpm dlx @catena/cli counterparties create wallet --help
428
- pnpm dlx @catena/cli counterparties request-details --help
456
+ npx @catena/cli --help
457
+ npx @catena/cli send --help
458
+ npx @catena/cli counterparties create --help
459
+ npx @catena/cli counterparties create email --help
460
+ npx @catena/cli counterparties create bank --help
461
+ npx @catena/cli counterparties create wallet --help
462
+ npx @catena/cli counterparties request-details --help
429
463
  ```