@inflowpayai/inflow 0.6.4 → 0.6.5
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 +95 -22
- package/dist/cli.js +1121 -702
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -7,28 +7,32 @@ Every command supports a TTY rendering (Ink) and an agent rendering via `--forma
|
|
|
7
7
|
view is what you get by default in an interactive terminal; the structured formats are what an AI assistant or pipeline
|
|
8
8
|
should request.
|
|
9
9
|
|
|
10
|
+
For host-specific skill and MCP installation, see the repository's
|
|
11
|
+
[surface install and testing guide](https://github.com/inflowpayai/inflow-cli/blob/main/docs/development/surfaces-and-testing.md).
|
|
12
|
+
|
|
10
13
|
## Command index
|
|
11
14
|
|
|
12
|
-
| Command | Purpose
|
|
13
|
-
| ------------------------------------ |
|
|
14
|
-
| `inflow auth login` | Run the OAuth device flow to authenticate. Saves a refreshable access token.
|
|
15
|
-
| `inflow auth logout` | Clear the saved access token and API key from local config.
|
|
16
|
-
| `inflow auth status` | Show which credential the CLI would use, plus the active environment and resolved API URL.
|
|
17
|
-
| `inflow user get` | Fetch the authenticated user's profile.
|
|
18
|
-
| `inflow balances list` | List the authenticated user's balances.
|
|
19
|
-
| `inflow deposit-addresses list` | List the user's configured deposit addresses, grouped by network.
|
|
20
|
-
| `inflow
|
|
21
|
-
| `inflow x402
|
|
22
|
-
| `inflow x402
|
|
23
|
-
| `inflow x402
|
|
24
|
-
| `inflow x402
|
|
25
|
-
| `inflow x402
|
|
26
|
-
| `inflow
|
|
27
|
-
| `inflow mpp
|
|
28
|
-
| `inflow mpp
|
|
29
|
-
| `inflow mpp
|
|
30
|
-
| `inflow mpp
|
|
31
|
-
| `inflow mpp
|
|
15
|
+
| Command | Purpose |
|
|
16
|
+
| ------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
17
|
+
| `inflow auth login` | Run the OAuth device flow to authenticate. Saves a refreshable access token. |
|
|
18
|
+
| `inflow auth logout` | Clear the saved access token and API key from local config. |
|
|
19
|
+
| `inflow auth status` | Show which credential the CLI would use, plus the active environment and resolved API URL. |
|
|
20
|
+
| `inflow user get` | Fetch the authenticated user's profile. |
|
|
21
|
+
| `inflow balances list` | List the authenticated user's balances. |
|
|
22
|
+
| `inflow deposit-addresses list` | List the user's configured deposit addresses, grouped by network. |
|
|
23
|
+
| `inflow inspect <url>` | Detect a URL's payment protocol(s) and show MPP and x402 challenges together. Read-only probe — no auth, no payment. |
|
|
24
|
+
| `inflow x402 pay <url>` | Probe a seller; if it returns 402, drive the approval flow and replay the request with the signed `PAYMENT-SIGNATURE`. |
|
|
25
|
+
| `inflow x402 inspect <url>` | Read-only probe. Show the seller's `PAYMENT-REQUIRED` accepts for a URL — no auth, no payment. |
|
|
26
|
+
| `inflow x402 status <transactionId>` | Poll the signing state of an in-flight transaction. Used to resume a previous `pay` across CLI invocations. |
|
|
27
|
+
| `inflow x402 cancel <approvalId>` | Best-effort cancel of an in-flight approval. Requires authentication; success does not verify the server-side approval state. |
|
|
28
|
+
| `inflow x402 decode <header>` | Decode a raw `PAYMENT-REQUIRED` header value. No auth required. |
|
|
29
|
+
| `inflow x402 supported` | List the buyer-side `(scheme, network)` capability cache. |
|
|
30
|
+
| `inflow mpp pay <url>` | Probe a seller; if it returns a `WWW-Authenticate: Payment` 402, fulfil the challenge and replay with `Authorization: Payment`. |
|
|
31
|
+
| `inflow mpp inspect <url>` | Read-only probe. Parse the seller's MPP `Payment` challenge(s) for a URL — no auth, no payment. |
|
|
32
|
+
| `inflow mpp status <transactionId>` | Poll the buyer-side state of an in-flight MPP transaction. Used to resume a previous `pay` across CLI invocations. |
|
|
33
|
+
| `inflow mpp cancel <approvalId>` | Best-effort cancel of an in-flight MPP approval. Requires authentication; success does not verify the server-side approval state. |
|
|
34
|
+
| `inflow mpp decode <value>` | Decode a `WWW-Authenticate: Payment` header, or a base64url credential / receipt. No auth required. |
|
|
35
|
+
| `inflow mpp supported` | List the methods the buyer can pay with — by intent, settlement rail, and currency. |
|
|
32
36
|
|
|
33
37
|
## Global flags
|
|
34
38
|
|
|
@@ -129,6 +133,75 @@ inflow deposit-addresses list --format json
|
|
|
129
133
|
|
|
130
134
|
Lists the configured deposit addresses for the authenticated user. TTY groups by network with a deposit address per row.
|
|
131
135
|
|
|
136
|
+
## `inspect`
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
inflow inspect https://seller.example.com/api/widgets
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Protocol-agnostic, read-only pre-flight. Probes the URL **once** and decodes both MPP and x402 challenges from the same
|
|
143
|
+
402 response — so you don't have to know the protocol before inspecting. **No authentication required.** This is the
|
|
144
|
+
recommended first step: read `detected` to decide which `pay` rail to use (MPP wins when a seller advertises both).
|
|
145
|
+
|
|
146
|
+
Unlike the per-protocol probes it carries only the probe-shape flags (`--method`, `--data`, `--header`) — it is
|
|
147
|
+
deliberately unfiltered. For filtered probes or full per-protocol detail (pay-to, timeout, extras, challenge ids /
|
|
148
|
+
digests), use [`inflow mpp inspect`](#mpp-inspect) / [`inflow x402 inspect`](#x402-inspect).
|
|
149
|
+
|
|
150
|
+
TTY renders a `detected:` summary line, then one section per protocol. Each section shows a triage table or a dim "none
|
|
151
|
+
advertised" line; a protocol whose header is present but undecodable shows a one-line warning rather than failing the
|
|
152
|
+
command. The x402 `Amount` is the seller's raw atomic units (decimals are not carried on the wire), and `Asset` is the
|
|
153
|
+
full on-chain contract address / mint rendered verbatim — it is not a token symbol.
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
PAYMENT-REQUIRED for https://seller.example.com/api/widgets · detected: mpp, x402
|
|
157
|
+
|
|
158
|
+
── MPP ── WWW-Authenticate: Payment · realm mpp.example · 1 challenge
|
|
159
|
+
Method Intent Amount Currency Rail
|
|
160
|
+
------ ------ ------ -------- -------
|
|
161
|
+
inflow charge 0.10 USDC balance
|
|
162
|
+
|
|
163
|
+
── x402 ── PAYMENT-REQUIRED · x402Version 2 · 2 accepts
|
|
164
|
+
Scheme Network Amount Asset
|
|
165
|
+
------ --------------------------------------- ------ ------------------------------------------
|
|
166
|
+
exact eip155:84532 10000 0x036CbD53842c5426634e7929541eC2318f3dCF7e
|
|
167
|
+
exact solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1 10000 4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU
|
|
168
|
+
|
|
169
|
+
Full detail (pay-to, timeout, extras, ids/digests): `inflow mpp inspect` / `inflow x402 inspect`, or --format json.
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Agent shape — fixed-shape arrays (`mpp` / `x402` are `[]` when a protocol is absent), with `detected` listing the
|
|
173
|
+
protocols that have at least one entry:
|
|
174
|
+
|
|
175
|
+
```jsonc
|
|
176
|
+
{
|
|
177
|
+
"outcome": "inspected",
|
|
178
|
+
"url": "https://seller.example.com/api/widgets",
|
|
179
|
+
"method": "GET",
|
|
180
|
+
"detected": ["x402"],
|
|
181
|
+
"mpp": [],
|
|
182
|
+
"x402": [
|
|
183
|
+
{
|
|
184
|
+
"scheme": "exact",
|
|
185
|
+
"network": "eip155:84532",
|
|
186
|
+
"amount": "10000",
|
|
187
|
+
"asset": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
|
|
188
|
+
"pay_to": "0x2096...",
|
|
189
|
+
"max_timeout_seconds": 300,
|
|
190
|
+
"extra": { "name": "USDC", "version": "2" },
|
|
191
|
+
},
|
|
192
|
+
],
|
|
193
|
+
"x402_resource": "https://www.seller.example.com/api/widgets",
|
|
194
|
+
"x402_version": 2,
|
|
195
|
+
}
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
Section-level problems are surfaced (without failing the command) in an optional `warnings` array — for example an MPP
|
|
199
|
+
header advertising no inflow-payable challenge (`NO_INFLOW_MATCH`), a present-but-undecodable header (`DECODE_FAILED`),
|
|
200
|
+
or a 402 carrying neither protocol header (`NO_PAYMENT_CHALLENGE`).
|
|
201
|
+
|
|
202
|
+
When the seller returns 2xx (no payment required), `inspect` yields `outcome: "no-payment-required"` with `status`,
|
|
203
|
+
`content_type`, and `body_size_bytes` — never the body itself.
|
|
204
|
+
|
|
132
205
|
## `x402`
|
|
133
206
|
|
|
134
207
|
The `x402` command group drives the buyer-side of the [x402 protocol](https://x402.org). It wraps
|
|
@@ -310,8 +383,8 @@ Polls the signing state of an in-flight transaction. Use to resume a previous `p
|
|
|
310
383
|
inflow x402 cancel appr_abc123
|
|
311
384
|
```
|
|
312
385
|
|
|
313
|
-
Best-effort cancel of `POST /v1/approvals/{approvalId}/cancel`.
|
|
314
|
-
|
|
386
|
+
Best-effort cancel of `POST /v1/approvals/{approvalId}/cancel`. Requires authentication. On success, the CLI returns
|
|
387
|
+
`cancelled: true`, but it does not poll for confirmation; the server-side approval may have already terminated.
|
|
315
388
|
|
|
316
389
|
### `x402 decode`
|
|
317
390
|
|