@interop/wallet-core 0.67.0 → 0.69.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 (204) hide show
  1. package/README.md +14 -13
  2. package/dist/clientAnnex/credentialAnchoredGenesis.d.ts +12 -6
  3. package/dist/clientAnnex/credentialAnchoredGenesis.d.ts.map +1 -1
  4. package/dist/clientAnnex/credentialAnchoredGenesis.js +10 -7
  5. package/dist/clientAnnex/credentialAnchoredGenesis.js.map +1 -1
  6. package/dist/clientAnnex/establish.d.ts +11 -12
  7. package/dist/clientAnnex/establish.d.ts.map +1 -1
  8. package/dist/clientAnnex/establish.js +20 -30
  9. package/dist/clientAnnex/establish.js.map +1 -1
  10. package/dist/clientAnnex/forget.d.ts +7 -16
  11. package/dist/clientAnnex/forget.d.ts.map +1 -1
  12. package/dist/clientAnnex/forget.js +8 -18
  13. package/dist/clientAnnex/forget.js.map +1 -1
  14. package/dist/clientAnnex/forgetLast.d.ts +8 -17
  15. package/dist/clientAnnex/forgetLast.d.ts.map +1 -1
  16. package/dist/clientAnnex/forgetLast.js +19 -34
  17. package/dist/clientAnnex/forgetLast.js.map +1 -1
  18. package/dist/clientAnnex/gc.d.ts +26 -12
  19. package/dist/clientAnnex/gc.d.ts.map +1 -1
  20. package/dist/clientAnnex/gc.js +60 -57
  21. package/dist/clientAnnex/gc.js.map +1 -1
  22. package/dist/clientAnnex/heal.d.ts +3 -12
  23. package/dist/clientAnnex/heal.d.ts.map +1 -1
  24. package/dist/clientAnnex/heal.js +19 -32
  25. package/dist/clientAnnex/heal.js.map +1 -1
  26. package/dist/clientAnnex/index.d.ts +2 -2
  27. package/dist/clientAnnex/index.d.ts.map +1 -1
  28. package/dist/clientAnnex/index.js +1 -1
  29. package/dist/clientAnnex/index.js.map +1 -1
  30. package/dist/clientAnnex/ladderAnchored.d.ts +25 -70
  31. package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -1
  32. package/dist/clientAnnex/ladderAnchored.js +34 -83
  33. package/dist/clientAnnex/ladderAnchored.js.map +1 -1
  34. package/dist/clientAnnex/log.d.ts +55 -68
  35. package/dist/clientAnnex/log.d.ts.map +1 -1
  36. package/dist/clientAnnex/log.js +82 -111
  37. package/dist/clientAnnex/log.js.map +1 -1
  38. package/dist/clientAnnex/mend.d.ts +19 -8
  39. package/dist/clientAnnex/mend.d.ts.map +1 -1
  40. package/dist/clientAnnex/mend.js +89 -66
  41. package/dist/clientAnnex/mend.js.map +1 -1
  42. package/dist/clientAnnex/recoveryLadderAnchored.d.ts +5 -12
  43. package/dist/clientAnnex/recoveryLadderAnchored.d.ts.map +1 -1
  44. package/dist/clientAnnex/recoveryLadderAnchored.js +7 -13
  45. package/dist/clientAnnex/recoveryLadderAnchored.js.map +1 -1
  46. package/dist/clientAnnex/rosterDeliveredEpochs.d.ts +13 -14
  47. package/dist/clientAnnex/rosterDeliveredEpochs.d.ts.map +1 -1
  48. package/dist/clientAnnex/rosterDeliveredEpochs.js +12 -12
  49. package/dist/clientAnnex/rosterDeliveredEpochs.js.map +1 -1
  50. package/dist/clientAnnex/selfEnroll.d.ts +6 -10
  51. package/dist/clientAnnex/selfEnroll.d.ts.map +1 -1
  52. package/dist/clientAnnex/selfEnroll.js +12 -17
  53. package/dist/clientAnnex/selfEnroll.js.map +1 -1
  54. package/dist/descriptors/index.d.ts +21 -46
  55. package/dist/descriptors/index.d.ts.map +1 -1
  56. package/dist/descriptors/index.js +21 -45
  57. package/dist/descriptors/index.js.map +1 -1
  58. package/dist/descriptors/logSource.d.ts +45 -56
  59. package/dist/descriptors/logSource.d.ts.map +1 -1
  60. package/dist/descriptors/logSource.js +64 -74
  61. package/dist/descriptors/logSource.js.map +1 -1
  62. package/dist/genesis/accountGenesis.d.ts +15 -6
  63. package/dist/genesis/accountGenesis.d.ts.map +1 -1
  64. package/dist/genesis/accountGenesis.js +14 -7
  65. package/dist/genesis/accountGenesis.js.map +1 -1
  66. package/dist/keys/collectionLogStore.d.ts +73 -0
  67. package/dist/keys/collectionLogStore.d.ts.map +1 -0
  68. package/dist/keys/collectionLogStore.js +60 -0
  69. package/dist/keys/collectionLogStore.js.map +1 -0
  70. package/dist/keys/index.d.ts +18 -6
  71. package/dist/keys/index.d.ts.map +1 -1
  72. package/dist/keys/index.js +18 -6
  73. package/dist/keys/index.js.map +1 -1
  74. package/dist/keys/rosterLogStore.d.ts +44 -6
  75. package/dist/keys/rosterLogStore.d.ts.map +1 -1
  76. package/dist/keys/rosterLogStore.js +51 -238
  77. package/dist/keys/rosterLogStore.js.map +1 -1
  78. package/dist/keys/rosterStore.d.ts.map +1 -1
  79. package/dist/keys/rosterStore.js +2 -1
  80. package/dist/keys/rosterStore.js.map +1 -1
  81. package/dist/keys/spaceEpochs.d.ts +67 -34
  82. package/dist/keys/spaceEpochs.d.ts.map +1 -1
  83. package/dist/keys/spaceEpochs.js +80 -30
  84. package/dist/keys/spaceEpochs.js.map +1 -1
  85. package/dist/keys/userKeyCascade.d.ts +26 -1
  86. package/dist/keys/userKeyCascade.d.ts.map +1 -1
  87. package/dist/keys/userKeyCascade.js +29 -2
  88. package/dist/keys/userKeyCascade.js.map +1 -1
  89. package/dist/keys/userKeyRoster.d.ts +5 -0
  90. package/dist/keys/userKeyRoster.d.ts.map +1 -1
  91. package/dist/keys/userKeyRoster.js +5 -0
  92. package/dist/keys/userKeyRoster.js.map +1 -1
  93. package/dist/keys/userKeyRosterCascade.d.ts +54 -16
  94. package/dist/keys/userKeyRosterCascade.d.ts.map +1 -1
  95. package/dist/keys/userKeyRosterCascade.js +50 -22
  96. package/dist/keys/userKeyRosterCascade.js.map +1 -1
  97. package/dist/recovery/continuation.d.ts +2 -7
  98. package/dist/recovery/continuation.d.ts.map +1 -1
  99. package/dist/recovery/continuation.js +2 -6
  100. package/dist/recovery/continuation.js.map +1 -1
  101. package/dist/recovery/recoveryWebvh.d.ts +11 -25
  102. package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
  103. package/dist/recovery/recoveryWebvh.js +13 -26
  104. package/dist/recovery/recoveryWebvh.js.map +1 -1
  105. package/dist/resourceLog/controller.d.ts +18 -6
  106. package/dist/resourceLog/controller.d.ts.map +1 -1
  107. package/dist/resourceLog/controller.js +5 -3
  108. package/dist/resourceLog/controller.js.map +1 -1
  109. package/dist/resourceLog/errors.d.ts +17 -43
  110. package/dist/resourceLog/errors.d.ts.map +1 -1
  111. package/dist/resourceLog/errors.js +17 -50
  112. package/dist/resourceLog/errors.js.map +1 -1
  113. package/dist/resourceLog/index.d.ts +6 -3
  114. package/dist/resourceLog/index.d.ts.map +1 -1
  115. package/dist/resourceLog/index.js +6 -3
  116. package/dist/resourceLog/index.js.map +1 -1
  117. package/dist/resourceLog/logClass.d.ts +69 -0
  118. package/dist/resourceLog/logClass.d.ts.map +1 -0
  119. package/dist/resourceLog/logClass.js +43 -0
  120. package/dist/resourceLog/logClass.js.map +1 -0
  121. package/dist/space/collections.d.ts +22 -2
  122. package/dist/space/collections.d.ts.map +1 -1
  123. package/dist/space/collections.js +18 -0
  124. package/dist/space/collections.js.map +1 -1
  125. package/dist/space/index.d.ts +4 -3
  126. package/dist/space/index.d.ts.map +1 -1
  127. package/dist/space/index.js +4 -3
  128. package/dist/space/index.js.map +1 -1
  129. package/dist/space/provisioning.d.ts +16 -6
  130. package/dist/space/provisioning.d.ts.map +1 -1
  131. package/dist/space/provisioning.js +11 -7
  132. package/dist/space/provisioning.js.map +1 -1
  133. package/dist/sync/engine.d.ts +4 -2
  134. package/dist/sync/engine.d.ts.map +1 -1
  135. package/dist/sync/engine.js.map +1 -1
  136. package/dist/sync/index.d.ts +9 -6
  137. package/dist/sync/index.d.ts.map +1 -1
  138. package/dist/sync/index.js +8 -5
  139. package/dist/sync/index.js.map +1 -1
  140. package/dist/sync/push.d.ts +0 -29
  141. package/dist/sync/push.d.ts.map +1 -1
  142. package/dist/sync/push.js +30 -28
  143. package/dist/sync/push.js.map +1 -1
  144. package/dist/sync/types.d.ts +39 -21
  145. package/dist/sync/types.d.ts.map +1 -1
  146. package/dist/sync/types.js +13 -7
  147. package/dist/sync/types.js.map +1 -1
  148. package/dist/unlock/retire.d.ts +12 -13
  149. package/dist/unlock/retire.d.ts.map +1 -1
  150. package/dist/unlock/retire.js +12 -15
  151. package/dist/unlock/retire.js.map +1 -1
  152. package/dist/unlock/standingWebvh.d.ts +8 -22
  153. package/dist/unlock/standingWebvh.d.ts.map +1 -1
  154. package/dist/unlock/standingWebvh.js +7 -18
  155. package/dist/unlock/standingWebvh.js.map +1 -1
  156. package/dist/webvh/accountEntry.d.ts +5 -12
  157. package/dist/webvh/accountEntry.d.ts.map +1 -1
  158. package/dist/webvh/accountEntry.js +11 -22
  159. package/dist/webvh/accountEntry.js.map +1 -1
  160. package/dist/webvh/delegatedLogStore.d.ts +7 -2
  161. package/dist/webvh/delegatedLogStore.d.ts.map +1 -1
  162. package/dist/webvh/delegatedLogStore.js +9 -1
  163. package/dist/webvh/delegatedLogStore.js.map +1 -1
  164. package/dist/webvh/didWebvh.d.ts +69 -80
  165. package/dist/webvh/didWebvh.d.ts.map +1 -1
  166. package/dist/webvh/didWebvh.js +74 -117
  167. package/dist/webvh/didWebvh.js.map +1 -1
  168. package/dist/webvh/enrollClient.d.ts +2 -8
  169. package/dist/webvh/enrollClient.d.ts.map +1 -1
  170. package/dist/webvh/enrollClient.js +3 -8
  171. package/dist/webvh/enrollClient.js.map +1 -1
  172. package/dist/webvh/index.d.ts +1 -1
  173. package/dist/webvh/index.d.ts.map +1 -1
  174. package/dist/webvh/index.js +1 -1
  175. package/dist/webvh/index.js.map +1 -1
  176. package/dist/webvh/revokeClient.d.ts +3 -9
  177. package/dist/webvh/revokeClient.d.ts.map +1 -1
  178. package/dist/webvh/revokeClient.js +4 -9
  179. package/dist/webvh/revokeClient.js.map +1 -1
  180. package/dist/webvh/verifyLog.d.ts +24 -4
  181. package/dist/webvh/verifyLog.d.ts.map +1 -1
  182. package/dist/webvh/verifyLog.js +26 -7
  183. package/dist/webvh/verifyLog.js.map +1 -1
  184. package/dist/webvh/wasIdStore.d.ts +16 -3
  185. package/dist/webvh/wasIdStore.d.ts.map +1 -1
  186. package/dist/webvh/wasIdStore.js +18 -3
  187. package/dist/webvh/wasIdStore.js.map +1 -1
  188. package/package.json +4 -4
  189. package/dist/descriptors/acquire.d.ts +0 -122
  190. package/dist/descriptors/acquire.d.ts.map +0 -1
  191. package/dist/descriptors/acquire.js +0 -100
  192. package/dist/descriptors/acquire.js.map +0 -1
  193. package/dist/descriptors/cipher.d.ts +0 -71
  194. package/dist/descriptors/cipher.d.ts.map +0 -1
  195. package/dist/descriptors/cipher.js +0 -109
  196. package/dist/descriptors/cipher.js.map +0 -1
  197. package/dist/descriptors/errors.d.ts +0 -44
  198. package/dist/descriptors/errors.d.ts.map +0 -1
  199. package/dist/descriptors/errors.js +0 -46
  200. package/dist/descriptors/errors.js.map +0 -1
  201. package/dist/descriptors/refresh.d.ts +0 -62
  202. package/dist/descriptors/refresh.d.ts.map +0 -1
  203. package/dist/descriptors/refresh.js +0 -69
  204. package/dist/descriptors/refresh.js.map +0 -1
