@x402api/agent-wallet-cli 0.2.2 → 0.2.3
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
|
@@ -4,15 +4,16 @@ Installs the `x402api` executable and bundled `x402api-pay` skill for persistent
|
|
|
4
4
|
agent wallets and exact x402 payments.
|
|
5
5
|
|
|
6
6
|
The launch payer authorizes only sponsored Base USDC and sponsored Solana
|
|
7
|
-
USDC/USDT. x402api supplies the network fee asset
|
|
8
|
-
SOL
|
|
9
|
-
|
|
7
|
+
USDC/USDT. x402api supplies the network fee asset from its platform treasury,
|
|
8
|
+
so buyers do not need ETH or SOL and actual gas is not debited from the
|
|
9
|
+
merchant tenant. TRON payment authorization returns `unsupported_profile`
|
|
10
|
+
until that rail is launched.
|
|
10
11
|
|
|
11
12
|
The CLI runs on the buyer or agent host; merchant integrations do not host it
|
|
12
13
|
or receive its keys. A wallet's funded token balance is spend authority, and
|
|
13
14
|
`wallet create --maximum-payment-atomic N` can add a per-payment ceiling. The
|
|
14
15
|
ceiling is not a daily, cumulative, or merchant-specific permission and cannot
|
|
15
|
-
be updated in place in version 0.2.
|
|
16
|
+
be updated in place in version 0.2.3.
|
|
16
17
|
|
|
17
18
|
Run `x402api help --json` for the machine-readable command summary. Unlock
|
|
18
19
|
material is accepted only from standard input or an owner-only file named by
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@x402api/agent-wallet-cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Command-line wallet for autonomous x402 purchases.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -38,6 +38,6 @@
|
|
|
38
38
|
"lint": "tsc --noEmit -p tsconfig.json"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@x402api/agent-wallet-core": "0.2.
|
|
41
|
+
"@x402api/agent-wallet-core": "0.2.3"
|
|
42
42
|
}
|
|
43
43
|
}
|
package/skill/SKILL.md
CHANGED
|
@@ -80,7 +80,9 @@ instructions to the human instead of sending email.
|
|
|
80
80
|
request and receive its `402 Payment Required` challenge.
|
|
81
81
|
2. Have that integration write the exact credential-free request envelope.
|
|
82
82
|
Never place authorization tokens, cookies, SSH keys, or owner credentials in
|
|
83
|
-
the envelope.
|
|
83
|
+
the envelope. Keep any merchant-side `X-X402API-Challenge-Handle` out as
|
|
84
|
+
well; it is reconciliation metadata, not the buyer payment identifier or a
|
|
85
|
+
signing input.
|
|
84
86
|
3. Verify the URL, method, exact body bytes, resource, network, asset, amount,
|
|
85
87
|
recipient, profile, and challenge digest.
|
|
86
88
|
4. Require a launch-sponsored Base USDC or Solana USDC/USDT profile and the
|
|
@@ -104,7 +106,8 @@ submission rules.
|
|
|
104
106
|
Distinguish these states:
|
|
105
107
|
|
|
106
108
|
- funding: the wallet has usable USDC/USDT balance; x402api sponsors launch-rail
|
|
107
|
-
ETH/SOL from the merchant tenant's
|
|
109
|
+
ETH/SOL from its platform treasury, subject to the merchant tenant's active
|
|
110
|
+
sponsorship allowance;
|
|
108
111
|
- authorization: one durable payment artifact exists;
|
|
109
112
|
- settlement: the payment is authoritative on the chosen rail;
|
|
110
113
|
- fulfillment: the merchant returned the purchased result.
|
|
@@ -34,7 +34,7 @@ x402api wallet sweep --wallet NAME --to ADDRESS --json
|
|
|
34
34
|
`--maximum-payment-atomic` is an optional canonical decimal in atomic units for
|
|
35
35
|
the wallet's supported payment asset. It is enforced on each authorization and
|
|
36
36
|
returns `payment_limit_exceeded` when the exact amount is larger. It is not a
|
|
37
|
-
daily or cumulative budget. Version 0.2.
|
|
37
|
+
daily or cumulative budget. Version 0.2.3 sets it only at wallet creation and
|
|
38
38
|
does not provide a policy-update command.
|
|
39
39
|
|
|
40
40
|
Unlocking commands additionally require `X402API_WALLET_PASSWORD_FILE` or an
|
|
@@ -95,13 +95,21 @@ when a merchant-specific integration owns the request lifecycle.
|
|
|
95
95
|
registered refill notification.
|
|
96
96
|
- `insufficient_network_fee_resources`: is not expected for a valid launch
|
|
97
97
|
profile; stop because the merchant challenge was not safely sponsored.
|
|
98
|
-
- `
|
|
99
|
-
`
|
|
100
|
-
|
|
98
|
+
- `gas_sponsorship_unavailable`, `gas_treasury_below_floor`,
|
|
99
|
+
`sponsor_signature_unavailable`: retain the exact attempt and retry only with
|
|
100
|
+
bounded backoff; never switch to buyer-funded gas.
|
|
101
|
+
- `sponsorship_allowance_unavailable`, `sponsorship_payment_cap_exceeded`,
|
|
102
|
+
`sponsorship_payment_allowance_exhausted`,
|
|
103
|
+
`sponsorship_volume_allowance_exhausted`,
|
|
104
|
+
`sponsorship_gas_budget_exhausted`: the current authorization is terminal.
|
|
105
|
+
The merchant tenant must top up or change its allowance configuration and
|
|
106
|
+
issue a fresh challenge; the buyer must not fund native gas.
|
|
107
|
+
- `tenant_gas_credit_insufficient`: legacy-server response; retain the exact
|
|
108
|
+
attempt and retry only after the merchant tenant restores service credit.
|
|
109
|
+
- `sponsorship_reservation_expired`: obtain a fresh challenge without reusing
|
|
110
|
+
the expired authorization.
|
|
101
111
|
- `sponsored_payload_invalid`: stop; the challenge or signed payload is not
|
|
102
112
|
safely sponsored.
|
|
103
|
-
- `sponsor_signature_unavailable`: retain the exact attempt and retry with
|
|
104
|
-
bounded backoff.
|
|
105
113
|
- `settlement_outcome_unknown`: keep the exact attempt and request envelope;
|
|
106
114
|
retry or reconcile them without creating a new authorization.
|
|
107
115
|
- `unsupported_network`, `unsupported_asset`, `unsupported_profile`,
|
|
@@ -25,7 +25,12 @@ The merchant tool writes an owner-only JSON file:
|
|
|
25
25
|
The body is exact canonical base64 and is never parsed and reserialized before
|
|
26
26
|
paid submission. The decoded `resource.url` must equal the normalized envelope
|
|
27
27
|
URL. The envelope excludes authorization headers, cookies, API keys, SSH keys,
|
|
28
|
-
and
|
|
28
|
+
owner tokens, and merchant-side challenge handles. A response header such as
|
|
29
|
+
`X-X402API-Challenge-Handle` is opaque reconciliation metadata for the merchant
|
|
30
|
+
integration. It is not the buyer payment identifier, does not affect the token
|
|
31
|
+
authorization, and must not be added to this exact V1 envelope. The wallet
|
|
32
|
+
creates its own `buyerPaymentIdentifier` when it authorizes a selected payment
|
|
33
|
+
requirement.
|
|
29
34
|
|
|
30
35
|
## Payment submission or artifact handoff
|
|
31
36
|
|
|
@@ -9,7 +9,7 @@ Base, Solana, and TRON.
|
|
|
9
9
|
|
|
10
10
|
An optional `maximumPaymentAtomic` value adds a local ceiling to each payment.
|
|
11
11
|
It does not limit aggregate or daily spend, restrict merchants, revoke existing
|
|
12
|
-
artifacts, or protect a wallet on a compromised same-user host. Version 0.2.
|
|
12
|
+
artifacts, or protect a wallet on a compromised same-user host. Version 0.2.3
|
|
13
13
|
sets this value only when creating a wallet and has no policy-update command.
|
|
14
14
|
|
|
15
15
|
Show the exact network, token contract or mint, public address, and requested
|