@consiliency/contract 0.3.0 → 0.6.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 (39) hide show
  1. package/README.md +41 -1
  2. package/conformance/vectors/authority-algorithm-confusion.json +62 -0
  3. package/conformance/vectors/authority-bad-signature.json +62 -0
  4. package/conformance/vectors/authority-cert-digest-mismatch.json +62 -0
  5. package/conformance/vectors/authority-chain-appended-still-verifies.json +72 -0
  6. package/conformance/vectors/authority-core-validity-expired.json +62 -0
  7. package/conformance/vectors/authority-forged-self-minted.json +62 -0
  8. package/conformance/vectors/authority-key-expired.json +62 -0
  9. package/conformance/vectors/authority-key-revoked.json +62 -0
  10. package/conformance/vectors/authority-missing-signature.json +57 -0
  11. package/conformance/vectors/authority-signer-approver-mismatch.json +62 -0
  12. package/conformance/vectors/authority-unknown-key-id.json +62 -0
  13. package/conformance/vectors/authority-valid.json +62 -0
  14. package/conformance/vectors/authority-wrong-key-valid-id.json +62 -0
  15. package/conformance/vectors/git-discipline-never-delete-human-refs.json +38 -0
  16. package/conformance/vectors/manifest-invalid-absolute-path.json +1 -1
  17. package/conformance/vectors/manifest-invalid-certified-maturity.json +2 -2
  18. package/conformance/vectors/manifest-invalid-path-and-ref.json +1 -1
  19. package/conformance/vectors/manifest-invalid-unknown-archetype.json +1 -1
  20. package/conformance/vectors/manifest-valid-baseline-only.json +1 -1
  21. package/conformance/vectors/manifest-valid-product.json +1 -1
  22. package/conformance/vectors/projections-index-pure-merge-deterministic.json +167 -0
  23. package/conformance/vectors/version-skew-compatible.json +3 -3
  24. package/conformance/vectors/version-skew-incompatible-warns.json +1 -1
  25. package/core/authority-canon/provenance.json +23 -0
  26. package/core/contract.json +14 -4
  27. package/core/registries/authority-key-registry.json +58 -0
  28. package/core/registries/maturity-labels.json +15 -3
  29. package/core/registries/pipeline-ref-classes.json +57 -0
  30. package/core/schemas/authority-event-protocol.schema.json +142 -0
  31. package/core/schemas/contract-version-status.schema.json +2 -2
  32. package/core/schemas/git-discipline-protocol.schema.json +150 -0
  33. package/core/schemas/manifest.schema.json +2 -2
  34. package/core/schemas/projections-index-v1.schema.json +226 -0
  35. package/core/schemas/version-skew-protocol.schema.json +3 -3
  36. package/package.json +1 -1
  37. package/src/authority.js +192 -0
  38. package/src/index.d.ts +15 -1
  39. package/src/index.js +9 -1
