@mikeargento/bitgraph 1.9.1 → 1.10.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/README.md +21 -21
- package/dist/fuse-cli.js +2 -2
- package/dist/fuse-cli.js.map +1 -1
- package/dist/fuse.d.ts +15 -1
- package/dist/fuse.d.ts.map +1 -1
- package/dist/fuse.js +29 -12
- package/dist/fuse.js.map +1 -1
- package/package.json +12 -8
- package/src/fuse-cli.ts +2 -2
- package/src/fuse.ts +46 -13
- package/dist/__tests__/audit-anchors.test.d.ts +0 -2
- package/dist/__tests__/audit-anchors.test.d.ts.map +0 -1
- package/dist/__tests__/audit-anchors.test.js +0 -152
- package/dist/__tests__/audit-anchors.test.js.map +0 -1
- package/dist/__tests__/audit-anomalies.test.d.ts +0 -2
- package/dist/__tests__/audit-anomalies.test.d.ts.map +0 -1
- package/dist/__tests__/audit-anomalies.test.js +0 -663
- package/dist/__tests__/audit-anomalies.test.js.map +0 -1
- package/dist/__tests__/audit-attestation.test.d.ts +0 -2
- package/dist/__tests__/audit-attestation.test.d.ts.map +0 -1
- package/dist/__tests__/audit-attestation.test.js +0 -403
- package/dist/__tests__/audit-attestation.test.js.map +0 -1
- package/dist/__tests__/audit-bench-smoke.test.d.ts +0 -2
- package/dist/__tests__/audit-bench-smoke.test.d.ts.map +0 -1
- package/dist/__tests__/audit-bench-smoke.test.js +0 -87
- package/dist/__tests__/audit-bench-smoke.test.js.map +0 -1
- package/dist/__tests__/audit-boundary.test.d.ts +0 -20
- package/dist/__tests__/audit-boundary.test.d.ts.map +0 -1
- package/dist/__tests__/audit-boundary.test.js +0 -84
- package/dist/__tests__/audit-boundary.test.js.map +0 -1
- package/dist/__tests__/audit-cli.test.d.ts +0 -2
- package/dist/__tests__/audit-cli.test.d.ts.map +0 -1
- package/dist/__tests__/audit-cli.test.js +0 -239
- package/dist/__tests__/audit-cli.test.js.map +0 -1
- package/dist/__tests__/audit-dependencies.test.d.ts +0 -2
- package/dist/__tests__/audit-dependencies.test.d.ts.map +0 -1
- package/dist/__tests__/audit-dependencies.test.js +0 -116
- package/dist/__tests__/audit-dependencies.test.js.map +0 -1
- package/dist/__tests__/audit-fixtures.d.ts +0 -265
- package/dist/__tests__/audit-fixtures.d.ts.map +0 -1
- package/dist/__tests__/audit-fixtures.js +0 -511
- package/dist/__tests__/audit-fixtures.js.map +0 -1
- package/dist/__tests__/audit-ingest.test.d.ts +0 -2
- package/dist/__tests__/audit-ingest.test.d.ts.map +0 -1
- package/dist/__tests__/audit-ingest.test.js +0 -473
- package/dist/__tests__/audit-ingest.test.js.map +0 -1
- package/dist/__tests__/audit-memory-ingest.test.d.ts +0 -12
- package/dist/__tests__/audit-memory-ingest.test.d.ts.map +0 -1
- package/dist/__tests__/audit-memory-ingest.test.js +0 -135
- package/dist/__tests__/audit-memory-ingest.test.js.map +0 -1
- package/dist/__tests__/audit-property.test.d.ts +0 -2
- package/dist/__tests__/audit-property.test.d.ts.map +0 -1
- package/dist/__tests__/audit-property.test.js +0 -771
- package/dist/__tests__/audit-property.test.js.map +0 -1
- package/dist/__tests__/audit-real-fixtures.test.d.ts +0 -2
- package/dist/__tests__/audit-real-fixtures.test.d.ts.map +0 -1
- package/dist/__tests__/audit-real-fixtures.test.js +0 -132
- package/dist/__tests__/audit-real-fixtures.test.js.map +0 -1
- package/dist/__tests__/audit-real-live.test.d.ts +0 -2
- package/dist/__tests__/audit-real-live.test.d.ts.map +0 -1
- package/dist/__tests__/audit-real-live.test.js +0 -107
- package/dist/__tests__/audit-real-live.test.js.map +0 -1
- package/dist/__tests__/audit-reconstruct.test.d.ts +0 -2
- package/dist/__tests__/audit-reconstruct.test.d.ts.map +0 -1
- package/dist/__tests__/audit-reconstruct.test.js +0 -287
- package/dist/__tests__/audit-reconstruct.test.js.map +0 -1
- package/dist/__tests__/audit-report.test.d.ts +0 -2
- package/dist/__tests__/audit-report.test.d.ts.map +0 -1
- package/dist/__tests__/audit-report.test.js +0 -186
- package/dist/__tests__/audit-report.test.js.map +0 -1
- package/dist/__tests__/audit-roundtrip.test.d.ts +0 -2
- package/dist/__tests__/audit-roundtrip.test.d.ts.map +0 -1
- package/dist/__tests__/audit-roundtrip.test.js +0 -368
- package/dist/__tests__/audit-roundtrip.test.js.map +0 -1
- package/dist/__tests__/audit-temporal.test.d.ts +0 -2
- package/dist/__tests__/audit-temporal.test.d.ts.map +0 -1
- package/dist/__tests__/audit-temporal.test.js +0 -364
- package/dist/__tests__/audit-temporal.test.js.map +0 -1
- package/dist/__tests__/audit-tiers.test.d.ts +0 -2
- package/dist/__tests__/audit-tiers.test.d.ts.map +0 -1
- package/dist/__tests__/audit-tiers.test.js +0 -282
- package/dist/__tests__/audit-tiers.test.js.map +0 -1
- package/dist/__tests__/audit-witness-real.test.d.ts +0 -19
- package/dist/__tests__/audit-witness-real.test.d.ts.map +0 -1
- package/dist/__tests__/audit-witness-real.test.js +0 -82
- package/dist/__tests__/audit-witness-real.test.js.map +0 -1
- package/dist/__tests__/audit-witness.test.d.ts +0 -2
- package/dist/__tests__/audit-witness.test.d.ts.map +0 -1
- package/dist/__tests__/audit-witness.test.js +0 -308
- package/dist/__tests__/audit-witness.test.js.map +0 -1
- package/dist/__tests__/canonical.test.d.ts +0 -2
- package/dist/__tests__/canonical.test.d.ts.map +0 -1
- package/dist/__tests__/canonical.test.js +0 -162
- package/dist/__tests__/canonical.test.js.map +0 -1
- package/dist/__tests__/chain-hash-anchor.test.d.ts +0 -22
- package/dist/__tests__/chain-hash-anchor.test.d.ts.map +0 -1
- package/dist/__tests__/chain-hash-anchor.test.js +0 -55
- package/dist/__tests__/chain-hash-anchor.test.js.map +0 -1
- package/dist/__tests__/commit-service.integration.test.d.ts +0 -2
- package/dist/__tests__/commit-service.integration.test.d.ts.map +0 -1
- package/dist/__tests__/commit-service.integration.test.js +0 -95
- package/dist/__tests__/commit-service.integration.test.js.map +0 -1
- package/dist/__tests__/constructor.test.d.ts +0 -2
- package/dist/__tests__/constructor.test.d.ts.map +0 -1
- package/dist/__tests__/constructor.test.js +0 -267
- package/dist/__tests__/constructor.test.js.map +0 -1
- package/dist/__tests__/declared-proof-fixture.d.ts +0 -66
- package/dist/__tests__/declared-proof-fixture.d.ts.map +0 -1
- package/dist/__tests__/declared-proof-fixture.js +0 -66
- package/dist/__tests__/declared-proof-fixture.js.map +0 -1
- package/dist/__tests__/fuse-inline.test.d.ts +0 -2
- package/dist/__tests__/fuse-inline.test.d.ts.map +0 -1
- package/dist/__tests__/fuse-inline.test.js +0 -181
- package/dist/__tests__/fuse-inline.test.js.map +0 -1
- package/dist/__tests__/fuse-placement.test.d.ts +0 -2
- package/dist/__tests__/fuse-placement.test.d.ts.map +0 -1
- package/dist/__tests__/fuse-placement.test.js +0 -31
- package/dist/__tests__/fuse-placement.test.js.map +0 -1
- package/dist/__tests__/fuse-roundtrip.test.d.ts +0 -2
- package/dist/__tests__/fuse-roundtrip.test.d.ts.map +0 -1
- package/dist/__tests__/fuse-roundtrip.test.js +0 -241
- package/dist/__tests__/fuse-roundtrip.test.js.map +0 -1
- package/dist/__tests__/fuse-sdk.test.d.ts +0 -2
- package/dist/__tests__/fuse-sdk.test.d.ts.map +0 -1
- package/dist/__tests__/fuse-sdk.test.js +0 -117
- package/dist/__tests__/fuse-sdk.test.js.map +0 -1
- package/dist/__tests__/fuse-set-sdk.test.d.ts +0 -2
- package/dist/__tests__/fuse-set-sdk.test.d.ts.map +0 -1
- package/dist/__tests__/fuse-set-sdk.test.js +0 -721
- package/dist/__tests__/fuse-set-sdk.test.js.map +0 -1
- package/dist/__tests__/fuse-set.test.d.ts +0 -2
- package/dist/__tests__/fuse-set.test.d.ts.map +0 -1
- package/dist/__tests__/fuse-set.test.js +0 -889
- package/dist/__tests__/fuse-set.test.js.map +0 -1
- package/dist/__tests__/fuse-set2.test.d.ts +0 -2
- package/dist/__tests__/fuse-set2.test.d.ts.map +0 -1
- package/dist/__tests__/fuse-set2.test.js +0 -294
- package/dist/__tests__/fuse-set2.test.js.map +0 -1
- package/dist/__tests__/fuse-vectors.test.d.ts +0 -2
- package/dist/__tests__/fuse-vectors.test.d.ts.map +0 -1
- package/dist/__tests__/fuse-vectors.test.js +0 -175
- package/dist/__tests__/fuse-vectors.test.js.map +0 -1
- package/dist/__tests__/fuse-verify.test.d.ts +0 -2
- package/dist/__tests__/fuse-verify.test.d.ts.map +0 -1
- package/dist/__tests__/fuse-verify.test.js +0 -250
- package/dist/__tests__/fuse-verify.test.js.map +0 -1
- package/dist/__tests__/hello-world.test.d.ts +0 -2
- package/dist/__tests__/hello-world.test.d.ts.map +0 -1
- package/dist/__tests__/hello-world.test.js +0 -9
- package/dist/__tests__/hello-world.test.js.map +0 -1
- package/dist/__tests__/mock-proof-fixture.d.ts +0 -15
- package/dist/__tests__/mock-proof-fixture.d.ts.map +0 -1
- package/dist/__tests__/mock-proof-fixture.js +0 -34
- package/dist/__tests__/mock-proof-fixture.js.map +0 -1
- package/dist/__tests__/policy-enforcement.test.d.ts +0 -2
- package/dist/__tests__/policy-enforcement.test.d.ts.map +0 -1
- package/dist/__tests__/policy-enforcement.test.js +0 -188
- package/dist/__tests__/policy-enforcement.test.js.map +0 -1
- package/dist/__tests__/proof-hash-regression.test.d.ts +0 -2
- package/dist/__tests__/proof-hash-regression.test.d.ts.map +0 -1
- package/dist/__tests__/proof-hash-regression.test.js +0 -95
- package/dist/__tests__/proof-hash-regression.test.js.map +0 -1
- package/dist/__tests__/proof-hash.test.d.ts +0 -2
- package/dist/__tests__/proof-hash.test.d.ts.map +0 -1
- package/dist/__tests__/proof-hash.test.js +0 -116
- package/dist/__tests__/proof-hash.test.js.map +0 -1
- package/dist/__tests__/proof-integrity.test.d.ts +0 -2
- package/dist/__tests__/proof-integrity.test.d.ts.map +0 -1
- package/dist/__tests__/proof-integrity.test.js +0 -454
- package/dist/__tests__/proof-integrity.test.js.map +0 -1
- package/dist/__tests__/realistic-proof-fixture.d.ts +0 -56
- package/dist/__tests__/realistic-proof-fixture.d.ts.map +0 -1
- package/dist/__tests__/realistic-proof-fixture.js +0 -57
- package/dist/__tests__/realistic-proof-fixture.js.map +0 -1
- package/dist/__tests__/run.test.d.ts +0 -2
- package/dist/__tests__/run.test.d.ts.map +0 -1
- package/dist/__tests__/run.test.js +0 -178
- package/dist/__tests__/run.test.js.map +0 -1
- package/dist/__tests__/verifier.test.d.ts +0 -2
- package/dist/__tests__/verifier.test.d.ts.map +0 -1
- package/dist/__tests__/verifier.test.js +0 -531
- package/dist/__tests__/verifier.test.js.map +0 -1
- package/dist/canonical.d.ts +0 -54
- package/dist/canonical.d.ts.map +0 -1
- package/dist/canonical.js +0 -119
- package/dist/canonical.js.map +0 -1
- package/dist/proof-hash.d.ts +0 -9
- package/dist/proof-hash.d.ts.map +0 -1
- package/dist/proof-hash.js +0 -75
- package/dist/proof-hash.js.map +0 -1
- package/dist/types.d.ts +0 -705
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -3
- package/dist/types.js.map +0 -1
- package/dist/verifier.d.ts +0 -27
- package/dist/verifier.d.ts.map +0 -1
- package/dist/verifier.js +0 -844
- package/dist/verifier.js.map +0 -1
- package/src/__tests__/audit-anchors.test.ts +0 -188
- package/src/__tests__/audit-anomalies.test.ts +0 -815
- package/src/__tests__/audit-attestation.test.ts +0 -529
- package/src/__tests__/audit-bench-smoke.test.ts +0 -108
- package/src/__tests__/audit-boundary.test.ts +0 -96
- package/src/__tests__/audit-cli.test.ts +0 -288
- package/src/__tests__/audit-dependencies.test.ts +0 -141
- package/src/__tests__/audit-fixtures.ts +0 -736
- package/src/__tests__/audit-ingest.test.ts +0 -575
- package/src/__tests__/audit-memory-ingest.test.ts +0 -156
- package/src/__tests__/audit-property.test.ts +0 -892
- package/src/__tests__/audit-real-fixtures.test.ts +0 -153
- package/src/__tests__/audit-real-live.test.ts +0 -128
- package/src/__tests__/audit-reconstruct.test.ts +0 -353
- package/src/__tests__/audit-report.test.ts +0 -222
- package/src/__tests__/audit-roundtrip.test.ts +0 -464
- package/src/__tests__/audit-temporal.test.ts +0 -446
- package/src/__tests__/audit-tiers.test.ts +0 -343
- package/src/__tests__/audit-witness-real.test.ts +0 -92
- package/src/__tests__/audit-witness.test.ts +0 -345
- package/src/__tests__/canonical.test.ts +0 -253
- package/src/__tests__/chain-hash-anchor.test.ts +0 -67
- package/src/__tests__/commit-service.integration.test.ts +0 -117
- package/src/__tests__/constructor.test.ts +0 -340
- package/src/__tests__/declared-proof-fixture.ts +0 -65
- package/src/__tests__/fuse-inline.test.ts +0 -211
- package/src/__tests__/fuse-placement.test.ts +0 -32
- package/src/__tests__/fuse-roundtrip.test.ts +0 -243
- package/src/__tests__/fuse-sdk.test.ts +0 -142
- package/src/__tests__/fuse-set-sdk.test.ts +0 -852
- package/src/__tests__/fuse-set.test.ts +0 -1027
- package/src/__tests__/fuse-set2.test.ts +0 -343
- package/src/__tests__/fuse-vectors.test.ts +0 -218
- package/src/__tests__/fuse-verify.test.ts +0 -278
- package/src/__tests__/hello-world.test.ts +0 -10
- package/src/__tests__/mock-proof-fixture.ts +0 -36
- package/src/__tests__/policy-enforcement.test.ts +0 -226
- package/src/__tests__/proof-hash-regression.test.ts +0 -107
- package/src/__tests__/proof-hash.test.ts +0 -129
- package/src/__tests__/proof-integrity.test.ts +0 -576
- package/src/__tests__/real-fixtures/anchor-after-112762.json +0 -47
- package/src/__tests__/real-fixtures/anchor-with-ethereum-112758.json +0 -47
- package/src/__tests__/real-fixtures/live-proof-0.json +0 -42
- package/src/__tests__/real-fixtures/live-proof-1.json +0 -43
- package/src/__tests__/real-fixtures/live-proof-2.json +0 -43
- package/src/__tests__/real-fixtures/successor-112760.json +0 -38
- package/src/__tests__/real-fixtures/witness-25525146.json +0 -6
- package/src/__tests__/real-fixtures/witness-25525147.json +0 -6
- package/src/__tests__/realistic-proof-fixture.ts +0 -57
- package/src/__tests__/verifier.test.ts +0 -624
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import { describe, it } from "node:test";
|
|
2
|
-
import * as assert from "node:assert/strict";
|
|
3
|
-
import { sha256 } from "@noble/hashes/sha256";
|
|
4
|
-
import { computeProofHash, canonicalize } from "../index.js";
|
|
5
|
-
import type { BitGraphProof } from "../index.js";
|
|
6
|
-
// Fixture moved verbatim to a shared non-test module so other suites can
|
|
7
|
-
// import it without re-registering this file's describes under node:test.
|
|
8
|
-
import { MOCK_PROOF } from "./mock-proof-fixture.js";
|
|
9
|
-
|
|
10
|
-
describe("computeProofHash", () => {
|
|
11
|
-
it("produces base64-encoded SHA-256", () => {
|
|
12
|
-
const hash = computeProofHash(MOCK_PROOF);
|
|
13
|
-
// Base64 of SHA-256 is always 44 chars (with padding)
|
|
14
|
-
assert.ok(hash.length > 0 && hash.length <= 44, `unexpected hash length: ${hash.length}`);
|
|
15
|
-
// Valid base64
|
|
16
|
-
const decoded = Buffer.from(hash, "base64");
|
|
17
|
-
assert.equal(decoded.length, 32, "SHA-256 output should be 32 bytes");
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it("matches manual signed-body computation", () => {
|
|
21
|
-
const signedBody: Record<string, unknown> = {
|
|
22
|
-
version: MOCK_PROOF.version,
|
|
23
|
-
artifact: MOCK_PROOF.artifact,
|
|
24
|
-
commit: MOCK_PROOF.commit,
|
|
25
|
-
publicKeyB64: MOCK_PROOF.signer.publicKeyB64,
|
|
26
|
-
enforcement: MOCK_PROOF.environment.enforcement,
|
|
27
|
-
measurement: MOCK_PROOF.environment.measurement,
|
|
28
|
-
attribution: MOCK_PROOF.attribution,
|
|
29
|
-
attestationFormat: MOCK_PROOF.environment.attestation!.format,
|
|
30
|
-
};
|
|
31
|
-
const expected = Buffer.from(sha256(canonicalize(signedBody))).toString("base64");
|
|
32
|
-
const actual = computeProofHash(MOCK_PROOF);
|
|
33
|
-
assert.equal(actual, expected, "computeProofHash must match manual signed-body hash");
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
it("is deterministic — same input always produces same output", () => {
|
|
37
|
-
const a = computeProofHash(MOCK_PROOF);
|
|
38
|
-
const b = computeProofHash(MOCK_PROOF);
|
|
39
|
-
assert.equal(a, b);
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
it("is not affected by key ordering in input", () => {
|
|
43
|
-
// Construct same proof with keys in different order
|
|
44
|
-
const reordered = {
|
|
45
|
-
environment: MOCK_PROOF.environment,
|
|
46
|
-
version: MOCK_PROOF.version,
|
|
47
|
-
signer: MOCK_PROOF.signer,
|
|
48
|
-
artifact: MOCK_PROOF.artifact,
|
|
49
|
-
commit: MOCK_PROOF.commit,
|
|
50
|
-
attribution: MOCK_PROOF.attribution,
|
|
51
|
-
} as unknown as BitGraphProof;
|
|
52
|
-
assert.equal(computeProofHash(reordered), computeProofHash(MOCK_PROOF));
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
it("is not affected by metadata (outside signed body)", () => {
|
|
56
|
-
const withMetadata = {
|
|
57
|
-
...MOCK_PROOF,
|
|
58
|
-
metadata: { extra: "stuff", nested: { deep: true } },
|
|
59
|
-
timestamps: { artifact: { time: 12345 } },
|
|
60
|
-
} as unknown as BitGraphProof;
|
|
61
|
-
assert.equal(computeProofHash(withMetadata), computeProofHash(MOCK_PROOF));
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
it("is not affected by signatureB64 (not in signed body)", () => {
|
|
65
|
-
const differentSig = {
|
|
66
|
-
...MOCK_PROOF,
|
|
67
|
-
signer: { ...MOCK_PROOF.signer, signatureB64: "completely-different-sig==" },
|
|
68
|
-
} as BitGraphProof;
|
|
69
|
-
assert.equal(computeProofHash(differentSig), computeProofHash(MOCK_PROOF));
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
it("is not affected by attestation reportB64 (not in signed body)", () => {
|
|
73
|
-
const differentReport = {
|
|
74
|
-
...MOCK_PROOF,
|
|
75
|
-
environment: {
|
|
76
|
-
...MOCK_PROOF.environment,
|
|
77
|
-
attestation: { format: "aws-nitro", reportB64: "totally-different==" },
|
|
78
|
-
},
|
|
79
|
-
} as BitGraphProof;
|
|
80
|
-
assert.equal(computeProofHash(differentReport), computeProofHash(MOCK_PROOF));
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
it("changes when artifact changes", () => {
|
|
84
|
-
const different = {
|
|
85
|
-
...MOCK_PROOF,
|
|
86
|
-
artifact: { hashAlg: "sha256" as const, digestB64: "different==" },
|
|
87
|
-
};
|
|
88
|
-
assert.notEqual(computeProofHash(different), computeProofHash(MOCK_PROOF));
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
it("changes when counter changes", () => {
|
|
92
|
-
const different = {
|
|
93
|
-
...MOCK_PROOF,
|
|
94
|
-
commit: { ...MOCK_PROOF.commit, counter: "99" },
|
|
95
|
-
};
|
|
96
|
-
assert.notEqual(computeProofHash(different), computeProofHash(MOCK_PROOF));
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
it("changes when publicKeyB64 changes", () => {
|
|
100
|
-
const different = {
|
|
101
|
-
...MOCK_PROOF,
|
|
102
|
-
signer: { ...MOCK_PROOF.signer, publicKeyB64: "different-key==" },
|
|
103
|
-
} as BitGraphProof;
|
|
104
|
-
assert.notEqual(computeProofHash(different), computeProofHash(MOCK_PROOF));
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
it("includes attribution when present", () => {
|
|
108
|
-
const without = { ...MOCK_PROOF } as Record<string, unknown>;
|
|
109
|
-
delete without.attribution;
|
|
110
|
-
assert.notEqual(computeProofHash(without), computeProofHash(MOCK_PROOF));
|
|
111
|
-
});
|
|
112
|
-
|
|
113
|
-
it("includes attestationFormat when present", () => {
|
|
114
|
-
const withoutAttestation = {
|
|
115
|
-
...MOCK_PROOF,
|
|
116
|
-
environment: {
|
|
117
|
-
enforcement: MOCK_PROOF.environment.enforcement,
|
|
118
|
-
measurement: MOCK_PROOF.environment.measurement,
|
|
119
|
-
},
|
|
120
|
-
} as BitGraphProof;
|
|
121
|
-
assert.notEqual(computeProofHash(withoutAttestation), computeProofHash(MOCK_PROOF));
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
it("works with Record<string, unknown> input (not just BitGraphProof)", () => {
|
|
125
|
-
const record: Record<string, unknown> = { ...MOCK_PROOF };
|
|
126
|
-
const hash = computeProofHash(record);
|
|
127
|
-
assert.equal(hash, computeProofHash(MOCK_PROOF));
|
|
128
|
-
});
|
|
129
|
-
});
|