@interop/wallet-core 0.45.0 → 0.46.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 (83) hide show
  1. package/dist/keyring/record.d.ts +4 -3
  2. package/dist/keyring/record.d.ts.map +1 -1
  3. package/dist/keyring/record.js.map +1 -1
  4. package/dist/keys/rosterLogStore.d.ts.map +1 -1
  5. package/dist/keys/rosterLogStore.js +18 -1
  6. package/dist/keys/rosterLogStore.js.map +1 -1
  7. package/dist/recovery/index.d.ts +1 -1
  8. package/dist/recovery/index.d.ts.map +1 -1
  9. package/dist/recovery/index.js +1 -1
  10. package/dist/recovery/index.js.map +1 -1
  11. package/dist/recovery/recoveryDelegation.d.ts +27 -40
  12. package/dist/recovery/recoveryDelegation.d.ts.map +1 -1
  13. package/dist/recovery/recoveryDelegation.js +119 -53
  14. package/dist/recovery/recoveryDelegation.js.map +1 -1
  15. package/dist/resourceLog/controller.d.ts +38 -3
  16. package/dist/resourceLog/controller.d.ts.map +1 -1
  17. package/dist/resourceLog/controller.js +106 -10
  18. package/dist/resourceLog/controller.js.map +1 -1
  19. package/dist/resourceLog/errors.d.ts +22 -1
  20. package/dist/resourceLog/errors.d.ts.map +1 -1
  21. package/dist/resourceLog/errors.js +23 -1
  22. package/dist/resourceLog/errors.js.map +1 -1
  23. package/dist/resourceLog/index.d.ts +8 -6
  24. package/dist/resourceLog/index.d.ts.map +1 -1
  25. package/dist/resourceLog/index.js +7 -5
  26. package/dist/resourceLog/index.js.map +1 -1
  27. package/dist/resourceLog/license.d.ts +44 -0
  28. package/dist/resourceLog/license.d.ts.map +1 -0
  29. package/dist/resourceLog/license.js +63 -0
  30. package/dist/resourceLog/license.js.map +1 -0
  31. package/dist/resourceLog/verify.d.ts +3 -2
  32. package/dist/resourceLog/verify.d.ts.map +1 -1
  33. package/dist/resourceLog/verify.js +30 -8
  34. package/dist/resourceLog/verify.js.map +1 -1
  35. package/dist/unlock/index.d.ts +17 -8
  36. package/dist/unlock/index.d.ts.map +1 -1
  37. package/dist/unlock/index.js +17 -8
  38. package/dist/unlock/index.js.map +1 -1
  39. package/dist/unlock/ladder.d.ts +76 -0
  40. package/dist/unlock/ladder.d.ts.map +1 -1
  41. package/dist/unlock/ladder.js +111 -1
  42. package/dist/unlock/ladder.js.map +1 -1
  43. package/dist/unlock/standingWebvh.d.ts +39 -0
  44. package/dist/unlock/standingWebvh.d.ts.map +1 -1
  45. package/dist/unlock/standingWebvh.js +69 -4
  46. package/dist/unlock/standingWebvh.js.map +1 -1
  47. package/dist/unlock/unlockRecord.d.ts +28 -8
  48. package/dist/unlock/unlockRecord.d.ts.map +1 -1
  49. package/dist/unlock/unlockRecord.js +93 -13
  50. package/dist/unlock/unlockRecord.js.map +1 -1
  51. package/dist/webvh/companion.d.ts +681 -0
  52. package/dist/webvh/companion.d.ts.map +1 -0
  53. package/dist/webvh/companion.js +1151 -0
  54. package/dist/webvh/companion.js.map +1 -0
  55. package/dist/webvh/delegatedLogStore.d.ts +67 -0
  56. package/dist/webvh/delegatedLogStore.d.ts.map +1 -0
  57. package/dist/webvh/delegatedLogStore.js +104 -0
  58. package/dist/webvh/delegatedLogStore.js.map +1 -0
  59. package/dist/webvh/didWebvh.d.ts +109 -5
  60. package/dist/webvh/didWebvh.d.ts.map +1 -1
  61. package/dist/webvh/didWebvh.js +186 -21
  62. package/dist/webvh/didWebvh.js.map +1 -1
  63. package/dist/webvh/index.d.ts +34 -5
  64. package/dist/webvh/index.d.ts.map +1 -1
  65. package/dist/webvh/index.js +31 -5
  66. package/dist/webvh/index.js.map +1 -1
  67. package/dist/webvh/listClients.d.ts +33 -0
  68. package/dist/webvh/listClients.d.ts.map +1 -1
  69. package/dist/webvh/listClients.js +27 -0
  70. package/dist/webvh/listClients.js.map +1 -1
  71. package/dist/webvh/standingZcap.d.ts +48 -0
  72. package/dist/webvh/standingZcap.d.ts.map +1 -0
  73. package/dist/webvh/standingZcap.js +54 -0
  74. package/dist/webvh/standingZcap.js.map +1 -0
  75. package/dist/webvh/wasIdStore.d.ts +36 -6
  76. package/dist/webvh/wasIdStore.d.ts.map +1 -1
  77. package/dist/webvh/wasIdStore.js +32 -13
  78. package/dist/webvh/wasIdStore.js.map +1 -1
  79. package/dist/webvh/zcap.d.ts +24 -0
  80. package/dist/webvh/zcap.d.ts.map +1 -1
  81. package/dist/webvh/zcap.js +42 -0
  82. package/dist/webvh/zcap.js.map +1 -1
  83. package/package.json +9 -9