@@ -1,24 +1,55 @@
1
- import { RESOURCE_LOG_METHOD } from '@interop/storage-core';
2
- import { readResourceLog, ResourceLogIntegrityError, resourceLogPinId } from '@interop/vh-resource-log';
3
- import { KEY_MAP_COLLECTION } from '../space/collections.js';
1
+ /*!
2
+ * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
+ */
4
+ /**
5
+ * The log-governed {@link EncryptionDescriptorSource}: descriptor acquisition
6
+ * for a collection whose encryption descriptor is governed by a resource log
7
+ * (the Resource Log Profile) rather than by its Collection Description. Every
8
+ * read -- including the unknown-epoch refresh's re-read -- resolves to the
9
+ * log's VERIFIED head state: chain, proofs, external authorization against
10
+ * the independently verified controller document, and the chain-head pin all
11
+ * checked before any descriptor is handed out, so a refresh re-verifies the
12
+ * log rather than adopting whatever the host serves. A verified head whose
13
+ * state is not an epoch configuration is refused fail-closed rather than
14
+ * handed out as a descriptor.
15
+ *
16
+ * The log lives at the collection's own `meta/log` sub-resource
17
+ * (`COLLECTION_HISTORY_LOG_SUBRESOURCE`), inside the URL subtree of the
18
+ * collection it governs. A share grantee or a connected app already holds a
19
+ * read capability over that subtree, so the same grant that lets them read
20
+ * the collection lets them verify its descriptor's history: no second grant,
21
+ * and no capability over the account's `key-map` collection.
22
+ *
23
+ * Reads here run under the collection-descriptor log CLASS: a ladder-signed
24
+ * append to one of these logs admits on `assertionMethod` membership alone,
25
+ * the roster's ceremony-tail license binding the roster log only. A reader
26
+ * that inherited the roster's rule would refuse a served log its own wallet
27
+ * wrote.
28
+ */
29
+ import { EPOCH_CONFIGURATION_STATE_TYPE, readGovernedEpochConfiguration } from '@interop/was-client/edv';
30
+ import { collectionLogPinId } from '@interop/vh-resource-log';
31
+ import { controllerForLogClass } from '../resourceLog/index.js';
4
32
  /**
5
- * The state-document schema identifier an encryption descriptor carries in a
6
- * governed log entry, per WAS-EC.
33
+ * The governed read boundary and the state-document schema identifier live in
34
+ * `@interop/was-client/edv` (the pointer-following collection store reads
35
+ * through the same helper); re-exported here so the roster store and this
36
+ * module's consumers keep one import site.
7
37
  */
