@interop/wallet-core 0.51.0 → 0.53.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 (292) hide show
  1. package/README.md +7 -11
  2. package/dist/clientAnnex/credentialAnchoredGenesis.d.ts +2 -2
  3. package/dist/clientAnnex/credentialAnchoredGenesis.d.ts.map +1 -1
  4. package/dist/clientAnnex/credentialAnchoredGenesis.js +1 -1
  5. package/dist/clientAnnex/forget.d.ts +18 -6
  6. package/dist/clientAnnex/forget.d.ts.map +1 -1
  7. package/dist/clientAnnex/forget.js +19 -6
  8. package/dist/clientAnnex/forget.js.map +1 -1
  9. package/dist/clientAnnex/forgetLast.d.ts +51 -30
  10. package/dist/clientAnnex/forgetLast.d.ts.map +1 -1
  11. package/dist/clientAnnex/forgetLast.js +72 -26
  12. package/dist/clientAnnex/forgetLast.js.map +1 -1
  13. package/dist/clientAnnex/gc.d.ts +3 -3
  14. package/dist/clientAnnex/gc.d.ts.map +1 -1
  15. package/dist/clientAnnex/gc.js +2 -2
  16. package/dist/clientAnnex/gc.js.map +1 -1
  17. package/dist/clientAnnex/index.d.ts +6 -6
  18. package/dist/clientAnnex/index.d.ts.map +1 -1
  19. package/dist/clientAnnex/index.js +5 -5
  20. package/dist/clientAnnex/index.js.map +1 -1
  21. package/dist/clientAnnex/ladder.d.ts +19 -11
  22. package/dist/clientAnnex/ladder.d.ts.map +1 -1
  23. package/dist/clientAnnex/ladder.js +77 -14
  24. package/dist/clientAnnex/ladder.js.map +1 -1
  25. package/dist/clientAnnex/ladderAnchored.d.ts +146 -10
  26. package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -1
  27. package/dist/clientAnnex/ladderAnchored.js +230 -26
  28. package/dist/clientAnnex/ladderAnchored.js.map +1 -1
  29. package/dist/clientAnnex/log.d.ts +6 -6
  30. package/dist/clientAnnex/log.d.ts.map +1 -1
  31. package/dist/clientAnnex/log.js +8 -8
  32. package/dist/clientAnnex/log.js.map +1 -1
  33. package/dist/clientAnnex/recoveryLadderAnchored.d.ts +18 -7
  34. package/dist/clientAnnex/recoveryLadderAnchored.d.ts.map +1 -1
  35. package/dist/clientAnnex/recoveryLadderAnchored.js +54 -14
  36. package/dist/clientAnnex/recoveryLadderAnchored.js.map +1 -1
  37. package/dist/clientAnnex/selfEnroll.d.ts +67 -6
  38. package/dist/clientAnnex/selfEnroll.d.ts.map +1 -1
  39. package/dist/clientAnnex/selfEnroll.js +91 -15
  40. package/dist/clientAnnex/selfEnroll.js.map +1 -1
  41. package/dist/clients/listing.d.ts +1 -1
  42. package/dist/clients/listing.d.ts.map +1 -1
  43. package/dist/clients/listing.js +1 -1
  44. package/dist/clients/listing.js.map +1 -1
  45. package/dist/clients/revocation.d.ts +1 -1
  46. package/dist/clients/rosterPolicy.d.ts +1 -1
  47. package/dist/clients/rosterPolicy.d.ts.map +1 -1
  48. package/dist/clients/rosterPolicy.js +10 -7
  49. package/dist/clients/rosterPolicy.js.map +1 -1
  50. package/dist/descriptors/acquire.js +1 -1
  51. package/dist/descriptors/logSource.d.ts +6 -4
  52. package/dist/descriptors/logSource.d.ts.map +1 -1
  53. package/dist/descriptors/logSource.js +7 -4
  54. package/dist/descriptors/logSource.js.map +1 -1
  55. package/dist/enrollment/enrollment.d.ts +1 -1
  56. package/dist/enrollment/enrollment.d.ts.map +1 -1
  57. package/dist/enrollment/enrollment.js +2 -1
  58. package/dist/enrollment/enrollment.js.map +1 -1
  59. package/dist/genesis/accountGenesis.d.ts +1 -1
  60. package/dist/genesis/accountGenesis.d.ts.map +1 -1
  61. package/dist/genesis/accountGenesis.js +1 -1
  62. package/dist/index.d.ts +8 -3
  63. package/dist/index.d.ts.map +1 -1
  64. package/dist/index.js +7 -3
  65. package/dist/index.js.map +1 -1
  66. package/dist/keyring/kdf.d.ts +6 -20
  67. package/dist/keyring/kdf.d.ts.map +1 -1
  68. package/dist/keyring/kdf.js +8 -5
  69. package/dist/keyring/kdf.js.map +1 -1
  70. package/dist/keyring/unlockSpace.js +1 -1
  71. package/dist/keys/clientKeyRecord.d.ts +68 -1
  72. package/dist/keys/clientKeyRecord.d.ts.map +1 -1
  73. package/dist/keys/clientKeyRecord.js +155 -20
  74. package/dist/keys/clientKeyRecord.js.map +1 -1
  75. package/dist/keys/index.d.ts +2 -2
  76. package/dist/keys/index.d.ts.map +1 -1
  77. package/dist/keys/index.js +1 -1
  78. package/dist/keys/index.js.map +1 -1
  79. package/dist/keys/rosterLogStore.d.ts +16 -14
  80. package/dist/keys/rosterLogStore.d.ts.map +1 -1
  81. package/dist/keys/rosterLogStore.js +164 -32
  82. package/dist/keys/rosterLogStore.js.map +1 -1
  83. package/dist/keys/rosterStore.d.ts +8 -7
  84. package/dist/keys/rosterStore.d.ts.map +1 -1
  85. package/dist/keys/rosterStore.js +6 -6
  86. package/dist/keys/rosterStore.js.map +1 -1
  87. package/dist/keys/spaceEpochs.d.ts +1 -1
  88. package/dist/keys/spaceEpochs.js +1 -1
  89. package/dist/keys/userKeyRoster.d.ts +3 -3
  90. package/dist/keys/userKeyRoster.d.ts.map +1 -1
  91. package/dist/keys/userKeyRoster.js +3 -3
  92. package/dist/keys/userKeyRoster.js.map +1 -1
  93. package/dist/log.d.ts +49 -0
  94. package/dist/log.d.ts.map +1 -0
  95. package/dist/log.js +53 -0
  96. package/dist/log.js.map +1 -0
  97. package/dist/recovery/index.d.ts +2 -2
  98. package/dist/recovery/index.js +2 -2
  99. package/dist/recovery/recoveryDelegation.d.ts +6 -2
  100. package/dist/recovery/recoveryDelegation.d.ts.map +1 -1
  101. package/dist/recovery/recoveryDelegation.js +32 -6
  102. package/dist/recovery/recoveryDelegation.js.map +1 -1
  103. package/dist/recovery/recoveryWebvh.d.ts +67 -8
  104. package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
  105. package/dist/recovery/recoveryWebvh.js +114 -19
  106. package/dist/recovery/recoveryWebvh.js.map +1 -1
  107. package/dist/request/appKey.d.ts +9 -3
  108. package/dist/request/appKey.d.ts.map +1 -1
  109. package/dist/request/appKey.js +13 -8
  110. package/dist/request/appKey.js.map +1 -1
  111. package/dist/request/capabilityRequest.d.ts +9 -1
  112. package/dist/request/capabilityRequest.d.ts.map +1 -1
  113. package/dist/request/capabilityRequest.js +13 -2
  114. package/dist/request/capabilityRequest.js.map +1 -1
  115. package/dist/request/classify.d.ts +37 -1
  116. package/dist/request/classify.d.ts.map +1 -1
  117. package/dist/request/classify.js +74 -3
  118. package/dist/request/classify.js.map +1 -1
  119. package/dist/request/ephemeralExchange.d.ts +5 -18
  120. package/dist/request/ephemeralExchange.d.ts.map +1 -1
  121. package/dist/request/ephemeralExchange.js +9 -3
  122. package/dist/request/ephemeralExchange.js.map +1 -1
  123. package/dist/request/exchangeClient.d.ts +0 -23
  124. package/dist/request/exchangeClient.d.ts.map +1 -1
  125. package/dist/request/exchangeClient.js +30 -1
  126. package/dist/request/exchangeClient.js.map +1 -1
  127. package/dist/request/index.d.ts +4 -1
  128. package/dist/request/index.d.ts.map +1 -1
  129. package/dist/request/index.js +4 -1
  130. package/dist/request/index.js.map +1 -1
  131. package/dist/request/interactionRequest.d.ts +23 -0
  132. package/dist/request/interactionRequest.d.ts.map +1 -0
  133. package/dist/request/interactionRequest.js +46 -0
  134. package/dist/request/interactionRequest.js.map +1 -0
  135. package/dist/request/interactionUrl.d.ts +3 -14
  136. package/dist/request/interactionUrl.d.ts.map +1 -1
  137. package/dist/request/interactionUrl.js +24 -3
  138. package/dist/request/interactionUrl.js.map +1 -1
  139. package/dist/request/parse.d.ts +0 -10
  140. package/dist/request/parse.d.ts.map +1 -1
  141. package/dist/request/parse.js +15 -1
  142. package/dist/request/parse.js.map +1 -1
  143. package/dist/request/processRequest.d.ts.map +1 -1
  144. package/dist/request/processRequest.js +2 -1
  145. package/dist/request/processRequest.js.map +1 -1
  146. package/dist/request/types.d.ts +23 -2
  147. package/dist/request/types.d.ts.map +1 -1
  148. package/dist/resourceLog/controller.d.ts +48 -49
  149. package/dist/resourceLog/controller.d.ts.map +1 -1
  150. package/dist/resourceLog/controller.js +41 -20
  151. package/dist/resourceLog/controller.js.map +1 -1
  152. package/dist/resourceLog/errors.d.ts +12 -78
  153. package/dist/resourceLog/errors.d.ts.map +1 -1
  154. package/dist/resourceLog/errors.js +12 -79
  155. package/dist/resourceLog/errors.js.map +1 -1
  156. package/dist/resourceLog/index.d.ts +17 -22
  157. package/dist/resourceLog/index.d.ts.map +1 -1
  158. package/dist/resourceLog/index.js +16 -21
  159. package/dist/resourceLog/index.js.map +1 -1
  160. package/dist/resourceLog/license.d.ts +42 -27
  161. package/dist/resourceLog/license.d.ts.map +1 -1
  162. package/dist/resourceLog/license.js +53 -30
  163. package/dist/resourceLog/license.js.map +1 -1
  164. package/dist/space/activity.d.ts +48 -1
  165. package/dist/space/activity.d.ts.map +1 -1
  166. package/dist/space/activity.js +52 -4
  167. package/dist/space/activity.js.map +1 -1
  168. package/dist/space/index.d.ts +1 -1
  169. package/dist/space/index.d.ts.map +1 -1
  170. package/dist/space/index.js +1 -1
  171. package/dist/space/index.js.map +1 -1
  172. package/dist/sync/pull.d.ts +0 -22
  173. package/dist/sync/pull.d.ts.map +1 -1
  174. package/dist/sync/pull.js +30 -2
  175. package/dist/sync/pull.js.map +1 -1
  176. package/dist/unlock/index.d.ts +7 -7
  177. package/dist/unlock/index.d.ts.map +1 -1
  178. package/dist/unlock/index.js +6 -6
  179. package/dist/unlock/index.js.map +1 -1
  180. package/dist/unlock/retire.d.ts +29 -28
  181. package/dist/unlock/retire.d.ts.map +1 -1
  182. package/dist/unlock/retire.js +25 -16
  183. package/dist/unlock/retire.js.map +1 -1
  184. package/dist/unlock/standingClient.d.ts +1 -1
  185. package/dist/unlock/standingClient.js +3 -3
  186. package/dist/unlock/standingWebvh.d.ts +28 -10
  187. package/dist/unlock/standingWebvh.d.ts.map +1 -1
  188. package/dist/unlock/standingWebvh.js +75 -37
  189. package/dist/unlock/standingWebvh.js.map +1 -1
  190. package/dist/unlock/unlockRecord.d.ts +37 -0
  191. package/dist/unlock/unlockRecord.d.ts.map +1 -1
  192. package/dist/unlock/unlockRecord.js +54 -1
  193. package/dist/unlock/unlockRecord.js.map +1 -1
  194. package/dist/webvh/delegatedLogStore.d.ts +2 -2
  195. package/dist/webvh/delegatedLogStore.js +2 -2
  196. package/dist/webvh/didWeb.js +1 -1
  197. package/dist/webvh/didWeb.js.map +1 -1
  198. package/dist/webvh/didWebvh.d.ts +33 -3
  199. package/dist/webvh/didWebvh.d.ts.map +1 -1
  200. package/dist/webvh/didWebvh.js +40 -11
  201. package/dist/webvh/didWebvh.js.map +1 -1
  202. package/dist/webvh/index.d.ts +1 -1
  203. package/dist/webvh/index.d.ts.map +1 -1
  204. package/dist/webvh/index.js +1 -1
  205. package/dist/webvh/index.js.map +1 -1
  206. package/dist/webvh/listClients.js +1 -1
  207. package/dist/webvh/listClients.js.map +1 -1
  208. package/dist/webvh/verifyLog.d.ts +1 -1
  209. package/dist/webvh/verifyLog.d.ts.map +1 -1
  210. package/dist/webvh/verifyLog.js +1 -2
  211. package/dist/webvh/verifyLog.js.map +1 -1
  212. package/package.json +9 -11
  213. package/dist/display/alignment.d.ts +0 -55
  214. package/dist/display/alignment.d.ts.map +0 -1
  215. package/dist/display/alignment.js +0 -117
  216. package/dist/display/alignment.js.map +0 -1
  217. package/dist/display/credentialName.d.ts +0 -42
  218. package/dist/display/credentialName.d.ts.map +0 -1
  219. package/dist/display/credentialName.js +0 -106
  220. package/dist/display/credentialName.js.map +0 -1
  221. package/dist/display/displayFields.d.ts +0 -59
  222. package/dist/display/displayFields.d.ts.map +0 -1
  223. package/dist/display/displayFields.js +0 -136
  224. package/dist/display/displayFields.js.map +0 -1
  225. package/dist/display/evidence.d.ts +0 -50
  226. package/dist/display/evidence.d.ts.map +0 -1
  227. package/dist/display/evidence.js +0 -67
  228. package/dist/display/evidence.js.map +0 -1
  229. package/dist/display/image.d.ts +0 -18
  230. package/dist/display/image.d.ts.map +0 -1
  231. package/dist/display/image.js +0 -23
  232. package/dist/display/image.js.map +0 -1
  233. package/dist/display/index.d.ts +0 -38
  234. package/dist/display/index.d.ts.map +0 -1
  235. package/dist/display/index.js +0 -32
  236. package/dist/display/index.js.map +0 -1
  237. package/dist/display/issuer.d.ts +0 -105
  238. package/dist/display/issuer.d.ts.map +0 -1
  239. package/dist/display/issuer.js +0 -126
  240. package/dist/display/issuer.js.map +0 -1
  241. package/dist/display/obv3.d.ts +0 -82
  242. package/dist/display/obv3.d.ts.map +0 -1
  243. package/dist/display/obv3.js +0 -117
  244. package/dist/display/obv3.js.map +0 -1
  245. package/dist/display/parse.d.ts +0 -66
  246. package/dist/display/parse.d.ts.map +0 -1
  247. package/dist/display/parse.js +0 -104
  248. package/dist/display/parse.js.map +0 -1
  249. package/dist/display/subject.d.ts +0 -79
  250. package/dist/display/subject.d.ts.map +0 -1
  251. package/dist/display/subject.js +0 -124
  252. package/dist/display/subject.js.map +0 -1
  253. package/dist/display/text.d.ts +0 -53
  254. package/dist/display/text.d.ts.map +0 -1
  255. package/dist/display/text.js +0 -78
  256. package/dist/display/text.js.map +0 -1
  257. package/dist/display/types.d.ts +0 -55
  258. package/dist/display/types.d.ts.map +0 -1
  259. package/dist/display/types.js +0 -41
  260. package/dist/display/types.js.map +0 -1
  261. package/dist/display/validity.d.ts +0 -51
  262. package/dist/display/validity.d.ts.map +0 -1
  263. package/dist/display/validity.js +0 -51
  264. package/dist/display/validity.js.map +0 -1
  265. package/dist/display/verificationView.d.ts +0 -115
  266. package/dist/display/verificationView.d.ts.map +0 -1
  267. package/dist/display/verificationView.js +0 -199
  268. package/dist/display/verificationView.js.map +0 -1
  269. package/dist/resourceLog/append.d.ts +0 -112
  270. package/dist/resourceLog/append.d.ts.map +0 -1
  271. package/dist/resourceLog/append.js +0 -197
  272. package/dist/resourceLog/append.js.map +0 -1
  273. package/dist/resourceLog/entry.d.ts +0 -68
  274. package/dist/resourceLog/entry.d.ts.map +0 -1
  275. package/dist/resourceLog/entry.js +0 -167
  276. package/dist/resourceLog/entry.js.map +0 -1
  277. package/dist/resourceLog/pin.d.ts +0 -82
  278. package/dist/resourceLog/pin.d.ts.map +0 -1
  279. package/dist/resourceLog/pin.js +0 -57
  280. package/dist/resourceLog/pin.js.map +0 -1
  281. package/dist/resourceLog/seal.d.ts +0 -97
  282. package/dist/resourceLog/seal.d.ts.map +0 -1
  283. package/dist/resourceLog/seal.js +0 -113
  284. package/dist/resourceLog/seal.js.map +0 -1
  285. package/dist/resourceLog/verify.d.ts +0 -96
  286. package/dist/resourceLog/verify.d.ts.map +0 -1
  287. package/dist/resourceLog/verify.js +0 -474
  288. package/dist/resourceLog/verify.js.map +0 -1
  289. package/dist/resourceLog/vmFragment.d.ts +0 -33
  290. package/dist/resourceLog/vmFragment.d.ts.map +0 -1
  291. package/dist/resourceLog/vmFragment.js +0 -39
  292. package/dist/resourceLog/vmFragment.js.map +0 -1