@@ -6,7 +6,9 @@
6
6
  * the profile's root of authority, resolved and verified by the reader
7
7
  * independently of the host serving the log. The interface is the seam --
8
8
  * verification consumes only the account DID, the ordered controller-log
9
- * version list, and per-version `assertionMethod` membership -- and the
9
+ * version list, per-version `assertionMethod` membership, and the
10
+ * per-version credential-posture view the ceremony-tail license reads -- and
11
+ * the
10
12
  * did:webvh adapter builds it from an already-verified account log (the
11
13
  * `verifyAccountLog` output), answering anchored-version lookups from that
12
14
  * verified history rather than from any wire fetch. Handing the verifier a
@@ -15,15 +17,38 @@
15
17
  * from.
16
18
  */
17
19
  import type { DIDLog } from '@interop/did-method-webvh';
20
+ /**
21
+ * The credential-posture view at one controller-log version, consumed by the
22
+ * ceremony-tail license on ladder-signed appends (clause B of the ladder
23
+ * VM's authority clauses). `ladderKeys` holds the ladder VMs' signing-key
24
+ * multibases, recognized by relation asymmetry -- a `capabilityDelegation`
25
+ * member absent from `capabilityInvocation` is the ladder VM -- and is how a
26
+ * verifier tells a ladder-signed proof from an enrolled client's.
27
+ * `postureKeys` is S(V), the credential-posture key set: the `keyAgreement`
28
+ * methods whose `controller` is the account DID (the deliberately unmarked
29
+ * credential entries -- verbatim `Multikey` keys and `MultikeyCommitment`
30
+ * commitments alike, keyed by their key material), union the ladder VMs. A
31
+ * document entry is posture-changing iff S(V) differs from S(V-1) in either
32
+ * direction; ordinary client enrollment and revocation are excluded
33
+ * structurally, because a client's `keyAgreement` twin carries the `did:key`
34
+ * controller marker rather than the account DID.
35
+ */
36
+ export interface ControllerPosture {
37
+ ladderKeys: Set<string>;
38
+ postureKeys: Set<string>;
39
+ }
18
40
  /**
19
41
  * What log verification consumes of the independently verified controller
20
42
  * document: the DID the entry proofs must sign under, the verified controller
21
43
  * log's `versionId` list in order (empty for an unversioned static
22
44
  * controller, degrading every anchor rule to current-document verification),
23
- * and the set of `assertionMethod` key multibases at a given version --
45
+ * the set of `assertionMethod` key multibases at a given version --
24
46
  * membership there is the whole authorization rule, so `keyAgreement`-only
25
47
  * recovery keys and `authentication`-only convenience keys are excluded
26
- * structurally.
48
+ * structurally -- and the credential-posture view at a given version, which
49
+ * is what evaluating the ceremony-tail license and recognizing a
50
+ * ladder-signed append require (both invisible through the
51
+ * `assertionMethod` accessor alone).
27
52
  */