8
- export const EPOCH_CONFIGURATION_STATE_TYPE = 'WasEpochConfiguration';
38
+ export { EPOCH_CONFIGURATION_STATE_TYPE, readGovernedEpochConfiguration };
9
39
  /**
10
40
  * The pin-slot key for a collection's governing descriptor log: the slot a
11
41
  * keyed `ResourceLogPinStore` holds that log's chain-head pin under,
12
- * `space/<spaceId>/key-map/<collectionId>.jsonl`. The library names it, as it
42
+ * `space/<spaceId>/<collectionId>/meta/log`. The library names it, as it
13
43
  * names the account log's (`accountLogPinId`) and the roster's
14
- * (`userKeyRosterPinId`) slots, so no app builds one of its own: the shape is
15
- * host-free on purpose -- the Space id is what stays stable across a claimed
16
- * host move, so a log served from a new host still lands in the same slot and
17
- * is checked against the held pin rather than opening a fresh
18
- * trust-on-first-use slate. The resource half mirrors the roster log's home
19
- * (`key-map/user-key.jsonl`): a governing log lives in the plaintext,
20
- * capability-gated key-map collection, beside the roster, since a log stored
21
- * inside the encrypted collection it governs would itself be sealed.
44
+ * (`userKeyRosterPinId`) slots, so no app builds one of its own.
45
+ *
46
+ * The slot follows the log's placement: the log is the collection's own
47
+ * `meta/log` sub-resource, inside the URL subtree of the collection it
48
+ * governs, so the read capability a share grantee or a connected app already
49
+ * holds covers it. The shape is host-free on purpose -- the Space id is what
50
+ * stays stable across a claimed host move, so a log served from a new host
51
+ * still lands in the same slot and is checked against the held pin rather
52
+ * than opening a fresh trust-on-first-use slate.
22
53
  *
23
54
  * @param options {object}
24
55
  * @param options.spaceId {string} the data Space id
@@ -26,59 +57,7 @@ export const EPOCH_CONFIGURATION_STATE_TYPE = 'WasEpochConfiguration';
26
57
  * @returns {string}
27
58
  */
28
59
  export function collectionDescriptorLogPinId({ spaceId, collectionId }) {
29
- return resourceLogPinId({
30
- spaceId,
31
- collectionId: KEY_MAP_COLLECTION.id,
32
- resourceId: `${collectionId}.jsonl`
33
- });
34
- }
35
- /**
36
- * The one governed epoch-configuration read: the fail-closed boundary that
37
- * decides whether a served log state may be treated as an encryption
38
- * descriptor. Resolves the controller view, reads and fully verifies the log
39
- * (chain, proofs, external authorization, and the chain-head pin, via
40
- * `readResourceLog`), and refuses a verified head whose state is not a
41
- * `WasEpochConfiguration` rather than handing it out as a descriptor.
42
- * Resolves `null` for an absent log (the pre-genesis state) only while no pin
43
- * is held for it; under a held pin an absent log is refused as a `rollback`,
44
- * the library's rule. Both governed
45
- * descriptor consumers -- the log-governed descriptor source below and the
46
- * roster's log-governed descriptor store -- read through this helper, so a
47
- * hardening applied here reaches every trusted descriptor read.
48
- *
49
- * @param options {object}
50
- * @param options.store {ResourceLogStore} the log's transport seam
51
- * @param options.resolveController {function}
52
- * `() => Promise<ResourceLogController>` -- the caller's currently verified
53
- * controller view, resolved per operation
54
- * @param options.pinStore {ResourceLogPinStore} this client's chain-head
55
- * pin for this log
56
- * @param options.logId {string} the pin-slot key for this log, from
57
- * `resourceLogPinId`
58
- * @returns {Promise<{ verified: VerifiedResourceLog; descriptor: CollectionEncryption; etag?: string } | null>}
59
- */
60
- export async function readGovernedEpochConfiguration({ store, resolveController, pinStore, logId }) {
61
- const controller = await resolveController();
62
- const current = await readResourceLog({
63
- store,
64
- controller,
65
- expectedMethod: RESOURCE_LOG_METHOD,
66
- pinStore,
67
- logId
68
- });
69
- if (current === null) {
70
- return null;
71
- }
72
- const state = current.verified.state;
73
- if (state.type !== EPOCH_CONFIGURATION_STATE_TYPE) {
74
- throw new ResourceLogIntegrityError(`The governed descriptor log carries state of type ` +
75
- `"${state.type}", not "${EPOCH_CONFIGURATION_STATE_TYPE}".`);
76
- }
77
- return {
78
- verified: current.verified,
79
- descriptor: state,
80
- etag: current.etag
81
- };
60
+ return collectionLogPinId({ spaceId, collectionId });
82
61
  }
