@pacspace-io/check 0.5.5 → 0.5.6

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/dist/inputs.txt CHANGED
@@ -1,3 +1,4 @@
1
+ ../shared/src/chain/rpc-guarded-send.ts
1
2
  ../shared/src/chain/rpc-provider.ts
2
3
  ../shared/src/demo/independent-verify-records.ts
3
4
  ../shared/src/demo/mirror-node-record-chain-reader.ts
package/dist/report.d.ts CHANGED
@@ -113,7 +113,11 @@ export interface CheckReport {
113
113
  /** Entry numbers (1-based) that do not match what was committed. */
114
114
  unmatched: number[];
115
115
  };
116
- /** True when every entry the record has is in the file and matches what was committed. */
116
+ /**
117
+ * True only when this report's `exitCode` is 0: the check passed as asked. False when the proof layer was not
118
+ * read (exit code 3) and when anything asked for did not match (exit code 1): an entry, the proof layer, a
119
+ * daily statement under `--full`, the statement fingerprint given, or the file you hold.
120
+ */
117
121
  passed: boolean;
118
122
  file: {
119
123
  /** The history's fingerprint as the file carries it, or as recomputed when the file carries none. */
@@ -252,7 +256,20 @@ export declare const FILE_CHANGED_SENTENCE = "This file has been changed since i
252
256
  export declare function fingerprintSentence(intact: boolean, given: CheckReport['statementFingerprint']): string | null;
253
257
  /** W-C4, W-C5 or W-C8, then W-C9 when the ledger was not read. */
254
258
  export declare function heldFileSentences(held: HeldFileOutcome): string[];
259
+ /**
260
+ * A report with the narrower fact the checker's own commands read: whether every entry the record has is in the
261
+ * file and matches what was committed, and the proof layer, where it was compared, agrees. It says nothing of a
262
+ * daily statement, a statement fingerprint or a held file, and it is true beside a proof layer that was not read.
263
+ * Internal: `release`, `evidence` and the lookup of where entries were committed read `entriesMatch`; the
264
+ * package exports only the report, whose `passed` follows its exit code.
265
+ */
266
+ export interface ReportWithFacts {
267
+ report: CheckReport;
268
+ entriesMatch: boolean;
269
+ }
255
270
  export declare function buildReport(input: ReportInput): CheckReport;
271
+ /** Internal; see `ReportWithFacts`. */
272
+ export declare function buildReportWithFacts(input: ReportInput): ReportWithFacts;
256
273
  export interface SealsReportInput {
257
274
  checker: {
258
275
  name: string;
@@ -274,6 +291,8 @@ export interface SealsReportInput {
274
291
  }
275
292
  /** A seal history's report, alone or in a kept copy, with any disclosure checked against it. */
276
293
  export declare function buildSealsReport(input: SealsReportInput): CheckReport;
294
+ /** Internal; see `ReportWithFacts`. Here `entriesMatch` also needs any disclosure to have verified. */
295
+ export declare function buildSealsReportWithFacts(input: SealsReportInput): ReportWithFacts;
277
296
  export declare const WRITES_HEADING = "Where each entry was committed on the proof layer:";
278
297
  export declare const WRITES_NOT_READ_SENTENCE = "Where each entry was committed could not be read from the proof layer this time. The check above does not depend on it.";
279
298
  /** The text report lists at most this many writes; `--json` lists all. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pacspace-io/check",
3
- "version": "0.5.5",
3
+ "version": "0.5.6",
4
4
  "description": "Checks a PacSpace record history file against the proof layer. Runs without PacSpace.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",