@tollstile/x402 0.1.0 → 0.1.2

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 (2) hide show
  1. package/README.md +1 -1
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -109,7 +109,7 @@ The authorization's `data` holds the payer's signed payload, because settlement
109
109
 
110
110
  ## Verification status
111
111
 
112
- **Tested only against fakes and the reference library.**
112
+ **Automated tests run against fakes and the reference library. One live run on Base Sepolia is recorded at the end of this section.**
113
113
 
114
114
  - `test/x402.test.ts` drives real flows through `createTollstile` with a fake facilitator and a fake JSON-RPC node sharing one simulated chain (injected `fetch`): 402 → pay with the echoed quote → 200 for `exact` and `upto` (fulfilled amount); dynamic prices; tampered `accepted` amount, recipient, network, asset, and timeout; signatures to another recipient, amount, spender, or facilitator; tampered and expired quotes; facilitator unreachable, hanging (abort), and `unexpected_verify_error` → 503; replay after settlement (`409 proof_already_used`, or `409 already_paid` with the same `Idempotency-Key` even after the quote expired) and concurrent replay (`409 proof_already_used`); a facilitator signature rejection stays `402 proof_invalid`; `payment-identifier` as idempotency key (`409 request_in_progress` in flight, `409 already_paid` after settlement, malformed id rejected); canonical lowercase payer; retry after a released charge; rejected settlement as 200 and non-2xx (fresh 402 `settlement_rejected` after the handler); `settlement_pending` → `unknown` → reconciled to `settled` from chain evidence (exact and upto) without a second `/settle`; unmined authorization kept `unknown` until expired, then `failed`; payer cancellation (EIP-3009 and Permit2 invalidation, with a decoy transfer) → nothing charged; RPC down → stays `unknown`; crash after fulfillment → settled by reconciliation; MCP challenge and receipt; redaction (payload kept until final and while `unknown`, kept after a release and dropped once the retry settles, dropped after settle, rejection, and reconciliation; lookup still works on redacted data); configuration errors.
115
115
  - `test/rail-conformance.test.ts` runs core's `railConformance()` kit against the same fakes for the `exact` scheme, with lost settle responses, settle failures before any effect, and tampered proofs: all 9 cases pass, none skipped. The kit prices routes with a fixed string, so `upto` is not exercised by it (it is covered in `x402.test.ts`).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tollstile/x402",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "x402 payments for APIs and MCP tools: accept USDC with the exact and upto schemes, verify through a facilitator, and reconcile on-chain. A Tollstile rail.",
5
5
  "keywords": [
6
6
  "x402",
@@ -39,11 +39,11 @@
39
39
  "dist"
40
40
  ],
41
41
  "peerDependencies": {
42
- "tollstile": "^0.1.0"
42
+ "tollstile": "^0.1.2"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@x402/core": "2.25.0",
46
- "tollstile": "^0.1.0"
46
+ "tollstile": "^0.1.2"
47
47
  },
48
48
  "scripts": {
49
49
  "build": "tsup",