@interop/wallet-core 0.68.0 → 0.70.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 (261) hide show
  1. package/README.md +31 -41
  2. package/dist/clientAnnex/credentialAnchoredGenesis.d.ts +12 -1
  3. package/dist/clientAnnex/credentialAnchoredGenesis.d.ts.map +1 -1
  4. package/dist/clientAnnex/credentialAnchoredGenesis.js +9 -2
  5. package/dist/clientAnnex/credentialAnchoredGenesis.js.map +1 -1
  6. package/dist/clientAnnex/establish.d.ts +10 -0
  7. package/dist/clientAnnex/establish.d.ts.map +1 -1
  8. package/dist/clientAnnex/establish.js +14 -2
  9. package/dist/clientAnnex/establish.js.map +1 -1
  10. package/dist/clientAnnex/ladder.d.ts +103 -57
  11. package/dist/clientAnnex/ladder.d.ts.map +1 -1
  12. package/dist/clientAnnex/ladder.js +254 -335
  13. package/dist/clientAnnex/ladder.js.map +1 -1
  14. package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -1
  15. package/dist/clientAnnex/ladderAnchored.js +10 -5
  16. package/dist/clientAnnex/ladderAnchored.js.map +1 -1
  17. package/dist/clientAnnex/mend.d.ts +19 -4
  18. package/dist/clientAnnex/mend.d.ts.map +1 -1
  19. package/dist/clientAnnex/mend.js +83 -35
  20. package/dist/clientAnnex/mend.js.map +1 -1
  21. package/dist/clientAnnex/recoveryLadderAnchored.d.ts +3 -15
  22. package/dist/clientAnnex/recoveryLadderAnchored.d.ts.map +1 -1
  23. package/dist/clientAnnex/recoveryLadderAnchored.js +22 -3
  24. package/dist/clientAnnex/recoveryLadderAnchored.js.map +1 -1
  25. package/dist/clientAnnex/rosterDeliveredEpochs.d.ts +13 -14
  26. package/dist/clientAnnex/rosterDeliveredEpochs.d.ts.map +1 -1
  27. package/dist/clientAnnex/rosterDeliveredEpochs.js +12 -12
  28. package/dist/clientAnnex/rosterDeliveredEpochs.js.map +1 -1
  29. package/dist/clients/grantState.d.ts +67 -0
  30. package/dist/clients/grantState.d.ts.map +1 -0
  31. package/dist/clients/grantState.js +72 -0
  32. package/dist/clients/grantState.js.map +1 -0
  33. package/dist/clients/index.d.ts +7 -0
  34. package/dist/clients/index.d.ts.map +1 -1
  35. package/dist/clients/index.js +6 -0
  36. package/dist/clients/index.js.map +1 -1
  37. package/dist/descriptors/index.d.ts +21 -46
  38. package/dist/descriptors/index.d.ts.map +1 -1
  39. package/dist/descriptors/index.js +21 -45
  40. package/dist/descriptors/index.js.map +1 -1
  41. package/dist/descriptors/logSource.d.ts +45 -56
  42. package/dist/descriptors/logSource.d.ts.map +1 -1
  43. package/dist/descriptors/logSource.js +64 -74
  44. package/dist/descriptors/logSource.js.map +1 -1
  45. package/dist/enrollment/connectCode.d.ts +4 -3
  46. package/dist/enrollment/connectCode.d.ts.map +1 -1
  47. package/dist/enrollment/connectCode.js +4 -3
  48. package/dist/enrollment/connectCode.js.map +1 -1
  49. package/dist/enrollment/index.d.ts +2 -2
  50. package/dist/enrollment/index.js +2 -2
  51. package/dist/enrollment/onboardingInvite.d.ts +1 -1
  52. package/dist/enrollment/onboardingInvite.js +1 -1
  53. package/dist/enrollment/onboardingResponse.js +1 -1
  54. package/dist/genesis/accountGenesis.d.ts +13 -1
  55. package/dist/genesis/accountGenesis.d.ts.map +1 -1
  56. package/dist/genesis/accountGenesis.js +11 -2
  57. package/dist/genesis/accountGenesis.js.map +1 -1
  58. package/dist/identity/index.d.ts +1 -1
  59. package/dist/identity/index.js +1 -1
  60. package/dist/index.d.ts +4 -8
  61. package/dist/index.d.ts.map +1 -1
  62. package/dist/index.js +4 -8
  63. package/dist/index.js.map +1 -1
  64. package/dist/keyring/kdf.d.ts +33 -19
  65. package/dist/keyring/kdf.d.ts.map +1 -1
  66. package/dist/keyring/kdf.js +36 -25
  67. package/dist/keyring/kdf.js.map +1 -1
  68. package/dist/keys/collectionLogStore.d.ts +73 -0
  69. package/dist/keys/collectionLogStore.d.ts.map +1 -0
  70. package/dist/keys/collectionLogStore.js +60 -0
  71. package/dist/keys/collectionLogStore.js.map +1 -0
  72. package/dist/keys/index.d.ts +18 -6
  73. package/dist/keys/index.d.ts.map +1 -1
  74. package/dist/keys/index.js +18 -6
  75. package/dist/keys/index.js.map +1 -1
  76. package/dist/keys/rosterLogStore.d.ts +44 -6
  77. package/dist/keys/rosterLogStore.d.ts.map +1 -1
  78. package/dist/keys/rosterLogStore.js +51 -238
  79. package/dist/keys/rosterLogStore.js.map +1 -1
  80. package/dist/keys/rosterStore.d.ts.map +1 -1
  81. package/dist/keys/rosterStore.js +2 -1
  82. package/dist/keys/rosterStore.js.map +1 -1
  83. package/dist/keys/spaceEpochs.d.ts +67 -34
  84. package/dist/keys/spaceEpochs.d.ts.map +1 -1
  85. package/dist/keys/spaceEpochs.js +80 -30
  86. package/dist/keys/spaceEpochs.js.map +1 -1
  87. package/dist/keys/userKeyCascade.d.ts +26 -1
  88. package/dist/keys/userKeyCascade.d.ts.map +1 -1
  89. package/dist/keys/userKeyCascade.js +29 -2
  90. package/dist/keys/userKeyCascade.js.map +1 -1
  91. package/dist/keys/userKeyRoster.d.ts +5 -0
  92. package/dist/keys/userKeyRoster.d.ts.map +1 -1
  93. package/dist/keys/userKeyRoster.js +5 -0
  94. package/dist/keys/userKeyRoster.js.map +1 -1
  95. package/dist/keys/userKeyRosterCascade.d.ts +54 -16
  96. package/dist/keys/userKeyRosterCascade.d.ts.map +1 -1
  97. package/dist/keys/userKeyRosterCascade.js +50 -22
  98. package/dist/keys/userKeyRosterCascade.js.map +1 -1
  99. package/dist/recovery/continuation.d.ts +5 -4
  100. package/dist/recovery/continuation.d.ts.map +1 -1
  101. package/dist/recovery/continuation.js +14 -13
  102. package/dist/recovery/continuation.js.map +1 -1
  103. package/dist/resourceLog/controller.d.ts +18 -6
  104. package/dist/resourceLog/controller.d.ts.map +1 -1
  105. package/dist/resourceLog/controller.js +5 -3
  106. package/dist/resourceLog/controller.js.map +1 -1
  107. package/dist/resourceLog/document.d.ts +10 -2
  108. package/dist/resourceLog/document.d.ts.map +1 -1
  109. package/dist/resourceLog/document.js +1 -2
  110. package/dist/resourceLog/document.js.map +1 -1
  111. package/dist/resourceLog/errors.d.ts +17 -43
  112. package/dist/resourceLog/errors.d.ts.map +1 -1
  113. package/dist/resourceLog/errors.js +17 -50
  114. package/dist/resourceLog/errors.js.map +1 -1
  115. package/dist/resourceLog/index.d.ts +4 -1
  116. package/dist/resourceLog/index.d.ts.map +1 -1
  117. package/dist/resourceLog/index.js +4 -1
  118. package/dist/resourceLog/index.js.map +1 -1
  119. package/dist/resourceLog/logClass.d.ts +69 -0
  120. package/dist/resourceLog/logClass.d.ts.map +1 -0
  121. package/dist/resourceLog/logClass.js +43 -0
  122. package/dist/resourceLog/logClass.js.map +1 -0
  123. package/dist/space/collections.d.ts +22 -2
  124. package/dist/space/collections.d.ts.map +1 -1
  125. package/dist/space/collections.js +18 -0
  126. package/dist/space/collections.js.map +1 -1
  127. package/dist/space/index.d.ts +8 -5
  128. package/dist/space/index.d.ts.map +1 -1
  129. package/dist/space/index.js +8 -5
  130. package/dist/space/index.js.map +1 -1
  131. package/dist/space/provisioning.d.ts +16 -6
  132. package/dist/space/provisioning.d.ts.map +1 -1
  133. package/dist/space/provisioning.js +11 -7
  134. package/dist/space/provisioning.js.map +1 -1
  135. package/dist/space/wasLink.d.ts +13 -2
  136. package/dist/space/wasLink.d.ts.map +1 -1
  137. package/dist/space/wasLink.js +28 -2
  138. package/dist/space/wasLink.js.map +1 -1
  139. package/dist/sync/engine.d.ts +4 -2
  140. package/dist/sync/engine.d.ts.map +1 -1
  141. package/dist/sync/engine.js.map +1 -1
  142. package/dist/sync/index.d.ts +9 -6
  143. package/dist/sync/index.d.ts.map +1 -1
  144. package/dist/sync/index.js +8 -5
  145. package/dist/sync/index.js.map +1 -1
  146. package/dist/sync/push.d.ts +0 -29
  147. package/dist/sync/push.d.ts.map +1 -1
  148. package/dist/sync/push.js +30 -28
  149. package/dist/sync/push.js.map +1 -1
  150. package/dist/sync/types.d.ts +39 -21
  151. package/dist/sync/types.d.ts.map +1 -1
  152. package/dist/sync/types.js +13 -7
  153. package/dist/sync/types.js.map +1 -1
  154. package/dist/unlock/index.d.ts +1 -1
  155. package/dist/unlock/index.d.ts.map +1 -1
  156. package/dist/unlock/index.js.map +1 -1
  157. package/dist/unlock/retire.d.ts +8 -1
  158. package/dist/unlock/retire.d.ts.map +1 -1
  159. package/dist/unlock/retire.js +8 -1
  160. package/dist/unlock/retire.js.map +1 -1
  161. package/dist/unlock/standingWebvh.d.ts +81 -19
  162. package/dist/unlock/standingWebvh.d.ts.map +1 -1
  163. package/dist/unlock/standingWebvh.js +170 -30
  164. package/dist/unlock/standingWebvh.js.map +1 -1
  165. package/dist/webvh/did.d.ts +2 -4
  166. package/dist/webvh/did.d.ts.map +1 -1
  167. package/dist/webvh/did.js +2 -4
  168. package/dist/webvh/did.js.map +1 -1
  169. package/dist/webvh/didWebvh.d.ts +3 -2
  170. package/dist/webvh/didWebvh.d.ts.map +1 -1
  171. package/dist/webvh/didWebvh.js +2 -1
  172. package/dist/webvh/didWebvh.js.map +1 -1
  173. package/dist/webvh/revokeClient.d.ts +13 -7
  174. package/dist/webvh/revokeClient.d.ts.map +1 -1
  175. package/dist/webvh/revokeClient.js +14 -7
  176. package/dist/webvh/revokeClient.js.map +1 -1
  177. package/package.json +4 -19
  178. package/dist/descriptors/acquire.d.ts +0 -122
  179. package/dist/descriptors/acquire.d.ts.map +0 -1
  180. package/dist/descriptors/acquire.js +0 -100
  181. package/dist/descriptors/acquire.js.map +0 -1
  182. package/dist/descriptors/cipher.d.ts +0 -71
  183. package/dist/descriptors/cipher.d.ts.map +0 -1
  184. package/dist/descriptors/cipher.js +0 -109
  185. package/dist/descriptors/cipher.js.map +0 -1
  186. package/dist/descriptors/errors.d.ts +0 -44
  187. package/dist/descriptors/errors.d.ts.map +0 -1
  188. package/dist/descriptors/errors.js +0 -46
  189. package/dist/descriptors/errors.js.map +0 -1
  190. package/dist/descriptors/refresh.d.ts +0 -62
  191. package/dist/descriptors/refresh.d.ts.map +0 -1
  192. package/dist/descriptors/refresh.js +0 -69
  193. package/dist/descriptors/refresh.js.map +0 -1
  194. package/dist/request/appKey.d.ts +0 -295
  195. package/dist/request/appKey.d.ts.map +0 -1
  196. package/dist/request/appKey.js +0 -516
  197. package/dist/request/appKey.js.map +0 -1
  198. package/dist/request/capabilityRequest.d.ts +0 -41
  199. package/dist/request/capabilityRequest.d.ts.map +0 -1
  200. package/dist/request/capabilityRequest.js +0 -46
  201. package/dist/request/capabilityRequest.js.map +0 -1
  202. package/dist/request/classify.d.ts +0 -226
  203. package/dist/request/classify.d.ts.map +0 -1
  204. package/dist/request/classify.js +0 -416
  205. package/dist/request/classify.js.map +0 -1
  206. package/dist/request/composeVp.d.ts +0 -52
  207. package/dist/request/composeVp.d.ts.map +0 -1
  208. package/dist/request/composeVp.js +0 -176
  209. package/dist/request/composeVp.js.map +0 -1
  210. package/dist/request/ephemeralExchange.d.ts +0 -100
  211. package/dist/request/ephemeralExchange.d.ts.map +0 -1
  212. package/dist/request/ephemeralExchange.js +0 -230
  213. package/dist/request/ephemeralExchange.js.map +0 -1
  214. package/dist/request/exchangeClient.d.ts +0 -142
  215. package/dist/request/exchangeClient.d.ts.map +0 -1
  216. package/dist/request/exchangeClient.js +0 -241
  217. package/dist/request/exchangeClient.js.map +0 -1
  218. package/dist/request/index.d.ts +0 -59
  219. package/dist/request/index.d.ts.map +0 -1
  220. package/dist/request/index.js +0 -59
  221. package/dist/request/index.js.map +0 -1
  222. package/dist/request/interactionRequest.d.ts +0 -23
  223. package/dist/request/interactionRequest.d.ts.map +0 -1
  224. package/dist/request/interactionRequest.js +0 -46
  225. package/dist/request/interactionRequest.js.map +0 -1
  226. package/dist/request/interactionUrl.d.ts +0 -42
  227. package/dist/request/interactionUrl.d.ts.map +0 -1
  228. package/dist/request/interactionUrl.js +0 -104
  229. package/dist/request/interactionUrl.js.map +0 -1
  230. package/dist/request/matching.d.ts +0 -95
  231. package/dist/request/matching.d.ts.map +0 -1
  232. package/dist/request/matching.js +0 -205
  233. package/dist/request/matching.js.map +0 -1
  234. package/dist/request/onboarding.d.ts +0 -94
  235. package/dist/request/onboarding.d.ts.map +0 -1
  236. package/dist/request/onboarding.js +0 -167
  237. package/dist/request/onboarding.js.map +0 -1
  238. package/dist/request/parse.d.ts +0 -63
  239. package/dist/request/parse.d.ts.map +0 -1
  240. package/dist/request/parse.js +0 -153
  241. package/dist/request/parse.js.map +0 -1
  242. package/dist/request/presentationSuite.d.ts +0 -71
  243. package/dist/request/presentationSuite.d.ts.map +0 -1
  244. package/dist/request/presentationSuite.js +0 -143
  245. package/dist/request/presentationSuite.js.map +0 -1
  246. package/dist/request/processRequest.d.ts +0 -45
  247. package/dist/request/processRequest.d.ts.map +0 -1
  248. package/dist/request/processRequest.js +0 -147
  249. package/dist/request/processRequest.js.map +0 -1
  250. package/dist/request/queryPredicates.d.ts +0 -98
  251. package/dist/request/queryPredicates.d.ts.map +0 -1
  252. package/dist/request/queryPredicates.js +0 -107
  253. package/dist/request/queryPredicates.js.map +0 -1
  254. package/dist/request/types.d.ts +0 -257
  255. package/dist/request/types.d.ts.map +0 -1
  256. package/dist/request/types.js +0 -2
  257. package/dist/request/types.js.map +0 -1
  258. package/dist/request/walletInput.d.ts +0 -93
  259. package/dist/request/walletInput.d.ts.map +0 -1
  260. package/dist/request/walletInput.js +0 -179
  261. package/dist/request/walletInput.js.map +0 -1