83
62
  /**
84
63
  * Builds the {@link EncryptionDescriptorSource} over per-collection resource
@@ -86,15 +65,23 @@ export async function readGovernedEpochConfiguration({ store, resolveController,
86
65
  * Collection Description `encryption` member (a plaintext collection, or one
87
66
  * whose provisioning has not landed), unless a pin is held for it, in which
88
67
  * case the read refuses as a `rollback`; verification failures throw through --
89
- * {@link acquireDescriptor} rethrows the refusal classes rather than falling
90
- * back to the cache.
68
+ * was-client's `acquireDescriptor` rethrows the refusal classes rather than
69
+ * falling back to the cache.
70
+ *
71
+ * Every read runs under the collection-descriptor log class
72
+ * ({@link controllerForLogClass}), so a ladder-signed append verifies on
73
+ * `assertionMethod` membership alone. Without that narrowing a reader would
74
+ * inherit the roster's ceremony-tail license and refuse a served log its own
75
+ * wallet's standing credential wrote.
91
76
  *
92
77
  * @param options {object}
93
78
  * @param options.logFor {function} `(collectionId) => ResourceLogStore` --
94
- * the collection's governing log's transport seam
79
+ * the collection's governing log's transport seam (was-client's
80
+ * `resourceLogStore({ collection })` over the collection's `meta/log`)
95
81
  * @param options.resolveController {function}
96
- * `() => Promise<ResourceLogController>` -- the caller's currently verified
97
- * controller view, resolved per operation
82
+ * `() => Promise<WebvhResourceLogController>` -- the caller's currently
83
+ * verified controller view, resolved per operation and narrowed here to
84
+ * this log class
98
85
  * @param options.pinStore {ResourceLogPinStore} this client's chain-head
99
86
  * pins, keyed per log; each collection's slot is
100
87
  * {@link collectionDescriptorLogPinId} over `spaceId`
@@ -106,7 +93,10 @@ export function logGovernedDescriptorSource({ logFor, resolveController, pinStor
106
93
  async collectionEncryption({ collectionId }) {
107
94
  const current = await readGovernedEpochConfiguration({
108
95
  store: logFor(collectionId),
109
- resolveController,
96
+ resolveController: async () => controllerForLogClass({
97
+ controller: await resolveController(),
98
+ logClass: 'collection-descriptor'
99
+ }),
110
100
  pinStore,
111
101
  logId: collectionDescriptorLogPinId({ spaceId, collectionId })
112
102
  });
@@ -1 +1 @@
1
- {"version":3,"file":"logSource.js","sourceRoot":"","sources":["../../src/descriptors/logSource.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EACL,eAAe,EACf,yBAAyB,EACzB,gBAAgB,EAKjB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAG5D;;;GAGG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,uBAAuB,CAAA;AAErE;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,4BAA4B,CAAC,EAC3C,OAAO,EACP,YAAY,EAIb;IACC,OAAO,gBAAgB,CAAC;QACtB,OAAO;QACP,YAAY,EAAE,kBAAkB,CAAC,EAAE;QACnC,UAAU,EAAE,GAAG,YAAY,QAAQ;KACpC,CAAC,CAAA;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,KAAK,UAAU,8BAA8B,CAAC,EACnD,KAAK,EACL,iBAAiB,EACjB,QAAQ,EACR,KAAK,EAMN;IAKC,MAAM,UAAU,GAAG,MAAM,iBAAiB,EAAE,CAAA;I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GAwBG;AACH,OAAO,EACL,8BAA8B,EAC9B,8BAA8B,EAE/B,MAAM,yBAAyB,CAAA;AAChC,OAAO,EACL,kBAAkB,EAGnB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EACL,qBAAqB,EAEtB,MAAM,yBAAyB,CAAA;AAEhC;;;;;GAKG;AACH,OAAO,EAAE,8BAA8B,EAAE,8BAA8B,EAAE,CAAA;AAEzE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,4BAA4B,CAAC,EAC3C,OAAO,EACP,YAAY,EAIb;IACC,OAAO,kBAAkB,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC,CAAA;AACtD,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,UAAU,2BAA2B,CAAC,EAC1C,MAAM,EACN,iBAAiB,EACjB,QAAQ,EACR,OAAO,EAMR;IACC,OAAO;QACL,KAAK,CAAC,oBAAoB,CAAC,EAAE,YAAY,EAAE;YACzC,MAAM,OAAO,GAAG,MAAM,8BAA8B,CAAC;gBACnD,KAAK,EAAE,MAAM,CAAC,YAAY,CAAC;gBAC3B,iBAAiB,EAAE,KAAK,IAAI,EAAE,CAC5B,qBAAqB,CAAC;oBACpB,UAAU,EAAE,MAAM,iBAAiB,EAAE;oBACrC,QAAQ,EAAE,uBAAuB;iBAClC,CAAC;gBACJ,QAAQ;gBACR,KAAK,EAAE,4BAA4B,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;aAC/D,CAAC,CAAA;YACF,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;gBACrB,OAAO,SAAS,CAAA;YAClB,CAAC;YACD,OAAO,OAAO,CAAC,UAAU,CAAA;QAC3B,CAAC;KACF,CAAA;AACH,CAAC"}
@@ -3,7 +3,6 @@ import type { EncryptionDescriptorStore } from '@interop/was-client/edv';
3
3
  import type { IKeyAgreementKey } from '@interop/data-integrity-core';
4
4
  import { type ClientWebvhUpdateKeys, type ICapabilityAgent, type KmsAuthenticationBinding, type PublishedWebvhLog, type WebvhIdStore } from '../webvh/index.js';
5
5
  import { type UserKey, type WalletSpaceEpochsResult } from '../keys/index.js';
6
- import type { ResourceLogPinStore } from '@interop/vh-resource-log';
7
6
  import { type StageNotifier } from '../log.js';
8
7
  /**
9
8
  * The complete key set a brand-new account mints locally before anything
@@ -186,6 +185,15 @@ export interface AccountGenesisResult {
186
185
  * EncryptionDescriptorStore` -- builds the user-key roster's descriptor
187
186
  * store once the account DID is known (the log-governed store's controller
188
187
  * view and chain-head pin are the app's wiring)
188
+ * @param options.collectionStoreFor {Function} `({ did }) =>
189
+ * (collectionId: string) => EncryptionDescriptorStore` -- builds each
190
+ * encrypted collection's descriptor store once the account DID is known,
191
+ * the same wiring the roster's builder takes. It is handed `did` alone,
192
+ * since this ceremony's did:webvh stage returns only that: an app whose
193
+ * store resolves a controller view builds it from the published log it
194
+ * fetches itself (`webvhResourceLogController` over a `verifyAccountLog`
195
+ * result), unlike the credential-anchored genesis, which hands its own
196
+ * head through
189
197
  * @param [options.provideKmsAuthentication] {Function} `({ spaceReady }) =>
190
198
  * Promise<KmsAuthenticationBinding | undefined>` -- the KMS authentication
191
199
  * binding's acquisition; absent or resolving `undefined`, the genesis is
@@ -201,9 +209,8 @@ export interface AccountGenesisResult {
201
209
  * the thunk mints instead of adopting
202
210
  * @param [options.expectedDid] {string} the account's did:webvh from the
203
211
  * caller's stored account pointer, when it already names one; the genesis
204
- * read then refuses a published log resolving to any other account
205
- * @param [options.accountLogPinStore] {ResourceLogPinStore} this client's
206
- * chain-head pin for the account log
212
+ * read then refuses a published log resolving to any other account. That
213
+ * read and the publish run under the `idStore`'s own chain-head pin
207
214
  * @param [options.onDidPublished] {Function} `({ did }) => Promise<void>`
208
215
  * -- runs between the DID publication and the roster genesis, so the app
209
216
  * can adopt the DID (and drop any verified-log memo) before the roster
@@ -220,7 +227,7 @@ export interface AccountGenesisResult {
220
227
  * genesis emits at the same point
221
228
  * @returns {Promise<AccountGenesisResult>}
222
229
  */
