chit402-verify 0.1.1 → 0.3.0

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 (3) hide show
  1. package/README.md +7 -1
  2. package/cli.js +2 -0
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -33,6 +33,10 @@ console.log(fullResult.overall); // 'verified' | 'partial' | 'failed'
33
33
  # Local binding verification (no network required)
34
34
  npx chit402-verify receipt.json
35
35
 
36
+ # Hash the canonical object (must match signed payload_hash) and read not_after
37
+ # from a pinned issuer-history snapshot. Both flags are offline.
38
+ npx chit402-verify receipt.json --canonical-preimage preimage.json --issuer-history-file issuer-history.json
39
+
36
40
  # With on-chain nullifier check (requires network)
37
41
  npx chit402-verify receipt.json --check-nullifier
38
42
 
@@ -48,10 +52,12 @@ curl -s https://api.chit402.com/receipt/task-123?format=json | npx chit402-verif
48
52
  | Check | Requires Network? | Description |
49
53
  |-------|-------------------|-------------|
50
54
  | Payment binding | No | Recompute commitment from receipt fields |
51
- | Issuer signature | No | ES256 — pinned `issuer_jwk` on receipt, or JWKS file |
55
+ | Issuer signature | No, unless `--fetch-jwks` | ES256. Trusted via JWKS (by kid) or the pinned production kid. Embedded `issuer_jwk` alone is not enough. |
52
56
  | Output hash | No | Hash is on the receipt |
53
57
  | On-chain settlement | Yes | Query Base RPC for tx |
54
58
  | Nullifier anchor | Yes | Query ZKVerifierSP1 contract |
59
+ | Canonical preimage | No | `--canonical-preimage` is SHA-256'd and matched to signed `payload_hash` |
60
+ | Issuer history | No, with `--issuer-history-file` | `iat` is inside the kid's `not_before` / `not_after`. A payload v10 pin must match |
55
61
 
56
62
  ## Exit Codes (CLI)
57
63
 
package/cli.js CHANGED
@@ -8,6 +8,8 @@ import { createRequire } from 'node:module';
8
8
  import { spawn } from 'node:child_process';
9
9
 
10
10
  const require = createRequire(import.meta.url);
11
+ // Resolve via the package exports map. Deep imports of dist/cli.js throw
12
+ // ERR_PACKAGE_PATH_NOT_EXPORTED unless @xfuel/verify lists that subpath.
11
13
  const verifyCliPath = require.resolve('@xfuel/verify/dist/cli.js');
12
14
 
13
15
  const child = spawn(process.execPath, [verifyCliPath, ...process.argv.slice(2)], {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chit402-verify",
3
- "version": "0.1.1",
3
+ "version": "0.3.0",
4
4
  "description": "Chit402 receipt verification — verify payment binding and output commitment offline.",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -54,6 +54,6 @@
54
54
  "directory": "packages/aliases/chit402-verify"
55
55
  },
56
56
  "dependencies": {
57
- "@xfuel/verify": "^0.1.1"
57
+ "@xfuel/verify": "^0.3.0"
58
58
  }
59
59
  }