@agledger/verify-core 2.2.0 → 4.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.
Files changed (49) hide show
  1. package/LICENSE +18 -18
  2. package/README.md +797 -29
  3. package/dist/acknowledgements.d.ts +32 -0
  4. package/dist/acknowledgements.js +88 -0
  5. package/dist/anchors.d.ts +349 -0
  6. package/dist/anchors.js +654 -0
  7. package/dist/attestation.d.ts +98 -0
  8. package/dist/attestation.js +145 -0
  9. package/dist/audit-export.d.ts +343 -20
  10. package/dist/audit-export.js +400 -22
  11. package/dist/batch-head.d.ts +28 -0
  12. package/dist/batch-head.js +169 -0
  13. package/dist/batch.d.ts +69 -0
  14. package/dist/batch.js +99 -0
  15. package/dist/bulk-export.d.ts +161 -0
  16. package/dist/bulk-export.js +711 -0
  17. package/dist/chain.d.ts +135 -13
  18. package/dist/chain.js +229 -24
  19. package/dist/claim.d.ts +23 -0
  20. package/dist/claim.js +100 -0
  21. package/dist/export-anchors.d.ts +84 -0
  22. package/dist/export-anchors.js +109 -0
  23. package/dist/export-evidence.d.ts +90 -0
  24. package/dist/export-evidence.js +186 -0
  25. package/dist/export-pages.d.ts +476 -0
  26. package/dist/export-pages.js +586 -0
  27. package/dist/failures.d.ts +20 -16
  28. package/dist/failures.js +44 -16
  29. package/dist/federation-wire.d.ts +78 -11
  30. package/dist/federation-wire.js +199 -57
  31. package/dist/history-seal.d.ts +100 -0
  32. package/dist/history-seal.js +301 -0
  33. package/dist/index.d.ts +36 -8
  34. package/dist/index.js +17 -4
  35. package/dist/key-statements.d.ts +138 -5
  36. package/dist/key-statements.js +191 -20
  37. package/dist/ml-dsa-kats.d.ts +18 -0
  38. package/dist/ml-dsa-kats.js +241 -0
  39. package/dist/primitives.d.ts +255 -18
  40. package/dist/primitives.js +612 -55
  41. package/dist/read-log.d.ts +350 -0
  42. package/dist/read-log.js +816 -0
  43. package/dist/schema-chain-export.d.ts +82 -0
  44. package/dist/schema-chain-export.js +474 -0
  45. package/dist/walk-anchors.d.ts +115 -0
  46. package/dist/walk-anchors.js +133 -0
  47. package/dist/walk-checkpoints.d.ts +125 -0
  48. package/dist/walk-checkpoints.js +118 -0
  49. package/package.json +6 -5
@@ -19,19 +19,20 @@ export interface KeyAlgorithm {
19
19
  coseAlgs: readonly number[];
20
20
  /** Raw signature length; also the length of the all-zero unsigned sentinel. */
21
21
  signatureLength: number;
22
- /** Whether THIS build can compute the algorithm (Ed25519 and ES256 today). */
22
+ /** Whether THIS build can compute the algorithm (Ed25519, ES256, ES384 and ML-DSA today). */
23
23
  verifiable: boolean;
24
24
  /** Node `asymmetricKeyType` the key material must carry. */
25
- nodeKeyType: 'ed25519' | 'ec';
25
+ nodeKeyType: 'ed25519' | 'ec' | 'ml-dsa-44' | 'ml-dsa-65' | 'ml-dsa-87';
26
26
  /** OpenSSL curve name from `asymmetricKeyDetails.namedCurve` (EC only). */
27
27
  namedCurve: string | null;
28
28
  /**
29
29
  * Digest passed as the FIRST POSITIONAL argument to node:crypto verify().
30
- * Part of algorithm identity (RFC 9053 §2.1 fixes SHA-256 to ES256), not a
30
+ * Part of algorithm identity (RFC 9053 §2.1 fixes SHA-256 to ES256 and
31
+ * SHA-384 to ES384), not a
31
32
  * caller choice: passing null for an EC key silently gets Node's
32
33
  * key-type-dispatched fallback, so the dispatcher refuses that combination.
33
34
  */
34
- digest: 'sha256' | null;
35
+ digest: 'sha256' | 'sha384' | null;
35
36
  /** Signature encoding for ECDSA (COSE requires raw r||s, not DER). */
36
37
  dsaEncoding: 'ieee-p1363' | null;
37
38
  }
