@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
@@ -40,9 +40,8 @@
40
40
  * Per-collection fan-out failures surface on the result's `epochs.failed`
41
41
  * list (the establishment's assert contract); nothing is discarded.
42
42
  */
43
- import type { IZcap } from '@interop/data-integrity-core';
44
43
  import type { IKeyAgreementKey } from '@interop/data-integrity-core';
45
- import type { CollectionEncryption, WasClient } from '@interop/was-client';
44
+ import type { CollectionEncryption } from '@interop/was-client';
46
45
  import type { EncryptionDescriptorStore } from '@interop/was-client/edv';
47
46
  import { type UserKey, type WalletSpaceEpochsResult } from '../keys/index.js';
48
47
  /**
@@ -76,10 +75,11 @@ export type RosterDeliveredEpochsResult = {
76
75
  /**
77
76
  * Ensures the user-key roster exists and every encrypted collection carries
78
77
  * epoch[0] under the key the roster delivers (see the module doc for the
79
- * policy and the refusal shapes). The two authority pairs ride the caller's
80
- * handles: the SIGNER is the store's (`store`, ladder-signed appends on a
81
- * ladder-anchored account), the INVOCATION is `was`'s -- bootstrap root
82
- * pre-promotion, or a delegated capability post-promotion (`capability`).
78
+ * policy and the refusal shapes). Both authority pairs ride the caller's
79
+ * stores: the SIGNER and the INVOCATION are wired into `store` for the
80
+ * roster and into each `storeFor` store for the collections -- ladder-signed
81
+ * appends on a ladder-anchored account, invoked with the bootstrap root
82
+ * pre-promotion or with a delegated capability post-promotion.
83
83
  *
84
84
  * @param options {object}
85
85
  * @param options.store {EncryptionDescriptorStore} the roster's descriptor
@@ -90,11 +90,11 @@ export type RosterDeliveredEpochsResult = {
90
90
  * @param options.clientKeyAgreementKey {IKeyAgreementKey} the credential's
91
91
  * own key-agreement key -- the roster recipient the ensure wraps to, and
92
92
  * the unwrap key of the re-read
93
- * @param options.was {WasClient} the collection fan-out's storage client
94
- * @param options.spaceId {string} the account Space's id
95
- * @param [options.capability] {IZcap} the delegated invocation capability
96
- * every fan-out request rides (a post-promotion caller: the generation
97
- * delegation); absent, requests invoke the root capability
93
+ * @param options.storeFor {function} `(collectionId) =>
94
+ * EncryptionDescriptorStore` -- the collection fan-out's per-collection
95
+ * descriptor stores
96
+ * @param options.spaceId {string} the account Space's id, named in the
97
+ * fan-out's per-collection failure messages
98
98
  * @param [options.collectionIds] {string[]} the fan-out's collection set
99
99
  * override, threaded through to `ensureWalletSpaceEpochs`
100
100
  * @param options.beforeMint {Function} `() => Promise<void>` -- the mint
@@ -109,13 +109,12 @@ export type RosterDeliveredEpochsResult = {
109
109
  * is refused with a `TypeError` before any read
110
110
  * @returns {Promise<RosterDeliveredEpochsResult>}
111
111
  */
112
- export declare function ensureRosterDeliveredEpochs({ store, candidateUserKey, clientKeyAgreementKey, was, spaceId, capability, collectionIds, beforeMint }: {
112
+ export declare function ensureRosterDeliveredEpochs({ store, candidateUserKey, clientKeyAgreementKey, storeFor, spaceId, collectionIds, beforeMint }: {
113
113
  store: EncryptionDescriptorStore;
114
114
  candidateUserKey: UserKey;
115
115
  clientKeyAgreementKey: IKeyAgreementKey;
116
- was: WasClient;
116
+ storeFor: (collectionId: string) => EncryptionDescriptorStore;
117
117
  spaceId: string;
118
- capability?: IZcap;
119
118
  collectionIds?: string[];
120
119
  beforeMint: () => Promise<void>;
121
120
  }): Promise<RosterDeliveredEpochsResult>;
@@ -1 +1 @@
1
- {"version":3,"file":"rosterDeliveredEpochs.d.ts","sourceRoot":"","sources":["../../src/clientAnnex/rosterDeliveredEpochs.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AACpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC1E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAA;AACxE,OAAO,EAIL,KAAK,OAAO,EACZ,KAAK,uBAAuB,EAC7B,MAAM,kBAAkB,CAAA;AAczB;;;;;;;GAOG;AACH,MAAM,MAAM,2BAA2B,GACnC;IACE,OAAO,EAAE,WAAW,GAAG,qBAAqB,CAAA;IAC5C;;OAEG;IACH,OAAO,EAAE,OAAO,CAAA;IAChB,gBAAgB,EAAE,oBAAoB,CAAA;IACtC;;OAEG;IACH,MAAM,EAAE,OAAO,CAAA;IACf,MAAM,EAAE,uBAAuB,CAAA;CAChC,GACD;IACE,OAAO,EAAE,SAAS,CAAA;IAClB,gBAAgB,EAAE,oBAAoB,CAAA;IACtC;;OAEG;IACH,KAAK,EAAE,OAAO,CAAA;CACf,CAAA;AAEL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAsB,2BAA2B,CAAC,EAChD,KAAK,EACL,gBAAgB,EAChB,qBAAqB,EACrB,GAAG,EACH,OAAO,EACP,UAAU,EACV,aAAa,EACb,UAAU,EACX,EAAE;IACD,KAAK,EAA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AChB,qBAAqB,EACrB,QAAQ,EACR,OAAO,EACP,aAAa,EACb,UAAU,EACX,EAAE;IACD,KAAK,EAAE,yBAAyB,CAAA;IAChC,gBAAgB,EAAE,OAAO,CAAA;IACzB,qBAAqB,EAAE,gBAAgB,CAAA;IACvC,QAAQ,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,yBAAyB,CAAA;IAC7D,OAAO,EAAE,MAAM,CAAA;IACf,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;IACxB,UAAU,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAChC,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAmFvC"}
@@ -13,10 +13,11 @@ const CREATE_RACE_ERROR_NAMES = new Set([
13
13
  /**
14
14
  * Ensures the user-key roster exists and every encrypted collection carries
15
15
  * epoch[0] under the key the roster delivers (see the module doc for the
16
- * policy and the refusal shapes). The two authority pairs ride the caller's
17
- * handles: the SIGNER is the store's (`store`, ladder-signed appends on a
18
- * ladder-anchored account), the INVOCATION is `was`'s -- bootstrap root
19
- * pre-promotion, or a delegated capability post-promotion (`capability`).
16
+ * policy and the refusal shapes). Both authority pairs ride the caller's
17
+ * stores: the SIGNER and the INVOCATION are wired into `store` for the
18
+ * roster and into each `storeFor` store for the collections -- ladder-signed
19
+ * appends on a ladder-anchored account, invoked with the bootstrap root
20
+ * pre-promotion or with a delegated capability post-promotion.
20
21
  *
21
22
  * @param options {object}
22
23
  * @param options.store {EncryptionDescriptorStore} the roster's descriptor
@@ -27,11 +28,11 @@ const CREATE_RACE_ERROR_NAMES = new Set([
27
28
  * @param options.clientKeyAgreementKey {IKeyAgreementKey} the credential's
28
29
  * own key-agreement key -- the roster recipient the ensure wraps to, and
29
30
  * the unwrap key of the re-read
30
- * @param options.was {WasClient} the collection fan-out's storage client
31
- * @param options.spaceId {string} the account Space's id
32
- * @param [options.capability] {IZcap} the delegated invocation capability
33
- * every fan-out request rides (a post-promotion caller: the generation
34
- * delegation); absent, requests invoke the root capability
31
+ * @param options.storeFor {function} `(collectionId) =>
32
+ * EncryptionDescriptorStore` -- the collection fan-out's per-collection
33
+ * descriptor stores
34
+ * @param options.spaceId {string} the account Space's id, named in the
35
+ * fan-out's per-collection failure messages
35
36
  * @param [options.collectionIds] {string[]} the fan-out's collection set
36
37
  * override, threaded through to `ensureWalletSpaceEpochs`
37
38
  * @param options.beforeMint {Function} `() => Promise<void>` -- the mint
@@ -46,7 +47,7 @@ const CREATE_RACE_ERROR_NAMES = new Set([
46
47
  * is refused with a `TypeError` before any read
47
48
  * @returns {Promise<RosterDeliveredEpochsResult>}
48
49
  */
49
- export async function ensureRosterDeliveredEpochs({ store, candidateUserKey, clientKeyAgreementKey, was, spaceId, capability, collectionIds, beforeMint }) {
50
+ export async function ensureRosterDeliveredEpochs({ store, candidateUserKey, clientKeyAgreementKey, storeFor, spaceId, collectionIds, beforeMint }) {
50
51
  if (typeof beforeMint !== 'function') {
51
52
  throw new TypeError('ensureRosterDeliveredEpochs requires a beforeMint seam: the mint ' +
52
53
  'preconditions that license installing the candidate as epoch[0].');
@@ -109,11 +110,10 @@ export async function ensureRosterDeliveredEpochs({ store, candidateUserKey, cli
109
110
  // the install. Per-collection failures ride the result's `failed` list to
110
111
  // the caller.
111
112
  const epochs = await ensureWalletSpaceEpochs({
112
- was,
113
+ storeFor,
113
114
  spaceId,
114
115
  userKey,
115
116
  rosterDescriptor: descriptor,
116
- ...(capability !== undefined ? { capability } : {}),
117
117
  ...(collectionIds !== undefined ? { collectionIds } : {})
118
118
  });
119
119
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"rosterDeliveredEpochs.js","sourceRoot":"","sources":["../../src/clientAnnex/rosterDeliveredEpochs.ts"],"names":[],"mappings":"AA8CA,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,iBAAiB,EAGlB,MAAM,kBAAkB,CAAA;AAEzB;;;;;;GAMG;AACH,MAAM,uBAAuB,GAAG,IAAI,GAAG,CAAC;IACtC,yBAAyB;I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CAAC,YAAY,KAAK,gBAAgB,CAAC,EAAE,CAAA;IAE9D,+DAA+D;IAC/D,sEAAsE;IACtE,kCAAkC;IAClC,IAAI,OAAgB,CAAA;IACpB,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,iBAAiB,CAAC;YACnC,KAAK;YACL,UAAU;YACV,OAAO,EAAE,gBAAgB;YACzB,qBAAqB;SACtB,CAAC,CAAA;QACF,OAAO,GAAG,IAAI,CAAC,OAAO,CAAA;IACxB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IACG,GAAgC,EAAE,IAAI,KAAK,0BAA0B,EACtE,CAAC;YACD,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,EAAE,CAAA;QACzE,CAAC;QACD,MAAM,GAAG,CAAA;IACX,CAAC;IAED,2EAA2E;IAC3E,uEAAuE;IACvE,uEAAuE;IACvE,wEAAwE;IACxE,0EAA0E;IAC1E,cAAc;IACd,MAAM,MAAM,GAAG,MAAM,uBAAuB,CAAC;QAC3C,GAAG;QACH,OAAO;QACP,OAAO;QACP,gBAAgB,EAAE,UAAU;QAC5B,GAAG,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACnD,GAAG,CAAC,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC1D,CAAC,CAAA;IACF,OAAO;QACL,OAAO,EAAE,kBAAkB,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,WAAW;QACjE,OAAO;QACP,gBAAgB,EAAE,UAAU;QAC5B,MAAM;QACN,MAAM;KACP,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"rosterDeliveredEpochs.js","sourceRoot":"","sources":["../../src/clientAnnex/rosterDeliveredEpochs.ts"],"names":[],"mappings":"AA6CA,OA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import type { UserKey } from '../keys/userKey.js';
46
46
  import type { AccountPointer } from '../keyring/record.js';
47
- import { type ResourceLogPinStore } from '@interop/vh-resource-log';
48
47
  import type { ClientWebvhUpdateKeys } from '../webvh/didWebvh.js';
49
48
  import type { UnlockLogStore } from '../unlock/standingWebvh.js';
50
49
  /**
@@ -65,13 +64,11 @@ import type { UnlockLogStore } from '../unlock/standingWebvh.js';
65
64
  * with
66
65
  * @param options.logStore {UnlockLogStore} the public log read plus the
67
66
  * delegated `did.jsonl` PUT, built by the app around the record's bridge
68
- * delegation
69
- * @param [options.accountLogPinStore] {ResourceLogPinStore} this client's
70
- * chain-head pin for the account log, checked on every read the two log
71
- * entries are built on and advanced as each publishes, then checked again
72
- * by the verify that follows. A fresh browser normally has none (this is
73
- * its first contact), which is exactly the pin's trust-on-first-use
74
- * establishment
67
+ * delegation. It carries this client's chain-head pin for the account log,
68
+ * checked on every read the two log entries are built on and advanced as
69
+ * each publishes, then checked again by the verify that follows. A fresh
70
+ * browser normally holds no pin yet (this is its first contact), which is
71
+ * exactly the pin's trust-on-first-use establishment
75
72
  * @param options.onCommitted {function}
76
73
  * `(committed: { builtOnHead, clientSeed, webvhUpdateKeys }) =>
77
74
  * Promise<void>` -- the REQUIRED persist-before-publish seam. The caller
@@ -111,12 +108,11 @@ import type { UnlockLogStore } from '../unlock/standingWebvh.js';
111
108
  * cleared. The member exists so a build skew that dropped it surfaces
112
109
  * instead of reading as `false`
113
110
  */
114
- export declare function selfEnrollClientCore({ pointer, ladderSeed, credentialKeyAgreementKey, logStore, accountLogPinStore, onCommitted, resume }: {
111
+ export declare function selfEnrollClientCore({ pointer, ladderSeed, credentialKeyAgreementKey, logStore, onCommitted, resume }: {
115
112
  pointer: AccountPointer;
116
113
  ladderSeed: Uint8Array;
117
114
  credentialKeyAgreementKey: IKeyAgreementKey;
118
115
  logStore: UnlockLogStore;
119
- accountLogPinStore?: ResourceLogPinStore;
120
116
  onCommitted: (committed: {
121
117
  builtOnHead: {
122
118
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;SAAE,CAAA;QAChD,UAAU,EAAE,UAAU,CAAA;QACtB,eAAe,EAAE,qBAAqB,CAAA;KACvC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACnB,MAAM,CAAC,EAAE;QACP,UAAU,EAAE,UAAU,CAAA;QACtB,eAAe,EAAE,qBAAqB,CAAA;QACtC,WAAW,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,SAAS,EAAE,MAAM,CAAA;SAAE,CAAA;KACjD,CAAA;CACF,GAAG,OAAO,CAAC;IACV,UAAU,EAAE,UAAU,CAAA;IACtB,eAAe,EAAE,qBAAqB,CAAA;IACtC,SAAS,EAAE,MAAM,CAAA;IACjB,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,OAAO,CAAA;IAChB,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,OAAO,CAAA;CACnB,CAAC,CA2ID"}
@@ -4,7 +4,7 @@ import { userKeyRosterDescriptorStore } from '../keys/rosterStore.js';
4
4
  import { memoryResourceLogPinStore } from '@interop/vh-resource-log';
5
5
  import { webvhResourceLogController } from '../resourceLog/index.js';
6
6
  import { mintClientWebvhUpdateKeys, updateKeyMultibase } from '../webvh/didWebvh.js';
7
- import { accountLogPinId, verifyAccountLog } from '../webvh/verifyLog.js';
7
+ import { verifyAccountLog } from '../webvh/verifyLog.js';
8
8
  import { clientSigningKeyMultibase, isWebvhDid, webvhZcapClient } from '../webvh/zcap.js';
9
9
  import { assertBuiltOnHeadShape, selfEnrollWebvhClient } from './ladderAnchored.js';
10
10
  /**
@@ -25,13 +25,11 @@ import { assertBuiltOnHeadShape, selfEnrollWebvhClient } from './ladderAnchored.
25
25
  * with
26
26
  * @param options.logStore {UnlockLogStore} the public log read plus the
27
27
  * delegated `did.jsonl` PUT, built by the app around the record's bridge
28
- * delegation
29
- * @param [options.accountLogPinStore] {ResourceLogPinStore} this client's
30
- * chain-head pin for the account log, checked on every read the two log
31
- * entries are built on and advanced as each publishes, then checked again
32
- * by the verify that follows. A fresh browser normally has none (this is
33
- * its first contact), which is exactly the pin's trust-on-first-use
34
- * establishment
28
+ * delegation. It carries this client's chain-head pin for the account log,
29
+ * checked on every read the two log entries are built on and advanced as
30
+ * each publishes, then checked again by the verify that follows. A fresh
31
+ * browser normally holds no pin yet (this is its first contact), which is
32
+ * exactly the pin's trust-on-first-use establishment
35
33
  * @param options.onCommitted {function}
36
34
  * `(committed: { builtOnHead, clientSeed, webvhUpdateKeys }) =>
37
35
  * Promise<void>` -- the REQUIRED persist-before-publish seam. The caller
@@ -71,7 +69,7 @@ import { assertBuiltOnHeadShape, selfEnrollWebvhClient } from './ladderAnchored.
71
69
  * cleared. The member exists so a build skew that dropped it surfaces
72
70
  * instead of reading as `false`
73
71
  */
74
- export async function selfEnrollClientCore({ pointer, ladderSeed, credentialKeyAgreementKey, logStore, accountLogPinStore, onCommitted, resume }) {
72
+ export async function selfEnrollClientCore({ pointer, ladderSeed, credentialKeyAgreementKey, logStore, onCommitted, resume }) {
75
73
  // Refused before any read, on the ceremony's own rule: without the seam the
76
74
  // pivot entry can publish a client whose seed nothing persisted.
77
75
  if (typeof onCommitted !== 'function') {
@@ -133,13 +131,7 @@ export async function selfEnrollClientCore({ pointer, ladderSeed, credentialKeyA
133
131
  // rewrite of what already stands.
134
132
  onCommitted: async ({ builtOnHead }) => onCommitted({ builtOnHead, clientSeed, webvhUpdateKeys }),
135
133
  ...(resume ? { builtOnHead: resume.builtOnHead } : {}),
136
- expectedDid,
137
- ...(accountLogPinStore
138
- ? {
139
- pinStore: accountLogPinStore,
140
- logId: accountLogPinId({ spaceId: pointer.spaceId })
141
- }
142
- : {})
134
+ expectedDid
143
135
  });
144
136
  // Verify the continuation from the world-readable log -- the same
145
137
  // first-contact read an enrollee's completion runs, and the controller the
@@ -148,7 +140,10 @@ export async function selfEnrollClientCore({ pointer, ladderSeed, credentialKeyA
148
140
  did: expectedDid,
149
141
  spaceId: pointer.spaceId,
150
142
  host: pointer.host,
151
- ...(accountLogPinStore ? { pinStore: accountLogPinStore } : {})
143
+ // The same chain-head pin the two entries above published under: the
144
+ // verifier fetches the log by host URL and holds no store, so the store's
145
+ // own pin is handed to it explicitly.
146
+ pinStore: logStore.pin.store
152
147
  });
153
148
  // The first roster read: signed with the `<did:webvh>#<multibase>` keyId
154
149
  // the add entry just published, unwrapping the user key from the
@@ -1 +1 @@
1
- {"version":3,"file":"selfEnroll.js","sourceRoot":"","sources":["../../src/clientAnnex/selfEnroll.ts"],"names":[],"mappings":"AA4CA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAA;AAGrE,OAAO,EACL,yBAAyB,EAE1B,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAA;AACpE,OAAO,EACL,yBAAyB,EACzB,kBAAkB,EACnB,MAAM,sBAAsB,CAAA;AAK7B,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACzE,OAAO,EACL,yBAAyB,EACzB,UAAU,EACV,eAAe,EAChB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACtB,MAAM,qBAAqB,CAAA;AAG5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,EACzC,OAAO,EACP,UAAU,EACV,yBAAyB,EACzB,QAAQ,EACR,kBAAkB,EAClB,WAAW,EACX,MAAM,EAiBP;IASC,4EAA4E;IAC5E,iEAAiE;IACjE,IAAI,OAAO,WAAW,KAAK,UAAU,EAAE,CAAC;QACtC,MAAM,IAAI,SAAS,CACjB,oEAA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AM,IAAI,KAAK,CACb,kEAAkE;YAChE,kCAAkC,CACrC,CAAA;IACH,CAAC;IAED,uEAAuE;IACvE,oEAAoE;IACpE,yDAAyD;IACzD,MAAM,yBAAyB,CAAC;QAC9B,KAAK;QACL,SAAS,EAAE;YACT,EAAE,EAAE,kBAAkB,CAAC;gBACrB,mBAAmB;gBACnB,wBAAwB;aACzB,CAAC;YACF,kBAAkB,EAAE,wBAAwB;SAC7C;QACD,oBAAoB,EAAE,yBAAyB;KAChD,CAAC,CAAA;IAEF,OAAO;QACL,UAAU;QACV,eAAe;QACf,SAAS,EAAE,QAAQ,CAAC,EAAE;QACtB,GAAG,EAAE,WAAW;QAChB,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,aAAa,EAAE,IAAI,CAAC,aAAa;QACjC,wEAAwE;QACxE,wEAAwE;QACxE,gBAAgB;QAChB,SAAS,EAAE,QAAQ,CAAC,SAAS;KAC9B,CAAA;AACH,CAAC"}
@@ -2,52 +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 type { EncryptionDescriptorCache, EncryptionDescriptorSource } from './acquire.js';
49
- export { collectionDescriptorLogPinId, EPOCH_CONFIGURATION_STATE_TYPE, logGovernedDescriptorSource, readGovernedEpochConfiguration } from './logSource.js';
50
- export { DescriptorRefreshPolicy } from './refresh.js';
51
- export { createRefreshingEdvDocCipher } from './cipher.js';
52
- export { isKeyUnwrapError } from './errors.js';
27
+ export { collectionDescriptorLogPinId, logGovernedDescriptorSource } from './logSource.js';
53
28
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/descriptors/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,cAAc,CAAA;AACrB,YAAY,EACV,yBAAyB,EACzB,0BAA0B,EAC3B,MAAM,cAAc,CAAA;AAErB,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.d.ts","sourceRoot":"","sources":["../../src/descriptors/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EACL,4BAA4B,EAC5B,2BAA2B,EAC5B,MAAM,gBAAgB,CAAA"}
@@ -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;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,4BAA4B,CAAC,EAC3C,OAAO,EACP,YAAY,EACb,EAAE;IACD,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,MAAM,CAAA;CACrB,GAAG,MAAM,CAMT;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,8BAA8B,CAAC,EACnD,KAAK,EACL,iBAAiB,EACjB,QAAQ,EACR,KAAK,EACN,EAAE;IACD,KAAK,EAAE,gBAAgB,CAAA;IACvB,iBAAiB,EAAE,MAAM,OAAO,CAAC,qBAAqB,CAAC,CAAA;IACvD,QAAQ,EAAE,mBAAmB,CAAA;IAC7B,KAAK,EAAE,MAAM,CAAA;CACd,GAAG,OAAO,CAAC;IACV,QAAQ,EAAE,mBAAmB,CAAA;IAC7B,UAAU,EAAE,oBAAoB,CAAA;IAChC,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,GAAG,IAAI,CAAC,CAwBR;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,2BAA2B,CAAC,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