twzrd-x402-gate 0.8.7 → 0.8.9
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 +5 -5
- package/bin/twzrd-gate-eval-refuse.js +3 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ refuse. Protects the **payer** from a risky **merchant** (`payTo`). Chain-neutra
|
|
|
10
10
|
### Default-on AutoGate (5 lines)
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
npm install twzrd-x402-gate@0.8.
|
|
13
|
+
npm install twzrd-x402-gate@0.8.9 @x402/core @x402/fetch @x402/svm
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
```typescript
|
|
@@ -49,7 +49,7 @@ transfer on-chain. Wash/sybil edges are primarily discounted in TWZRD scoring, n
|
|
|
49
49
|
revenue refusal.
|
|
50
50
|
|
|
51
51
|
```bash
|
|
52
|
-
npm install twzrd-x402-gate@0.8.
|
|
52
|
+
npm install twzrd-x402-gate@0.8.9
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
```typescript
|
|
@@ -93,7 +93,7 @@ Fixture-backed SVM extract tests live in `test/seller-hook.test.ts` +
|
|
|
93
93
|
Install the published gate and run against wash fixtures:
|
|
94
94
|
|
|
95
95
|
```bash
|
|
96
|
-
npm install twzrd-x402-gate@0.8.
|
|
96
|
+
npm install twzrd-x402-gate@0.8.9
|
|
97
97
|
# from package root after install, or from a checkout:
|
|
98
98
|
npm run wash-dogfood
|
|
99
99
|
```
|
|
@@ -238,10 +238,10 @@ Dogfood (one public live proof path):
|
|
|
238
238
|
## Install
|
|
239
239
|
|
|
240
240
|
```bash
|
|
241
|
-
npm install twzrd-x402-gate@0.8.
|
|
241
|
+
npm install twzrd-x402-gate@0.8.9
|
|
242
242
|
```
|
|
243
243
|
|
|
244
|
-
Current npm truth: `0.8.
|
|
244
|
+
Current npm truth: `0.8.9` (buyer gate + optional seller settle guard + payer-extract hardening).
|
|
245
245
|
Check `npm view twzrd-x402-gate version` if in doubt (do not pin stale **0.5.4** / **0.7.1**).
|
|
246
246
|
|
|
247
247
|
Optional settle guard (resource-server **payer** policy): see **Seller settle guard
|
|
@@ -16,8 +16,9 @@ import { dirname, join } from "node:path";
|
|
|
16
16
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
17
17
|
import { existsSync } from "node:fs";
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
const
|
|
19
|
+
// Owned TWZRD refuse dogfood (not a third-party brand). Live 402 + force hard-block.
|
|
20
|
+
const TARGET_URL = "https://intel.twzrd.xyz/v1/intel/refuse-fixture";
|
|
21
|
+
const EXPECT_PAYTO = "CnTmHDXVEafkc8sFSzNky9w5zwk63Bk2mHZZodorjhvR";
|
|
21
22
|
const NETWORK = "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp";
|
|
22
23
|
const USDC = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v";
|
|
23
24
|
const INTEL_PREFLIGHT = "https://intel.twzrd.xyz/v1/intel/preflight";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "twzrd-x402-gate",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.9",
|
|
4
4
|
"description": "Core: buyer-side x402 trust gate. Free TWZRD preflight (ReadinessCard) before signing USDC to any merchant, with optional $0.001 paid trust escalate on warn \u2014 blocking spend on bad intel, no human in the loop. Optional: createTwzrdSettleGuard for resource servers to apply merchant policy on the payer before settle+serve. installTwzrdAutoGate is the canonical default-on entry across fetch payWrap, x402 client (onBeforePaymentCreation), and MPP onChallenge. Fail-closed by default \u2014 set TWZRD_FAIL_OPEN=true for outage allow; kill switch TWZRD_GATE_ENABLED=false or TWZRD_AUTO_GATE=0. Always stamps X-Twzrd-Caller for seat metrics.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|