@@ -60,6 +61,14 @@ export declare function algorithmByName(name: string): KeyAlgorithm | null;
60
61
  * implementations classify the same bytes the same way.
61
62
  */
62
63
  export declare function looksLikeEd25519Key(spkiDer: Uint8Array): boolean;
64
+ /**
65
+ * The table entry these bytes DECLARE by their SPKI structure, without asking
66
+ * node:crypto to load them: Ed25519 or an ML-DSA parameter set, else null.
67
+ * Same purpose as `looksLikeEd25519Key`, widened to every algorithm a host
68
+ * can refuse at load: a Node.js build without ML-DSA cannot load an ML-DSA
69
+ * key, and that must read as "not verified here", not as tamper.
70
+ */
71
+ export declare function declaredKeyAlgorithm(spkiDer: Uint8Array): KeyAlgorithm | null;
63
72
  /**
64
73
  * Resolve the algorithm a base64 SPKI DER public key commits to. Returns:
65
74
  *
@@ -71,6 +80,17 @@ export declare function looksLikeEd25519Key(spkiDer: Uint8Array): boolean;
71
80
  * - `'unparseable'` when the bytes are not a public key at all.
72
81
  */
73
82
  export declare function resolveKeyAlgorithm(publicKeyBase64: string): KeyAlgorithm | 'unparseable' | 'unrecognized';
83
+ /**
84
+ * {@link resolveKeyAlgorithm}, with a key this host refused to LOAD read as
85
+ * the algorithm its bytes declare (Ed25519 or ML-DSA, by structure, on a host
86
+ * whose own known-answer test says it does not compute that algorithm). For a
87
+ * site that judges a key before computing anything under it (a batched
88
+ * entry's own key, a batch head's key, a history seal's key), so a host
89
+ * refusal there reads as one, as it does for an entry's signature, and never
90
+ * as a malformed key. Garbage bytes still resolve `'unparseable'`, and a key
91
+ * of a type this build cannot compute still resolves `'unrecognized'`.
92
+ */
93
+ export declare function resolveKeyAlgorithmOrHostRefused(publicKeyBase64: string): KeyAlgorithm | 'unparseable' | 'unrecognized';
74
94
  /**
75
95
  * Verify an Ed25519 signature over raw bytes.
76
96
  * `publicKeyBase64` is the SPKI DER public key, base64-encoded
@@ -97,6 +117,26 @@ export declare function verifyEd25519Bytes(publicKeyBase64: string, input: Uint8
97
117
  * as tamper evidence.
98
118
  */
99
119
  export declare function runtimeCanCompute(keyAlg: KeyAlgorithm): boolean;
120
+ /** The lowest Node.js release this package verifies on: the first that computes ML-DSA, the Server's default signing algorithm. */
121
+ export declare const NODE_FLOOR = "24.6.0";
122
+ /** Present on a result, and returned by {@link runtimeBelowFloor}, only when the running Node.js is older than {@link NODE_FLOOR}. */
123
+ export interface RuntimeBelowFloor {
124
+ belowFloor: true;
125
+ /** The running Node.js, as `process.version` gives it. */
126
+ nodeVersion: string;
127
+ /** The lowest Node.js release verification runs on. */
128
+ floor: string;
129
+ }
130
+ /**
131
+ * Whether the running Node.js is older than {@link NODE_FLOOR}; null when it
132
+ * is not. Node.js releases before the floor do not compute ML-DSA, so a
133
+ * verdict reached there on a record a current Server signed is not one to
134
+ * act on. The command-line verifiers stop here and reach no verdict; a
135
+ * library caller reads this, or `runtime` on a result, and does the same.
136
+ */
137
+ export declare function runtimeBelowFloor(): RuntimeBelowFloor | null;
138
+ /** The sentence to show first when {@link runtimeBelowFloor} is not null. */
139
+ export declare function belowFloorNotice(runtime: RuntimeBelowFloor): string;
100
140
  /**
101
141
  * Human-readable reason an algorithm could not be computed, for the detail
102
142
  * line of CHAIN_UNSUPPORTED_ALGORITHM. Distinguishes the two causes that share
@@ -104,6 +144,158 @@ export declare function runtimeCanCompute(keyAlg: KeyAlgorithm): boolean;
104
144
  * verifier, versus re-run somewhere the algorithm is permitted.
105
145
  */