28
53
  export interface ResourceLogController {
29
54
  did: string;
@@ -37,6 +62,16 @@ export interface ResourceLogController {
37
62
  * @returns {Promise<Set<string>>}
38
63
  */
39
64
  assertionKeysAt(versionId?: string): Promise<Set<string>>;
65
+ /**
66
+ * Resolves the credential-posture view at a controller-log version
67
+ * (`undefined`: the current document): the ladder VM key multibases and
68
+ * the posture set S(V) the ceremony-tail license compares across
69
+ * versions.
70
+ *
71
+ * @param [versionId] {string}
72
+ * @returns {Promise<ControllerPosture>}
73
+ */
74
+ postureAt(versionId?: string): Promise<ControllerPosture>;
40
75
  }
41
76
  /**
42
77
  * Builds the controller view over an already-verified did:webvh account log
@@ -1 +1 @@
1
- {"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../src/resourceLog/controller.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAGvD;;;;;;;;;GASG;AACH,MAAM,WAAW,qBAAqB;IACpC,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB;;;;;;;OAOG;IACH,eAAe,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;CAC1D;AAmCD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,0BAA0B,CAAC,EACzC,GAAG,EACH,GAAG,EACJ,EAAE;IACD,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;CACZ,GAAG,qBAAqB,CA6BxB"}
1
+ {"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../src/resourceLog/controller.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAGvD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACvB,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CACzB;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,qBAAqB;IACpC,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB;;;;;;;OAOG;IACH,eAAe,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;IACzD;;;;;;;;OAQG;IACH,SAAS,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAA;CAC1D;AA6ID;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,0BAA0B,CAAC,EACzC,GAAG,EACH,GAAG,EACJ,EAAE;IACD,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;CACZ,GAAG,qBAAqB,CAwCxB"}
@@ -1,28 +1,109 @@
1
1
  import { ResourceLogIntegrityError } from './errors.js';
2
2
  /**
3
- * Collects a document's `assertionMethod` key multibases: embedded
4
- * verification methods verbatim, string references resolved against
5
- * `verificationMethod`.
3
+ * Resolves one relation entry: an embedded verification method verbatim, a
4
+ * string reference through the given `verificationMethod` index.
6
5
  *
7
- * @param doc {AssertionDocument}
8
- * @returns {Set<string>}
6
+ * @param entry {string | ControllerVerificationMethod}
7
+ * @param byId {Map<string, ControllerVerificationMethod>}
8
+ * @returns {ControllerVerificationMethod | undefined}
9
9
  */
10
- function assertionKeysOf(doc) {
10
+ function resolveMethod(entry, byId) {
11
+ return typeof entry === 'string' ? byId.get(entry) : entry;
12
+ }
13
+ /**
14
+ * Indexes a document's `verificationMethod` array by id.
15
+ *
16
+ * @param doc {ControllerDocument}
17
+ * @returns {Map<string, ControllerVerificationMethod>}
18
+ */
19
+ function methodsById(doc) {
11
20
  const byId = new Map();
12
21
  for (const method of doc.verificationMethod ?? []) {
13
22
  if (typeof method?.id === 'string') {
14
23
  byId.set(method.id, method);
15
24
  }
16
25
  }
26
+ return byId;
27
+ }
28
+ /**
29
+ * A relation entry's verification-method id: the string reference itself, or
30
+ * an embedded method's `id`.
31
+ *
32
+ * @param entry {string | ControllerVerificationMethod}
33
+ * @returns {string | undefined}
34
+ */
35
+ function relationIdOf(entry) {
36
+ return typeof entry === 'string' ? entry : entry?.id;
37
+ }
38
+ /**
39
+ * Collects a document's `assertionMethod` key multibases: embedded
40
+ * verification methods verbatim, string references resolved against
41
+ * `verificationMethod`.
42
+ *
43
+ * @param doc {ControllerDocument}
44
+ * @returns {Set<string>}
45
+ */
46
+ function assertionKeysOf(doc) {
47
+ const byId = methodsById(doc);
17
48
  const keys = new Set();
18
49
  for (const entry of doc.assertionMethod ?? []) {
19
- const method = typeof entry === 'string' ? byId.get(entry) : entry;
50
+ const method = resolveMethod(entry, byId);
20
51
  if (method && typeof method.publicKeyMultibase === 'string') {
21
52
  keys.add(method.publicKeyMultibase);
22
53
  }
23
54
  }
24
55
  return keys;
25
56
  }
57
+ /**
58
+ * Collects a document's credential-posture view (see
59
+ * {@link ControllerPosture}): the ladder VMs by relation asymmetry
60
+ * (`capabilityDelegation` members absent from `capabilityInvocation`,
61
+ * compared by verification-method id), and S(V) as the account-controlled
62
+ * `keyAgreement` methods' key material -- `publicKeyCommitment` where the
63
+ * entry is a commitment, `publicKeyMultibase` where it is verbatim (the two
64
+ * value spaces are disjoint) -- union the ladder keys. A `keyAgreement`
65
+ * method carrying neither is skipped: an unidentifiable entry must not make
66
+ * two distinct postures compare equal.
67
+ *
68
+ * @param doc {ControllerDocument}
69
+ * @param did {string} the account DID posture entries are controlled by
70
+ * @returns {ControllerPosture}
71
+ */
72
+ function postureOf(doc, did) {
73
+ const byId = methodsById(doc);
74
+ const invocable = new Set();
75
+ for (const entry of doc.capabilityInvocation ?? []) {
76
+ const id = relationIdOf(entry);
77
+ if (id !== undefined) {
78
+ invocable.add(id);
79
+ }
80
+ }
81
+ const ladderKeys = new Set();
82
+ for (const entry of doc.capabilityDelegation ?? []) {
83
+ const id = relationIdOf(entry);
84
+ if (id !== undefined && invocable.has(id)) {
85
+ continue;
86
+ }
87
+ const method = resolveMethod(entry, byId);
88
+ if (method && typeof method.publicKeyMultibase === 'string') {
89
+ ladderKeys.add(method.publicKeyMultibase);
90
+ }
91
+ }
92
+ const postureKeys = new Set(ladderKeys);
93
+ for (const entry of doc.keyAgreement ?? []) {
94
+ const method = resolveMethod(entry, byId);
95
+ if (!method || method.controller !== did) {
96
+ continue;
97
+ }
98
+ if (typeof method.publicKeyCommitment === 'string') {
99
+ postureKeys.add(method.publicKeyCommitment);
100
+ }
101
+ else if (typeof method.publicKeyMultibase === 'string') {
102
+ postureKeys.add(method.publicKeyMultibase);
103
+ }
104
+ }
105
+ return { ladderKeys, postureKeys };
106
+ }
26
107
  /**
27
108
  * Builds the controller view over an already-verified did:webvh account log
28
109
  * (the `verifyAccountLog` output -- callers never hand this a log they have
@@ -41,10 +122,17 @@ function assertionKeysOf(doc) {
41
122
  export function webvhResourceLogController({ did, log }) {
42
123
  const versionIds = log.map(entry => entry.versionId);
43
124
  const keysByVersion = new Map();
125
+ const postureByVersion = new Map();
44
126
  for (const entry of log) {
45
- keysByVersion.set(entry.versionId, assertionKeysOf(entry.state));
127
+ const doc = entry.state;
128
+ keysByVersion.set(entry.versionId, assertionKeysOf(doc));
129
+ postureByVersion.set(entry.versionId, postureOf(doc, did));
46
130
  }
47
131
  const head = log.length === 0 ? undefined : log[log.length - 1];
132
+ function versionRefusal(versionId) {
133
+ return new ResourceLogIntegrityError(`The controller document did not resolve at version ` +
134
+ `"${versionId ?? '<head>'}" (no document returned).`);
135
+ }
48
136
  return {
49
137
  did,
50
138
  versionIds,
@@ -53,8 +141,16 @@ export function webvhResourceLogController({ did, log }) {
53
141
  ? head && keysByVersion.get(head.versionId)
54
142
  : keysByVersion.get(versionId);
55
143
  if (!resolved) {
56
- return Promise.reject(new ResourceLogIntegrityError(`The controller document did not resolve at version ` +
57
- `"${versionId ?? '<head>'}" (no document returned).`));
144
+ return Promise.reject(versionRefusal(versionId));
145
+ }
146
+ return Promise.resolve(resolved);
147
+ },
148
+ postureAt(versionId) {
149
+ const resolved = versionId === undefined
150
+ ? head && postureByVersion.get(head.versionId)
151
+ : postureByVersion.get(versionId);
152
+ if (!resolved) {
153
+ return Promise.reject(versionRefusal(versionId));
58
154
  }
59
155
  return Promise.resolve(resolved);
60
156
  }
@@ -1 +1 @@
1
- {"version":3,"file":"controller.js","sourceRoot":"","sources":["../../src/resourceLog/controller.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;AAkCvD;;;;;;;GAOG;AACH,SAAS,eAAe,CAAC,GAAsB;IAC7C,MAAM,IAAI,GAAG,IAAI,GAAG,EAA2C,CAAA;IAC/D,KAAK,MAAM,MAAM,IAAI,GAAG,CAAC,kBAAkB,IAAI,EAAE,EAAE,CAAC;QAClD,IAAI,OAAO,MAAM,EAAE,EAAE,KAAK,QAAQ,EAAE,CAAC;YACnC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,CAAC,CAAA;QAC7B,CAAC;IACH,CAAC;IACD,MAAM,I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,7 @@
4
4
  /**
5
5
  * The resource-log refusal taxonomy, carried over from the roster's WC-1
6
6
  * detached-signature design onto the log design. Two adversarial classes plus
7
- * one lifecycle refusal:
7
+ * two admission refusals:
8
8
  *
9
9
  * - {@link ResourceLogIntegrityError} -- fabrication: the served log fails
10
10
  * verification on its own terms (parse shape, SCID, chain hashes, proofs,
@@ -19,6 +19,12 @@
19
19
  * head is a terminal handover entry. Not an attack: the log's own authors
20
20
  * closed it, and a verifier of this profile must refuse to extend a closed
21
21
  * log even though nothing currently emits terminal entries.
22
+ * - {@link ResourceLogLicenseError} -- a ladder-signed append outside the
23
+ * ceremony-tail license. An admission refusal, not log corruption: the
24
+ * append (attempted, or already served) is not licensed, and the same
25
+ * append can become licensed after a posture-changing controller-document
26
+ * entry -- callers must not treat it with the reject-the-whole-log
27
+ * severity of the integrity class.
22
28
  */
23
29
  /**
24
30
  * A served log failed verification: malformed entries, a non-verifying SCID,
@@ -55,6 +61,21 @@ export declare class ResourceLogContinuityError extends Error {
55
61
  servedEntries?: unknown[];
56
62
  });
57
63
  }
64
+ /**
65
+ * A ladder-signed append outside the ceremony-tail license: it is not the
66
+ * log's first entry, and it does not anchor at a posture-changing controller
67
+ * document version no verified entry already anchors at or past. Above all
68
+ * this refuses the silent-rekey shape -- a ladder-signed rotation against an
69
+ * unchanged document. Write-time admission class: the log is not corrupt and
70
+ * whoever signed the append genuinely holds the credential; the append is
71
+ * merely unlicensed, and a retry after a posture-changing document entry may
72
+ * succeed.
73
+ */
74
+ export declare class ResourceLogLicenseError extends Error {
75
+ constructor(message: string, options?: {
76
+ cause?: unknown;
77
+ });
78
+ }
58
79
  /**
59
80
  * An append was refused because the log's verified head is a terminal
60
81
  * handover entry: the log is closed and names a successor, and this profile
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/resourceLog/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;;;GAKG;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E,MAAM,CAAA;IAClB;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,EAAE,CAAA;gBACb,EACV,MAAM,EACN,UAAU,EACV,aAAa,EACd,EAAE;QACD,MAAM,EAAE,UAAU,GAAG,MAAM,GAAG,aAAa,GAAG,eAAe,CAAA;QAC7D,UAAU,EAAE,MAAM,CAAA;QAClB,aAAa,CAAC,EAAE,OAAO,EAAE,CAAA;KAC1B;CAUF;AAED;;;;;;;;;GASG;AACH,qBAAa,uBAAwB,SAAQ,KAAK;gBACpC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;CAI3D;AAED;;;;GAIG;AACH,qBAAa,sBAAuB,SAAQ,KAAK;IAC/C,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;gBAC7B,EAAE,OAAO,EAAE,EAAE;QAAE,OAAO,EAAE;YAAE,MAAM,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE;CAQvE"}
@@ -4,7 +4,7 @@
4
4
  /**
5
5
  * The resource-log refusal taxonomy, carried over from the roster's WC-1
6
6
  * detached-signature design onto the log design. Two adversarial classes plus
7
- * one lifecycle refusal:
7
+ * two admission refusals:
8
8
  *
9
9
  * - {@link ResourceLogIntegrityError} -- fabrication: the served log fails
10
10
  * verification on its own terms (parse shape, SCID, chain hashes, proofs,
@@ -19,6 +19,12 @@
19
19
  * head is a terminal handover entry. Not an attack: the log's own authors
20
20
  * closed it, and a verifier of this profile must refuse to extend a closed
21
21
  * log even though nothing currently emits terminal entries.
22
+ * - {@link ResourceLogLicenseError} -- a ladder-signed append outside the
23
+ * ceremony-tail license. An admission refusal, not log corruption: the
24
+ * append (attempted, or already served) is not licensed, and the same
25
+ * append can become licensed after a posture-changing controller-document
26
+ * entry -- callers must not treat it with the reject-the-whole-log
27
+ * severity of the integrity class.
22
28
  */
23
29
  /**
24
30
  * A served log failed verification: malformed entries, a non-verifying SCID,
@@ -59,6 +65,22 @@ export class ResourceLogContinuityError extends Error {
59
65
  this.servedEntries = servedEntries;
60
66
  }
61
67
  }
68
+ /**
69
+ * A ladder-signed append outside the ceremony-tail license: it is not the
70
+ * log's first entry, and it does not anchor at a posture-changing controller
71
+ * document version no verified entry already anchors at or past. Above all
72
+ * this refuses the silent-rekey shape -- a ladder-signed rotation against an
73
+ * unchanged document. Write-time admission class: the log is not corrupt and
74
+ * whoever signed the append genuinely holds the credential; the append is
75
+ * merely unlicensed, and a retry after a posture-changing document entry may
76
+ * succeed.
77
+ */
78
+ export class ResourceLogLicenseError extends Error {
79
+ constructor(message, options) {
80
+ super(message, options);
81
+ this.name = 'ResourceLogLicenseError';
82
+ }
83
+ }
62
84
  /**
63
85
  * An append was refused because the log's verified head is a terminal
64
86
  * handover entry: the log is closed and names a successor, and this profile
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/resourceLog/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;;;GAKG;AACH,MAAM,OAAO,yBAA0B,SAAQ,KAAK;IAClD,YAAY,OAAe,EAAE,OAA6B;QACxD,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;QACvB,IAAI,CAAC,IAAI,GAAG,2BAA2B,CAAA;IACzC,CAAC;CACF;AAED;;;;;;;;GAQG;AACH,MAAM,OAAO,0BAA2B,SAAQ,KAAK;IACnD,MAAM,CAAuD;IAC7D,UAAU,CAAQ;IAClB;;;;OAIG;IACH,aAAa,CAAY;IACzB,YAAY,EACV,MAAM,EACN,UAAU,EACV,aAAa,EAKd;QACC,KAAK,CACH,sEAAsE;YACpE,IAAI,MAAM,iBAAiB,UAAU,IAAI,CAC5C,CAAA;QACD,IAAI,CAAC,IAAI,GAAG,4BAA4B,CAAA;QACxC,IAAI,CAAC,MAAM,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A6B;QACxD,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;QACvB,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAA;IACvC,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,OAAO,sBAAuB,SAAQ,KAAK;IAC/C,OAAO,CAAkC;IACzC,YAAY,EAAE,OAAO,EAAiD;QACpE,KAAK,CACH,wEAAwE;YACtE,0BAA0B,CAC7B,CAAA;QACD,IAAI,CAAC,IAAI,GAAG,wBAAwB,CAAA;QACpC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;CACF"}
@@ -7,17 +7,19 @@
7
7
  * chain verification against an adversarial host (parse shape, SCID and
8
8
  * entry-hash recomputation, entry proofs, the external-authorization rule
9
9
  * against the independently verified did:webvh controller document, terminal
10
- * entries), the chain-head pin with its continuity rules, the append path
11
- * (verified-head build, CAS with rebase-and-retry, read-back confirmation),
12
- * and the sealing sweep (the idempotent backstop append that re-anchors a
13
- * log's head past the controller's latest membership change).
10
+ * entries), the ceremony-tail license on ladder-signed appends, the
11
+ * chain-head pin with its continuity rules, the append path (verified-head
12
+ * build, CAS with rebase-and-retry, read-back confirmation), and the sealing
13
+ * sweep (the idempotent backstop append that re-anchors a log's head past
14
+ * the controller's latest membership change).
14
15
  * Transport (JSON Lines, the store seam, the projection write) lives in
15
16
  * `@interop/was-client/log`; the hashing and proof kernel in
16
17
  * `@interop/did-method-webvh`. Kept out of the root export: this subpath
17
18
  * pulls the did:webvh and ed25519 dependency graph.
18
19
  */
19
- export { webvhResourceLogController, type ResourceLogController } from './controller.js';
20
- export { ResourceLogClosedError, ResourceLogContinuityError, ResourceLogIntegrityError } from './errors.js';
20
+ export { webvhResourceLogController, type ControllerPosture, type ResourceLogController } from './controller.js';
21
+ export { ResourceLogClosedError, ResourceLogContinuityError, ResourceLogIntegrityError, ResourceLogLicenseError } from './errors.js';
22
+ export { assertLadderAppendLicensed } from './license.js';
21
23
  export { buildResourceLogEntry, buildResourceLogGenesis, type ResourceLogSigner } from './entry.js';
22
24
  export { memoryResourceLogPinStore, resourceLogPinId, type ResourceLogHeadPin, type ResourceLogPinStore } from './pin.js';
23
25
  export { isTerminalResourceLogEntry, verifyResourceLog, verifyResourceLogHandover, type VerifiedResourceLog } from './verify.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resourceLog/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;GAcG;AACH,OAAO,EACL,0BAA0B,EAC1B,KAAK,qBAAqB,EAC3B,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC1B,yBAAyB,EAC1B,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,KAAK,iBAAiB,EACvB,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,yBAAyB,EACzB,gBAAgB,EAChB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACzB,MAAM,UAAU,CAAA;AACjB,OAAO,EACL,0BAA0B,EAC1B,iBAAiB,EACjB,yBAAyB,EACzB,KAAK,mBAAmB,EACzB,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EAChB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,2BAA2B,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resourceLog/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EACL,0BAA0B,EAC1B,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC3B,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC1B,yBAAyB,EACzB,uBAAuB,EACxB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAA;AACzD,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,KAAK,iBAAiB,EACvB,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,yBAAyB,EACzB,gBAAgB,EAChB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACzB,MAAM,UAAU,CAAA;AACjB,OAAO,EACL,0BAA0B,EAC1B,iBAAiB,EACjB,yBAAyB,EACzB,KAAK,mBAAmB,EACzB,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EAChB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,2BAA2B,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA"}
@@ -7,17 +7,19 @@
7
7
  * chain verification against an adversarial host (parse shape, SCID and
8
8
  * entry-hash recomputation, entry proofs, the external-authorization rule
9
9
  * against the independently verified did:webvh controller document, terminal
10
- * entries), the chain-head pin with its continuity rules, the append path
11
- * (verified-head build, CAS with rebase-and-retry, read-back confirmation),
12
- * and the sealing sweep (the idempotent backstop append that re-anchors a
13
- * log's head past the controller's latest membership change).
10
+ * entries), the ceremony-tail license on ladder-signed appends, the
11
+ * chain-head pin with its continuity rules, the append path (verified-head
12
+ * build, CAS with rebase-and-retry, read-back confirmation), and the sealing
13
+ * sweep (the idempotent backstop append that re-anchors a log's head past
14
+ * the controller's latest membership change).
14
15
  * Transport (JSON Lines, the store seam, the projection write) lives in
15
16
  * `@interop/was-client/log`; the hashing and proof kernel in
16
17
  * `@interop/did-method-webvh`. Kept out of the root export: this subpath
17
18
  * pulls the did:webvh and ed25519 dependency graph.
18
19
  */
19
20
  export { webvhResourceLogController } from './controller.js';
20
- export { ResourceLogClosedError, ResourceLogContinuityError, ResourceLogIntegrityError } from './errors.js';
21
+ export { ResourceLogClosedError, ResourceLogContinuityError, ResourceLogIntegrityError, ResourceLogLicenseError } from './errors.js';
22
+ export { assertLadderAppendLicensed } from './license.js';
21
23
  export { buildResourceLogEntry, buildResourceLogGenesis } from './entry.js';
22
24
  export { memoryResourceLogPinStore, resourceLogPinId } from './pin.js';
23
25
  export { isTerminalResourceLogEntry, verifyResourceLog, verifyResourceLogHandover } from './verify.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resourceLog/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;GAcG;AACH,OAAO,EACL,0BAA0B,EAE3B,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC1B,yBAAyB,EAC1B,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EAExB,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,yBAAyB,EACzB,gBAAgB,EAGjB,MAAM,UAAU,CAAA;AACjB,OAAO,EACL,0BAA0B,EAC1B,iBAAiB,EACjB,yBAAyB,EAE1B,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EAChB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,2BAA2B,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resourceLog/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EACL,0BAA0B,EAG3B,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC1B,yBAAyB,EACzB,uBAAuB,EACxB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAA;AACzD,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EAExB,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,yBAAyB,EACzB,gBAAgB,EAGjB,MAAM,UAAU,CAAA;AACjB,OAAO,EACL,0BAA0B,EAC1B,iBAAiB,EACjB,yBAAyB,EAE1B,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EAChB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,2BAA2B,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA"}
@@ -0,0 +1,44 @@
1
+ /*!
2
+ * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
+ */
4
+ /**
5
+ * The ceremony-tail license on ladder-signed resource-log appends (clause B
6
+ * of the ladder VM's authority clauses). A ladder-signed append is accepted
7
+ * in exactly two shapes: the log's first entry (creation, never extension --
8
+ * callers admit that shape by not calling this check on a genesis entry),
9
+ * or a rotation anchored at a posture-changing controller-document version,
10
+ * one-shot -- refused when the verified log head already carries an entry
11
+ * anchored at that version or later. Everything else, above all a rotation
12
+ * against an unchanged document (the silent-rekey shape), is refused with
13
+ * {@link ResourceLogLicenseError}. Anchors compare by position in the
14
+ * controller's verified version history, the structural twin of the sealing
15
+ * sweep's `headAnchorIndex >= removalIndex` check.
16
+ */
17
+ import type { ResourceLogController } from './controller.js';
18
+ /**
19
+ * Evaluates the ceremony-tail license's second shape for one ladder-signed
20
+ * append: the append must anchor at a posture-changing document version V --
21
+ * S(V) differs from S(V-1) in either direction, with S(-1) empty for a
22
+ * genesis-version anchor -- and no verified entry may already anchor at V or
23
+ * later (`headAnchorIndex >= anchorIndex` refuses; the license is one-shot,
24
+ * so a torn ceremony's late-arriving tail still passes while a second
25
+ * rotation against the same anchor does not). A `null` anchor index (an
26
+ * unversioned controller, where no anchor exists to license against) is
27
+ * refused fail-closed.
28
+ *
29
+ * @param options {object}
30
+ * @param options.controller {ResourceLogController} the verified controller
31
+ * view
32
+ * @param options.anchorIndex {number | null} the append's anchor as an
33
+ * index into `controller.versionIds` (`null`: unanchored)
34
+ * @param options.headAnchorIndex {number | null} the verified log head's
35
+ * effective anchor before this append (`null`: the log has no anchored
36
+ * entries yet)
37
+ * @returns {Promise<void>}
38
+ */
39
+ export declare function assertLadderAppendLicensed({ controller, anchorIndex, headAnchorIndex }: {
40
+ controller: ResourceLogController;
41
+ anchorIndex: number | null;
42
+ headAnchorIndex: number | null;
43
+ }): Promise<void>;
44
+ //# sourceMappingURL=license.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"license.d.ts","sourceRoot":"","sources":["../../src/resourceLog/license.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AAsB5D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,0BAA0B,CAAC,EAC/C,UAAU,EACV,WAAW,EACX,eAAe,EAChB,EAAE;IACD,UAAU,EAAE,qBAAqB,CAAA;IACjC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;CAC/B,GAAG,OAAO,CAAC,IAAI,CAAC,CAgChB"}
@@ -0,0 +1,63 @@
1
+ import { ResourceLogLicenseError } from './errors.js';
2
+ /**
3
+ * Set equality over posture members.
4
+ *
5
+ * @param left {Set<string>}
6
+ * @param right {Set<string>}
7
+ * @returns {boolean}
8
+ */
9
+ function setsEqual(left, right) {
10
+ if (left.size !== right.size) {
11
+ return false;
12
+ }
13
+ for (const member of left) {
14
+ if (!right.has(member)) {
15
+ return false;
16
+ }
17
+ }
18
+ return true;
19
+ }
20
+ /**
21
+ * Evaluates the ceremony-tail license's second shape for one ladder-signed
22
+ * append: the append must anchor at a posture-changing document version V --
23
+ * S(V) differs from S(V-1) in either direction, with S(-1) empty for a
24
+ * genesis-version anchor -- and no verified entry may already anchor at V or
25
+ * later (`headAnchorIndex >= anchorIndex` refuses; the license is one-shot,
26
+ * so a torn ceremony's late-arriving tail still passes while a second
27
+ * rotation against the same anchor does not). A `null` anchor index (an
28
+ * unversioned controller, where no anchor exists to license against) is
29
+ * refused fail-closed.
30
+ *
31
+ * @param options {object}
32
+ * @param options.controller {ResourceLogController} the verified controller
33
+ * view
34
+ * @param options.anchorIndex {number | null} the append's anchor as an
35
+ * index into `controller.versionIds` (`null`: unanchored)
36
+ * @param options.headAnchorIndex {number | null} the verified log head's
37
+ * effective anchor before this append (`null`: the log has no anchored
38
+ * entries yet)
39
+ * @returns {Promise<void>}
40
+ */
41
+ export async function assertLadderAppendLicensed({ controller, anchorIndex, headAnchorIndex }) {
42
+ if (anchorIndex === null ||
43
+ anchorIndex < 0 ||
44
+ anchorIndex >= controller.versionIds.length) {
45
+ throw new ResourceLogLicenseError('A ladder-signed append past the genesis entry cannot be licensed ' +
46
+ 'without an anchor into the controller document version history.');
47
+ }
48
+ const current = (await controller.postureAt(controller.versionIds[anchorIndex])).postureKeys;
49
+ const previous = anchorIndex === 0
50
+ ? new Set()
51
+ : (await controller.postureAt(controller.versionIds[anchorIndex - 1]))
52
+ .postureKeys;
53
+ if (setsEqual(current, previous)) {
54
+ throw new ResourceLogLicenseError('The ladder-signed append anchors at a controller document version ' +
55
+ 'that did not change the credential posture (a rotation against an ' +
56
+ 'unchanged document is never licensed).');
57
+ }
58
+ if (headAnchorIndex !== null && headAnchorIndex >= anchorIndex) {
59
+ throw new ResourceLogLicenseError('The verified log head already carries an entry anchored at or past ' +
60
+ 'this posture-changing document version (the license is one-shot).');
61
+ }
62
+ }
63
+ //# sourceMappingURL=license.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"license.js","sourceRoot":"","sources":["../../src/resourceLog/license.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AAErD;;;;;;GAMG;AACH,SAAS,SAAS,CAAC,IAAiB,EAAE,KAAkB;IACt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CAAC;AACH,CAAC"}
@@ -46,8 +46,9 @@ export declare function isTerminalResourceLogEntry(entry: ResourceLogEntry): boo
46
46
  * recomputation, per-entry proofs, the external-authorization rule with
47
47
  * anchor monotonicity, termination, and continuity against the chain-head
48
48
  * pin. Throws {@link ResourceLogIntegrityError} on fabrication-class
49
- * failures, {@link ResourceLogContinuityError} on pin conflicts; any failure
50
- * rejects the whole log.
49
+ * failures, {@link ResourceLogContinuityError} on pin conflicts, and
50
+ * `ResourceLogLicenseError` on a ladder-signed append outside the
51
+ * ceremony-tail license; any failure rejects the whole log.
51
52
  *
52
53
  * The controller view is the independently verified controller document --
53
54
  * never material served beside the log. An unversioned controller (empty
@@ -1 +1 @@
1
- {"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../src/resourceLog/verify.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EACV,gBAAgB,EAEjB,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AAK5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAclD;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,gBAAgB,EAAE,CAAA;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,gBAAgB,CAAA;IACtB,KAAK,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IAChC,GAAG,EAAE,kBAAkB,CAAA;IACvB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,QAAQ,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;IACjD,WAAW,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CACnD;AAED;;;;;;;GAOG;AACH,wB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A;IACjD,WAAW,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CACnD;AAED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAM3E;AA0OD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAsB,iBAAiB,CAAC,EACtC,OAAO,EACP,UAAU,EACV,cAAc,EACd,GAAG,EACJ,EAAE;IACD,OAAO,EAAE,gBAAgB,EAAE,CAAA;IAC3B,UAAU,EAAE,qBAAqB,CAAA;IACjC,cAAc,EAAE,MAAM,CAAA;IACtB,GAAG,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAA;CAChC,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAqP/B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,yBAAyB,CAAC,EACxC,KAAK,EACL,SAAS,EACV,EAAE;IACD,KAAK,EAAE,mBAAmB,CAAA;IAC1B,SAAS,EAAE,mBAAmB,CAAA;CAC/B,GAAG,IAAI,CAqBP"}
@@ -8,13 +8,17 @@
8
8
  * verification through the did:webvh log kernel, the external-authorization
9
9
  * rule (anchor resolution against the independently verified controller
10
10
  * document, `assertionMethod` membership at the anchored version, anchor
11
- * monotonicity), terminal-entry recognition, and continuity against the
12
- * chain-head pin. Any failure rejects the LOG, not just the failing entry,
13
- * and nothing served -- a stated head, a digest, a count -- is ever accepted
14
- * in place of recomputation.
11
+ * monotonicity), the ceremony-tail license on ladder-signed appends,
12
+ * terminal-entry recognition, and continuity against the chain-head pin. Any
13
+ * failure rejects the LOG, not just the failing entry, and nothing served --
14
+ * a stated head, a digest, a count -- is ever accepted in place of
15
+ * recomputation; a license refusal keeps its own class
16
+ * (`ResourceLogLicenseError`) so callers can tell an unlicensed append from
17
+ * a corrupt log.
15
18
  */
16
19
  import { buildVersionId, canonicalizeStrict, defaultWebvhLogVerifier, deriveHash, parseAndValidateVersionId, SCID_PLACEHOLDER, verifyEntryProofs } from '@interop/did-method-webvh';
17
- import { ResourceLogContinuityError, ResourceLogIntegrityError } from './errors.js';
20
+ import { ResourceLogContinuityError, ResourceLogIntegrityError, ResourceLogLicenseError } from './errors.js';
21
+ import { assertLadderAppendLicensed } from './license.js';
18
22
  import { vmFragmentOf } from './vmFragment.js';
19
23
  /**
20
24
  * The five members a log entry carries, exactly.
@@ -219,8 +223,9 @@ function parseAnchoredVm(verificationMethod, ordinal) {
219
223
  * recomputation, per-entry proofs, the external-authorization rule with
220
224
  * anchor monotonicity, termination, and continuity against the chain-head
221
225
  * pin. Throws {@link ResourceLogIntegrityError} on fabrication-class
222
- * failures, {@link ResourceLogContinuityError} on pin conflicts; any failure
223
- * rejects the whole log.
226
+ * failures, {@link ResourceLogContinuityError} on pin conflicts, and
227
+ * `ResourceLogLicenseError` on a ladder-signed append outside the
228
+ * ceremony-tail license; any failure rejects the whole log.
224
229
  *
225
230
  * The controller view is the independently verified controller document --
226
231
  * never material served beside the log. An unversioned controller (empty
@@ -325,6 +330,22 @@ export async function verifyResourceLog({ entries, controller, expectedMethod, p
325
330
  `document does not list under assertionMethod at the anchored ` +
326
331
  `version.`);
327
332
  }
333
+ // The ceremony-tail license: a ladder-signed proof (the anchored
334
+ // version's relation-asymmetry ladder VM) is admitted only on the
335
+ // genesis entry, or anchored at a posture-changing version no prior
336
+ // entry anchors at or past. The floor at this point is still the
337
+ // previous entries' effective anchor -- the verified head this append
338
+ // extended.
339
+ if (index > 0) {
340
+ const posture = await controller.postureAt(anchor);
341
+ if (posture.ladderKeys.has(keyMultibase)) {
342
+ await assertLadderAppendLicensed({
343
+ controller,
344
+ anchorIndex: versioned ? anchorIndex : null,
345
+ headAnchorIndex: anchorFloor
346
+ });
347
+ }
348
+ }
328
349
  entryAnchorIndex = Math.max(entryAnchorIndex, anchorIndex);
329
350
  };
330
351
  try {
@@ -339,7 +360,8 @@ export async function verifyResourceLog({ entries, controller, expectedMethod, p
339
360
  });
340
361
  }
341
362
  catch (err) {
342
- if (err instanceof ResourceLogIntegrityError) {
363
+ if (err instanceof ResourceLogIntegrityError ||
364
+ err instanceof ResourceLogLicenseError) {
343
365
  throw err;
344
366
  }
345
367
  throw new ResourceLogIntegrityError(`Resource log entry ${ordinal} failed proof verification.`, { cause: err });