@@ -2,51 +2,27 @@
2
2
  * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
3
  */
4
4
  /**
5
- * The `@interop/wallet-core/descriptors` subpath: collection
6
- * encryption-descriptor acquisition and the unknown-epoch refresh policy --
7
- * the one implementation of "which key epoch does this collection encrypt
8
- * under, and when do we ask again" that every wallet replica must share (a
9
- * drift here does not fail loudly; it fails as a resource one replica cannot
10
- * decrypt).
5
+ * The `@interop/wallet-core/descriptors` subpath: the log-governed descriptor
6
+ * source, the wallet's implementation of `@interop/was-client/edv`'s
7
+ * `EncryptionDescriptorSource` seam for collections whose encryption
8
+ * descriptor is governed by a resource log. The acquisition, cache-fallback,
9
+ * and unknown-epoch refresh policy that source plugs into (`acquireDescriptor`,
10
+ * `DescriptorRefreshPolicy`, `createRefreshingEdvDocCipher`, and the
11
+ * `isKeyUnwrapError` matcher) ship from `@interop/was-client/edv`, and this
12
+ * subpath re-exports none of them: one owner per name.
11
13
  *
12
- * - `EncryptionDescriptorSource` / `EncryptionDescriptorCache` -- the narrow
13
- * seams a host implements: one signed Collection Description read, and a
14
- * client-local get/put pre-scoped to one account's Space.
15
- * - `wasDescriptorSource` -- the `EncryptionDescriptorSource` over a
16
- * was-client handle.
17
- * - `acquireDescriptor` / `acquireDescriptors` -- fetch + cache with the
18
- * cached fallback whenever the fetch yields no descriptor, thrown or empty
19
- * (offline, a collection keeps encrypting under its current epoch; an empty
20
- * description is ambiguous, since WAS masks an unauthorized read as an
21
- * absent one). No descriptor anywhere means a plaintext collection, or an
22
- * encrypted one whose epoch[0] install has not landed -- which a caller that
23
- * has declared the collection encrypted must refuse fail-closed. A
24
- * log-governed source's refusal classes rethrow instead of falling back
25
- * (except a continuity rollback, which is reconcilable divergence).
26
- * - `logGovernedDescriptorSource` -- the `EncryptionDescriptorSource` for
27
- * collections whose descriptor is governed by a resource log: every read
28
- * (including the unknown-epoch refresh) re-verifies the log and resolves to
29
- * its verified head state, refusing a head that is not a
30
- * `WasEpochConfiguration`. It keys each collection's chain-head pin by
31
- * `collectionDescriptorLogPinId` over the Space id, the library-named slot
32
- * (`space/<spaceId>/key-map/<collectionId>.jsonl`), so no app builds one.
33
- * - `DescriptorRefreshPolicy` -- the once-per-collection-per-session
34
- * unknown-epoch refresh guard, plus the refresh-and-re-read-once wrapper
35
- * for hosts whose reads scan rows and count unknown-epoch skips.
36
- * - `createRefreshingEdvDocCipher` -- `createEdvDocCipher` bound to both: a
37
- * cipher that acquires its own descriptor and, on an unknown-epoch decrypt,
38
- * re-reads the description, swaps itself, and retries exactly once per
39
- * instance.
40
- * - `isKeyUnwrapError` -- how a host scanning rows tells "not a recipient of
41
- * this epoch" from corruption, matched by `err.name` because the cipher is
42
- * an injected seam. Its sibling `isUnknownEpochError` ships from
43
- * `@interop/was-client/sync`, beside the class it matches. This one stays
44
- * here on policy: it classifies a roster-membership failure the wallet
45
- * layer owns, and no sync driver dispatches on it.
14
+ * - `logGovernedDescriptorSource` -- every read (including the unknown-epoch
15
+ * refresh) re-verifies the log and resolves to its verified head state,
16
+ * refusing a head that is not a `WasEpochConfiguration`. Reads run under the
17
+ * collection-descriptor log class, so a ladder-signed append admits on
18
+ * `assertionMethod` membership alone. It keys each collection's chain-head
19
+ * pin by `collectionDescriptorLogPinId` over the Space id, the library-named
20
+ * slot (`space/<spaceId>/<collectionId>/meta/log`, the log's own home), so no
21
+ * app builds one. It is the one governed-descriptor reader this subpath
22
+ * publishes: the bare-controller read under it
23
+ * (`readGovernedEpochConfiguration`, was-client's) states no log class and
24
+ * would read a collection log under the roster's license, so it stays
25
+ * module-internal.
46
26
  */