106
146
  export declare function describeUnsupportedAlgorithm(publicKeyBase64: string): string;
147
+ /** Why the host refused `name`, as the clause that ends the refusal sentence. */
148
+ /**
149
+ * What a signature's bytes are under `keyAlg`, before anything is computed:
150
+ * the all-zero sentinel of the algorithm's length, a length no signature
151
+ * under it has, or a candidate signature. Read the same on every host, so a
152
+ * site asks it before asking whether this host computes the algorithm.
153
+ */
154
+ export declare function signatureShape(keyAlg: KeyAlgorithm, signature: Uint8Array): 'zero' | 'wrong-length' | 'signature';
155
+ /**
156
+ * Why this host refused to compute `name`, when that is known, as a clause:
157
+ * an active OpenSSL FIPS provider for Ed25519 (it carries no EdDSA) or for
158
+ * ML-DSA, or a Node.js runtime older than ML-DSA's for ML-DSA. Null when no
159
+ * cause is known: the line then names the algorithm and claims no cause.
160
+ */
161
+ export declare function hostRefusalCause(name: string): string | null;
162
+ /**
163
+ * An algorithm a key commits to that could not be computed here, and why:
164
+ * `host` when this verifier build supports it and the host runtime refused to
165
+ * compute it (an active OpenSSL FIPS provider and Ed25519, or a Node.js build
166
+ * without ML-DSA), `build` when this verifier build cannot compute it.
167
+ * `algorithm` is null for a well-formed key of a type this build does not
168
+ * recognize at all.
169
+ */
170
+ export interface UncomputableAlgorithm {
171
+ algorithm: string | null;
172
+ cause: 'host' | 'build';
173
+ }
174
+ /**
175
+ * The signature checks of a result that could not be computed, counted over
176
+ * the whole artifact (each `CHAIN_UNSUPPORTED_ALGORITHM`, and each key
177
+ * statement the walk could not check), and the algorithms of its keys this
178
+ * host or build cannot compute. `count` 0 means every signature reached was
179
+ * computed.
180
+ */
181
+ export interface Uncomputable {
182
+ count: number;
183
+ algorithms: UncomputableAlgorithm[];
184
+ /**
185
+ * On an `unverifiable` result, every other failure code it lists (such as
186
+ * KEY_CLOSURE_INVALID or CHAIN_SIGNING_KEY_UNANCHORED): each follows from
187
+ * the checks this host could not compute, since with them verified nothing
188
+ * fails. Empty on any other verdict.
189
+ */
190
+ consequences: string[];
191
+ /**
192
+ * On an `unverifiable` result, what the rerun behind it assumed verified.
193
+ * `data`: a trust anchor this host computes was given, so every key was
194
+ * trusted through signatures this host computed, and only signatures over
195
+ * data that this host refused were assumed. `data-and-key-statements`: no
196
+ * such anchor, so the key statements this host could not check were
197
+ * assumed too, and the result is the same for an artifact and a forgery of
198
+ * it; nothing about its keys was established here. Absent on any other
199
+ * verdict.
200
+ */
201
+ assumed?: 'data' | 'data-and-key-statements';
202
+ /**
203
+ * With `assumed: 'data-and-key-statements'`, the algorithms of the trust
204
+ * anchors given that name a key here; empty when none was given or none
205
+ * names a key here.
206
+ */
207
+ anchorAlgorithms?: string[];
208
+ /**
209
+ * With `assumed: 'data-and-key-statements'`, true when trust anchors were
210
+ * given and none names a key here, and the input would be valid without
211
+ * them had the refused checks verified. A host that computes every
212
+ * algorithm here reads the same input as `unanchored`. Absent otherwise.
213
+ */
214
+ pinUnmet?: true;
215
+ }
216
+ /**
217
+ * The {@link UncomputableAlgorithm} of a key, given its SPKI DER base64, or
218
+ * null when this build and this host can both compute it, or when the bytes
219
+ * are not a public key at all (which is tamper class, not a gap).
220
+ */
221
+ export declare function uncomputableAlgorithm(publicKeyBase64: string): UncomputableAlgorithm | null;
222
+ /**
223
+ * Run `run` as though the signature checks this host refused under an
224
+ * algorithm this build supports had verified, and return what it returns.
225
+ * The counterfactual behind the `unverifiable` verdict (see
226
+ * `unverifiableVerdict`): a result is unverifiable only when the same input,
227
+ * re-verified this way, is valid.
228
+ *
229
+ * Only the host's refusals change. "Refused" is this build's own known-answer
230
+ * test of the algorithm on this host, which nothing in an artifact can change,
231
+ * so on a host that computes every algorithm this build supports, `run`
232
+ * behaves exactly as it would outside. A key of a type this build cannot
233
+ * compute still cannot be computed, a signature that was checked and did not
234
+ * verify still does not, and hash, link and count checks run as they are.
235
+ *
236
+ * With `statements: false`, a refused check over a key statement (a vault
237
+ * key's genesis, succession or closure, a federation key's history) is not
238
+ * assumed: it reads exactly as it does outside, so no key reaches trust
239
+ * through a signature this host did not compute. That is the rerun for a run
240
+ * with a trust anchor this host can compute (see `hasComputableAnchor`).
241
+ *
242
+ * For verifiers built on this package. `run` must be synchronous; the
243
+ * assumption is withdrawn when it returns or throws, and never outlives it. A
244
+ * result read inside it is a counterfactual and must never be reported as a
245
+ * verification.
246
+ */
247
+ export declare function verifyAsIfHostComputed<T>(run: () => T, options?: {
248
+ statements: boolean;
249
+ }): T;
250
+ /** Whether the caller is inside {@link verifyAsIfHostComputed}. */
251
+ export declare function isVerifyingAsIfHostComputed(): boolean;
252
+ /**
253
+ * Whether this is a rerun that assumes only the refused signatures over data:
254
+ * one under a trust anchor this host computes, where a key is trusted only
255
+ * through signatures this host computed.
256
+ */
257
+ export declare function isDataOnlyRerun(): boolean;
258
+ /**
259
+ * Run `run`, which judges key statement signatures, so that a rerun that does
260
+ * not assume key statements reads them as this host does. Every site that
261
+ * decides key trust from a signature runs inside it.
262
+ */
263
+ export declare function judgingKeyStatements<T>(run: () => T): T;
264
+ /**
265
+ * Whether one of `anchors` is the digest of one of `publicKeys` (SPKI DER
266
+ * base64) whose algorithm this host computes, by its own known-answer test.
267
+ * With such an anchor this host can establish key trust itself, and the
268
+ * counterfactual rerun assumes no key statement. Read from the host alone,
269
+ * never from inside a rerun.
270
+ */
271
+ export declare function hasComputableAnchor(anchors: readonly string[], publicKeys: Iterable<string>): boolean;
272
+ /** The algorithms of the keys among `publicKeys` that `anchors` name, each once. */
273
+ export declare function anchorAlgorithms(anchors: readonly string[], publicKeys: Iterable<string>): string[];
274
+ /**
275
+ * The algorithms among `publicKeys` (SPKI DER base64) this host or build
276
+ * cannot compute, each once, in the order first met.
277
+ */
278
+ export declare function uncomputableAlgorithms(publicKeys: Iterable<string>): UncomputableAlgorithm[];
279
+ /**
280
+ * What to tell the holder of a result whose verdict is `unverifiable`: how
281
+ * many signature checks could not be computed and under which algorithms,
282
+ * that nothing was found wrong and the refused signatures were never
283
+ * checked, that it is neither
284
+ * evidence of tampering nor a pass, and the remedy for each cause. Built from
285
+ * the same claims as the `CHAIN_UNSUPPORTED_ALGORITHM` detail lines. Show it
286
+ * only where the verdict is `unverifiable`: it says nothing was found wrong,
287
+ * which a `failed` result does not support.
288
+ */
289
+ export declare function unverifiableDetail(uncomputable: Pick<Uncomputable, 'count' | 'algorithms'> & Partial<Pick<Uncomputable, 'consequences' | 'assumed' | 'anchorAlgorithms' | 'pinUnmet'>>): string;
290
+ /**
291
+ * The line a `failed` result shows for the signature checks it could not
292
+ * compute, beside the failure it names: how many, under which algorithms, and
293
+ * that they were not checked here. Empty when there were none. A `failed`
294
+ * result has a real failure, so this line never says nothing was found wrong.
295
+ */
296
+ export declare function uncomputableNote(uncomputable: Pick<Uncomputable, 'count' | 'algorithms'>): string;
297
+ /** Best-effort FIPS detection, used only to explain a failure, never to gate one. */
298
+ export declare function isFipsActive(): boolean;
107
299
  /**
108
300
  * Verify a raw signature under whatever algorithm the TRUSTED key commits to.
109
301
  * Generalizes `verifyEd25519Bytes`: the algorithm is resolved from the SPKI
@@ -112,8 +304,9 @@ export declare function describeUnsupportedAlgorithm(publicKeyBase64: string): s
112
304
  * the upgrade-vs-forgery distinction use `resolveKeyAlgorithm` first, as
113
305
  * `verifyCoseSign1` does).
114
306
  *
115
- * ES256 mirrors how the Server verifies it: SHA-256 digest passed
116
- * positionally, `dsaEncoding: 'ieee-p1363'` (COSE raw r||s, 64 bytes). The
307
+ * ES256 and ES384 mirror how the Server verifies them: the SHA-256 or SHA-384
308
+ * digest passed positionally, `dsaEncoding: 'ieee-p1363'` (COSE raw r||s, 64
309
+ * or 96 bytes). The
117
310
  * Server normalizes to low-S at sign time but, like the Server's verifier,
118
311
  * high-S is accepted here: ECDSA malleability changes the envelope bytes,
119
312
  * which the hash-link layer already pins.
@@ -142,7 +335,7 @@ export declare function decodeCoseSign1(bytes: Uint8Array): CoseSign1Parts | nul
142
335
  * Reconstructs Sig_structure = ["Signature1", protected_bstr, h'' (empty
143
336
  * external_aad), payload_bstr] per RFC 9052 §4.4, deterministically CBOR-
144
337
  * encodes it (RFC 8949 §4.2.1), and verifies under the algorithm the trusted
145
- * key commits to (Ed25519 or ES256). The producer used the exact same
338
+ * key commits to. The producer used the exact same
146
339
  * construction, so byte-equality is required.
147
340
  *
148
341
  * Returns:
@@ -171,6 +364,8 @@ export declare function decodeCoseSign1(bytes: Uint8Array): CoseSign1Parts | nul
171
364
  */
