@mikeargento/bitgraph-verify 1.0.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024-2026 Mike Argento
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,26 @@
1
+ # @mikeargento/bitgraph-verify
2
+
3
+ Offline, deterministic verification of [BitGraph](https://bitgraph.ing) proofs.
4
+
5
+ Verification of BitGraph proofs is permissionless by design. This package is MIT-licensed so that anyone, including parties adverse to the proof's issuer, can verify a proof without asking permission, online or offline, forever.
6
+
7
+ ```ts
8
+ import { verify } from "@mikeargento/bitgraph-verify";
9
+
10
+ const result = await verify({ proof, bytes });
11
+ if (result.ok) {
12
+ // signature, slot binding, attestation, and chain link all checked
13
+ }
14
+ ```
15
+
16
+ Verification runs entirely locally: the artifact bytes and the proof JSON are the only inputs. No network access, no account, no contact with BitGraph.
17
+
18
+ The proof schema (`bitgraph/1`), canonical serialization, and proofHash computation live here as well, so independent implementations can be checked against this one.
19
+
20
+ See [bitgraph.ing/docs/verification](https://bitgraph.ing/docs/verification) for the verification checklist and attestation handling.
21
+
22
+ The BitGraph construction side (proof creation) is separate and proprietary: [`@mikeargento/bitgraph`](https://www.npmjs.com/package/@mikeargento/bitgraph).
23
+
24
+ ## License
25
+
26
+ MIT. Copyright 2024-2026 Mike Argento. The BitGraph protocol is patent pending; this package's MIT grant covers this verification code.
@@ -0,0 +1,54 @@
1
+ /**
2
+ * bitgraph-core canonical serialization
3
+ *
4
+ * Produces a deterministic, UTF-8 encoded JSON byte sequence from an
5
+ * arbitrary JavaScript value. The output is used as the signing input
6
+ * for BitGraphProof signatures and must be reproduced identically by any
7
+ * verifier regardless of platform or runtime.
8
+ *
9
+ * Algorithm:
10
+ * 1. Recursively sort object keys lexicographically (Unicode code-point order)
11
+ * 2. Serialize with JSON.stringify (no whitespace)
12
+ * 3. Encode the resulting string as UTF-8
13
+ *
14
+ * Constraints satisfied:
15
+ * - Deterministic key ordering
16
+ * - No whitespace variance
17
+ * - Stable numeric formatting (JSON.stringify uses shortest representation)
18
+ * - UTF-8 output (TextEncoder default)
19
+ * - Rejects undefined, functions, and symbols, which have no JSON repr
20
+ *
21
+ * Limitations:
22
+ * - BigInt is not serializable via JSON.stringify; callers must convert
23
+ * to string before passing (consistent with the `counter` field type).
24
+ * - NaN and Infinity serialize as `null` in JSON; callers must validate
25
+ * numeric fields upstream.
26
+ * - Object prototype chains are not walked; only own enumerable keys.
27
+ *
28
+ * This module has zero dependencies on other bitgraph-core modules so that it
29
+ * can be used standalone for testing and external verification tooling.
30
+ */
31
+ /**
32
+ * Serialize `obj` to canonical JSON and return UTF-8 encoded bytes.
33
+ *
34
+ * Throws if `obj` contains values that cannot survive a JSON round-trip
35
+ * without information loss (undefined top-level, functions, symbols, BigInt).
36
+ */
37
+ export declare function canonicalize(obj: unknown): Uint8Array;
38
+ /**
39
+ * Serialize `obj` to a canonical JSON string.
40
+ * Exposed for debugging and test assertions.
41
+ */
42
+ export declare function canonicalizeToString(obj: unknown): string;
43
+ /**
44
+ * Compare two Uint8Arrays in constant time.
45
+ *
46
+ * Returns true iff `a` and `b` have the same length and identical contents.
47
+ * Resistance against timing side-channels is important when comparing
48
+ * digests and signatures in the verifier.
49
+ *
50
+ * Note: JavaScript runtimes may still optimize this; a native binding would
51
+ * provide stronger guarantees. For v0.1 this is a reasonable best-effort.
52
+ */
53
+ export declare function constantTimeEqual(a: Uint8Array, b: Uint8Array): boolean;
54
+ //# sourceMappingURL=canonical.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canonical.d.ts","sourceRoot":"","sources":["../src/canonical.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAMH;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,OAAO,GAAG,UAAU,CAGrD;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAEzD;AA2DD;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,UAAU,GAAG,OAAO,CAUvE"}
@@ -0,0 +1,119 @@
1
+ // Copyright (c) 2024-2026 Mike Argento. Licensed under the MIT License. See LICENSE.
2
+ /**
3
+ * bitgraph-core canonical serialization
4
+ *
5
+ * Produces a deterministic, UTF-8 encoded JSON byte sequence from an
6
+ * arbitrary JavaScript value. The output is used as the signing input
7
+ * for BitGraphProof signatures and must be reproduced identically by any
8
+ * verifier regardless of platform or runtime.
9
+ *
10
+ * Algorithm:
11
+ * 1. Recursively sort object keys lexicographically (Unicode code-point order)
12
+ * 2. Serialize with JSON.stringify (no whitespace)
13
+ * 3. Encode the resulting string as UTF-8
14
+ *
15
+ * Constraints satisfied:
16
+ * - Deterministic key ordering
17
+ * - No whitespace variance
18
+ * - Stable numeric formatting (JSON.stringify uses shortest representation)
19
+ * - UTF-8 output (TextEncoder default)
20
+ * - Rejects undefined, functions, and symbols, which have no JSON repr
21
+ *
22
+ * Limitations:
23
+ * - BigInt is not serializable via JSON.stringify; callers must convert
24
+ * to string before passing (consistent with the `counter` field type).
25
+ * - NaN and Infinity serialize as `null` in JSON; callers must validate
26
+ * numeric fields upstream.
27
+ * - Object prototype chains are not walked; only own enumerable keys.
28
+ *
29
+ * This module has zero dependencies on other bitgraph-core modules so that it
30
+ * can be used standalone for testing and external verification tooling.
31
+ */
32
+ // ---------------------------------------------------------------------------
33
+ // Public API
34
+ // ---------------------------------------------------------------------------
35
+ /**
36
+ * Serialize `obj` to canonical JSON and return UTF-8 encoded bytes.
37
+ *
38
+ * Throws if `obj` contains values that cannot survive a JSON round-trip
39
+ * without information loss (undefined top-level, functions, symbols, BigInt).
40
+ */
41
+ export function canonicalize(obj) {
42
+ const json = canonicalizeToString(obj);
43
+ return new TextEncoder().encode(json);
44
+ }
45
+ /**
46
+ * Serialize `obj` to a canonical JSON string.
47
+ * Exposed for debugging and test assertions.
48
+ */
49
+ export function canonicalizeToString(obj) {
50
+ return JSON.stringify(sortedReplacer(obj));
51
+ }
52
+ // ---------------------------------------------------------------------------
53
+ // Internal helpers
54
+ // ---------------------------------------------------------------------------
55
+ /**
56
+ * Recursively produce a value suitable for JSON.stringify that has its
57
+ * object keys sorted lexicographically at every level of nesting.
58
+ *
59
+ * Arrays preserve element order (ordering arrays would change semantics).
60
+ * Primitives are returned as-is.
61
+ */
62
+ function sortedReplacer(value) {
63
+ if (value === null || typeof value !== "object") {
64
+ // Primitive or null: no key ordering needed.
65
+ // Reject types that serialize to undefined in JSON.
66
+ if (typeof value === "undefined") {
67
+ throw new TypeError("bitgraph-core/canonical: undefined values are not serializable to canonical JSON");
68
+ }
69
+ if (typeof value === "function" || typeof value === "symbol") {
70
+ throw new TypeError(`bitgraph-core/canonical: ${typeof value} values are not serializable to canonical JSON`);
71
+ }
72
+ if (typeof value === "bigint") {
73
+ throw new TypeError("bitgraph-core/canonical: BigInt values are not serializable to canonical JSON; " +
74
+ "convert to string (decimal) before canonicalizing");
75
+ }
76
+ return value;
77
+ }
78
+ if (Array.isArray(value)) {
79
+ // Recurse into elements; preserve order.
80
+ return value.map(sortedReplacer);
81
+ }
82
+ // Plain object: sort own enumerable string keys and recurse.
83
+ const sorted = {};
84
+ for (const key of Object.keys(value).sort()) {
85
+ const child = value[key];
86
+ // Skip undefined values (JSON.stringify would omit them anyway,
87
+ // but we skip explicitly to avoid surprising iteration behavior).
88
+ if (typeof child === "undefined") {
89
+ continue;
90
+ }
91
+ sorted[key] = sortedReplacer(child);
92
+ }
93
+ return sorted;
94
+ }
95
+ // ---------------------------------------------------------------------------
96
+ // Utility: constant-time Uint8Array equality
97
+ // ---------------------------------------------------------------------------
98
+ /**
99
+ * Compare two Uint8Arrays in constant time.
100
+ *
101
+ * Returns true iff `a` and `b` have the same length and identical contents.
102
+ * Resistance against timing side-channels is important when comparing
103
+ * digests and signatures in the verifier.
104
+ *
105
+ * Note: JavaScript runtimes may still optimize this; a native binding would
106
+ * provide stronger guarantees. For v0.1 this is a reasonable best-effort.
107
+ */
108
+ export function constantTimeEqual(a, b) {
109
+ if (a.length !== b.length) {
110
+ return false;
111
+ }
112
+ let diff = 0;
113
+ for (let i = 0; i < a.length; i++) {
114
+ // biome-ignore: non-null assertion safe because lengths are equal
115
+ diff |= a[i] ^ b[i];
116
+ }
117
+ return diff === 0;
118
+ }
119
+ //# sourceMappingURL=canonical.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canonical.js","sourceRoot":"","sources":["../src/canonical.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAErF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,8EAA8E;AAC9E,aAAa;AACb,8EAA8E;AAE9E;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,GAAY;I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G,CAAC,CAAC;QACtD,gEAAgE;QAChE,kEAAkE;QAClE,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE,CAAC;YACjC,SAAS;QACX,CAAC;QACD,MAAM,CAAC,GAAG,CAAC,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IACtC,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,8EAA8E;AAC9E,6CAA6C;AAC7C,8EAA8E;AAE9E;;;;;;;;;GASG;AACH,MAAM,UAAU,iBAAiB,CAAC,CAAa,EAAE,CAAa;IAC5D,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC;QAC1B,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAClC,kEAAkE;QAClE,IAAI,IAAK,CAAC,CAAC,CAAC,CAAY,GAAI,CAAC,CAAC,CAAC,CAAY,CAAC;IAC9C,CAAC;IACD,OAAO,IAAI,KAAK,CAAC,CAAC;AACpB,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @mikeargento/bitgraph-verify
3
+ *
4
+ * Offline, deterministic verification of BitGraph proofs.
5
+ * Permissionless by design: this package is MIT-licensed so that anyone
6
+ * can verify a proof without asking permission.
7
+ */
8
+ export type { BitGraphProof, BitGraphPolicy, VerificationPolicy, SignedBody, EnforcementTier, Attribution, PolicyBinding, SlotAllocation, ActorIdentity, AuthorizationPayload, WebAuthnAuthorization, AgencyEnvelope, } from "./types.js";
9
+ export { verify, resetEpochLinkState } from "./verifier.js";
10
+ export type { VerifyResult } from "./verifier.js";
11
+ export { computeProofHash } from "./proof-hash.js";
12
+ export { canonicalize, canonicalizeToString, constantTimeEqual } from "./canonical.js";
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,YAAY,EACV,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,UAAU,EACV,eAAe,EACf,WAAW,EACX,aAAa,EACb,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,qBAAqB,EACrB,cAAc,GACf,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,MAAM,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAC5D,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ // Copyright (c) 2024-2026 Mike Argento. Licensed under the MIT License. See LICENSE.
2
+ export { verify, resetEpochLinkState } from "./verifier.js";
3
+ export { computeProofHash } from "./proof-hash.js";
4
+ export { canonicalize, canonicalizeToString, constantTimeEqual } from "./canonical.js";
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAyBrF,OAAO,EAAE,MAAM,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAG5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { BitGraphProof } from "./types.js";
2
+ /**
3
+ * Compute the canonical hash of a BitGraph proof's signed body.
4
+ *
5
+ * @param proof - The full BitGraphProof object (or equivalent Record)
6
+ * @returns Base64-standard encoded SHA-256 hash
7
+ */
8
+ export declare function computeProofHash(proof: BitGraphProof | Record<string, unknown>): string;
9
+ //# sourceMappingURL=proof-hash.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"proof-hash.d.ts","sourceRoot":"","sources":["../src/proof-hash.ts"],"names":[],"mappings":"AAqCA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAqCvF"}
@@ -0,0 +1,75 @@
1
+ // Copyright (c) 2024-2026 Mike Argento. Licensed under the MIT License. See LICENSE.
2
+ /**
3
+ * bitgraph-core proof hash
4
+ *
5
+ * Canonical, deterministic proof hash computation.
6
+ *
7
+ * The proof hash covers the SIGNED BODY — the fields that are
8
+ * cryptographically signed by the enclave. This matches what the
9
+ * Ed25519 signature covers, making the hash verifiable.
10
+ *
11
+ * Signed body fields:
12
+ * - version, artifact, commit
13
+ * - publicKeyB64 (from signer)
14
+ * - enforcement, measurement (from environment)
15
+ * - attribution (if present)
16
+ * - attestationFormat (if attestation present)
17
+ *
18
+ * This hash is used for:
19
+ * - prevB64 chain linking
20
+ * - S3 ledger key generation
21
+ * - Ethereum anchor binding
22
+ * - Proof deduplication and verification
23
+ *
24
+ * Algorithm:
25
+ * 1. Extract signed body fields
26
+ * 2. canonicalize(signedBody) — recursive key sort, compact JSON, UTF-8
27
+ * 3. SHA-256 of canonical bytes
28
+ * 4. Base64-standard encode (RFC 4648 §4)
29
+ *
30
+ * IMPORTANT: All call sites MUST use this function. Do NOT compute
31
+ * proof hashes ad-hoc with JSON.stringify or Object.keys().sort().
32
+ * Non-recursive key sorting diverges on nested objects.
33
+ */
34
+ import { canonicalize } from "./canonical.js";
35
+ import { sha256 } from "@noble/hashes/sha256";
36
+ /**
37
+ * Compute the canonical hash of a BitGraph proof's signed body.
38
+ *
39
+ * @param proof - The full BitGraphProof object (or equivalent Record)
40
+ * @returns Base64-standard encoded SHA-256 hash
41
+ */
42
+ export function computeProofHash(proof) {
43
+ const p = proof;
44
+ const signer = p.signer;
45
+ const env = p.environment;
46
+ const signedBody = {
47
+ version: p.version,
48
+ artifact: p.artifact,
49
+ commit: p.commit,
50
+ publicKeyB64: signer?.publicKeyB64,
51
+ enforcement: env?.enforcement,
52
+ measurement: env?.measurement,
53
+ };
54
+ // Include attribution if present
55
+ if (p.attribution) {
56
+ signedBody.attribution = p.attribution;
57
+ }
58
+ // Include attestation format if present
59
+ if (env?.attestation) {
60
+ signedBody.attestationFormat = env.attestation.format;
61
+ }
62
+ const bytes = canonicalize(signedBody);
63
+ const hash = sha256(bytes);
64
+ // Base64 encode (works in both Node.js and browser)
65
+ if (typeof Buffer !== "undefined") {
66
+ return Buffer.from(hash).toString("base64");
67
+ }
68
+ // Browser fallback
69
+ let binary = "";
70
+ for (let i = 0; i < hash.length; i++) {
71
+ binary += String.fromCharCode(hash[i]);
72
+ }
73
+ return btoa(binary);
74
+ }
75
+ //# sourceMappingURL=proof-hash.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"proof-hash.js","sourceRoot":"","sources":["../src/proof-hash.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAErF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAG9C;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAA8C;IAC7E,MAAM,CAAC,GAAG,KAAgC,CAAC;IAC3C,MAAM,MAAM,GAAG,CAAC,CAAC,MAA8C,CAAC;IAChE,MAAM,GAAG,GAAG,CAAC,CAAC,WAAyG,CAAC;IAExH,MAAM,UAAU,GAA4B;QAC1C,OAAO,EAAE,CAAC,CAAC,OAAO;QAClB,QAAQ,EAAE,CAAC,CAAC,QAAQ;QACpB,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,YAAY,EA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