@pacspace-io/check 0.5.3 → 0.5.5

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.5 - 2026-11-17
4
+
5
+ ### Security
6
+
7
+ - Reads from a mirror (the default source or `--source <url>`) hold the source to its own address: a redirect is not followed, and a next page is read only from the same source and the same contract's log. A page with more logs than were asked for is not read. A page larger than 1 MiB is asked for again in smaller pages, and a single answer larger than 1 MiB is not read. With a source that does any of these the report says the proof layer was not read, and why, and the exit code is the one for a proof layer that could not be reached. A source given as `http://` that redirects to `https://` must now be given as `https://`. The list of where each entry was committed reads its pages under the same limits.
8
+
9
+ ## 0.5.4 - 2026-11-16
10
+
11
+ ### Added
12
+
13
+ - After a history file passes and matches the proof layer, the report lists where each entry was committed: the time, and a link to the write on an explorer of the proof layer. `--json` carries the same in a new `writes` field. This is information only: when it cannot be read the report says so, and the result and the exit code are what they were. `--no-lookup` leaves it out, `--offline` never makes it, and `release` and `open` do not make it.
14
+
3
15
  ## 0.5.3 - 2026-11-15
4
16
 
5
17
  ### Changed
package/README.md CHANGED
@@ -34,11 +34,25 @@ Proof layer <the proof layer mirror the record names>
34
34
 
35
35
  This record has 3 entries. All 3 are here, and all 3 match what was committed.
36
36
  Compared with the proof layer for this record: it matches.
37
+ Where each entry was committed on the proof layer:
38
+ Entry 1: committed 11 September 2026, 23:58:07 UTC
39
+ https://hashscan.io/mainnet/transaction/0x5d1c...9a3e
40
+ Entries 2 and 3: committed 12 September 2026, 00:41:19 UTC
41
+ https://hashscan.io/mainnet/transaction/0x81f0...c27b
37
42
  Daily statement of 12 September 2026 (UTC): matches.
38
43
  The fingerprint you gave names this file.
39
44
  The check shows the record is unchanged since it was committed. It does not show that what was recorded was true.
40
45
  ```
41
46
 
47
+ After a history file passes and matches the proof layer, the report lists
48
+ where each entry was committed: the time, and a link to the write. The
49
+ link opens that write on an explorer of the proof layer, which shows the
50
+ same time in your own time zone. `--json` carries the same in a `writes`
51
+ field. This is information only: when it cannot be read the report says
52
+ so, and the result and the exit code are what they were. `--no-lookup`
53
+ leaves it out, `--offline` never makes it, and `release` and `open` do
54
+ not make it.
55
+
42
56
  ## What it checks
43
57
 
44
58
  1. The file against its own fingerprint. A history file carries the
@@ -95,6 +109,7 @@ release reads each file three ways, as the host sends it, and checks each answer
95
109
  --source <url> read the proof layer from this mirror
96
110
  --rpc <url> read the proof layer over JSON-RPC at this URL
97
111
  --full also read every daily statement
112
+ --no-lookup do not look up where each entry was committed
98
113
  --timeout <ms> network timeout per read (default 10000)
99
114
  --json print the report as JSON
100
115
  ```
@@ -122,7 +137,7 @@ fingerprint comparison; and the sentences printed above.
122
137
 
123
138
  Node.js 20.19 or later, and the network, for the proof layer. open reads the record from the link's host, and release reads the key pages from the host it checks. Checking a file sends nothing to PacSpace. Where a record was committed is named inside the history
124
139
  file; `--source` and `--rpc` point the checker at a mirror or endpoint of
125
- your own.
140
+ your own. A redirect from a source is not followed. Pass the address it leads to; a source given as `http://` usually needs `https://`. When a report says the proof layer was not read because of its source, name another source, or read without a mirror with `--rpc <url>`.
126
141
 
127
142
  ## License
128
143
 
package/dist/check.d.ts CHANGED
@@ -54,6 +54,15 @@ export interface CheckOptions {
54
54
  recordKey?: Uint8Array;
55
55
  /** Called with a disclosure's revealed fields once they verified; never for fields that failed. */
56
56
  onRevealed?: (entries: RevealedEntry[]) => void;
57
+ /**
58
+ * After a words history or kept copy passes and matches the proof layer, also look up where each
59
+ * entry was committed and carry it in the report's `writes`. Off unless passed. Information only:
60
+ * the verdict, the sentences and the exit code are built first and are what they would be without it.
61
+ */
62
+ writes?: boolean;
63
+ /** Test seams for the lookup: its window and its clock. */
64
+ writesWindowSeconds?: number;
65
+ writesNow?: () => number;
57
66
  }
58
67
  /** One disclosed entry's fields as the reader sees them: entries count from 1. */