172
365
  export type CoseVerifyOutcome = 'ok' | 'decode-fail' | 'invalid' | 'unsigned' | 'alg-mismatch' | 'unsupported-key-algorithm';
173
366
  export declare function verifyCoseSign1(coseSign1: Uint8Array, publicKeyBase64: string): CoseVerifyOutcome;
367
+ /** Decode the protected header's `alg` (label 1); null when absent or not an int. */
368
+ export declare function extractHeaderAlg(protectedBstr: Uint8Array): number | null;
174
369
  /**
175
370
  * Extract the signature-covered `kid` (protected header label 4) as lowercase
176
371
  * hex, matching the key id shape the Server's key registry uses. Returns null
@@ -231,13 +426,29 @@ export declare function extractTraceparentClaim(payloadBstr: Uint8Array): string
231
426
  * prefix, so one signature cannot be replayed as the other.
232
427
  */
233
428
  export declare const AGENT_SIGNATURE_CONTEXT = "agledger.agent.sig.v1\n";
234
- /** An Ed25519 public key in JWK form, as sent in `publicKeyJwk` at cert exchange. */
235
- export interface AgentPublicKeyJwk {
429
+ /**
430
+ * An agent cert's public key in JWK form, as sent in `publicKeyJwk` at cert
431
+ * exchange and signed into the cert's `EPHEMERAL_CERT_ISSUED` entry: an AKP
432
+ * key (RFC 9964) for ML-DSA-87 or ML-DSA-65, a P-384 EC key, or the Ed25519
433
+ * OKP key of a cert a Server before 4.0.0 issued.
434
+ */
435
+ export type AgentPublicKeyJwk = {
436
+ kty: 'AKP';
437
+ alg: 'ML-DSA-87' | 'ML-DSA-65';
438
+ /** base64url of the raw public key. */
439
+ pub: string;
440
+ } | {
441
+ kty: 'EC';
442
+ crv: 'P-384';
443
+ /** base64url of the 48-byte coordinates. */
444
+ x: string;
445
+ y: string;
446
+ } | {
236
447
  kty: 'OKP';
237
448
  crv: 'Ed25519';
238
449
  /** base64url of the raw 32-byte public key. */
239
450
  x: string;
240
- }
451
+ };
241
452
  /**
242
453
  * The agent-signature evidence the Server sealed into a chain entry, read from
243
454
  * the signed payload. Fields are left `unknown` where the verifier must check
@@ -270,18 +481,39 @@ export declare function extractAgentSignatureClaim(payloadBstr: Uint8Array): Age
270
481
  export declare function ed25519JwkThumbprint(jwk: unknown): string | null;
271
482
  /** SPKI DER (base64) for an Ed25519 JWK, or null when it is not one. */
