@agledger/verify-core 0.1.7 → 0.1.8
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 +20 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,9 +7,11 @@ signature over each `Sig_structure` — with no engine, no database, and no
|
|
|
7
7
|
network.
|
|
8
8
|
|
|
9
9
|
This is the single body of logic that underpins the SDK `/verify` subpath
|
|
10
|
-
(`@agledger/sdk/verify`), the [`@agledger/cli`](
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
(`@agledger/sdk/verify`), the [`@agledger/cli`](https://github.com/agledger-ai/cli)
|
|
11
|
+
`verify` command, the
|
|
12
|
+
[`@agledger/mcp-server`](https://github.com/agledger-ai/mcp-server) `agledger_verify`
|
|
13
|
+
tool, and the full-vault [`@agledger/verify`](https://github.com/agledger-ai/verify)
|
|
14
|
+
auditor package. Each of those
|
|
13
15
|
consumes this core rather than carrying its own copy, so a chain that passes in
|
|
14
16
|
one surface passes identically in all of them.
|
|
15
17
|
|
|
@@ -22,7 +24,7 @@ CBOR decoding.
|
|
|
22
24
|
import { verifyAuditExport } from '@agledger/verify-core';
|
|
23
25
|
|
|
24
26
|
const result = verifyAuditExport(exportDocument, {
|
|
25
|
-
publicKeys, // optional out-of-band keys
|
|
27
|
+
publicKeys, // optional out-of-band keys (see "Out-of-band keys" below)
|
|
26
28
|
requireOutOfBandKeys: true, // optional: refuse the export's embedded keys
|
|
27
29
|
});
|
|
28
30
|
|
|
@@ -44,11 +46,24 @@ if (!result.valid) {
|
|
|
44
46
|
- **Ed25519 signature** — over the reconstructed `Sig_structure`, against the
|
|
45
47
|
matched verification key.
|
|
46
48
|
|
|
49
|
+
## Out-of-band keys
|
|
50
|
+
|
|
51
|
+
`options.publicKeys` accepts either of two shapes:
|
|
52
|
+
|
|
53
|
+
- a **`Record<keyId, base64SpkiDer>`** map (compact, keyed by key id), or
|
|
54
|
+
- an **`OutOfBandKeyEntry[]`** array — the natural shape returned by
|
|
55
|
+
`client.verificationKeys.list().data` and SCITT COSE_KeySet listings, where
|
|
56
|
+
each entry is `{ keyId, publicKey, activatedAt?, retiredAt? }` (`publicKey`
|
|
57
|
+
is SPKI DER base64).
|
|
58
|
+
|
|
59
|
+
Both are normalized at the boundary; anything else throws `TypeError`
|
|
60
|
+
(fail-closed — the verifier never silently falls back to embedded keys).
|
|
61
|
+
|
|
47
62
|
## Canonical failure taxonomy
|
|
48
63
|
|
|
49
64
|
Every failure is a canonical SCREAMING_SNAKE `FailureCode`. Importing the
|
|
50
65
|
taxonomy from one place keeps every verifier reporting the same code for the
|
|
51
|
-
same fault — so an auditor reads `
|
|
66
|
+
same fault — so an auditor reads `CHAIN_LINK_BROKEN` whether the
|
|
52
67
|
chain was checked by the SDK, the CLI, the MCP tool, or `@agledger/verify`.
|
|
53
68
|
|
|
54
69
|
## Key provenance
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agledger/verify-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "Shared offline verification core for AGLedger audit chains — COSE_Sign1 (RFC 9052) decode/verify, Ed25519, hash-chain walk, Merkle proofs, and the canonical failure taxonomy. One dependency (cborg); no network. The single source of truth the SDK, CLI, MCP server, and @agledger/verify all build on.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"type": "module",
|