59
68
  export interface RevealedEntry {
package/dist/cli.d.ts CHANGED
@@ -14,8 +14,10 @@ export interface CliArgs {
14
14
  history: string | null;
15
15
  /** A path, or `-` for stdin; never the key itself. */
16
16
  key: string | null;
17
+ /** `--no-lookup`: do not look up where each entry was committed. */
18
+ noLookup: boolean;
17
19
  }
18
- export declare const USAGE = "Usage: pacspace-check <history.json> [options]\n pacspace-check <history.json> --key <path>\n pacspace-check open [--link-file <path>] [--access-code-file <path>] [--copy <path>] [--html <path>] [--source <url> | --rpc <url>] [--timeout <ms>] [--json]\n pacspace-check release [--origin <url>] [--source <url> | --rpc <url>] [--timeout <ms>] [--json]\n pacspace-check release --origin <url> --release-record <record key>,<network id>,<contract>\n\nChecks a PacSpace record history file: every entry against what was\ncommitted, the file against its own fingerprint, and the record against\nthe proof layer. open reads the record from the link's host, and release reads the key pages from the host it checks. Checking a file sends nothing to PacSpace.\n\nOptions:\n --fingerprint <0x...> the fingerprint printed on a statement; the checker\n says whether it names this file\n --held-file <path> check whether a verified entry names a file you hold\n --blinding <path> the blinding file for the file you hold, when its entry is blinded\n --history <path> the seal history or kept copy a disclosure is checked against\n --key <path> the record key for an encrypted history, read from this file (- for stdin)\n --link-file <path> open: read the link from this file instead of asking\n --access-code-file <path> open: read the access code from this file instead of asking\n --copy <path> open: save a kept copy of what the link shows to a new file\n --html <path> open: save the report as a page that opens without a network connection\n --offline check the file alone; do not read the proof layer\n --source <url> read the proof layer from this mirror instead of\n the one known for the record's network\n --rpc <url> read the proof layer over JSON-RPC at this URL\n --full also read every daily statement\n --timeout <ms> network timeout per read (default 10000)\n --json print the report as JSON\n --version print the checker's version\n --help print this text\n\nExit codes: 0 the check passed as asked; 1 it did not, or the file you hold is not in it; 2 the history file, the link, a key, the file you hold, its blinding file or the arguments could not be used; 3 the proof layer or the link's host could not be reached. When more than one applies, 2 comes before 3, and 3 before 1.\n";
20
+ export declare const USAGE = "Usage: pacspace-check <history.json> [options]\n pacspace-check <history.json> --key <path>\n pacspace-check open [--link-file <path>] [--access-code-file <path>] [--copy <path>] [--html <path>] [--source <url> | --rpc <url>] [--timeout <ms>] [--json]\n pacspace-check release [--origin <url>] [--source <url> | --rpc <url>] [--timeout <ms>] [--json]\n pacspace-check release --origin <url> --release-record <record key>,<network id>,<contract>\n\nChecks a PacSpace record history file: every entry against what was\ncommitted, the file against its own fingerprint, and the record against\nthe proof layer. open reads the record from the link's host, and release reads the key pages from the host it checks. Checking a file sends nothing to PacSpace.\n\nOptions:\n --fingerprint <0x...> the fingerprint printed on a statement; the checker\n says whether it names this file\n --held-file <path> check whether a verified entry names a file you hold\n --blinding <path> the blinding file for the file you hold, when its entry is blinded\n --history <path> the seal history or kept copy a disclosure is checked against\n --key <path> the record key for an encrypted history, read from this file (- for stdin)\n --link-file <path> open: read the link from this file instead of asking\n --access-code-file <path> open: read the access code from this file instead of asking\n --copy <path> open: save a kept copy of what the link shows to a new file\n --html <path> open: save the report as a page that opens without a network connection\n --offline check the file alone; do not read the proof layer\n --source <url> read the proof layer from this mirror instead of\n the one known for the record's network\n --rpc <url> read the proof layer over JSON-RPC at this URL\n --full also read every daily statement\n --no-lookup do not look up where each entry was committed\n --timeout <ms> network timeout per read (default 10000)\n --json print the report as JSON\n --version print the checker's version\n --help print this text\n\nExit codes: 0 the check passed as asked; 1 it did not, or the file you hold is not in it; 2 the history file, the link, a key, the file you hold, its blinding file or the arguments could not be used; 3 the proof layer or the link's host could not be reached. When more than one applies, 2 comes before 3, and 3 before 1.\n";
19
21
  export declare const BLINDING_FILE_INVALID_SENTENCE = "This is not a valid blinding file.";
20
22
  export declare const BLINDING_NEEDS_HELD_FILE_SENTENCE = "--blinding needs --held-file.";
21
23
  export declare const HISTORY_ONLY_FOR_DISCLOSURE_SENTENCE = "--history is used only with a disclosure file.";