@@ -0,0 +1,226 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://consiliency.io/contracts/projections-index-v1.schema.json",
4
+ "title": "Consiliency projections index (projections.index.v1)",
5
+ "description": "A deterministic pure-merge index of per-artifact projection manifests (+ portal_projection.v2 envelopes + refresh sidecars). Carries NO generated_at / generated_at_commit so a --check rebuild is byte-identical across source commits that touch no manifest (determinism). Per-entry pinned_commit carries the meaningful provenance. The wire schema id is 'projections.index.v1' (non-namespaced, per DESIGN §2.3 — the interchangeability wire value the producer emits) while the file and loader key follow the package's hyphen/snake conventions. v0.4.1: facts_path/facts_digest/pinned_commit are conditionally required (proj-code kinds only); proj-S-certified requires source_S_digest instead and is the only kind permitted a certified-tier maturity_label. v0.4.2: the per-kind maturity caps are TWO-SIDED enums — proj-code is [presence-only, hash-checked] (never realized-edge-observed or any certified tier) and proj-S-certified is [realized-edge-observed, certified] (floor-revert semantics), replacing the one-sided not:certified guard. v0.6.0 (CS-1.4): splits the single certified rung into parity-certified (byte-parity cert, no authority event) and authority-certified (parity PLUS a verified, human-ratified authority event) — the bare 'certified' id is kept in both maturity_label enums below ONLY as a deprecated alias of parity-certified (never authority-certified), so existing producers/consumers keep validating; new entries should emit parity-certified or authority-certified. See docs/design/CS-1.4-certified-label-rescope.md and core/registries/maturity-labels.json.",
6
+ "type": "object",
7
+ "required": [
8
+ "schema",
9
+ "entries"
10
+ ],
11
+ "additionalProperties": false,
12
+ "properties": {
13
+ "schema": {
14
+ "const": "projections.index.v1"
15
+ },
16
+ "entries": {
17
+ "type": "array",
18
+ "items": {
19
+ "$ref": "#/$defs/entry"
20
+ }
21
+ }
22
+ },
23
+ "$defs": {
24
+ "repoRelativePath": {
25
+ "type": "string",
26
+ "minLength": 1,
27
+ "not": {
28
+ "anyOf": [
29
+ {
30
+ "pattern": "^/"
31
+ },
32
+ {
33
+ "pattern": "(^|/)\\.\\.(/|$)"
34
+ },
35
+ {
36
+ "pattern": "^[A-Za-z]:[\\\\/]"
37
+ }
38
+ ]
39
+ }
40
+ },
41
+ "sha256Hex": {
42
+ "type": "string",
43
+ "pattern": "^[0-9a-f]{64}$"
44
+ },
45
+ "commitSha": {
46
+ "type": "string",
47
+ "pattern": "^([0-9a-f]{40}|[0-9a-f]{64})$"
48
+ },
49
+ "entry": {
50
+ "type": "object",
51
+ "required": [
52
+ "repo",
53
+ "kind",
54
+ "predicate",
55
+ "body_path",
56
+ "body_content_type",
57
+ "manifest_path",
58
+ "body_digest",
59
+ "body_digest_domain",
60
+ "maturity_label",
61
+ "gate_state"
62
+ ],
63
+ "additionalProperties": false,
64
+ "properties": {
65
+ "repo": {
66
+ "type": "string",
67
+ "pattern": "^[a-z0-9][a-z0-9_.-]*$"
68
+ },
69
+ "kind": {
70
+ "enum": [
71
+ "proj-code-sbom",
72
+ "proj-code-api",
73
+ "proj-S-certified"
74
+ ]
75
+ },
76
+ "predicate": {
77
+ "type": "string",
78
+ "minLength": 1
79
+ },
80
+ "body_path": {
81
+ "$ref": "#/$defs/repoRelativePath"
82
+ },
83
+ "body_content_type": {
84
+ "enum": [
85
+ "text/markdown",
86
+ "text/html"
87
+ ]
88
+ },
89
+ "facts_path": {
90
+ "$ref": "#/$defs/repoRelativePath"
91
+ },
92
+ "manifest_path": {
93
+ "$ref": "#/$defs/repoRelativePath"
94
+ },
95
+ "body_digest": {
96
+ "$ref": "#/$defs/sha256Hex"
97
+ },
98
+ "body_digest_domain": {
99
+ "enum": [
100
+ "raw-sha256",
101
+ "spec-render:html:v1"
102
+ ]
103
+ },
104
+ "facts_digest": {
105
+ "$ref": "#/$defs/sha256Hex"
106
+ },
107
+ "pinned_commit": {
108
+ "$ref": "#/$defs/commitSha"
109
+ },
110
+ "source_S_digest": {
111
+ "$ref": "#/$defs/sha256Hex",
112
+ "description": "REQUIRED for kind proj-S-certified: the canon semantic-content digest of the desired-state graph S this certified projection renders (the certificate's desired_graph_digest). It is the neutral index field the aggregator maps from spec's graph_digest / desired_graph_digest, following the same naming pattern as code_head_sha -> pinned_commit. A certified proj-S pins S, not a code commit — pinned_commit/facts_* are proj-code concepts and are conditionally required for the proj-code kinds only (v0.4.1)."
113
+ },
114
+ "maturity_label": {
115
+ "enum": [
116
+ "presence-only",
117
+ "hash-checked",
118
+ "realized-edge-observed",
119
+ "certified",
120
+ "parity-certified",
121
+ "authority-certified"
122
+ ],
123
+ "description": "'certified' is a DEPRECATED alias of parity-certified, kept for existing producers/consumers (CS-1.4). See the per-kind caps below for which entries may use which values."
124
+ },
125
+ "gate_state": {
126
+ "enum": [
127
+ "pass",
128
+ "fail",
129
+ "not_evaluated"
130
+ ]
131
+ },
132
+ "branch": {
133
+ "type": "string",
134
+ "minLength": 1,
135
+ "description": "OPTIONAL pipeline-owned contract branch this projection was generated on (DESIGN §11.1). Omitted keeps the entry a pure function of the manifest per §2.3 / §10.4 (single pin per commit; currency is a display-time comparison, not a per-branch generation matrix). Populated only when the branch is available in the generation context; never required for pure-merge determinism."
136
+ },
137
+ "refresh_status": {
138
+ "enum": [
139
+ "current",
140
+ "stale"
141
+ ],
142
+ "description": "REFRESH-LAYER field (§5), NOT a manifest verdict. Merged from the committed <artifact>.refresh.json SIDECAR, never from the manifest (manifests are additionalProperties:false single-writer gate records). Absent when no sidecar exists."
143
+ },
144
+ "refresh_failure_class": {
145
+ "type": "string",
146
+ "minLength": 1
147
+ },
148
+ "attempted_code_head_sha": {
149
+ "$ref": "#/$defs/commitSha"
150
+ },
151
+ "display_route": {
152
+ "type": [
153
+ "string",
154
+ "null"
155
+ ],
156
+ "description": "Present for parity-certified / authority-certified entries (from portal_projection.v2); null / absent otherwise."
157
+ },
158
+ "not_certified_reason": {
159
+ "type": "string",
160
+ "minLength": 1
161
+ }
162
+ },
163
+ "allOf": [
164
+ {
165
+ "if": {
166
+ "properties": {
167
+ "kind": {
168
+ "enum": [
169
+ "proj-code-sbom",
170
+ "proj-code-api"
171
+ ]
172
+ }
173
+ },
174
+ "required": [
175
+ "kind"
176
+ ]
177
+ },
178
+ "then": {
179
+ "required": [
180
+ "facts_path",
181
+ "facts_digest",
182
+ "pinned_commit"
183
+ ],
184
+ "properties": {
185
+ "maturity_label": {
186
+ "enum": [
187
+ "presence-only",
188
+ "hash-checked"
189
+ ],
190
+ "description": "proj-code kinds are capped at hash-checked (no S-model/parity cert): presence-only | hash-checked only — never realized-edge-observed nor any certified tier (certified, parity-certified, authority-certified)."
191
+ }
192
+ }
193
+ }
194
+ },
195
+ {
196
+ "if": {
197
+ "properties": {
198
+ "kind": {
199
+ "const": "proj-S-certified"
200
+ }
201
+ },
202
+ "required": [
203
+ "kind"
204
+ ]
205
+ },
206
+ "then": {
207
+ "required": [
208
+ "source_S_digest"
209
+ ],
210
+ "properties": {
211
+ "maturity_label": {
212
+ "enum": [
213
+ "realized-edge-observed",
214
+ "certified",
215
+ "parity-certified",
216
+ "authority-certified"
217
+ ],
218
+ "description": "a proj-S-certified entry either floor-reverts to realized-edge-observed (cert bind failed) or carries a certified-tier label when the C1-C5 cert bind passes — matching the slice-1 gate's floor-revert semantics. Any certified-tier value is permitted ONLY for this kind (two-sided cap: proj-code never reaches it). CS-1.4 splits that tier: parity-certified (byte parity, no authority event) is the honest label for what this kind proves today; authority-certified additionally requires a verified authority event (enforced upstream by the delivery/gate layer, not by this schema). 'certified' remains valid here as a DEPRECATED alias of parity-certified."
219
+ }
220
+ }
221
+ }
222
+ }
223
+ ]
224
+ }
225
+ }
226
+ }
@@ -7,14 +7,14 @@
7
7
  "additionalProperties": false,
