chit402-verify 0.2.0 → 0.3.4
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 +10 -0
- package/package.json +4 -4
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
|
|
|
@@ -52,6 +56,8 @@ curl -s https://api.chit402.com/receipt/task-123?format=json | npx chit402-verif
|
|
|
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
|
|
|
@@ -62,6 +68,10 @@ curl -s https://api.chit402.com/receipt/task-123?format=json | npx chit402-verif
|
|
|
62
68
|
| 2 | Partial (binding ok, nullifier not checked) |
|
|
63
69
|
| 3 | Input error |
|
|
64
70
|
|
|
71
|
+
## Publish
|
|
72
|
+
|
|
73
|
+
`publishConfig` sets `access` to `public` and does not name an owner. On the registry, `chit402-verify` (latest `0.2.0`) and `@xfuel/verify` (latest `0.2.1`) are both maintained by the npm user `xfuel`. Publish `@xfuel/verify` first. `npm whoami` must print `xfuel`. A `404` on `PUT https://registry.npmjs.org/chit402-verify` is that login, not a missing package and not a new scope: the name already exists.
|
|
74
|
+
|
|
65
75
|
## Documentation
|
|
66
76
|
|
|
67
77
|
- [Chit402 Docs](https://chit402.com)
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chit402-verify",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"description": "Chit402 receipt verification — verify payment binding and output commitment offline.",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
7
7
|
"bin": {
|
|
8
|
-
"chit402-verify": "
|
|
8
|
+
"chit402-verify": "cli.js"
|
|
9
9
|
},
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
},
|
|
51
51
|
"repository": {
|
|
52
52
|
"type": "git",
|
|
53
|
-
"url": "https://github.com/XFuel-Lab/chit402.git",
|
|
53
|
+
"url": "git+https://github.com/XFuel-Lab/chit402.git",
|
|
54
54
|
"directory": "packages/aliases/chit402-verify"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@xfuel/verify": "^0.
|
|
57
|
+
"@xfuel/verify": "^0.3.4"
|
|
58
58
|
}
|
|
59
59
|
}
|