@@ -1,4 +1,5 @@
1
- import { ResourceLogIntegrityError } from './errors.js';
1
+ import { ResourceLogIntegrityError } from '@interop/vh-resource-log';
2
+ import { assertLadderAppendLicensed } from './license.js';
2
3
  /**
3
4
  * Resolves one relation entry: an embedded verification method verbatim, a
4
5
  * string reference through the given `verificationMethod` index.
@@ -55,21 +56,21 @@ function assertionKeysOf(doc) {
55
56
  return keys;
56
57
  }
57
58
  /**
58
- * Collects a document's credential-posture view (see
59
- * {@link ControllerPosture}): the ladder VMs by relation asymmetry
59
+ * Collects a document's credential-inventory view (see
60
+ * {@link ControllerInventory}): the ladder VMs by relation asymmetry
60
61
  * (`capabilityDelegation` members absent from `capabilityInvocation`,
61
62
  * compared by verification-method id), and S(V) as the account-controlled
62
63
  * `keyAgreement` methods' key material -- `publicKeyCommitment` where the
63
64
  * entry is a commitment, `publicKeyMultibase` where it is verbatim (the two
64
65
  * value spaces are disjoint) -- union the ladder keys. A `keyAgreement`
65
66
  * method carrying neither is skipped: an unidentifiable entry must not make
66
- * two distinct postures compare equal.
67
+ * two distinct inventories compare equal.
67
68
  *
68
69
  * @param doc {ControllerDocument}
69
- * @param did {string} the account DID posture entries are controlled by
70
- * @returns {ControllerPosture}
70
+ * @param did {string} the account DID inventory entries are controlled by
71
+ * @returns {ControllerInventory}
71
72
  */