8
8
  "properties": {
9
9
  "schema": {"const": "consiliency.version_skew_protocol.v1"},
10
- "contract_version": {"const": "0.3.0"},
10
+ "contract_version": {"const": "0.4.2"},
11
11
  "compatible_ranges": {
12
12
  "type": "object",
13
13
  "required": ["contract", "package"],
14
14
  "additionalProperties": false,
15
15
  "properties": {
16
- "contract": {"const": ">=0.3.0 <0.4.0"},
17
- "package": {"const": ">=0.3.0 <0.4.0"}
16
+ "contract": {"const": ">=0.4.0 <0.5.0"},
17
+ "package": {"const": ">=0.4.0 <0.5.0"}
18
18
  }
19
19
  },
20
20
  "prerelease_policy": {"enum": ["reject-by-default"]},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consiliency/contract",
3
- "version": "0.3.0",
3
+ "version": "0.6.0",
4
4
  "description": "Consiliency cross-repo contract package: shared JSON contract data, conformance vectors, thin npm/PyPI readers, and the canonical_html.v1 public contract surface.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -0,0 +1,192 @@
1
+ // Authority-event contract: canonical signed-core bytes + Ed25519 verification.
2
+ //
3
+ // This is the ROOT OF TRUST reference implementation for the JS side. It is
4
+ // dependency-free (Node >=18 `node:crypto` only) so the governed-pipeline (gp)
5
+ // gate can verify an authority event without ICU/Unicode-16 canon or any npm
6
+ // dependency.
7
+ //
8
+ // CANON OWNERSHIP: the signed-core bytes ARE spec canon-core v2
9
+ // `canonical_bytes(core)` (NOT a new/4th canon). `canonicalizeCore` here is a
10
+ // metadata-safe-ASCII / integer-only PORT of that one normative algorithm — the
11
+ // AUTHORITY PROFILE, where non-ASCII / floats / null are fail-closed rejected by
12
+ // design (design amendment #3), which is exactly the subset on which canon v2's
13
+ // full rules and this port emit identical bytes. Parity is pinned per vector
14
+ // (`input.canon_core_v2_bytes`, produced from spec's canon.py) and the source is
15
+ // digest-pinned in `core/authority-canon/provenance.json`. See
16
+ // `docs/design/authority-event-canonical-bytes.md` for the normative spec.
17
+
18
+ import { Buffer } from "node:buffer";
19
+ import { createPublicKey, verify as cryptoVerify } from "node:crypto";
20
+
21
+ // A signed-core object key: ASCII snake_case identifier. Keeps the sort order
22
+ // (code-unit == code-point for ASCII) identical between JS and Python.
23
+ const KEY_RE = /^[A-Za-z_][A-Za-z0-9_]*$/;
24
+
25
+ // Metadata-safe ASCII for every signed-core STRING field: printable ASCII
26
+ // 0x21..0x7E EXCLUDING the double-quote (0x22) and backslash (0x5C). Because no
27
+ // character in this set requires JSON escaping and none is non-ASCII, JS
28
+ // `JSON.stringify` and Python `json.dumps(ensure_ascii=False)` cannot diverge.
29
+ const VALUE_RE = /^[\x21\x23-\x5B\x5D-\x7E]+$/;
30
+
31
+ // RFC3339 UTC, fixed width, "Z" only. Fixed-width zero-padded UTC timestamps
32
+ // sort lexicographically == chronologically, so validity-window checks need no
33
+ // date parsing (another cross-language divergence removed).
34
+ const TIMESTAMP_RE = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$/;
35
+
36
+ const SUPPORTED_SCHEME = "ed25519";
37
+
38
+ // Domain separation (XG-4 decision): the Ed25519 signature covers the
39
+ // canon-core v2 AUTHORITY-PROFILE digest preimage — the `spec-canon:v2:authority`
40
+ // domain prefix concatenated with `canonical_bytes(core)` — NOT the bare bytes.
41
+ // This prevents cross-context signature reuse and matches canon-core v2's rule of
42
+ // prefixing every profile (`spec-canon:v2:<profile>\n`). canon-core v2 does not
43
+ // yet register an `authority` profile (XG-4 will add it); this prefix is byte-
44
+ // identical to what `canon.digest(core, "authority")` will hash once it does, so
45
+ // there is ZERO re-signing at XG-4. See docs/design/authority-event-canonical-bytes.md.
46
+ const AUTHORITY_SIGNING_PREFIX = Buffer.from("spec-canon:v2:authority\n", "ascii");
47
+
48
+ // SPKI DER prefix for a 32-byte Ed25519 public key. Node's `createPublicKey`
49
+ // does not accept a raw Ed25519 key, so we wrap the registry's raw hex bytes.
50
+ const ED25519_SPKI_PREFIX = Buffer.from("302a300506032b6570032100", "hex");
51
+
52
+ export class AuthorityCanonicalError extends Error {}
53
+
54
+ // Fail-closed canonical serializer for the signed core. Rejects anything that
55
+ // could serialize ambiguously across languages: non-ASCII, floats, unsafe
56
+ // integers, null/undefined, illegal keys, unsafe string bytes.
57
+ export function canonicalizeCore(value) {
58
+ if (value === true) return "true";
59
+ if (value === false) return "false";
60
+ if (typeof value === "string") {
61
+ if (!VALUE_RE.test(value)) {
62
+ throw new AuthorityCanonicalError(`non-metadata-safe string: ${JSON.stringify(value)}`);
63
+ }
64
+ return `"${value}"`;
65
+ }
66
+ if (typeof value === "number") {
67
+ if (!Number.isInteger(value) || !Number.isSafeInteger(value)) {
68
+ throw new AuthorityCanonicalError(`non-integer or unsafe number: ${value}`);
69
+ }
70
+ return String(value);
71
+ }
72
+ if (Array.isArray(value)) {
73
+ return `[${value.map(canonicalizeCore).join(",")}]`;
74
+ }
75
+ if (value && typeof value === "object") {
76
+ const keys = Object.keys(value);
77
+ for (const key of keys) {
78
+ if (!KEY_RE.test(key)) throw new AuthorityCanonicalError(`illegal object key: ${JSON.stringify(key)}`);
79
+ }
80
+ keys.sort();
81
+ return `{${keys.map((key) => `"${key}":${canonicalizeCore(value[key])}`).join(",")}}`;
82
+ }
83
+ throw new AuthorityCanonicalError(`unsupported value in signed core: ${String(value)}`);
84
+ }
85
+
86
+ // The canon-core v2 canonical bytes of the signed core (the digest preimage body).
87
+ export function canonicalCoreBytes(core) {
88
+ return Buffer.from(canonicalizeCore(core), "utf8");
89
+ }
90
+
91
+ // The exact bytes the Ed25519 signature covers: the canon-core v2 authority-profile
92
+ // digest preimage = `spec-canon:v2:authority\n` ‖ canonicalCoreBytes(core).
93
+ export function authoritySigningPreimage(core) {
94
+ return Buffer.concat([AUTHORITY_SIGNING_PREFIX, canonicalCoreBytes(core)]);
95
+ }
96
+
97
+ function isTimestamp(value) {
98
+ return typeof value === "string" && TIMESTAMP_RE.test(value);
99
+ }
100
+
101
+ // not_before <= now < not_after, on fixed-width UTC strings (lexicographic).
102
+ function withinWindow(now, validity) {
103
+ if (!validity || !isTimestamp(validity.not_before) || !isTimestamp(validity.not_after) || !isTimestamp(now)) {
104
+ return false;
105
+ }
106
+ return validity.not_before <= now && now < validity.not_after;
107
+ }
108
+
109
+ function findKey(registry, keyId) {
110
+ const keys = (registry && registry.keys) || [];
111
+ return keys.find((entry) => entry.key_id === keyId) || null;
112
+ }
113
+
114
+ function ed25519Verify(publicKeyHex, signatureHex, message) {
115
+ let keyObject;
116
+ try {
117
+ const raw = Buffer.from(publicKeyHex, "hex");
118
+ if (raw.length !== 32) return false;
119
+ const der = Buffer.concat([ED25519_SPKI_PREFIX, raw]);
120
+ keyObject = createPublicKey({ key: der, format: "der", type: "spki" });
121
+ } catch {
122
+ return false;
123
+ }
124
+ let signature;
125
+ try {
126
+ signature = Buffer.from(signatureHex, "hex");
127
+ if (signature.length !== 64) return false;
128
+ } catch {
129
+ return false;
130
+ }
131
+ try {
132
+ return cryptoVerify(null, message, keyObject, signature);
133
+ } catch {
134
+ return false;
135
+ }
136
+ }
137
+
138
+ // Verify an authority event against the pinned key registry.
139
+ //
140
+ // AUTHORITATIVE SOURCES: the scheme and public key come from the REGISTRY entry
141
+ // selected by the SIGNED core's `key_id` — never from the event's self-declared
142
+ // `signature.scheme`/`signature.key_id`. `expectedCertDigest` and `now` are
143
+ // supplied by the caller (the cert being ratified, the evaluation time) so the
144
+ // binding and window checks are deterministic.
145
+ //
146
+ // Returns { ok: boolean, reason: string }.
147
+ export function verifyAuthorityEvent(event, registry, { now, expectedCertDigest } = {}) {
148
+ if (!event || typeof event !== "object" || !event.core || typeof event.core !== "object") {
149
+ return { ok: false, reason: "malformed_event" };
150
+ }
151
+ const { core } = event;
152
+ const signature = event.signature;
153
+ if (!signature || typeof signature !== "object" || typeof signature.signature !== "string") {
154
+ return { ok: false, reason: "missing_signature" };
155
+ }
156
+
157
+ // The signed bytes are the authority-profile digest preimage
158
+ // (`spec-canon:v2:authority\n` ‖ canonical bytes). A core that fails the
159
+ // fail-closed canonicalizer is malformed, not merely unsigned.
160
+ let message;
161
+ try {
162
+ message = authoritySigningPreimage(core);
163
+ } catch {
164
+ return { ok: false, reason: "malformed_event" };
165
+ }
166
+
167
+ const key = findKey(registry, core.key_id);
168
+ if (!key) return { ok: false, reason: "unknown_key_id" };
169
+
170
+ // Registry is authoritative for scheme; a mismatched self-declared scheme is
171
+ // an algorithm-confusion attempt.
172
+ if (key.scheme !== SUPPORTED_SCHEME || signature.scheme !== key.scheme) {
173
+ return { ok: false, reason: "algorithm_confusion" };
174
+ }
175
+ if (key.revoked === true) return { ok: false, reason: "key_revoked" };
176
+ if (!withinWindow(now, key.validity)) return { ok: false, reason: "key_expired" };
177
+
178
+ // signer<->approver binding: the signing key must be registered to the
179
+ // approver named in the signed core (amendment #4).
180
+ if (core.approver !== key.approver) return { ok: false, reason: "signer_approver_mismatch" };
181
+
182
+ // cert binding: the event authorizes exactly the cert the human saw (N4).
183
+ if (typeof expectedCertDigest !== "string" || core.cert_digest !== expectedCertDigest) {
184
+ return { ok: false, reason: "cert_digest_mismatch" };
185
+ }
186
+ if (!withinWindow(now, core.validity)) return { ok: false, reason: "core_validity_expired" };
187
+
188
+ if (!ed25519Verify(key.public_key, signature.signature, message)) {
189
+ return { ok: false, reason: "bad_signature" };
190
+ }
191
+ return { ok: true, reason: "verified" };
192
+ }
package/src/index.d.ts CHANGED
@@ -1,8 +1,22 @@
1
1
  export declare const CONTRACT_PACKAGE: "@consiliency/contract";
2
- export declare const CONTRACT_VERSION: "0.3.0";
2
+ export declare const CONTRACT_VERSION: "0.6.0";
3
3
  export declare const CONTRACT: Record<string, unknown>;
4
4
  export declare function loadContract(): Record<string, unknown>;
5
5
  export declare function loadSchema(name: string): Record<string, unknown>;
6
6
  export declare function loadRegistry(name: string): Record<string, unknown>;
7
7
  export declare function listVectors(): string[];
8
8
  export declare function loadVector(name: string): Record<string, unknown>;
9
+
10
+ export declare class AuthorityCanonicalError extends Error {}
11
+ export declare function canonicalizeCore(core: unknown): string;
12
+ export declare function canonicalCoreBytes(core: unknown): Buffer;
13
+ export declare function authoritySigningPreimage(core: unknown): Buffer;
14
+ export interface AuthorityVerifyResult {
15
+ ok: boolean;
16
+ reason: string;
17
+ }
18
+ export declare function verifyAuthorityEvent(
19
+ event: unknown,
20
+ registry: unknown,
21
+ options: { now: string; expectedCertDigest: string },
22
+ ): AuthorityVerifyResult;
package/src/index.js CHANGED
@@ -3,7 +3,15 @@ import { dirname, join } from "node:path";
3
3
  import { fileURLToPath } from "node:url";
4
4
 
5
5
  export const CONTRACT_PACKAGE = "@consiliency/contract";
6
- export const CONTRACT_VERSION = "0.3.0";
6
+ export const CONTRACT_VERSION = "0.6.0";
7
+
8
+ export {
9
+ AuthorityCanonicalError,
10
+ authoritySigningPreimage,
11
+ canonicalizeCore,
12
+ canonicalCoreBytes,
13
+ verifyAuthorityEvent,
14
+ } from "./authority.js";
7
15
 
8
16
  const packageRoot = dirname(dirname(fileURLToPath(import.meta.url)));
9
17