@mikeargento/bitgraph-player 0.15.0 → 0.16.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 +25 -14
- package/dist/__tests__/base-floor-check.test.d.ts +2 -0
- package/dist/__tests__/base-floor-check.test.d.ts.map +1 -0
- package/dist/__tests__/base-floor-check.test.js +163 -0
- package/dist/__tests__/base-floor-check.test.js.map +1 -0
- package/dist/__tests__/check.test.js +1 -1
- package/dist/check.d.ts +58 -9
- package/dist/check.d.ts.map +1 -1
- package/dist/check.js +91 -26
- package/dist/check.js.map +1 -1
- package/dist/cli.js +0 -0
- package/dist/order.d.ts +4 -1
- package/dist/order.d.ts.map +1 -1
- package/dist/order.js +9 -0
- package/dist/order.js.map +1 -1
- package/dist/verdict.d.ts +1 -1
- package/dist/verdict.js +1 -1
- package/dist-web/verify.html +5 -4165
- package/package.json +3 -3
- package/src/__tests__/base-floor-check.test.ts +187 -0
- package/src/__tests__/check.test.ts +1 -1
- package/src/check.ts +156 -34
- package/src/order.ts +12 -1
- package/src/verdict.ts +1 -1
package/README.md
CHANGED
|
@@ -5,9 +5,9 @@ Deterministic evaluation of causal rules over BitGraph proof bundles.
|
|
|
5
5
|
BitGraph records. Player evaluates.
|
|
6
6
|
|
|
7
7
|
A BitGraph proof bundle establishes facts: these bits were recorded at
|
|
8
|
-
these causal positions,
|
|
8
|
+
these causal positions, tied to a public timeline. Player
|
|
9
9
|
evaluates a rule over those facts and produces a verdict anyone can
|
|
10
|
-
reproduce from the bundle alone
|
|
10
|
+
reproduce from the bundle alone: no network, no clock, no account, no
|
|
11
11
|
trust in the machine that ran it first.
|
|
12
12
|
|
|
13
13
|
evidence + rule = conclusion
|
|
@@ -20,24 +20,35 @@ trust in the machine that ran it first.
|
|
|
20
20
|
|
|
21
21
|
bitgraph-play rule.json bundle/ > verdict.json
|
|
22
22
|
|
|
23
|
-
The bundle is a directory, `.tar`, or `.tar.gz` of BitGraph
|
|
24
|
-
|
|
23
|
+
The bundle is a directory, `.tar`, or `.tar.gz` of BitGraph proofs:
|
|
24
|
+
`proof.json` files beside the files they record, Frame files
|
|
25
|
+
(`bitgraph-fuse/1`), Ethereum anchor witnesses for proofs made before
|
|
26
|
+
the Base floor. This build reads through
|
|
27
|
+
`@mikeargento/bitgraph-audit` 0.7.x, which does not read the export
|
|
28
|
+
(`bitgraph-export/1`) a tree/1 BitGraph is kept with. So Player does not
|
|
29
|
+
read exports yet; a file with its export is checked with
|
|
30
|
+
`npx -p @mikeargento/bitgraph-sdk bitgraph verify <file> <export.json>`
|
|
31
|
+
or with bitgraph-audit 0.9.0. Exit codes: `0` TRUE, `1` FALSE,
|
|
25
32
|
`2` UNDETERMINED, `3` error. `--out file` writes the verdict to a file;
|
|
26
33
|
`--summary` prints a bundle reconnaissance to stderr.
|
|
27
34
|
|
|
28
35
|
## Check a bundle
|
|
29
36
|
|
|
30
|
-
bitgraph-play check
|
|
37
|
+
bitgraph-play check recordings/
|
|
31
38
|
bitgraph-play check proof.json photo.jpg --json
|
|
32
39
|
|
|
33
|
-
No rule needed. `check` reads
|
|
40
|
+
No rule needed. `check` reads a bundle (a folder or archive, or a
|
|
34
41
|
proof.json beside the file it records) and says, offline, what the bundle
|
|
35
42
|
establishes about each recording in it: that the file in hand hashes to
|
|
36
43
|
the recorded digest, that the Ed25519 signature and position binding verify,
|
|
37
44
|
that the AWS Nitro attestation validates to the AWS root and binds this
|
|
38
45
|
exact proof, that the attested PCR0 is a published BitGraph enclave
|
|
39
|
-
measurement, and, from block headers in the bundle,
|
|
40
|
-
the
|
|
46
|
+
measurement (enclave v9 included), and, from block headers in the bundle,
|
|
47
|
+
the Ethereum block the recording comes after (its floor, a time) and the
|
|
48
|
+
later anchor it was committed before (a position, never a clock time).
|
|
49
|
+
This build predates the Base floor (`commit.slotFloor`): it states the
|
|
50
|
+
floor of Ethereum-anchored proofs only.
|
|
51
|
+
Every line is TRUE, FALSE, or UNDETERMINED:
|
|
41
52
|
FALSE only when evidence in hand contradicts the recording (an edited
|
|
42
53
|
signature, a block header that does not hash to its anchor), UNDETERMINED
|
|
43
54
|
when the evidence does not decide (the file is not in the bundle, a
|
|
@@ -46,7 +57,7 @@ no offline check can establish, stated rather than implied. `--json`
|
|
|
46
57
|
prints the `bitgraph-check/1` report; exit codes match evaluation.
|
|
47
58
|
|
|
48
59
|
The same check runs in a browser: `verify.html`, built from this package
|
|
49
|
-
to `dist-web/verify.html`. Open it and choose or drop
|
|
60
|
+
to `dist-web/verify.html`. Open it and choose or drop a bundle, offline,
|
|
50
61
|
and it renders the same report from the same code. bitgraph.ing stopped
|
|
51
62
|
serving a copy on 8 September 2026: loading a checker from the party
|
|
52
63
|
being checked is not an offline check. A copy you already have still
|
|
@@ -59,7 +70,7 @@ network request.
|
|
|
59
70
|
|
|
60
71
|
`init` hashes the files you name and writes a rule skeleton with the
|
|
61
72
|
cast filled in: one role per file, digests computed, role names from
|
|
62
|
-
filenames. The skeleton does not run as written
|
|
73
|
+
filenames. The skeleton does not run as written: `requires.ordering`
|
|
63
74
|
is a placeholder you must replace, because the trust floor is the
|
|
64
75
|
rule's own security policy and has no default, from the scaffolder or
|
|
65
76
|
anywhere else. Choose the floor, say what each digest means, refine the
|
|
@@ -98,7 +109,7 @@ ambiguous rather than silently picking a mode.
|
|
|
98
109
|
|
|
99
110
|
`cast` is everything taken on the rule author's word: which digest means
|
|
100
111
|
what, which occurrence is meant, who is said to have signed it. `claim`
|
|
101
|
-
is only what BitGraph derives. `then` is a label
|
|
112
|
+
is only what BitGraph derives. `then` is a label: no field of a rule can
|
|
102
113
|
cause an action. Player decides; whatever stakes money on a TRUE sits
|
|
103
114
|
above it.
|
|
104
115
|
|
|
@@ -113,7 +124,7 @@ wrong on some input.
|
|
|
113
124
|
|
|
114
125
|
The verdict splits `derived` (BitGraph established this) from `declared`
|
|
115
126
|
(a named party asserted this), and its last declared entry is always the
|
|
116
|
-
closed world itself
|
|
127
|
+
closed world itself: absence is asserted only among the roles the author
|
|
117
128
|
declared, and nothing establishes that the cast is complete.
|
|
118
129
|
|
|
119
130
|
## Determinism
|
|
@@ -126,7 +137,7 @@ agree with it.
|
|
|
126
137
|
|
|
127
138
|
## API
|
|
128
139
|
|
|
129
|
-
One call runs the whole pipeline
|
|
140
|
+
One call runs the whole pipeline; the CLI is built on the same
|
|
130
141
|
function, so embedding Player cannot drift from it:
|
|
131
142
|
|
|
132
143
|
```ts
|
|
@@ -159,7 +170,7 @@ browser page share:
|
|
|
159
170
|
import { ingestBundle, ingestEntries } from "@mikeargento/bitgraph-audit";
|
|
160
171
|
import { checkIngest, renderCheckText } from "@mikeargento/bitgraph-player";
|
|
161
172
|
|
|
162
|
-
const report = await checkIngest(await ingestBundle("
|
|
173
|
+
const report = await checkIngest(await ingestBundle("recordings/"));
|
|
163
174
|
// or, from bytes already in hand (a browser drop):
|
|
164
175
|
// await checkIngest(await ingestEntries([{ path: "proof.json", open: () => bytes }]));
|
|
165
176
|
process.stdout.write(renderCheckText(report));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-floor-check.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/base-floor-check.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
// Copyright (c) 2024-2026 Argento Computing Inc. Licensed under the MIT License. See LICENSE.
|
|
2
|
+
/**
|
|
3
|
+
* Base floors (enclave v10) in `check` and `compare`.
|
|
4
|
+
*
|
|
5
|
+
* From enclave v10 a recording signs its floor as a Base block
|
|
6
|
+
* (commit.slotFloor) instead of an Ethereum anchor. An audit that reads it
|
|
7
|
+
* reports a not-before segment bound with source "signed-floor" and chain
|
|
8
|
+
* "base", a TemporalAnalysis.signedFloors record per floor, and
|
|
9
|
+
* floorProblems. The Player reads those fields structurally (it still builds
|
|
10
|
+
* against an older audit), so these tests hand it AuditResult shapes with
|
|
11
|
+
* them, exactly as the fixtures elsewhere do. No ledger writes, no network.
|
|
12
|
+
*/
|
|
13
|
+
import { describe, it } from "node:test";
|
|
14
|
+
import * as assert from "node:assert/strict";
|
|
15
|
+
import { buildCheckReport, renderCheckText } from "../check.js";
|
|
16
|
+
import { compare } from "../order.js";
|
|
17
|
+
import { digestFor, makeAudit, makeBound, proofHashOf } from "./fixtures.js";
|
|
18
|
+
const BASE_BLOCK = 52271417;
|
|
19
|
+
const BASE_TIME = 1791332181;
|
|
20
|
+
const BASE_HASH = "0x71d926aeae9847fcc15fad2d4de8871923f56862d42db7a7463e95a838f8f9b0";
|
|
21
|
+
function complete(audit, temporal) {
|
|
22
|
+
return {
|
|
23
|
+
...audit,
|
|
24
|
+
anomalies: { anomalies: [], divergences: [], boundaryEntryPoints: [] },
|
|
25
|
+
authorities: { groups: [], anomalies: [], sharedSignersAcrossEpochs: [] },
|
|
26
|
+
anchors: { anchors: [], metadataOnlyProofHashes: [], findings: [] },
|
|
27
|
+
witnesses: { outcomes: [], findings: [] },
|
|
28
|
+
attestations: {
|
|
29
|
+
records: [],
|
|
30
|
+
findings: [],
|
|
31
|
+
counts: {
|
|
32
|
+
proofsWithDeclaredMeasurement: 0, proofsWithDocument: 0, documentsValidated: 0, documentsFailed: 0,
|
|
33
|
+
pcr0Matches: 0, pcr0Mismatches: 0, userDataBound: 0, userDataUnbound: 0,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
temporal: { ...audit.temporal, ...temporal },
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function baseBound(proofName, opts) {
|
|
40
|
+
return {
|
|
41
|
+
...makeBound({
|
|
42
|
+
kind: "not-before",
|
|
43
|
+
anchorProofHash: proofHashOf(proofName),
|
|
44
|
+
blockHash: BASE_HASH,
|
|
45
|
+
blockNumber: String(opts?.blockNumber ?? BASE_BLOCK),
|
|
46
|
+
timestamp: opts?.timestamp ?? BASE_TIME,
|
|
47
|
+
evidence: (opts?.evidence ?? "signed-floor"),
|
|
48
|
+
claim: "fixture Base floor bound",
|
|
49
|
+
}),
|
|
50
|
+
source: "signed-floor",
|
|
51
|
+
chain: "base",
|
|
52
|
+
timeSource: opts?.timeSource ?? "header",
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function floorRecord(proofName, opts) {
|
|
56
|
+
return {
|
|
57
|
+
proofHash: proofHashOf(proofName),
|
|
58
|
+
chain: "base",
|
|
59
|
+
blockNumber: BASE_BLOCK,
|
|
60
|
+
blockHash: BASE_HASH,
|
|
61
|
+
blockTimestamp: BASE_TIME,
|
|
62
|
+
header: "checked",
|
|
63
|
+
headerPath: "base-floor/floor-header.json",
|
|
64
|
+
bound: "not-before",
|
|
65
|
+
...(opts ?? {}),
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
function segment(names, lower, upper = [], epochId = "E10") {
|
|
69
|
+
return {
|
|
70
|
+
partition: { publicKeyB64: "key-A", chainId: "bitgraph:main", epochId },
|
|
71
|
+
memberProofHashes: names.map(proofHashOf),
|
|
72
|
+
status: lower.length > 0 && upper.length > 0 ? "lower-bounded-with-following-anchor" : lower.length > 0 ? "lower-bounded" : upper.length > 0 ? "upper-bounded" : "ordered-but-unanchored",
|
|
73
|
+
lowerBounds: lower,
|
|
74
|
+
upperBounds: upper,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
function oneRecording(temporal, attribution) {
|
|
78
|
+
const audit = makeAudit({ proofs: [{ name: "r", digestB64: digestFor("r"), epochId: "E10", counter: "4", slotCounter: "3" }] });
|
|
79
|
+
if (attribution !== undefined) {
|
|
80
|
+
audit.ingest.proofs[0].proof["attribution"] = attribution;
|
|
81
|
+
}
|
|
82
|
+
return complete(audit, temporal);
|
|
83
|
+
}
|
|
84
|
+
describe("check: a recording that signs a Base floor", () => {
|
|
85
|
+
it("is bounded after its Base block, with the header checked, and no upper bound", () => {
|
|
86
|
+
const report = buildCheckReport(oneRecording({ segments: [segment(["r"], [baseBound("r")])], signedFloors: [floorRecord("r")] }));
|
|
87
|
+
const rec = report.recordings[0];
|
|
88
|
+
assert.equal(rec.bounds.status, "lower-bounded");
|
|
89
|
+
assert.equal(rec.bounds.notBefore?.chain, "base");
|
|
90
|
+
assert.equal(rec.bounds.notBefore?.evidence, "signed-floor");
|
|
91
|
+
assert.equal(rec.bounds.notBefore?.blockNumber, String(BASE_BLOCK));
|
|
92
|
+
assert.equal(rec.bounds.notAfter, undefined);
|
|
93
|
+
assert.match(rec.bounds.detail, /after Base block 52271417 \(its floor, header checked in this bundle\)/);
|
|
94
|
+
assert.doesNotMatch(rec.bounds.detail, /Ethereum/);
|
|
95
|
+
assert.ok(report.notChecked.some((n) => /Base floor blocks are Base's own/.test(n)));
|
|
96
|
+
assert.doesNotMatch(renderCheckText(report), /[–—]/);
|
|
97
|
+
});
|
|
98
|
+
it("without the header, says the block needs a Base lookup", () => {
|
|
99
|
+
const report = buildCheckReport(oneRecording({ segments: [segment(["r"], [baseBound("r", { timeSource: "signed" })])], signedFloors: [floorRecord("r", { header: "not-carried" })] }));
|
|
100
|
+
assert.match(report.recordings[0].bounds.detail, /confirming the block needs a Base lookup/);
|
|
101
|
+
});
|
|
102
|
+
it("compares bounds across chains by time, never by block number", () => {
|
|
103
|
+
// Ethereum block 25,000,000 is later in time than this Base block,
|
|
104
|
+
// whose NUMBER is larger: the tightest not-before is the Ethereum one.
|
|
105
|
+
const eth = makeBound({ kind: "not-before", anchorProofHash: "anchor-eth", blockNumber: "25000000", timestamp: BASE_TIME + 600 });
|
|
106
|
+
const report = buildCheckReport(oneRecording({ segments: [segment(["r"], [baseBound("r"), eth])], signedFloors: [floorRecord("r")] }));
|
|
107
|
+
const nb = report.recordings[0].bounds.notBefore;
|
|
108
|
+
assert.equal(nb.chain, undefined);
|
|
109
|
+
assert.equal(nb.blockNumber, "25000000");
|
|
110
|
+
});
|
|
111
|
+
it("a fuse/3 recording's fused floor is the Base block it signs", () => {
|
|
112
|
+
const report = buildCheckReport(oneRecording({ segments: [segment(["r"], [baseBound("r")])], signedFloors: [floorRecord("r")] }, { name: "bitgraph-fuse/3", title: "trailer/1" }));
|
|
113
|
+
const fused = report.recordings[0].fused;
|
|
114
|
+
assert.equal(fused.floor?.chain, "base");
|
|
115
|
+
assert.equal(fused.floor?.evidence, "signed-floor");
|
|
116
|
+
assert.equal(fused.floor?.blockNumber, String(BASE_BLOCK));
|
|
117
|
+
assert.match(fused.floorDetail, /Base block #52271417 .*the Base block this recording signs as its floor/);
|
|
118
|
+
});
|
|
119
|
+
it("a withheld floor bounds nothing and says why", () => {
|
|
120
|
+
const why = "the floor block is stamped after the attestation document was made";
|
|
121
|
+
const report = buildCheckReport(oneRecording({ segments: [segment(["r"], [])], signedFloors: [floorRecord("r", { bound: "withheld", withheldReason: why })] }, { name: "bitgraph-fuse/3", title: "trailer/1" }));
|
|
122
|
+
const rec = report.recordings[0];
|
|
123
|
+
assert.equal(rec.bounds.notBefore, undefined);
|
|
124
|
+
assert.match(rec.bounds.detail, /not used as a bound/);
|
|
125
|
+
assert.equal(rec.fused.floor, null);
|
|
126
|
+
assert.match(rec.fused.floorDetail, /not used as a bound/);
|
|
127
|
+
});
|
|
128
|
+
it("a floor problem (a recording that signs two floors) is a contradiction: FALSE", () => {
|
|
129
|
+
const report = buildCheckReport(oneRecording({
|
|
130
|
+
segments: [segment(["r"], [])],
|
|
131
|
+
floorProblems: [{ code: "floor-ambiguous", proofHash: proofHashOf("r"), message: "the proof signs two floors" }],
|
|
132
|
+
}));
|
|
133
|
+
assert.equal(report.result, "FALSE");
|
|
134
|
+
assert.ok(report.contradictions.some((c) => c.detail.startsWith("floor-ambiguous")));
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
describe("compare: a Base floor orders no epoch", () => {
|
|
138
|
+
it("an anchor's not-after in one epoch and a later Base floor in another answer unordered", () => {
|
|
139
|
+
const base = makeAudit({
|
|
140
|
+
proofs: [
|
|
141
|
+
{ name: "old", digestB64: digestFor("old"), epochId: "E9", counter: "2" },
|
|
142
|
+
{ name: "new", digestB64: digestFor("new"), epochId: "E10", counter: "2", publicKeyB64: "key-B" },
|
|
143
|
+
],
|
|
144
|
+
partitions: [
|
|
145
|
+
{ epochId: "E9", members: ["old"] },
|
|
146
|
+
{ epochId: "E10", members: ["new"], publicKeyB64: "key-B" },
|
|
147
|
+
],
|
|
148
|
+
});
|
|
149
|
+
const anchorUpper = makeBound({ kind: "not-after", anchorProofHash: "anchor-9", blockNumber: "25000000", timestamp: 1_700_000_000 });
|
|
150
|
+
const audit = complete(base, {
|
|
151
|
+
segments: [segment(["old"], [], [anchorUpper], "E9"), segment(["new"], [baseBound("new")], [], "E10")],
|
|
152
|
+
signedFloors: [floorRecord("new")],
|
|
153
|
+
});
|
|
154
|
+
const byName = (n) => audit.ingest.proofs.find((p) => p.proofHash === proofHashOf(n));
|
|
155
|
+
assert.equal(compare(byName("old"), byName("new"), audit).relation, "unordered");
|
|
156
|
+
assert.equal(compare(byName("new"), byName("old"), audit).relation, "unordered");
|
|
157
|
+
// The same shape with an anchor not-before on the new side does order them (old behaviour kept).
|
|
158
|
+
const anchorLower = makeBound({ kind: "not-before", anchorProofHash: "anchor-10", blockNumber: "25000100", timestamp: 1_700_001_200 });
|
|
159
|
+
const anchored = complete(base, { segments: [segment(["old"], [], [anchorUpper], "E9"), segment(["new"], [anchorLower], [], "E10")] });
|
|
160
|
+
assert.equal(compare(byName("old"), byName("new"), anchored).relation, "before");
|
|
161
|
+
});
|
|
162
|
+
});
|
|
163
|
+
//# sourceMappingURL=base-floor-check.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-floor-check.test.js","sourceRoot":"","sources":["../../src/__tests__/base-floor-check.test.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAE9F;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAE7C,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEhE,OAA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AC,CAAC,EAAE,CAAC,CAAC;QACvI,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IACnF,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -125,7 +125,7 @@ describe("check: real export fixture (disk)", () => {
|
|
|
125
125
|
it("recognizes the enclave v5 measurement from PINS.md", () => {
|
|
126
126
|
const enclave = report.recordings[0].lines.find((l) => l.name === "enclave");
|
|
127
127
|
assert.match(enclave.detail, /enclave v5/);
|
|
128
|
-
assert.equal(KNOWN_ENCLAVE_MEASUREMENTS.length,
|
|
128
|
+
assert.equal(KNOWN_ENCLAVE_MEASUREMENTS.length, 9);
|
|
129
129
|
});
|
|
130
130
|
it("serializes deterministically: no timestamps, no machine paths", async () => {
|
|
131
131
|
const again = await checkIngest(await ingestBundle(FIXTURE));
|
package/dist/check.d.ts
CHANGED
|
@@ -53,6 +53,32 @@
|
|
|
53
53
|
import type { AnchorRecord, AuditResult, IngestResult, TemporalSegment } from "@mikeargento/bitgraph-audit";
|
|
54
54
|
import type { FuseVerifyResult } from "@mikeargento/bitgraph-verify";
|
|
55
55
|
import type { ThreeValued } from "./types.js";
|
|
56
|
+
/**
|
|
57
|
+
* What an audit that reads Base floors adds (bitgraph-audit after 0.9.0:
|
|
58
|
+
* TemporalAnalysis.signedFloors and floorProblems, and source / chain /
|
|
59
|
+
* timeSource on a segment bound). Read structurally, so the Player builds and
|
|
60
|
+
* behaves exactly as before against an audit without them; every field is
|
|
61
|
+
* optional and absent means an Ethereum anchor bound.
|
|
62
|
+
* TODO(release): bump the bitgraph-audit dependency to the release that
|
|
63
|
+
* carries signedFloors, then these can be the audit's own exported types.
|
|
64
|
+
*/
|
|
65
|
+
export interface SignedFloorRecord {
|
|
66
|
+
proofHash: string;
|
|
67
|
+
chain: "base";
|
|
68
|
+
blockNumber: number;
|
|
69
|
+
blockHash: string;
|
|
70
|
+
blockTimestamp: number;
|
|
71
|
+
header: "checked" | "not-carried";
|
|
72
|
+
headerPath?: string;
|
|
73
|
+
bound: "not-before" | "withheld";
|
|
74
|
+
withheldReason?: string;
|
|
75
|
+
}
|
|
76
|
+
export interface FloorProblem {
|
|
77
|
+
code: string;
|
|
78
|
+
proofHash?: string;
|
|
79
|
+
path?: string;
|
|
80
|
+
message: string;
|
|
81
|
+
}
|
|
56
82
|
/**
|
|
57
83
|
* Published BitGraph enclave PCR0 measurements, per PINS.md, oldest first.
|
|
58
84
|
* Each remains correct for proofs minted during its own period; a proof
|
|
@@ -70,15 +96,24 @@ export interface CheckLine {
|
|
|
70
96
|
result: ThreeValued;
|
|
71
97
|
detail: string;
|
|
72
98
|
}
|
|
73
|
-
/**
|
|
99
|
+
/**
|
|
100
|
+
* A verified bound on a recording: an Ethereum anchor's, from a witness in
|
|
101
|
+
* the bundle, or (enclave v10) the Base block a recording signs as its floor,
|
|
102
|
+
* which is a not-before only.
|
|
103
|
+
*/
|
|
74
104
|
export interface CheckBound {
|
|
105
|
+
/** Absent for Ethereum (an anchor); "base" for a Base floor (commit.slotFloor). */
|
|
106
|
+
chain?: "base";
|
|
75
107
|
blockNumber?: string;
|
|
76
108
|
blockHash: string;
|
|
77
|
-
/** Unix seconds from the verified block header. */
|
|
109
|
+
/** Unix seconds: from the verified block header, or for a Base floor without one, the time the proof signs. */
|
|
78
110
|
timestamp: number;
|
|
111
|
+
/** The anchor proof, or for a Base floor the recording that signs it. */
|
|
79
112
|
anchorProofHash: string;
|
|
80
|
-
evidence: "chain-link" | "counter-order";
|
|
113
|
+
evidence: "chain-link" | "counter-order" | "signed-floor";
|
|
81
114
|
weaker: boolean;
|
|
115
|
+
/** Base floors only: "header" checked in the bundle, or "signed" (confirming the block needs a Base lookup). */
|
|
116
|
+
timeSource?: "header" | "signed";
|
|
82
117
|
}
|
|
83
118
|
export interface CheckBounds {
|
|
84
119
|
status: "lower-bounded-with-following-anchor" | "lower-bounded" | "upper-bounded" | "unanchored";
|
|
@@ -87,18 +122,26 @@ export interface CheckBounds {
|
|
|
87
122
|
detail: string;
|
|
88
123
|
}
|
|
89
124
|
/**
|
|
90
|
-
* The wall-clock floor of a fused artifact
|
|
91
|
-
* block preceding its SLOT counter in
|
|
92
|
-
* evidence by construction (no hash path
|
|
93
|
-
*
|
|
125
|
+
* The wall-clock floor of a fused artifact. Ethereum floors (enclave v9 and
|
|
126
|
+
* before): the last verified anchored block preceding its SLOT counter in
|
|
127
|
+
* the same epoch chain, counter-order evidence by construction (no hash path
|
|
128
|
+
* reaches a slot record). Base floors (enclave v10): the block the recording
|
|
129
|
+
* itself signs as commit.slotFloor, which a bitgraph-fuse/3 commitment binds
|
|
130
|
+
* ("signed-floor"). Either is reported with the same "genuine block"
|
|
131
|
+
* assumption as every other bound.
|
|
94
132
|
*/
|
|
95
133
|
export interface CheckFloor {
|
|
134
|
+
/** Absent for Ethereum; "base" for the recording's own Base floor. */
|
|
135
|
+
chain?: "base";
|
|
96
136
|
blockNumber?: string;
|
|
97
137
|
blockHash: string;
|
|
98
|
-
/** Unix seconds from the verified block header. */
|
|
138
|
+
/** Unix seconds from the verified block header, or for a Base floor without one, the signed time. */
|
|
99
139
|
timestamp: number;
|
|
140
|
+
/** The anchor proof, or for a Base floor the recording itself. */
|
|
100
141
|
anchorProofHash: string;
|
|
101
|
-
evidence: "counter-order";
|
|
142
|
+
evidence: "counter-order" | "signed-floor";
|
|
143
|
+
/** Base floors only: "header" checked in the bundle, or "signed" (confirming the block needs a Base lookup). */
|
|
144
|
+
timeSource?: "header" | "signed";
|
|
102
145
|
}
|
|
103
146
|
/** What the bundle establishes about a recording marked fused (profile bitgraph-fuse/1, working name). */
|
|
104
147
|
export interface CheckFused {
|
|
@@ -201,6 +244,12 @@ export declare function buildCheckReport(audit: AuditResult, options?: CheckOpti
|
|
|
201
244
|
*/
|
|
202
245
|
export declare const ANCHORED_CHAIN = "bitgraph:main";
|
|
203
246
|
export declare function fusedFloor(segment: TemporalSegment | undefined, anchorByHash: ReadonlyMap<string, AnchorRecord> | undefined, slotCounter: string | undefined, chainId?: string): CheckFloor | null;
|
|
247
|
+
/**
|
|
248
|
+
* The fused floor of a recording that signs a Base floor (enclave v10): the
|
|
249
|
+
* block itself, which a bitgraph-fuse/3 commitment binds. Null when the audit
|
|
250
|
+
* withheld it as a bound (the reason is in the floor detail).
|
|
251
|
+
*/
|
|
252
|
+
export declare function ownBaseFloor(floor: SignedFloorRecord): CheckFloor | null;
|
|
204
253
|
export declare function renderCheckText(report: CheckReport): string;
|
|
205
254
|
/** Deterministic JSON bytes for the report: two-space indent, one trailing newline. */
|
|
206
255
|
export declare function serializeCheckReport(report: CheckReport): string;
|
package/dist/check.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../src/check.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,WAAW,EAEX,YAAY,EAIZ,eAAe,EAChB,MAAM,6BAA6B,CAAC;AAGrC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAQ9C;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,EAAE,aAAa,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../src/check.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,WAAW,EAEX,YA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