twzrd-x402-gate 0.11.4 → 0.11.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/CHANGELOG.md CHANGED
@@ -28,6 +28,10 @@ All notable changes to `twzrd-x402-gate`. Dates are npm publish dates (UTC).
28
28
  - **Seller side** (`createTwzrdSettleGuard`): fail-open by default. A screen that throws
29
29
  returns without aborting settlement unless `failOpen: false`.
30
30
 
31
+ ## 0.11.5 - 2026-10-02 (peer floor)
32
+
33
+ - **`x402-solana` peer floor raised to `>=3.0.1`** (was `>=3.0.0`). x402-solana 3.0.1 refuses a non-positive amount, or one above the u64 range, before it builds or signs a transfer; 3.0.0 accepted a negative amount. An install that resolves the stock PayAI client now gets that check. The gate's own `amount_malformed` refusal (0.11.2) already rejected a signed or non-integer amount on every gate entry point; this closes the same hole for a payer that calls `x402-solana` directly. No gate allow/refuse outcome changes.
34
+
31
35
  ## 0.11.4 - 2026-10-01 (security fix)
32
36
 
33
37
  - **`createTwzrdPolicyFetch` and the x402 intent adapter refuse a non-USDC asset** (`twzrd_non_usdc_asset`) instead of reading its base units as USD: 5 wSOL (`500000000`) passed a $1000 cap as "$500". The hook and approval seats already refused it; the policy seat now agrees. A bare `"USDC"` symbol is not a mint and is refused like any other non-mint asset on a network with a known USDC set. The MPP seat has its own priced-asset table and is unchanged (it also prices USDT 1:1; the x402 seats do not).
package/QUICKSTART.md CHANGED
@@ -6,13 +6,13 @@ is unreachable the gate never *invents* a wash flag. A failed preflight, or a me
6
6
  outage on a scored path, blocks by default (`TWZRD_FAIL_OPEN=true` to allow). A reachable
7
7
  card with no wash signal still proceeds.
8
8
 