47
- export { acquireDescriptor, acquireDescriptors, wasDescriptorSource } from './acquire.js';
48
- export { collectionDescriptorLogPinId, EPOCH_CONFIGURATION_STATE_TYPE, logGovernedDescriptorSource, readGovernedEpochConfiguration } from './logSource.js';
49
- export { DescriptorRefreshPolicy } from './refresh.js';
50
- export { createRefreshingEdvDocCipher } from './cipher.js';
51
- export { isKeyUnwrapError } from './errors.js';
27
+ export { collectionDescriptorLogPinId, logGovernedDescriptorSource } from './logSource.js';
52
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/descriptors/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,cAAc,CAAA;AAMrB,OAAO,EACL,4BAA4B,EAC5B,8BAA8B,EAC9B,2BAA2B,EAC3B,8BAA8B,EAC/B,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAEtD,OAAO,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAA;AAE1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/descriptors/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EACL,4BAA4B,EAC5B,2BAA2B,EAC5B,MAAM,gBAAgB,CAAA"}
@@ -12,28 +12,44 @@
12
12
  * log rather than adopting whatever the host serves. A verified head whose
13
13
  * state is not an epoch configuration is refused fail-closed rather than
14
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.
15
28
  */
16
- import type { CollectionEncryption } from '@interop/was-client';
17
- import { type ResourceLogController, type ResourceLogPinStore, type ResourceLogStore, type VerifiedResourceLog } from '@interop/vh-resource-log';
18
- import type { EncryptionDescriptorSource } from './acquire.js';
29
+ import { EPOCH_CONFIGURATION_STATE_TYPE, readGovernedEpochConfiguration, type EncryptionDescriptorSource } from '@interop/was-client/edv';
30
+ import { type ResourceLogPinStore, type ResourceLogStore } from '@interop/vh-resource-log';
31
+ import { type WebvhResourceLogController } from '../resourceLog/index.js';
19
32
  /**
20
- * The state-document schema identifier an encryption descriptor carries in a
21
- * 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.
22
37
  */