272
483
  export declare function ed25519JwkToSpki(jwk: unknown): string | null;
484
+ /**
485
+ * JWK thumbprint of an agent cert key in the Server's `sha256:<hex>` form, or
486
+ * null when the value is not one (see {@link AgentPublicKeyJwk}). The members
487
+ * hashed are the required ones in lexicographic order: `alg`, `kty`, `pub`
488
+ * for an AKP key (RFC 9964), `crv`, `kty`, `x`, `y` for P-384 and `crv`,
489
+ * `kty`, `x` for Ed25519 (RFC 7638). Other members (`use`, `kid`) are not
490
+ * hashed.
491
+ */
492
+ export declare function agentJwkThumbprint(jwk: unknown): string | null;
493
+ /** SPKI DER (base64) for an agent cert key, or null when the value is not one. */
494
+ export declare function agentJwkToSpki(jwk: unknown): string | null;
273
495
  export type AgentSignatureOutcome = 'ok' | 'invalid' | 'malformed' | 'unsupported';
274
496
  /**
275
- * Verify a sealed agent signature against the cert's Ed25519 key.
497
+ * The algorithm an agent cert key signs with, or null when the key is not an
498
+ * agent key. Read from the key's structure first, so an ML-DSA or Ed25519 key
499
+ * reads as itself on a host that cannot load it.
500
+ */
501
+ export declare function agentKeyAlgorithm(spkiBase64: string): KeyAlgorithm | null;
502
+ /**
503
+ * Verify a sealed agent signature against the cert's key. The algorithm is
504
+ * the key's own: ML-DSA-87 or ML-DSA-65 (pure, empty context), ES384 (the
505
+ * 96-byte `r||s`, either S half), or Ed25519 on an entry sealed before
506
+ * Server 4.0.0.
276
507
  *
277
508
  * - `ok`: the signature verifies over `AGENT_SIGNATURE_CONTEXT + <hex>`.
278
- * - `invalid`: well formed, does not verify under this key.
279
- * - `malformed`: a shape the Server never writes (alg other than EdDSA, a
280
- * content hash not `sha256:<hex64>`, a signature that is not 64 bytes of
281
- * standard base64). Nothing can verify it, which the Server also treats as
282
- * a break.
283
- * - `unsupported`: this host cannot compute Ed25519 (an active OpenSSL FIPS
284
- * provider). NOT verified and NOT tamper evidence.
509
+ * - `invalid`: well formed, and does not verify under this key, or the sealed
510
+ * `alg` names another algorithm than the key's.
511
+ * - `malformed`: a shape the Server never writes (an `alg` it does not seal,
512
+ * a content hash not `sha256:<hex64>`, a signature that is not standard
513
+ * base64 at the algorithm's length). Nothing can verify it, which the Server
514
+ * also treats as a break.
515
+ * - `unsupported`: this host cannot compute the key's algorithm. NOT verified
516
+ * and NOT tamper evidence.
285
517
  *
286
518
  * What it proves: the holder of the cert's private key signed that content
287
519
  * hash. It does not re-hash a request body; the export carries the hash, not
@@ -407,3 +639,8 @@ export declare function orgReadMerkleRoot(leafHashesHex: readonly string[]): str
407
639
  * `treeSize` that is not a safe integer (a JSON number can be 0.5 or 1e300).
408
640
  */
409
641
  export declare function verifyOrgReadInclusion(leafHashHex: string, leafIndex: number, treeSize: number, pathHex: readonly string[], expectedRootHex: string): boolean;
642
+ /**
643
+ * A run of chain positions in prose: `entry 4 was` for one position, `entries
644
+ * 4 through 9 were` for more. `verb` is the plural form (`were`, `are`).
645
+ */
646
+ export declare function entryRun(from: number, through: number, verb: 'were' | 'are'): string;