9
- **Pin:** `twzrd-x402-gate@0.11.4` + stock PayAI client `x402-solana@3.0.0` (official
9
+ **Pin:** `twzrd-x402-gate@0.11.5` + stock PayAI client `x402-solana@3.0.1` (official
10
10
  `beforePayment` seat). `@x402/core` Path E remains supported; refuse script is fallback.
11
11
 
12
12
  ## 1. Stock PayAI client (default seat — copy-paste)
13
13
 
14
14
  ```bash
15
- npm install twzrd-x402-gate@0.11.4 x402-solana@3.0.0
15
+ npm install twzrd-x402-gate@0.11.5 x402-solana@3.0.1
16
16
  ```
17
17
 
18
18
  > **ESM-only.** The package ships `import` conditions only — a CommonJS
@@ -37,7 +37,7 @@ Then: `await client.fetch("https://merchant.example/paid");`
37
37
  ## 1b. Official `@x402/core` client (Path E)
38
38
 
39
39
  ```bash
40
- npm install twzrd-x402-gate@0.11.4 @x402/core @x402/fetch @x402/svm
40
+ npm install twzrd-x402-gate@0.11.5 @x402/core @x402/fetch @x402/svm
41
41
  ```
42
42
 
43
43
  ```typescript
@@ -109,7 +109,7 @@ Optional seat proofs (live intel; the clean-fixture leg can exit 2 when
109
109
  `CLEAN_PAYTO` is wash-flagged — that is not the first demo):
110
110
 
111
111
  ```bash
112
- # Stock-client seat proof (beforePayment). Needs x402-solana@3.0.0.
112
+ # Stock-client seat proof (beforePayment). Needs x402-solana@3.0.1.
113
113
  # Harness fallback runs without it but does not clear closure.
114
114
  npm run x402-solana-before-payment-proof
115
115
  # writes block-proof-<run_id>.json — hook: beforePayment
package/README.md CHANGED
@@ -41,7 +41,7 @@ refuse. Protects the **payer** from a risky **merchant** (`payTo`). Chain-neutra
41
41
  ### Default-on AutoGate (5 lines)
42
42
 
43
43
  ```bash
44
- npm install twzrd-x402-gate@0.11.4 @x402/core @x402/fetch @x402/svm
44
+ npm install twzrd-x402-gate@0.11.5 @x402/core @x402/fetch @x402/svm
45
45
  ```
46
46
 
47
47
  ```typescript
@@ -80,7 +80,7 @@ transfer on-chain. Wash/sybil edges are primarily discounted in TWZRD scoring, n
80
80
  revenue refusal.
81
81
 
82
82
  ```bash
83
- npm install twzrd-x402-gate@0.11.4
83
+ npm install twzrd-x402-gate@0.11.5
84
84
  ```
85
85
 
86
86
  ```typescript
@@ -125,7 +125,7 @@ Fixture-backed SVM extract tests live in `test/seller-hook.test.ts` +
125
125
  Install the published gate and run against wash fixtures:
126
126
 
127
127
  ```bash
128
- npm install twzrd-x402-gate@0.11.4
128
+ npm install twzrd-x402-gate@0.11.5
129
129
  # from package root after install, or from a checkout:
130
130
  npm run wash-dogfood
131
131
  ```
@@ -299,7 +299,7 @@ Dogfood (one public live proof path):
299
299
  ## Install
300
300
 
301
301
  ```bash
302
- npm install twzrd-x402-gate@0.11.4
302
+ npm install twzrd-x402-gate@0.11.5
303
303
  ```
304
304
 
305
305
  Do not hardcode a version in this doc — every past pin here (**0.5.4**, **0.7.1**, **0.8.5**,
package/dist/doctor.js CHANGED
@@ -33,7 +33,7 @@ const HOSTS = [
33
33
  id: "solana-agent-kit",
34
34
  label: "Solana Agent Kit (SolanaAgentKit)",
35
35
  deps: ["solana-agent-kit"],
36
- install: "npm install twzrd-x402-gate@0.11.4",
36
+ install: "npm install twzrd-x402-gate@0.11.5",
37
37
  snippet: `import { SolanaAgentKit } from "solana-agent-kit";
38
38
  import { twzrdBeforeSign } from "twzrd-x402-gate";
39
39
 
@@ -49,7 +49,7 @@ const agent = new SolanaAgentKit(wallet, rpcUrl, {
49
49
  id: "pay-kit",
50
50
  label: "Solana PayKit (createPayKitClient)",
51
51
  deps: ["@solana/pay-kit"],
52
- install: "npm install twzrd-x402-gate@0.11.4 @solana/pay-kit",
52
+ install: "npm install twzrd-x402-gate@0.11.5 @solana/pay-kit",
53
53
  snippet: `import { createPayKitClient } from "@solana/pay-kit";
54
54
  import { createTwzrdPayKitBeforePaymentHook } from "twzrd-x402-gate";
55
55
 
@@ -71,7 +71,7 @@ const client = await createPayKitClient({
71
71
  id: "x402-client",
72
72
  label: "official x402 client (@x402/core)",
73
73
  deps: ["@x402/core", "@x402/fetch", "@x402/svm"],
74
- install: "npm install twzrd-x402-gate@0.11.4 @x402/core @x402/fetch @x402/svm",
74
+ install: "npm install twzrd-x402-gate@0.11.5 @x402/core @x402/fetch @x402/svm",
75
75
  snippet: `import { x402Client } from "@x402/core/client";
76
76
  import { installTwzrdAutoGate } from "twzrd-x402-gate";
77
77
 
@@ -83,7 +83,7 @@ installTwzrdAutoGate(client, { refuseWashFlagged: true });`,
83
83
  id: "elizaos",
84
84
  label: "elizaOS agent runtime",
85
85
  deps: ["@elizaos/core", "elizaos"],
86
- install: "npm install twzrd-x402-gate@0.11.4",
86
+ install: "npm install twzrd-x402-gate@0.11.5",
87
87
  snippet: `import { installTwzrdAutoGate } from "twzrd-x402-gate";
88
88
 
89
89
  // Gate the payment client your plugin hands to the runtime, not the runtime
@@ -94,7 +94,7 @@ installTwzrdAutoGate(paymentClient, { refuseWashFlagged: true });`,
94
94
  id: "goat",
95
95
  label: "GOAT SDK",
96
96
  deps: ["@goat-sdk/core"],
97
- install: "npm install twzrd-x402-gate@0.11.4",
97
+ install: "npm install twzrd-x402-gate@0.11.5",
98
98
  snippet: `import { installTwzrdAutoGate } from "twzrd-x402-gate";
99
99
 
100
100
  installTwzrdAutoGate(walletClient, { refuseWashFlagged: true });`,
@@ -103,7 +103,7 @@ installTwzrdAutoGate(walletClient, { refuseWashFlagged: true });`,
103
103
  id: "raw-fetch",
104
104
  label: "raw fetch + x402 payer",
105
105
  deps: ["x402-fetch", "x402"],
106
- install: "npm install twzrd-x402-gate@0.11.4",
106
+ install: "npm install twzrd-x402-gate@0.11.5",
107
107
  snippet: `import { installTwzrdAutoGate } from "twzrd-x402-gate";
108
108
 
109
109
  // Wraps fetch: a refused payment never reaches the payer.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "twzrd-x402-gate",
3
- "version": "0.11.4",
3
+ "version": "0.11.5",
4
4
  "description": "Released identity 0.11.2. Buyer-side x402 trust gate: free preflight before signing USDC to a merchant. On Solana mainnet and Base mainnet (eip155:8453), a missing payTo is not approved, a buyer preflight outage does not sign unless TWZRD_FAIL_OPEN=true, null_reason unknown_subject does not sign, a price above recommended_cap_usdc does not sign, and disagreeing v1/v2 price or recipient fields are refused. An approved warn whose paying fetch is wired requests /v1/intel/quick and does not request /v1/intel/trust. Other EVM networks do not run the scored preflight. createTwzrdBeforePaymentHook does not read TWZRD_AUTO_GATE or TWZRD_GATE_ENABLED; those switches apply only to installTwzrdAutoGate. createTwzrdSettleGuard stays fail-open by default, so an unavailable gate does not abort. 0.11.0 is not uniformly fail-closed.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -111,7 +111,7 @@
111
111
  "@x402/fetch": ">=2.0.0",
112
112
  "@x402/svm": ">=2.0.0",
113
113
  "js-sha3": ">=0.8.0",
114
- "x402-solana": ">=3.0.0"
114
+ "x402-solana": ">=3.0.1"
115
115
  },
116
116
  "peerDependenciesMeta": {
117
117
  "@scure/base": {
@@ -150,6 +150,6 @@
150
150
  "js-sha3": "^0.13.0",
151
151
  "tsx": "^4.23.12",
152
152
  "typescript": "^5.4.0",
153
- "x402-solana": "^3.0.0"
153
+ "x402-solana": "^3.0.1"
154
154
  }
155
155
  }