23
- export declare const EPOCH_CONFIGURATION_STATE_TYPE = "WasEpochConfiguration";
38
+ export { EPOCH_CONFIGURATION_STATE_TYPE, readGovernedEpochConfiguration };
24
39
  /**
25
40
  * The pin-slot key for a collection's governing descriptor log: the slot a
26
41
  * keyed `ResourceLogPinStore` holds that log's chain-head pin under,
27
- * `space/<spaceId>/key-map/<collectionId>.jsonl`. The library names it, as it
42
+ * `space/<spaceId>/<collectionId>/meta/log`. The library names it, as it
28
43
  * names the account log's (`accountLogPinId`) and the roster's
29
- * (`userKeyRosterPinId`) slots, so no app builds one of its own: the shape is
30
- * host-free on purpose -- the Space id is what stays stable across a claimed
31
- * host move, so a log served from a new host still lands in the same slot and
32
- * is checked against the held pin rather than opening a fresh
33
- * trust-on-first-use slate. The resource half mirrors the roster log's home
34
- * (`key-map/user-key.jsonl`): a governing log lives in the plaintext,
35
- * capability-gated key-map collection, beside the roster, since a log stored
36
- * 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.
37
53
  *
38
54
  * @param options {object}
39
55
  * @param options.spaceId {string} the data Space id
@@ -44,56 +60,29 @@ export declare function collectionDescriptorLogPinId({ spaceId, collectionId }:
44
60
  spaceId: string;
45
61
  collectionId: string;
46
62
  }): string;
47
- /**
48
- * The one governed epoch-configuration read: the fail-closed boundary that
49
- * decides whether a served log state may be treated as an encryption
50
- * descriptor. Resolves the controller view, reads and fully verifies the log
51
- * (chain, proofs, external authorization, and the chain-head pin, via
52
- * `readResourceLog`), and refuses a verified head whose state is not a
53
- * `WasEpochConfiguration` rather than handing it out as a descriptor.
54
- * Resolves `null` for an absent log (the pre-genesis state) only while no pin
55
- * is held for it; under a held pin an absent log is refused as a `rollback`,
56
- * the library's rule. Both governed
57
- * descriptor consumers -- the log-governed descriptor source below and the
58
- * roster's log-governed descriptor store -- read through this helper, so a
59
- * hardening applied here reaches every trusted descriptor read.
60
- *
61
- * @param options {object}
62
- * @param options.store {ResourceLogStore} the log's transport seam
63
- * @param options.resolveController {function}
64
- * `() => Promise<ResourceLogController>` -- the caller's currently verified
65
- * controller view, resolved per operation
66
- * @param options.pinStore {ResourceLogPinStore} this client's chain-head
67
- * pin for this log
68
- * @param options.logId {string} the pin-slot key for this log, from
69
- * `resourceLogPinId`
70
- * @returns {Promise<{ verified: VerifiedResourceLog; descriptor: CollectionEncryption; etag?: string } | null>}
71
- */
72
- export declare function readGovernedEpochConfiguration({ store, resolveController, pinStore, logId }: {
73
- store: ResourceLogStore;
74
- resolveController: () => Promise<ResourceLogController>;
75
- pinStore: ResourceLogPinStore;
76
- logId: string;
77
- }): Promise<{
78
- verified: VerifiedResourceLog;
79
- descriptor: CollectionEncryption;
80
- etag?: string;
81
- } | null>;
82
63
  /**
83
64
  * Builds the {@link EncryptionDescriptorSource} over per-collection resource
84
65
  * logs. An absent log resolves `undefined` exactly like an absent
85
66
  * Collection Description `encryption` member (a plaintext collection, or one
86
67
  * whose provisioning has not landed), unless a pin is held for it, in which
87
68
  * case the read refuses as a `rollback`; verification failures throw through --
88
- * {@link acquireDescriptor} rethrows the refusal classes rather than falling
89
- * back to the cache.
69
+ * was-client's `acquireDescriptor` rethrows the refusal classes rather than
70
+ * falling back to the cache.
71
+ *
72
+ * Every read runs under the collection-descriptor log class
73
+ * ({@link controllerForLogClass}), so a ladder-signed append verifies on
74
+ * `assertionMethod` membership alone. Without that narrowing a reader would
75
+ * inherit the roster's ceremony-tail license and refuse a served log its own
76
+ * wallet's standing credential wrote.
90
77
  *
91
78
  * @param options {object}
92
79
  * @param options.logFor {function} `(collectionId) => ResourceLogStore` --
93
- * the collection's governing log's transport seam
80
+ * the collection's governing log's transport seam (was-client's
81
+ * `resourceLogStore({ collection })` over the collection's `meta/log`)
94
82
  * @param options.resolveController {function}
95
- * `() => Promise<ResourceLogController>` -- the caller's currently verified
96
- * controller view, resolved per operation
83
+ * `() => Promise<WebvhResourceLogController>` -- the caller's currently
84
+ * verified controller view, resolved per operation and narrowed here to
85
+ * this log class
97
86
  * @param options.pinStore {ResourceLogPinStore} this client's chain-head
98
87
  * pins, keyed per log; each collection's slot is
99
88
  * {@link collectionDescriptorLogPinId} over `spaceId`
@@ -102,7 +91,7 @@ export declare function readGovernedEpochConfiguration({ store, resolveControlle
102
91
  */