223
- export declare function ensureAccountGenesis({ was, wasAsClient, wasServerUrl, spaceId, keyAgent, clientKeyAgreementKey, userKey, updateKeys, idStore, rosterStoreFor, provideKmsAuthentication, expectedDid, accountLogPinStore, onDidPublished, promoteController, onStage }: {
230
+ export declare function ensureAccountGenesis({ was, wasAsClient, wasServerUrl, spaceId, keyAgent, clientKeyAgreementKey, userKey, updateKeys, idStore, rosterStoreFor, collectionStoreFor, provideKmsAuthentication, expectedDid, onDidPublished, promoteController, onStage }: {
224
231
  was: WasClient;
225
232
  wasAsClient?: WasClient;
226
233
  wasServerUrl: string;
@@ -233,11 +240,13 @@ export declare function ensureAccountGenesis({ was, wasAsClient, wasServerUrl, s
233
240
  rosterStoreFor: (options: {
234
241
  did: string;
235
242
  }) => EncryptionDescriptorStore;
243
+ collectionStoreFor: (options: {
244
+ did: string;
245
+ }) => (collectionId: string) => EncryptionDescriptorStore;
236
246
  provideKmsAuthentication?: (options: {
237
247
  spaceReady: Promise<unknown>;
238
248
  }) => Promise<KmsAuthenticationBinding | undefined>;
239
249
  expectedDid?: string;
240
- accountLogPinStore?: ResourceLogPinStore;
241
250
  onDidPublished?: (published: {
242
251
  did: string;
243
252
  }) => Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"accountGenesis.d.ts","sourceRoot":"","sources":["../../src/genesis/accountGenesis.ts"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC1E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAA;AACxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAGpE,OAAO,EAIL,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,YAAY,EAClB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAIL,KAAK,OAAO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AoB,CAAC,EACzC,GAAG,EACH,WAAW,EACX,YAAY,EACZ,OAAO,EACP,QAAQ,EACR,qBAAqB,EACrB,OAAO,EACP,UAAU,EACV,OAAO,EACP,cAAc,EACd,kBAAkB,EAClB,wBAAwB,EACxB,WAAW,EACX,cAAc,EACd,iBAAwB,EACxB,OAAO,EACR,EAAE;IACD,GAAG,EAAE,SAAS,CAAA;IACd,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,YAAY,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,qBAAqB,EAAE,gBAAgB,CAAA;IACvC,OAAO,EAAE,OAAO,CAAA;IAChB,UAAU,EAAE,qBAAqB,CAAA;IACjC,OAAO,EAAE,YAAY,CAAA;IACrB,cAAc,EAAE,CAAC,OAAO,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,KAAK,yBAAyB,CAAA;IACvE,kBAAkB,EAAE,CAAC,OAAO,EAAE;QAC5B,GAAG,EAAE,MAAM,CAAA;KACZ,KAAK,CAAC,YAAY,EAAE,MAAM,KAAK,yBAAyB,CAAA;IACzD,wBAAwB,CAAC,EAAE,CAAC,OAAO,EAAE;QACnC,UAAU,EAAE,OAAO,CAAC,OAAO,CAAC,CAAA;KAC7B,KAAK,OAAO,CAAC,wBAAwB,GAAG,SAAS,CAAC,CAAA;IACnD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,cAAc,CAAC,EAAE,CAAC,SAAS,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC9D,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,OAAO,CAAC,EAAE,aAAa,CAAA;CACxB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAoIhC"}
@@ -184,6 +184,15 @@ export class AccountGenesisSpaceError extends Error {
184
184
  * EncryptionDescriptorStore` -- builds the user-key roster's descriptor
185
185
  * store once the account DID is known (the log-governed store's controller
186
186
  * view and chain-head pin are the app's wiring)
187
+ * @param options.collectionStoreFor {Function} `({ did }) =>
188
+ * (collectionId: string) => EncryptionDescriptorStore` -- builds each
189
+ * encrypted collection's descriptor store once the account DID is known,
190
+ * the same wiring the roster's builder takes. It is handed `did` alone,
191
+ * since this ceremony's did:webvh stage returns only that: an app whose
192
+ * store resolves a controller view builds it from the published log it
193
+ * fetches itself (`webvhResourceLogController` over a `verifyAccountLog`
194
+ * result), unlike the credential-anchored genesis, which hands its own
195
+ * head through
187
196
  * @param [options.provideKmsAuthentication] {Function} `({ spaceReady }) =>
188
197
  * Promise<KmsAuthenticationBinding | undefined>` -- the KMS authentication
189
198
  * binding's acquisition; absent or resolving `undefined`, the genesis is
@@ -199,9 +208,8 @@ export class AccountGenesisSpaceError extends Error {
199
208
  * the thunk mints instead of adopting
200
209
  * @param [options.expectedDid] {string} the account's did:webvh from the
201
210
  * caller's stored account pointer, when it already names one; the genesis
202
- * read then refuses a published log resolving to any other account
203
- * @param [options.accountLogPinStore] {ResourceLogPinStore} this client's
204
- * chain-head pin for the account log
211
+ * read then refuses a published log resolving to any other account. That
212
+ * read and the publish run under the `idStore`'s own chain-head pin
205
213
  * @param [options.onDidPublished] {Function} `({ did }) => Promise<void>`
206
214
  * -- runs between the DID publication and the roster genesis, so the app
207
215
  * can adopt the DID (and drop any verified-log memo) before the roster
@@ -218,7 +226,7 @@ export class AccountGenesisSpaceError extends Error {
218
226
  * genesis emits at the same point
219
227
  * @returns {Promise<AccountGenesisResult>}
220
228
  */
221
- export async function ensureAccountGenesis({ was, wasAsClient, wasServerUrl, spaceId, keyAgent, clientKeyAgreementKey, userKey, updateKeys, idStore, rosterStoreFor, provideKmsAuthentication, expectedDid, accountLogPinStore, onDidPublished, promoteController = true, onStage }) {
229
+ export async function ensureAccountGenesis({ was, wasAsClient, wasServerUrl, spaceId, keyAgent, clientKeyAgreementKey, userKey, updateKeys, idStore, rosterStoreFor, collectionStoreFor, provideKmsAuthentication, expectedDid, onDidPublished, promoteController = true, onStage }) {
222
230
  const failed = [];
223
231
  const stage = stageNotifier(onStage);
224
232
  // 1. The Space and its collection roster, create-if-absent under this
@@ -274,8 +282,7 @@ export async function ensureAccountGenesis({ was, wasAsClient, wasServerUrl, spa
274
282
  keyAgreementKeyMultibase
275
283
  },
276
284
  updateKeys,
277
- ...(expectedDid !== undefined ? { expectedDid } : {}),
278
- ...(accountLogPinStore ? { pinStore: accountLogPinStore } : {})
285
+ ...(expectedDid !== undefined ? { expectedDid } : {})
279
286
  });
280
287
  await onDidPublished?.({ did });
281
288
  // 4. The user-key roster genesis, strictly after the DID publication: the
@@ -305,7 +312,7 @@ export async function ensureAccountGenesis({ was, wasAsClient, wasServerUrl, spa
305
312
  if (rosterDescriptor) {
306
313
  try {
307
314
  const fanOut = await ensureWalletSpaceEpochs({
308
- was,
315
+ storeFor: collectionStoreFor({ did }),
309
316
  spaceId,
310
317
  userKey,
311
318
  rosterDescriptor
@@ -1 +1 @@
1
- {"version":3,"file":"accountGenesis.js","sourceRoot":"","sources":["../../src/genesis/accountGenesis.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAK5C,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAC3E,OAAO,EACL,yBAAyB,EACzB,cAAc,EACd,yBAAyB,EAM1B,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,WAAW,EAGZ,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAsB,MAAM,WAAW,CAAA;AAC7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAA;AAEvD;;GAEG;AACH,MAAM,cAAc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AC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACnC,MAAM;KACP,CAAA;AACH,CAAC"}
@@ -0,0 +1,73 @@
1
+ /*!
2
+ * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
+ */
4
+ /**
5
+ * The descriptor store over ONE encrypted collection's governing history log
6
+ * -- the collection's own `meta/log` sub-resource, whose verified head state
7
+ * IS its `encryption` descriptor. The sibling of the user key roster's
8
+ * builder ({@link userKeyRosterDescriptorStore}), over the same wrapped
9
+ * `logGovernedDescriptorStore`: reads resolve to the verified head, writes
10
+ * are signed appends, and `create` is the guarded genesis (`If-None-Match:
11
+ * *`) that declares the Collection governed. The server derives the
12
+ * Collection Description's `encryption` member from that log, so a governed
13
+ * collection's descriptor is never client-written into its Description.
14
+ *
15
+ * The transport seam is was-client's `resourceLogStore({ collection })`, so
16
+ * the handle passed in is the whole address: the store derives its own
17
+ * chain-head pin slot from the handle's Space and collection ids
18
+ * ({@link collectionDescriptorLogPinId}), and no caller names a `logId`.
19
+ */
20
+ import type { Collection } from '@interop/was-client';
21
+ import type { ResourceLogPinStore, ResourceLogSigner } from '@interop/vh-resource-log';
22
+ import type { WebvhResourceLogController } from '../resourceLog/index.js';
23
+ import { type SealableEncryptionDescriptorStore } from './rosterLogStore.js';
24
+ /**
25
+ * Builds the log-governed, sealable descriptor store over one collection's
26
+ * governing history log.
27
+ *
28
+ * Reads resolve to the log's verified head (chain, entry proofs, external
29
+ * authorization against the independently verified account document, and the
30
+ * chain-head pin, all checked before a descriptor is handed out); writes are
31
+ * signed appends of the full next state; `create` is the guarded genesis that
32
+ * declares the Collection governed -- the epoch[0] install
33
+ * ({@link ensureIndexedFirstEpoch}) is what runs it. `seal()` is the backstop
34
+ * for a rotation that no-op'd and so left the log anchored before the account
35
+ * document's latest membership change, and `setMinimumControllerVersion` is
36
+ * the post-edit anchor a ceremony sets so its appends never resolve to a
37
+ * cached pre-edit view.
38
+ *
39
+ * The signer is the same `ResourceLogSigner` the roster takes: an enrolled
40
+ * client's account key ({@link userKeyRosterLogSigner}), or a standing
41
+ * credential's ladder VM on a credential-anchored account.
42
+ *
43
+ * The store's class is `collection-descriptor`, so a ladder-signed append is
44
+ * admitted on `assertionMethod` membership at the anchored version alone.
45
+ * The ceremony-tail license binds the user key roster log only: a descriptor
46
+ * append escrows one recipient into one collection, lands as a hash-chained
47
+ * entry attributable to that credential, and is auditable by the account's
48
+ * clients.
49
+ *
50
+ * @param options {object}
51
+ * @param options.collection {Collection} the collection handle whose
52
+ * `meta/log` is the log; its `spaceId` and `id` are what the pin slot is
53
+ * derived from, and its capability wiring is what every request rides
54
+ * @param options.resolveController {function}
55
+ * `() => Promise<WebvhResourceLogController>` -- the caller's currently
56
+ * verified controller view (`webvhResourceLogController` over a
57
+ * `verifyAccountLog` result), resolved per operation
58
+ * @param options.pinStore {ResourceLogPinStore} this client's chain-head
59
+ * pins, keyed per log
60
+ * @param options.signer {ResourceLogSigner} the signing key the appends
61
+ * this store writes are proved by. It must be listed under
62
+ * `assertionMethod` in the account document at the version the append
63
+ * anchors at, so a ceremony that strikes a key builds its collection stores
64
+ * on one its own edit leaves standing
65
+ * @returns {SealableEncryptionDescriptorStore}
66
+ */
67
+ export declare function collectionDescriptorLogStore({ collection, resolveController, pinStore, signer }: {
68
+ collection: Collection;
69
+ resolveController: () => Promise<WebvhResourceLogController>;
70
+ pinStore: ResourceLogPinStore;
71
+ signer: ResourceLogSigner;
72
+ }): SealableEncryptionDescriptorStore;
73
+ //# sourceMappingURL=collectionLogStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collectionLogStore.d.ts","sourceRoot":"","sources":["../../src/keys/collectionLogStore.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAErD,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,0BAA0B,CAAA;AAEjC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAA;AACzE,OAAO,EAEL,KAAK,iCAAiC,EACvC,MAAM,qBAAqB,CAAA;AAE5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAgB,4BAA4B,CAAC,EAC3C,UAAU,EACV,iBAAiB,EACjB,QAAQ,EACR,MAAM,EACP,EAAE;IACD,UAAU,EAAE,UAAU,CAAA;IACtB,iBAAiB,EAAE,MAAM,OAAO,CAAC,0BAA0B,CAAC,CAAA;IAC5D,QAAQ,EAAE,mBAAmB,CAAA;IAC7B,MAAM,EAAE,iBAAiB,CAAA;CAC1B,GAAG,iCAAiC,CAYpC"}
@@ -0,0 +1,60 @@
1
+ import { resourceLogStore } from '@interop/was-client/log';
2
+ import { collectionDescriptorLogPinId } from '../descriptors/logSource.js';
3
+ import { logGovernedDescriptorStore } from './rosterLogStore.js';
4
+ /**
5
+ * Builds the log-governed, sealable descriptor store over one collection's
6
+ * governing history log.
7
+ *
8
+ * Reads resolve to the log's verified head (chain, entry proofs, external
9
+ * authorization against the independently verified account document, and the
10
+ * chain-head pin, all checked before a descriptor is handed out); writes are
11
+ * signed appends of the full next state; `create` is the guarded genesis that
12
+ * declares the Collection governed -- the epoch[0] install
13
+ * ({@link ensureIndexedFirstEpoch}) is what runs it. `seal()` is the backstop
14
+ * for a rotation that no-op'd and so left the log anchored before the account
15
+ * document's latest membership change, and `setMinimumControllerVersion` is
16
+ * the post-edit anchor a ceremony sets so its appends never resolve to a
17
+ * cached pre-edit view.
18
+ *
19
+ * The signer is the same `ResourceLogSigner` the roster takes: an enrolled
20
+ * client's account key ({@link userKeyRosterLogSigner}), or a standing
21
+ * credential's ladder VM on a credential-anchored account.
22
+ *
23
+ * The store's class is `collection-descriptor`, so a ladder-signed append is
24
+ * admitted on `assertionMethod` membership at the anchored version alone.
25
+ * The ceremony-tail license binds the user key roster log only: a descriptor
26
+ * append escrows one recipient into one collection, lands as a hash-chained
27
+ * entry attributable to that credential, and is auditable by the account's
28
+ * clients.
29
+ *
30
+ * @param options {object}
31
+ * @param options.collection {Collection} the collection handle whose
32
+ * `meta/log` is the log; its `spaceId` and `id` are what the pin slot is
33
+ * derived from, and its capability wiring is what every request rides
34
+ * @param options.resolveController {function}
35
+ * `() => Promise<WebvhResourceLogController>` -- the caller's currently
36
+ * verified controller view (`webvhResourceLogController` over a
37
+ * `verifyAccountLog` result), resolved per operation
38
+ * @param options.pinStore {ResourceLogPinStore} this client's chain-head
39
+ * pins, keyed per log
40
+ * @param options.signer {ResourceLogSigner} the signing key the appends
41
+ * this store writes are proved by. It must be listed under
42
+ * `assertionMethod` in the account document at the version the append
43
+ * anchors at, so a ceremony that strikes a key builds its collection stores
44
+ * on one its own edit leaves standing
45
+ * @returns {SealableEncryptionDescriptorStore}
46
+ */
47
+ export function collectionDescriptorLogStore({ collection, resolveController, pinStore, signer }) {
48
+ return logGovernedDescriptorStore({
49
+ log: resourceLogStore({ collection }),
50
+ resolveController,
51
+ pinStore,
52
+ logId: collectionDescriptorLogPinId({
53
+ spaceId: collection.spaceId,
54
+ collectionId: collection.id
55
+ }),
56
+ signer,
57
+ logClass: 'collection-descriptor'
58
+ });
59
+ }
60
+ //# sourceMappingURL=collectionLogStore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collectionLogStore.js","sourceRoot":"","sources":["../../src/keys/collectionLogStore.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAK1D,OAAO,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAE1E,OAAO,EACL,0BAA0B,EAE3B,MAAM,qBAAqB,CAAA;AAE5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,MAAM,UAAU,4BAA4B,CAAC,EAC3C,UAAU,EACV,iBAAiB,EACjB,QAAQ,EACR,MAAM,EAMP;IACC,OAAO,0BAA0B,CAAC;QAChC,GAAG,EAAE,gBAAgB,CAAC,EAAE,UAAU,EAAE,CAAC;QACrC,iBAAiB;QACjB,QAAQ;QACR,KAAK,EAAE,4BAA4B,CAAC;YAClC,OAAO,EAAE,UAAU,CAAC,OAAO;YAC3B,YAAY,EAAE,UAAU,CAAC,EAAE;SAC5B,CAAC;QACF,MAAM;QACN,QAAQ,EAAE,uBAAuB;KAClC,CAAC,CAAA;AACJ,CAAC"}
@@ -22,13 +22,23 @@
22
22
  * current epoch, refusing a `currentEpoch` that names no epoch in its own
23
23
  * list" (`UserKeyRosterIntegrityError`); every roster and collection
24
24
  * descriptor read that needs the current epoch goes through it.
25
- * - `userKeyRosterDescriptorStore` / `logGovernedDescriptorStore` -- that
26
- * descriptor store: reads resolve to the roster log's verified head
25
+ * - `collectionDescriptorLogStore` -- the same store over ONE encrypted
26
+ * collection's governing history log (the collection's `meta/log`
27
+ * sub-resource, whose verified head state is its `encryption` descriptor).
28
+ * It derives its own chain-head pin slot from the collection handle, and
29
+ * carries the `collection-descriptor` log class, whose ladder-signed
30
+ * appends admit on `assertionMethod` membership alone.
31
+ * - `userKeyRosterDescriptorStore` -- the same store over the user key roster:
32
+ * reads resolve to the roster log's verified head
27
33
  * (`key-map/user-key.jsonl`), writes append signed entries; built from a
28
34
  * bare signing client for the login-time direct read. Sealable
29
35
  * (`SealableEncryptionDescriptorStore` / `isSealableDescriptorStore`):
30
36
  * `seal()` appends the idempotent backstop entry when the log's head still
31
37
  * anchors before the account document's latest membership change.
38
+ *
39
+ * Those two builders are the subpath's whole store surface. Each states its
40
+ * log class at construction, and the generic wrapper under them takes a
41
+ * caller-chosen class and log id, so it stays module-internal.
32
42
  * - `rosterRecipientKid` -- the one builder of a client's roster kid, shared by
33
43
  * the enrollment wrap and the roster read. A retiring rotation names no kid:
34
44
  * it converges onto the account document instead.
@@ -52,9 +62,10 @@
52
62
  * names (also the completion sweep's driver).
53
63
  * - `rotateRosterToDocumentAndCascade` -- the shared roster-and-cascade tail
54
64
  * every account-membership ceremony ends with (a client disconnected, a
55
- * standing unlock credential retired): the post-edit minimum controller version, the
56
- * convergence rotation with its seal backstop, and the collection fan-out
57
- * onto the fresh user key.
65
+ * standing unlock credential retired): the post-edit minimum controller
66
+ * version on the roster store AND on every log-governed collection store
67
+ * the fan-out touches, the convergence rotation with its seal backstop, and
68
+ * the collection fan-out onto the fresh user key.
58
69
  * - `retireRosterRecipientAndCascade` -- the same tail for a ceremony that
59
70
  * rotates BEFORE its document edit (the two forgets): the minimum
60
71
  * controller version at the caller's anchor, one named recipient retired
@@ -82,8 +93,9 @@ export { anchorRosterStoreAt, retireRosterRecipientAndCascade, rotateRosterToDoc
82
93
  export type { CascadeCollections, RosterCascadeResult, RosterSealReport, UserKeyAdoptedHook } from './userKeyRosterCascade.js';
83
94
  export type { DescriptorStoreRead, UserKeyRosterReadResult } from './userKeyRoster.js';
84
95
  export type { KeyAgreementDocument } from '../resourceLog/document.js';
96
+ export { collectionDescriptorLogStore } from './collectionLogStore.js';
85
97
  export { userKeyRosterDescriptorStore, userKeyRosterPinId } from './rosterStore.js';
86
- export { EPOCH_CONFIGURATION_STATE_TYPE, isSealableDescriptorStore, logGovernedDescriptorStore } from './rosterLogStore.js';
98
+ export { isSealableDescriptorStore } from './rosterLogStore.js';
87
99
  export type { SealableEncryptionDescriptorStore } from './rosterLogStore.js';
88
100
  export { ensureIndexedFirstEpoch, ensureWalletSpaceEpochs, WalletSpaceProvisioningError, walletSpaceProvisioner } from './spaceEpochs.js';
89
101
  export type { WalletSpaceEpochsResult } from './spaceEpochs.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/keys/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEG;AACH,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,M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AC/B,wBAAwB,EACzB,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EACV,gCAAgC,EAChC,oBAAoB,EACrB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,mBAAmB,EACnB,+BAA+B,EAC/B,gCAAgC,EACjC,MAAM,2BAA2B,CAAA;AAClC,YAAY,EACV,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,2BAA2B,CAAA;AAClC,YAAY,EACV,mBAAmB,EACnB,uBAAuB,EACxB,MAAM,oBAAoB,CAAA;AAC3B,YAAY,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAEtE,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAA;AACtE,OAAO,EACL,4BAA4B,EAC5B,kBAAkB,EACnB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAA;AAC/D,YAAY,EAAE,iCAAiC,EAAE,MAAM,qBAAqB,CAAA;AAE5E,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,4BAA4B,EAC5B,sBAAsB,EACvB,MAAM,kBAAkB,CAAA;AACzB,YAAY,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAE/D,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACf,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAE9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA"}
@@ -22,13 +22,23 @@
22
22
  * current epoch, refusing a `currentEpoch` that names no epoch in its own
23
23
  * list" (`UserKeyRosterIntegrityError`); every roster and collection
24
24
  * descriptor read that needs the current epoch goes through it.
25
- * - `userKeyRosterDescriptorStore` / `logGovernedDescriptorStore` -- that
26
- * descriptor store: reads resolve to the roster log's verified head
25
+ * - `collectionDescriptorLogStore` -- the same store over ONE encrypted
26
+ * collection's governing history log (the collection's `meta/log`
27
+ * sub-resource, whose verified head state is its `encryption` descriptor).
28
+ * It derives its own chain-head pin slot from the collection handle, and
29
+ * carries the `collection-descriptor` log class, whose ladder-signed
30
+ * appends admit on `assertionMethod` membership alone.
31
+ * - `userKeyRosterDescriptorStore` -- the same store over the user key roster:
32
+ * reads resolve to the roster log's verified head
27
33
  * (`key-map/user-key.jsonl`), writes append signed entries; built from a
28
34
  * bare signing client for the login-time direct read. Sealable
29
35
  * (`SealableEncryptionDescriptorStore` / `isSealableDescriptorStore`):
30
36
  * `seal()` appends the idempotent backstop entry when the log's head still
31
37
  * anchors before the account document's latest membership change.
38
+ *
39
+ * Those two builders are the subpath's whole store surface. Each states its
40
+ * log class at construction, and the generic wrapper under them takes a
41
+ * caller-chosen class and log id, so it stays module-internal.
32
42
  * - `rosterRecipientKid` -- the one builder of a client's roster kid, shared by
33
43
  * the enrollment wrap and the roster read. A retiring rotation names no kid:
34
44
  * it converges onto the account document instead.
@@ -52,9 +62,10 @@
52
62
  * names (also the completion sweep's driver).
53
63
  * - `rotateRosterToDocumentAndCascade` -- the shared roster-and-cascade tail
54
64
  * every account-membership ceremony ends with (a client disconnected, a
55
- * standing unlock credential retired): the post-edit minimum controller version, the
56
- * convergence rotation with its seal backstop, and the collection fan-out
57
- * onto the fresh user key.
65
+ * standing unlock credential retired): the post-edit minimum controller
66
+ * version on the roster store AND on every log-governed collection store
67
+ * the fan-out touches, the convergence rotation with its seal backstop, and
68
+ * the collection fan-out onto the fresh user key.
58
69
  * - `retireRosterRecipientAndCascade` -- the same tail for a ceremony that
59
70
  * rotates BEFORE its document edit (the two forgets): the minimum
60
71
  * controller version at the caller's anchor, one named recipient retired
@@ -76,8 +87,9 @@ export { assertEnrolledClientKeyRecord, decodeClientKeyRecord, encodeClientKeyRe
76
87
  export { addUserKeyRosterRecipient, convergeUserKeyRosterToDocument, currentEpochOf, enrolledClientRosterRecipients, ensureUserKeyRoster, UserKeyRosterContinuityError, UserKeyRosterIntegrityError, UserKeyRosterUnwrapError, userKeyRosterLogSigner, userKeyRosterRecipientResolver, readUserKeyRoster, replaceUserKeyRosterRecipients, rosterRecipientKid, rosterRecipientsToRetire, rosterWrapsRecipient, rotateUserKeyRoster } from './userKeyRoster.js';
77
88
  export { cascadeCollectionsToUserKey, userKeyAsRecipient, rotateCollectionEpochsToUserKey, unwrapUserKeyGenerations } from './userKeyCascade.js';
78
89
  export { anchorRosterStoreAt, retireRosterRecipientAndCascade, rotateRosterToDocumentAndCascade } from './userKeyRosterCascade.js';
90
+ export { collectionDescriptorLogStore } from './collectionLogStore.js';
79
91
  export { userKeyRosterDescriptorStore, userKeyRosterPinId } from './rosterStore.js';
80
- export { EPOCH_CONFIGURATION_STATE_TYPE, isSealableDescriptorStore, logGovernedDescriptorStore } from './rosterLogStore.js';
92
+ export { isSealableDescriptorStore } from './rosterLogStore.js';
81
93
  export { ensureIndexedFirstEpoch, ensureWalletSpaceEpochs, WalletSpaceProvisioningError, walletSpaceProvisioner } from './spaceEpochs.js';
82
94
  export { readClientLabels, removeClientLabel, setClientLabel } from './clientLabels.js';
83
95
  export { wasClientLabelsStore } from './wasLabelsStore.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/keys/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEG;AACH,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAG5D,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,EACrB,qBAAqB,EACrB,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC3B,MAAM,sBAAsB,CAAA;AAQ7B,OAAO,EACL,yBAAyB,EACzB,+BAA+B,EAC/B,cAAc,EACd,8BAA8B,EAC9B,mBAAmB,EACnB,4BAA4B,EAC5B,2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