twzrd-receipt-verifier 1.0.5 → 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
package/package.json CHANGED
@@ -1,8 +1,18 @@
1
1
  {
2
2
  "name": "twzrd-receipt-verifier",
3
- "version": "1.0.5",
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",
7
17
  "bugs": {
8
18
  "url": "https://github.com/twzrd-sol/wzrd-final/issues"
@@ -23,7 +33,8 @@
23
33
  "LICENSE"
24
34
  ],
25
35
  "scripts": {
26
- "verify": "node verify_twzrd_receipt.js"
36
+ "verify": "node verify_twzrd_receipt.js",
37
+ "test": "node --test test/*.test.js"
27
38
  },
28
39
  "engines": {
29
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 };