twzrd-receipt-verifier 1.0.4 → 1.0.6

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
@@ -1,7 +1,7 @@
1
1
  # TWZRD Receipt Verifier (standalone)
2
2
 
3
- Verify a TWZRD **AO-Receipt V5** offline, trusting **nothing from TWZRD's servers
4
- or codebase** - only the receipt, TWZRD's published public key, and two
3
+ Verify a **signed TWZRD trust receipt** offline, trusting **nothing from TWZRD's
4
+ servers or codebase** - only the receipt, TWZRD's published public key, and two
5
5
  widely-audited crypto libraries.
6
6
 
7
7
  A TWZRD trust receipt has two layers:
@@ -32,6 +32,16 @@ npx twzrd-receipt-verifier receipt.json --pubkey 9V6Pn19kiUA5Rn6JpQfNduanvGt2aXG
32
32
  npx twzrd-receipt-verifier receipt.json --pubkey 9V6Pn19kiUA5Rn6JpQfNduanvGt2aXGwsarosNfa2Ldf --max-age 60
33
33
  ```
34
34
 
35
+ ## Ingest the corpus
36
+
37
+ The receipts this tool verifies are issued from the only live cross-facilitator x402
38
+ payer corpus on Solana. Pull the scored signal population as a feed (no auth, paginated):
39
+
40
+ curl -s 'https://intel.twzrd.xyz/v1/intel/corpus_feed?limit=5' | jq .
41
+
42
+ Browser demo: https://twzrd.xyz/demo/ingest/ · schema: https://intel.twzrd.xyz/docs ·
43
+ ingestion pilots: https://twzrd.xyz/grants (email privacy@twzrd.xyz).
44
+
35
45
  ## The published signing key
36
46
 
37
47
  | field | value |
@@ -50,8 +60,8 @@ Also published, machine-readable, at:
50
60
 
51
61
  ## Get a receipt to verify
52
62
 
53
- Any TWZRD V5 receipt works. To mint a fresh one, pay the trust endpoint (x402,
54
- 0.05 USDC on Solana mainnet) - e.g. via AgentCash:
63
+ Any signed TWZRD trust receipt works. To mint a fresh one, pay the trust endpoint
64
+ (x402, 0.05 USDC on Solana mainnet) - e.g. via AgentCash:
55
65
 
56
66
  ```bash
57
67
  npx agentcash@latest fetch https://intel.twzrd.xyz/v1/intel/trust/<PUBKEY> > resp.json
@@ -75,21 +85,27 @@ The receipt object looks like:
75
85
  ## Python
76
86
 
77
87
  ```bash
78
- pip install pynacl pycryptodome # libsodium Ed25519 + original Keccak-256
88
+ pip install twzrd-receipt-verifier # PyPI; or: pip install pynacl pycryptodome for script-only use
79
89
 
80
90
  # fetch the published key and verify:
81
- python verify_twzrd_receipt.py receipt.json
91
+ twzrd-verify-receipt receipt.json
92
+ # or: python verify_twzrd_receipt.py receipt.json
82
93
 
83
94
  # pin the key out-of-band (recommended):
84
95
  python verify_twzrd_receipt.py receipt.json --pubkey 9V6Pn19kiUA5Rn6JpQfNduanvGt2aXGwsarosNfa2Ldf
85
96
 
86
97
  # also confirm a tampered copy FAILS:
87
- python verify_twzrd_receipt.py receipt.json --self-test
98
+ twzrd-verify-receipt receipt.json --self-test
99
+
100
+ # replay-resistance (opt-in; same semantics as the npm CLI --max-age):
101
+ twzrd-verify-receipt receipt.json --max-age 300
88
102
 
89
103
  # from stdin:
90
- cat receipt.json | python verify_twzrd_receipt.py -
104
+ cat receipt.json | twzrd-verify-receipt -
91
105
  ```
92
106
 
107
+ Source: [packages/twzrd-agent-intel/verifier](https://github.com/twzrd-sol/wzrd-final/tree/main/packages/twzrd-agent-intel/verifier)
108
+
93
109
  ## Node
94
110
 
95
111
  ```bash
package/package.json CHANGED
@@ -1,9 +1,27 @@
1
1
  {
2
2
  "name": "twzrd-receipt-verifier",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "Standalone offline verifier for TWZRD AO-Receipt V5 (Ed25519-signed keccak256 leaf). No trust in TWZRD servers or code.",
5
- "keywords": ["twzrd", "x402", "solana", "ed25519", "keccak256", "receipt", "verifier", "agent", "attestation"],
5
+ "keywords": [
6
+ "twzrd",
7
+ "x402",
8
+ "solana",
9
+ "ed25519",
10
+ "keccak256",
11
+ "receipt",
12
+ "verifier",
13
+ "agent",
14
+ "attestation"
15
+ ],
6
16
  "homepage": "https://intel.twzrd.xyz",
17
+ "bugs": {
18
+ "url": "https://github.com/twzrd-sol/wzrd-final/issues"
19
+ },
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/twzrd-sol/wzrd-final.git",
23
+ "directory": "packages/twzrd-agent-intel/verifier"
24
+ },
7
25
  "license": "MIT",
8
26
  "author": "TWZRD",
9
27
  "bin": {
@@ -15,7 +33,8 @@
15
33
  "LICENSE"
16
34
  ],
17
35
  "scripts": {
18
- "verify": "node verify_twzrd_receipt.js"
36
+ "verify": "node verify_twzrd_receipt.js",
37
+ "test": "node --test test/*.test.js"
19
38
  },
20
39
  "engines": {
21
40
  "node": ">=16"
@@ -220,4 +220,9 @@ key source: ${DEFAULT_BASE_URL}/.well-known/x402`;
220
220
  process.exit(ok ? 0 : 1);
221
221
  }
222
222
 
223
- main().catch((e) => { console.error('error:', e.message); process.exit(1); });
223
+ // Run the CLI only when invoked directly; stay importable for tests.
224
+ if (require.main === module) {
225
+ main().catch((e) => { console.error('error:', e.message); process.exit(1); });
226
+ }
227
+
228
+ module.exports = { verify, recomputeLeaf, b58decode, payer32, anchor32 };