103
92
  export declare function logGovernedDescriptorSource({ logFor, resolveController, pinStore, spaceId }: {
104
93
  logFor: (collectionId: string) => ResourceLogStore;
105
- resolveController: () => Promise<ResourceLogController>;
94
+ resolveController: () => Promise<WebvhResourceLogController>;
106
95
  pinStore: ResourceLogPinStore;
107
96
  spaceId: string;
108
97
  }): EncryptionDescriptorSource;
@@ -1 +1 @@
1
- {"version":3,"file":"logSource.d.ts","sourceRoot":"","sources":["../../src/descriptors/logSource.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAE/D,OAAO,EAIL,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACzB,MAAM,0BAA0B,CAAA;AAEjC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAA;AAE9D;;;GAGG;AACH,eAAO,MAAM,8BAA8B,0BAA0B,CAAA;AAErE;;;;;;;;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CAAA;AACjC,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,yBAAyB,CAAA;AAEhC;;;;;GAKG;AACH,OAAO,EAAE,8BAA8B,EAAE,8BAA8B,EAAE,CAAA;AAEzE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,4BAA4B,CAAC,EAC3C,OAAO,EACP,YAAY,EACb,EAAE;IACD,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,MAAM,CAAA;CACrB,GAAG,MAAM,CAET;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,2BAA2B,CAAC,EAC1C,MAAM,EACN,iBAAiB,EACjB,QAAQ,EACR,OAAO,EACR,EAAE;IACD,MAAM,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,gBAAgB,CAAA;IAClD,iBAAiB,EAAE,MAAM,OAAO,CAAC,0BAA0B,CAAC,CAAA;IAC5D,QAAQ,EAAE,mBAAmB,CAAA;IAC7B,OAAO,EAAE,MAAM,CAAA;CAChB,GAAG,0BAA0B,CAmB7B"}
@@ -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;IAC5C,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;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"}
@@ -7,9 +7,10 @@
7
7
  *
8
8
  * It is a leaf module deliberately. Recognizing a connect code is something a
9
9
  * paste box or a QR scanner does long before any ceremony machinery is
10
- * involved, so the input classifier can depend on this without pulling in the
11
- * enrollment ceremony's whole graph -- and there is still exactly one spelling
12
- * of the prefix in the codebase.
10
+ * involved: {@link isConnectCode} is the recognizer a wallet hands
11
+ * `@interop/wallet-request`'s input classifier for its `connect-code` branch,
12
+ * and importing it here pulls in none of the enrollment ceremony's graph --
13
+ * while there is still exactly one spelling of the prefix in the codebase.
13
14
  */
14
15
  /**
15
16
  * The connect-code prefix; the payload after it is base64url(JSON) of an
@@ -1 +1 @@
1
- {"version":3,"file":"connectCode.d.ts","sourceRoot":"","sources":["../../src/enrollment/connectCode.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;GASG;AAEH;;;GAGG;AACH,eAAO,MAAM,mBAAmB,wBAAwB,CAAA;AAExD;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEnD"}
1
+ {"version":3,"file":"connectCode.d.ts","sourceRoot":"","sources":["../../src/enrollment/connectCode.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;GAUG;AAEH;;;GAGG;AACH,eAAO,MAAM,mBAAmB,wBAAwB,CAAA;AAExD;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEnD"}
@@ -7,9 +7,10 @@
7
7
  *
8
8
  * It is a leaf module deliberately. Recognizing a connect code is something a
9
9
  * paste box or a QR scanner does long before any ceremony machinery is
10
- * involved, so the input classifier can depend on this without pulling in the
11
- * enrollment ceremony's whole graph -- and there is still exactly one spelling
12
- * of the prefix in the codebase.
10
+ * involved: {@link isConnectCode} is the recognizer a wallet hands
11
+ * `@interop/wallet-request`'s input classifier for its `connect-code` branch,
12
+ * and importing it here pulls in none of the enrollment ceremony's graph --
13
+ * while there is still exactly one spelling of the prefix in the codebase.
13
14
  */
14
15
  /**
15
16
  * The connect-code prefix; the payload after it is base64url(JSON) of an
@@ -1 +1 @@
1
- {"version":3,"file":"connectCode.js","sourceRoot":"","sources":["../../src/enrollment/connectCode.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;GASG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,qBAAqB,CAAA;AAExD;;;;;;;;GAQG;AACH,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAA;AACpD,CAAC"}
1
+ {"version":3,"file":"connectCode.js","sourceRoot":"","sources":["../../src/enrollment/connectCode.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;GAUG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,qBAAqB,CAAA;AAExD;;;;;;;;GAQG;AACH,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAA;AACpD,CAAC"}
@@ -19,11 +19,11 @@
19
19
  * - `encodeOnboardingResponse` / `parseOnboardingResponse` -- the onboarding-
20
20
  * response envelope, the transport that carries a connect code (verbatim)
21
21
  * plus a suggested display label back over an exchange whose request asked
22
- * with a `WalletOnboardingQuery` (`@interop/wallet-core/request`).
22
+ * with a `WalletOnboardingQuery` (`@interop/wallet-request`).
23
23
  * - `ONBOARDING_INVITE_TTL_MS` -- how long a wallet offers an invite for. The
24
24
  * invite's transport (creating the ephemeral exchange that carries the
25
25
  * query, polling it until the envelope arrives) is the generic requester in
26
- * `@interop/wallet-core/request` (`createEphemeralExchange` /
26
+ * `@interop/wallet-request` (`createEphemeralExchange` /
27
27
  * `pollEphemeralExchange`).
28
28
  * - `completeEnrollmentCore` -- the enrollee's half: verify from the published
29
29
  * log, read the roster, hand back the user key and the epoch to pin. Persisting
@@ -19,11 +19,11 @@
19
19
  * - `encodeOnboardingResponse` / `parseOnboardingResponse` -- the onboarding-
20
20
  * response envelope, the transport that carries a connect code (verbatim)
21
21
  * plus a suggested display label back over an exchange whose request asked
22
- * with a `WalletOnboardingQuery` (`@interop/wallet-core/request`).
22
+ * with a `WalletOnboardingQuery` (`@interop/wallet-request`).
23
23
  * - `ONBOARDING_INVITE_TTL_MS` -- how long a wallet offers an invite for. The
24
24
  * invite's transport (creating the ephemeral exchange that carries the
25
25
  * query, polling it until the envelope arrives) is the generic requester in
26
- * `@interop/wallet-core/request` (`createEphemeralExchange` /
26
+ * `@interop/wallet-request` (`createEphemeralExchange` /
27
27
  * `pollEphemeralExchange`).
28
28
  * - `completeEnrollmentCore` -- the enrollee's half: verify from the published
29
29
  * log, read the roster, hand back the user key and the epoch to pin. Persisting
@@ -4,7 +4,7 @@
4
4
  /**
5
5
  * The wallet-onboarding invite's one policy constant. The invite's transport
6
6
  * is the generic ephemeral-exchange requester in
7
- * `@interop/wallet-core/request` (`createEphemeralExchange` /
7
+ * `@interop/wallet-request` (`createEphemeralExchange` /
8
8
  * `pollEphemeralExchange`); what stays here is how long a wallet offers the
9
9
  * invite for.
10
10
  */
@@ -4,7 +4,7 @@
4
4
  /**
5
5
  * The wallet-onboarding invite's one policy constant. The invite's transport
6
6
  * is the generic ephemeral-exchange requester in
7
- * `@interop/wallet-core/request` (`createEphemeralExchange` /
7
+ * `@interop/wallet-request` (`createEphemeralExchange` /
8
8
  * `pollEphemeralExchange`); what stays here is how long a wallet offers the
9
9
  * invite for.
10
10
  */
@@ -4,7 +4,7 @@
4
4
  /**
5
5
  * The onboarding-response envelope: what a fresh wallet (the enrollee) POSTs
6
6
  * back to an ephemeral exchange whose request carried a
7
- * `WalletOnboardingQuery` (`@interop/wallet-core/request`). It is transport
7
+ * `WalletOnboardingQuery` (`@interop/wallet-request`). It is transport
8
8
  * vocabulary only -- the enrollment ceremony is untouched.
9
9
  *
10
10
  * The envelope carries an ordinary connect code VERBATIM as its payload, so
@@ -185,6 +185,15 @@ export interface AccountGenesisResult {
185
185
  * EncryptionDescriptorStore` -- builds the user-key roster's descriptor
186
186
  * store once the account DID is known (the log-governed store's controller
187
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
188
197
  * @param [options.provideKmsAuthentication] {Function} `({ spaceReady }) =>
189
198
  * Promise<KmsAuthenticationBinding | undefined>` -- the KMS authentication
190
199
  * binding's acquisition; absent or resolving `undefined`, the genesis is
@@ -218,7 +227,7 @@ export interface AccountGenesisResult {
218
227
  * genesis emits at the same point
219
228
  * @returns {Promise<AccountGenesisResult>}
220
229
  */
221
- export declare function ensureAccountGenesis({ was, wasAsClient, wasServerUrl, spaceId, keyAgent, clientKeyAgreementKey, userKey, updateKeys, idStore, rosterStoreFor, provideKmsAuthentication, expectedDid, onDidPublished, promoteController, onStage }: {
230
+ export declare function ensureAccountGenesis({ was, wasAsClient, wasServerUrl, spaceId, keyAgent, clientKeyAgreementKey, userKey, updateKeys, idStore, rosterStoreFor, collectionStoreFor, provideKmsAuthentication, expectedDid, onDidPublished, promoteController, onStage }: {
222
231
  was: WasClient;
223
232
  wasAsClient?: WasClient;
224
233
  wasServerUrl: string;
@@ -231,6 +240,9 @@ export declare function ensureAccountGenesis({ was, wasAsClient, wasServerUrl, s
231
240
  rosterStoreFor: (options: {
232
241
  did: string;
233
242
  }) => EncryptionDescriptorStore;
243
+ collectionStoreFor: (options: {
244
+ did: string;
245
+ }) => (collectionId: string) => EncryptionDescriptorStore;
234
246
  provideKmsAuthentication?: (options: {
235
247
  spaceReady: Promise<unknown>;
236
248
  }) => Promise<KmsAuthenticationBinding | undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"accountGenesis.d.ts","sourceRoot":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AAE;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
@@ -217,7 +226,7 @@ export class AccountGenesisSpaceError extends Error {
217
226
  * genesis emits at the same point
218
227
  * @returns {Promise<AccountGenesisResult>}
219
228
  */
220
- export async function ensureAccountGenesis({ was, wasAsClient, wasServerUrl, spaceId, keyAgent, clientKeyAgreementKey, userKey, updateKeys, idStore, rosterStoreFor, provideKmsAuthentication, expectedDid, 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 }) {
221
230
  const failed = [];
222
231
  const stage = stageNotifier(onStage);
223
232
  // 1. The Space and its collection roster, create-if-absent under this
@@ -303,7 +312,7 @@ export async function ensureAccountGenesis({ was, wasAsClient, wasServerUrl, spa
303
312
  if (rosterDescriptor) {
304
313
  try {
305
314
  const fanOut = await ensureWalletSpaceEpochs({
306
- was,
315
+ storeFor: collectionStoreFor({ did }),
307
316
  spaceId,
308
317
  userKey,
309
318
  rosterDescriptor