72
- function postureOf(doc, did) {
73
+ function inventoryOf(doc, did) {
73
74
  const byId = methodsById(doc);
74
75
  const invocable = new Set();
75
76
  for (const entry of doc.capabilityInvocation ?? []) {
@@ -89,20 +90,20 @@ function postureOf(doc, did) {
89
90
  ladderKeys.add(method.publicKeyMultibase);
90
91
  }
91
92
  }
92
- const postureKeys = new Set(ladderKeys);
93
+ const inventoryKeys = new Set(ladderKeys);
93
94
  for (const entry of doc.keyAgreement ?? []) {
94
95
  const method = resolveMethod(entry, byId);
95
96
  if (!method || method.controller !== did) {
96
97
  continue;
97
98
  }
98
99
  if (typeof method.publicKeyCommitment === 'string') {
99
- postureKeys.add(method.publicKeyCommitment);
100
+ inventoryKeys.add(method.publicKeyCommitment);
100
101
  }
101
102
  else if (typeof method.publicKeyMultibase === 'string') {
102
- postureKeys.add(method.publicKeyMultibase);
103
+ inventoryKeys.add(method.publicKeyMultibase);
103
104
  }
104
105
  }
105
- return { ladderKeys, postureKeys };
106
+ return { ladderKeys, inventoryKeys };
106
107
  }
107
108
  /**
108
109
  * Builds the controller view over an already-verified did:webvh account log
@@ -110,30 +111,38 @@ function postureOf(doc, did) {
110
111
  * not verified against the account pointer). Because every verified entry
111
112
  * carries its resolved document in `state`, the per-version `assertionMethod`
112
113
  * sets are read straight off those entries in one linear pass over the log
113
- * rather than replaying resolution once per version. An anchored lookup at a
114
- * version the log does not carry refuses instead of guessing, and `undefined`
114
+ * rather than replaying resolution once per version. A lookup at a version
115
+ * the log does not carry refuses instead of guessing, and `undefined`
115
116
  * answers from the last entry (the current document).
116
117
  *
118
+ * The returned view carries the `admitAppend` hook: it resolves the
119
+ * inventory at the proof's controller versionId, and where the signing key
120
+ * is a ladder VM there it runs the ceremony-tail license
121
+ * (`assertLadderAppendLicensed`) --
122
+ * so ordinary client-signed appends admit untouched, and a ladder-signed
123
+ * append outside the license refuses with `ResourceLogLicenseError`,
124
+ * propagated with its class intact by the library's verifier.
125
+ *
117
126
  * @param options {object}
118
127
  * @param options.did {string} the account's did:webvh, as verified
119
128
  * @param options.log {DIDLog} the verified account log
120
- * @returns {ResourceLogController}
129
+ * @returns {WebvhResourceLogController}
121
130
  */
122
131
  export function webvhResourceLogController({ did, log }) {
123
132
  const versionIds = log.map(entry => entry.versionId);
124
133
  const keysByVersion = new Map();
125
- const postureByVersion = new Map();
134
+ const inventoryByVersion = new Map();
126
135
  for (const entry of log) {
127
136
  const doc = entry.state;
128
137
  keysByVersion.set(entry.versionId, assertionKeysOf(doc));
129
- postureByVersion.set(entry.versionId, postureOf(doc, did));
138
+ inventoryByVersion.set(entry.versionId, inventoryOf(doc, did));
130
139
  }
131
140
  const head = log.length === 0 ? undefined : log[log.length - 1];
132
141
  function versionRefusal(versionId) {
133
142
  return new ResourceLogIntegrityError(`The controller document did not resolve at version ` +
134
143
  `"${versionId ?? '<head>'}" (no document returned).`);
135
144
  }
136
- return {
145
+ const view = {
137
146
  did,
138
147
  versionIds,
139
148
  assertionKeysAt(versionId) {
@@ -145,15 +154,27 @@ export function webvhResourceLogController({ did, log }) {
145
154
  }
146
155
  return Promise.resolve(resolved);
147
156
  },
148
- postureAt(versionId) {
157
+ inventoryAt(versionId) {
149
158
  const resolved = versionId === undefined
150
- ? head && postureByVersion.get(head.versionId)
151
- : postureByVersion.get(versionId);
159
+ ? head && inventoryByVersion.get(head.versionId)
160
+ : inventoryByVersion.get(versionId);
152
161
  if (!resolved) {
153
162
  return Promise.reject(versionRefusal(versionId));
154
163
  }
155
164
  return Promise.resolve(resolved);
165
+ },
166
+ async admitAppend({ keyMultibase, controllerVersionId, controllerVersionIndex, headControllerVersionIndex, proofKeys }) {
167
+ const inventory = await view.inventoryAt(controllerVersionId);
168
+ if (inventory.ladderKeys.has(keyMultibase)) {
169
+ await assertLadderAppendLicensed({
170
+ controller: view,
171
+ controllerVersionIndex,
172
+ headControllerVersionIndex,
173
+ proofKeys
174
+ });
175
+ }
156
176
  }
157
177
  };
178
+ return view;
158
179
  }
159
180
  //# sourceMappingURL=controller.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"controller.js","sourceRoot":"","sources":["../../src/resourceLog/controller.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;AAmFvD;;;;;;;GAOG;AACH,SAAS,aAAa,CACpB,KAA4C,EAC5C,IAA+C;IAE/C,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAA;AAC5D,CAAC;AAED;;;;;GAKG;AACH,SAAS,WAAW,CAClB,GAAuB;IAEvB,MAAM,IAAI,GAAG,IAAI,GAAG,EAAwC,CAAA;IAC5D,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,OAAO,IAAI,CAAA;AACb,CAAC;AAED;;;;;;GAMG;AACH,SAAS,YAAY,CACnB,KAA4C;IAE5C,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,CAAA;AACtD,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,eAAe,CAAC,GAAuB;IAC9C,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,CAAC,CAAA;IAC7B,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAA;IAC9B,KAAK,MAAM,KAAK,IAAI,GAAG,CAAC,eAAe,IAAI,EAAE,EAAE,CAAC;QAC9C,MAAM,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CAAC,CAAA;YACJ,CAAC;QACH,CAAC;KACF,CAAA;IACD,OAAO,IAAI,CAAA;AACb,CAAC"}
@@ -2,73 +2,24 @@
2
2
  * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
3
  */
4
4
  /**
5
- * The resource-log refusal taxonomy, carried over from the roster's WC-1
6
- * detached-signature design onto the log design. Two adversarial classes plus
7
- * two admission refusals:
8
- *
9
- * - {@link ResourceLogIntegrityError} -- fabrication: the served log fails
10
- * verification on its own terms (parse shape, SCID, chain hashes, proofs,
11
- * or the external-authorization rule). Whoever produced it could not make a
12
- * log the account's clients would have made.
13
- * - {@link ResourceLogContinuityError} -- a served log that verifies but
14
- * conflicts with what this client has already accepted: a rollback behind
15
- * the chain-head pin, a fork off the pinned history, or an SCID/method
16
- * switch outside a verified handover. The log may be internally consistent;
17
- * it is not the continuation of the history this client pinned.
18
- * - {@link ResourceLogClosedError} -- an append refused because the verified
19
- * head is a terminal handover entry. Not an attack: the log's own authors
20
- * closed it, and a verifier of this profile must refuse to extend a closed
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.
5
+ * The one refusal class the resource-log layer still owns after the generic
6
+ * client side moved to `@interop/vh-resource-log`: the ceremony-tail license
7
+ * refusal. The generic taxonomy (`ResourceLogIntegrityError`,
8
+ * `ResourceLogContinuityError`, `ResourceLogClosedError`,
9
+ * `LogNotConfirmedError`, and the store port's `ResourceLogConflictError`)
10
+ * is the library's; wallet-core re-exports none of it -- one owner per name.
11
+ * Like every class in that taxonomy, this one assigns its `name` string
12
+ * explicitly and is matched by `err.name` across package boundaries (the
13
+ * WC-64 rule; minified class names do not survive bundling).
28
14
  */
29
- /**
30
- * A served log failed verification: malformed entries, a non-verifying SCID,
31
- * a broken hash chain, a failing proof, or a signer the controller document
32
- * does not back at the entry's anchored version. Fabrication-class: refused
33
- * as something no enrolled client produced.
34
- */
35
- export declare class ResourceLogIntegrityError extends Error {
36
- constructor(message: string, options?: {
37
- cause?: unknown;
38
- });
39
- }
40
- /**
41
- * A served log conflicts with this client's chain-head pin: `rollback` (the
42
- * served head is behind the pinned head -- possibly replication lag; the pin
43
- * is never regressed and the caller may retry), `fork` (the served log
44
- * diverges from the pinned history -- both logs are transferable evidence of
45
- * equivocation, so the served entries ride along), `scid-switch` /
46
- * `method-switch` (a different log identity or format under the pinned
47
- * location, outside a verified handover).
48
- */
49
- export declare class ResourceLogContinuityError extends Error {
50
- reason: 'rollback' | 'fork' | 'scid-switch' | 'method-switch';
51
- pinnedHead: string;
52
- /**
53
- * On a `fork`, the full served log retained as evidence: every entry is
54
- * signed, so a conflicting pair of logs under one SCID is transferable,
55
- * independently verifiable proof of equivocation.
56
- */
57
- servedEntries?: unknown[];
58
- constructor({ reason, pinnedHead, servedEntries }: {
59
- reason: 'rollback' | 'fork' | 'scid-switch' | 'method-switch';
60
- pinnedHead: string;
61
- servedEntries?: unknown[];
62
- });
63
- }
64
15
  /**
65
16
  * 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
17
+ * log's first entry, and it does not carry an inventory-changing controller
18
+ * document version no verified entry already carries at or past. Above all
68
19
  * this refuses the silent-rekey shape -- a ladder-signed rotation against an
69
20
  * unchanged document. Write-time admission class: the log is not corrupt and
70
21
  * whoever signed the append genuinely holds the credential; the append is
71
- * merely unlicensed, and a retry after a posture-changing document entry may
22
+ * merely unlicensed, and a retry after a inventory-changing document entry may
72
23
  * succeed.
73
24
  */
74
25
  export declare class ResourceLogLicenseError extends Error {
@@ -76,21 +27,4 @@ export declare class ResourceLogLicenseError extends Error {
76
27
  cause?: unknown;
77
28
  });
78
29
  }
79
- /**
80
- * An append was refused because the log's verified head is a terminal
81
- * handover entry: the log is closed and names a successor, and this profile
82
- * forbids extending a history its authors have closed.
83
- */
84
- export declare class ResourceLogClosedError extends Error {
85
- nextLog: {
86
- method: string;
87
- scid: string;
88
- };
89
- constructor({ nextLog }: {
90
- nextLog: {
91
- method: string;
92
- scid: string;
93
- };
94
- });
95
- }
96
30
  //# sourceMappingURL=errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/resourceLog/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH;;;;;GAKG;AACH,qBAAa,yBAA0B,SAAQ,KAAK;gBACtC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;CAI3D;AAED;;;;;;;;GAQG;AACH,qBAAa,0BAA2B,SAAQ,KAAK;IACnD,MAAM,EAAE,UAAU,GAAG,MAAM,GAAG,aAAa,GAAG,eAAe,CAAA;IAC7D,UAAU,EAAE,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"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/resourceLog/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;GAUG;AAEH;;;;;;;;;GASG;AACH,qBAAa,uBAAwB,SAAQ,KAAK;gBACpC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;CAI3D"}
@@ -2,77 +2,24 @@
2
2
  * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
3
  */
4
4
  /**
5
- * The resource-log refusal taxonomy, carried over from the roster's WC-1
6
- * detached-signature design onto the log design. Two adversarial classes plus
7
- * two admission refusals:
8
- *
9
- * - {@link ResourceLogIntegrityError} -- fabrication: the served log fails
10
- * verification on its own terms (parse shape, SCID, chain hashes, proofs,
11
- * or the external-authorization rule). Whoever produced it could not make a
12
- * log the account's clients would have made.
13
- * - {@link ResourceLogContinuityError} -- a served log that verifies but
14
- * conflicts with what this client has already accepted: a rollback behind
15
- * the chain-head pin, a fork off the pinned history, or an SCID/method
16
- * switch outside a verified handover. The log may be internally consistent;
17
- * it is not the continuation of the history this client pinned.
18
- * - {@link ResourceLogClosedError} -- an append refused because the verified
19
- * head is a terminal handover entry. Not an attack: the log's own authors
20
- * closed it, and a verifier of this profile must refuse to extend a closed
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.
5
+ * The one refusal class the resource-log layer still owns after the generic
6
+ * client side moved to `@interop/vh-resource-log`: the ceremony-tail license
7
+ * refusal. The generic taxonomy (`ResourceLogIntegrityError`,
8
+ * `ResourceLogContinuityError`, `ResourceLogClosedError`,
9
+ * `LogNotConfirmedError`, and the store port's `ResourceLogConflictError`)
10
+ * is the library's; wallet-core re-exports none of it -- one owner per name.
11
+ * Like every class in that taxonomy, this one assigns its `name` string
12
+ * explicitly and is matched by `err.name` across package boundaries (the
13
+ * WC-64 rule; minified class names do not survive bundling).
28
14
  */
29
- /**
30
- * A served log failed verification: malformed entries, a non-verifying SCID,
31
- * a broken hash chain, a failing proof, or a signer the controller document
32
- * does not back at the entry's anchored version. Fabrication-class: refused
33
- * as something no enrolled client produced.
34
- */
35
- export class ResourceLogIntegrityError extends Error {
36
- constructor(message, options) {
37
- super(message, options);
38
- this.name = 'ResourceLogIntegrityError';
39
- }
40
- }
41
- /**
42
- * A served log conflicts with this client's chain-head pin: `rollback` (the
43
- * served head is behind the pinned head -- possibly replication lag; the pin
44
- * is never regressed and the caller may retry), `fork` (the served log
45
- * diverges from the pinned history -- both logs are transferable evidence of
46
- * equivocation, so the served entries ride along), `scid-switch` /
47
- * `method-switch` (a different log identity or format under the pinned
48
- * location, outside a verified handover).
49
- */
50
- export class ResourceLogContinuityError extends Error {
51
- reason;
52
- pinnedHead;
53
- /**
54
- * On a `fork`, the full served log retained as evidence: every entry is
55
- * signed, so a conflicting pair of logs under one SCID is transferable,
56
- * independently verifiable proof of equivocation.
57
- */
58
- servedEntries;
59
- constructor({ reason, pinnedHead, servedEntries }) {
60
- super(`The served resource log is not a continuation of the pinned history ` +
61
- `(${reason}; pinned head ${pinnedHead}).`);
62
- this.name = 'ResourceLogContinuityError';
63
- this.reason = reason;
64
- this.pinnedHead = pinnedHead;
65
- this.servedEntries = servedEntries;
66
- }
67
- }
68
15
  /**
69
16
  * 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
17
+ * log's first entry, and it does not carry an inventory-changing controller
18
+ * document version no verified entry already carries at or past. Above all
72
19
  * this refuses the silent-rekey shape -- a ladder-signed rotation against an
73
20
  * unchanged document. Write-time admission class: the log is not corrupt and
74
21
  * whoever signed the append genuinely holds the credential; the append is
75
- * merely unlicensed, and a retry after a posture-changing document entry may
22
+ * merely unlicensed, and a retry after a inventory-changing document entry may
76
23
  * succeed.
77
24
  */
78
25
  export class ResourceLogLicenseError extends Error {
@@ -81,18 +28,4 @@ export class ResourceLogLicenseError extends Error {
81
28
  this.name = 'ResourceLogLicenseError';
82
29
  }
83
30
  }
84
- /**
85
- * An append was refused because the log's verified head is a terminal
86
- * handover entry: the log is closed and names a successor, and this profile
87
- * forbids extending a history its authors have closed.
88
- */
89
- export class ResourceLogClosedError extends Error {
90
- nextLog;
91
- constructor({ nextLog }) {
92
- super('The resource log is closed by a terminal handover entry; appends must ' +
93
- 'go to its successor log.');
94
- this.name = 'ResourceLogClosedError';
95
- this.nextLog = nextLog;
96
- }
97
- }
98
31
  //# sourceMappingURL=errors.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/resourceLog/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;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,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAC5B,IAAI,CAAC,aAAa,GAAG,aAAa,CAAA;IACpC,CAAC;CACF;AAED;;;;;;;;;GASG;AACH,MAAM,OAAO,uBAAwB,SAAQ,KAAK;IAChD,YAAY,OAAe,EAAE,OAA6B;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"}
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/resourceLog/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;GAUG;AAEH;;;;;;;;;GASG;AACH,MAAM,OAAO,uBAAwB,SAAQ,KAAK;IAChD,YAAY,OAAe,EAAE,OAA6B;QACxD,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;QACvB,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAA;IACvC,CAAC;CACF"}
@@ -2,28 +2,23 @@
2
2
  * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
3
  */
4
4
  /**
5
- * The `@interop/wallet-core/resourceLog` entry: the client side of the
6
- * Resource Log Profile (App Connect spec `#resource-log-profile`) -- full
7
- * chain verification against an adversarial host (parse shape, SCID and
8
- * entry-hash recomputation, entry proofs, the external-authorization rule
9
- * against the independently verified did:webvh controller document, terminal
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).
15
- * Transport (JSON Lines, the store seam, the projection write) lives in
16
- * `@interop/was-client/log`; the hashing and proof kernel in
17
- * `@interop/did-method-webvh`. Kept out of the root export: this subpath
18
- * pulls the did:webvh and ed25519 dependency graph.
5
+ * The `@interop/wallet-core/resourceLog` entry: the wallet-domain residue of
6
+ * the Resource Log Profile's client side after the generic half moved to
7
+ * `@interop/vh-resource-log` -- the did:webvh controller adapter (the
8
+ * library's controller port extended with the per-version
9
+ * credential-inventory view, supplying the mandatory `admitAppend` admission
10
+ * hook), and the ceremony-tail license the hook carries
11
+ * (`assertLadderAppendLicensed`, refusing with `ResourceLogLicenseError`).
12
+ * Everything generic -- the JSON Lines codec, the store port and
13
+ * `confirmAppend`, chain verification, the chain-head pin
14
+ * (`ResourceLogPinStore` and `resourceLogPinId`; the named slot-key builders
15
+ * stay on their owning subpaths: `accountLogPinId` in `webvh`,
16
+ * `userKeyRosterPinId` in `keys`, `clientAnnexLogPinId` in `clientAnnex`),
17
+ * the append path, and the sealing sweep -- lives in the library, and this
18
+ * subpath re-exports none of it: one owner per name. Kept out of the root
19
+ * export: this subpath pulls the did:webvh and ed25519 dependency graph.
19
20
  */
20
- export { webvhResourceLogController, type ControllerPosture, type ResourceLogController } from './controller.js';
21
- export { ResourceLogClosedError, ResourceLogContinuityError, ResourceLogIntegrityError, ResourceLogLicenseError } from './errors.js';
21
+ export { webvhResourceLogController, type ControllerInventory, type WebvhResourceLogController } from './controller.js';
22
+ export { ResourceLogLicenseError } from './errors.js';
22
23
  export { assertLadderAppendLicensed } from './license.js';
23
- export { buildResourceLogEntry, buildResourceLogGenesis, type ResourceLogSigner } from './entry.js';
24
- export { memoryResourceLogPinStore, resourceLogPinId, type ResourceLogHeadPin, type ResourceLogPinStore } from './pin.js';
25
- export { isTerminalResourceLogEntry, verifyResourceLog, verifyResourceLogHandover, type VerifiedResourceLog } from './verify.js';
26
- export { appendResourceLog, createResourceLog, readResourceLog } from './append.js';
27
- export { latestAssertionRemovalIndex, sealResourceLog } from './seal.js';
28
- export { vmFragmentOf } from './vmFragment.js';
29
24
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resourceLog/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EACL,0BAA0B,EAC1B,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAChC,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AACrD,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAA"}
@@ -2,28 +2,23 @@
2
2
  * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
3
  */
4
4
  /**
5
- * The `@interop/wallet-core/resourceLog` entry: the client side of the
6
- * Resource Log Profile (App Connect spec `#resource-log-profile`) -- full
7
- * chain verification against an adversarial host (parse shape, SCID and
8
- * entry-hash recomputation, entry proofs, the external-authorization rule
9
- * against the independently verified did:webvh controller document, terminal
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).
15
- * Transport (JSON Lines, the store seam, the projection write) lives in
16
- * `@interop/was-client/log`; the hashing and proof kernel in
17
- * `@interop/did-method-webvh`. Kept out of the root export: this subpath
18
- * pulls the did:webvh and ed25519 dependency graph.
5
+ * The `@interop/wallet-core/resourceLog` entry: the wallet-domain residue of
6
+ * the Resource Log Profile's client side after the generic half moved to
7
+ * `@interop/vh-resource-log` -- the did:webvh controller adapter (the
8
+ * library's controller port extended with the per-version
9
+ * credential-inventory view, supplying the mandatory `admitAppend` admission
10
+ * hook), and the ceremony-tail license the hook carries
11
+ * (`assertLadderAppendLicensed`, refusing with `ResourceLogLicenseError`).
12
+ * Everything generic -- the JSON Lines codec, the store port and
13
+ * `confirmAppend`, chain verification, the chain-head pin
14
+ * (`ResourceLogPinStore` and `resourceLogPinId`; the named slot-key builders
15
+ * stay on their owning subpaths: `accountLogPinId` in `webvh`,
16
+ * `userKeyRosterPinId` in `keys`, `clientAnnexLogPinId` in `clientAnnex`),
17
+ * the append path, and the sealing sweep -- lives in the library, and this
18
+ * subpath re-exports none of it: one owner per name. Kept out of the root
19
+ * export: this subpath pulls the did:webvh and ed25519 dependency graph.
19
20
  */
20
21
  export { webvhResourceLogController } from './controller.js';
21
- export { ResourceLogClosedError, ResourceLogContinuityError, ResourceLogIntegrityError, ResourceLogLicenseError } from './errors.js';
22
+ export { ResourceLogLicenseError } from './errors.js';
22
23
  export { assertLadderAppendLicensed } from './license.js';
23
- export { buildResourceLogEntry, buildResourceLogGenesis } from './entry.js';
24
- export { memoryResourceLogPinStore, resourceLogPinId } from './pin.js';
25
- export { isTerminalResourceLogEntry, verifyResourceLog, verifyResourceLogHandover } from './verify.js';
26
- export { appendResourceLog, createResourceLog, readResourceLog } from './append.js';
27
- export { latestAssertionRemovalIndex, sealResourceLog } from './seal.js';
28
- export { vmFragmentOf } from './vmFragment.js';
29
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resourceLog/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EACL,0BAA0B,EAG3B,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AACrD,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAA"}
@@ -4,41 +4,56 @@
4
4
  /**
5
5
  * The ceremony-tail license on ladder-signed resource-log appends (clause B
6
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 --
7
+ * in exactly two shapes: the log's first entry (creation, not extension --
8
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
9
+ * or a rotation that carries an inventory-changing controller document
10
+ * version, one-shot -- refused when the verified log head already carries
11
+ * an entry at that version or later. Both shapes carry a per-entry rule: at
12
+ * most one of an entry's proofs may be by a ladder key, so a second ladder
13
+ * key cannot co-sign its way around the one-shot. A rotation co-signed by an
14
+ * ordinary member stays licensed. Everything else, above all a rotation
12
15
  * 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
+ * {@link ResourceLogLicenseError}. Controller versions compare by position
17
+ * in the controller's verified version history, the structural twin of the
18
+ * sealing sweep's `headControllerVersionIndex >= removalIndex` check.
16
19
  */
17
- import type { ResourceLogController } from './controller.js';
20
+ import type { WebvhResourceLogController } from './controller.js';
18
21
  /**
19
22
  * 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.
23
+ * append: the append must carry an inventory-changing document version V --
24
+ * S(V) differs from S(V-1) in either direction, with S(-1) empty for the
25
+ * genesis version -- and no verified entry may already carry V or later
26
+ * (`headControllerVersionIndex >= controllerVersionIndex` refuses; the
27
+ * license is one-shot, so a torn ceremony's late-arriving tail still passes
28
+ * while a second rotation against the same version does not). A `null`
29
+ * controller version index (an unversioned controller, where no version
30
+ * exists to license against) is refused fail-closed.
31
+ *
32
+ * The one-shot is spent per entry, so the entry itself may carry at most one
33
+ * ladder-key proof: a second ladder key among `proofKeys` refuses, because
34
+ * every proof of an entry shares one controller version and two ladder
35
+ * signatures would otherwise spend the same version twice. Proof order does
36
+ * not matter -- `proofKeys` is read as a set, and the caller's hook runs on
37
+ * each proof, so the refusal lands on whichever ladder-key proof is admitted
38
+ * first. A ladder proof co-signed by an ordinary member is untouched.
28
39
  *
29
40
  * @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)
41
+ * @param options.controller {object} the verified controller view's
42
+ * version list and inventory accessor
43
+ * @param options.controllerVersionIndex {number | null} the append's
44
+ * controller version as an index into `controller.versionIds` (`null`:
45
+ * no controller version)
46
+ * @param options.headControllerVersionIndex {number | null} the verified
47
+ * log head's effective controller version index before this append
48
+ * (`null`: the log has no versioned entries yet)
49
+ * @param options.proofKeys {string[]} every signing-key multibase on the
50
+ * entry, distinct, read as a set
37
51
  * @returns {Promise<void>}
38
52
  */
39
- export declare function assertLadderAppendLicensed({ controller, anchorIndex, headAnchorIndex }: {
40
- controller: ResourceLogController;
41
- anchorIndex: number | null;
42
- headAnchorIndex: number | null;
53
+ export declare function assertLadderAppendLicensed({ controller, controllerVersionIndex, headControllerVersionIndex, proofKeys }: {
54
+ controller: Pick<WebvhResourceLogController, 'versionIds' | 'inventoryAt'>;
55
+ controllerVersionIndex: number | null;
56
+ headControllerVersionIndex: number | null;
57
+ proofKeys: string[];
43
58
  }): Promise<void>;
44
59
  //# sourceMappingURL=license.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"license.d.ts","sourceRoot":"","sources":["../../src/resourceLog/license.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAA;AAsBjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAsB,0BAA0B,CAAC,EAC/C,UAAU,EACV,sBAAsB,EACtB,0BAA0B,EAC1B,SAAS,EACV,EAAE;IACD,UAAU,EAAE,IAAI,CAAC,0BAA0B,EAAE,YAAY,GAAG,aAAa,CAAC,CAAA;IAC1E,sBAAsB,EAAE,MAAM,GAAG,IAAI,CAAA;IACrC,0BAA0B,EAAE,MAAM,GAAG,IAAI,CAAA;IACzC,SAAS,EAAE,MAAM,EAAE,CAAA;CACpB,GAAG,OAAO,CAAC,IAAI,CAAC,CAoDhB"}