@interop/wallet-core 0.62.0 → 0.66.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 (321) hide show
  1. package/README.md +41 -16
  2. package/dist/clientAnnex/credentialAnchoredGenesis.d.ts +46 -26
  3. package/dist/clientAnnex/credentialAnchoredGenesis.d.ts.map +1 -1
  4. package/dist/clientAnnex/credentialAnchoredGenesis.js +91 -39
  5. package/dist/clientAnnex/credentialAnchoredGenesis.js.map +1 -1
  6. package/dist/clientAnnex/establish.d.ts +119 -35
  7. package/dist/clientAnnex/establish.d.ts.map +1 -1
  8. package/dist/clientAnnex/establish.js +227 -160
  9. package/dist/clientAnnex/establish.js.map +1 -1
  10. package/dist/clientAnnex/forget.d.ts +18 -8
  11. package/dist/clientAnnex/forget.d.ts.map +1 -1
  12. package/dist/clientAnnex/forget.js +37 -64
  13. package/dist/clientAnnex/forget.js.map +1 -1
  14. package/dist/clientAnnex/forgetLast.d.ts +85 -38
  15. package/dist/clientAnnex/forgetLast.d.ts.map +1 -1
  16. package/dist/clientAnnex/forgetLast.js +155 -98
  17. package/dist/clientAnnex/forgetLast.js.map +1 -1
  18. package/dist/clientAnnex/gc.d.ts +3 -2
  19. package/dist/clientAnnex/gc.d.ts.map +1 -1
  20. package/dist/clientAnnex/gc.js +16 -7
  21. package/dist/clientAnnex/gc.js.map +1 -1
  22. package/dist/clientAnnex/heal.d.ts +65 -14
  23. package/dist/clientAnnex/heal.d.ts.map +1 -1
  24. package/dist/clientAnnex/heal.js +397 -298
  25. package/dist/clientAnnex/heal.js.map +1 -1
  26. package/dist/clientAnnex/index.d.ts +23 -7
  27. package/dist/clientAnnex/index.d.ts.map +1 -1
  28. package/dist/clientAnnex/index.js +26 -7
  29. package/dist/clientAnnex/index.js.map +1 -1
  30. package/dist/clientAnnex/ladder.d.ts +58 -0
  31. package/dist/clientAnnex/ladder.d.ts.map +1 -1
  32. package/dist/clientAnnex/ladder.js +249 -41
  33. package/dist/clientAnnex/ladder.js.map +1 -1
  34. package/dist/clientAnnex/ladderAnchored.d.ts +148 -22
  35. package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -1
  36. package/dist/clientAnnex/ladderAnchored.js +391 -346
  37. package/dist/clientAnnex/ladderAnchored.js.map +1 -1
  38. package/dist/clientAnnex/log.d.ts +237 -53
  39. package/dist/clientAnnex/log.d.ts.map +1 -1
  40. package/dist/clientAnnex/log.js +533 -198
  41. package/dist/clientAnnex/log.js.map +1 -1
  42. package/dist/clientAnnex/mend.d.ts +12 -6
  43. package/dist/clientAnnex/mend.d.ts.map +1 -1
  44. package/dist/clientAnnex/mend.js +44 -72
  45. package/dist/clientAnnex/mend.js.map +1 -1
  46. package/dist/clientAnnex/recoveryLadderAnchored.d.ts +6 -4
  47. package/dist/clientAnnex/recoveryLadderAnchored.d.ts.map +1 -1
  48. package/dist/clientAnnex/recoveryLadderAnchored.js +56 -35
  49. package/dist/clientAnnex/recoveryLadderAnchored.js.map +1 -1
  50. package/dist/clientAnnex/spaceCapability.d.ts +123 -0
  51. package/dist/clientAnnex/spaceCapability.d.ts.map +1 -0
  52. package/dist/clientAnnex/spaceCapability.js +152 -0
  53. package/dist/clientAnnex/spaceCapability.js.map +1 -0
  54. package/dist/clientAnnex/stages.d.ts +63 -0
  55. package/dist/clientAnnex/stages.d.ts.map +1 -0
  56. package/dist/clientAnnex/stages.js +64 -0
  57. package/dist/clientAnnex/stages.js.map +1 -0
  58. package/dist/clientAnnex/zcap.d.ts +1 -1
  59. package/dist/clientAnnex/zcap.d.ts.map +1 -1
  60. package/dist/clientAnnex/zcap.js +42 -35
  61. package/dist/clientAnnex/zcap.js.map +1 -1
  62. package/dist/clients/policy.d.ts +15 -1
  63. package/dist/clients/policy.d.ts.map +1 -1
  64. package/dist/clients/policy.js +12 -6
  65. package/dist/clients/policy.js.map +1 -1
  66. package/dist/clients/revocation.d.ts +18 -10
  67. package/dist/clients/revocation.d.ts.map +1 -1
  68. package/dist/clients/revocation.js +13 -5
  69. package/dist/clients/revocation.js.map +1 -1
  70. package/dist/clients/rosterPolicy.d.ts +10 -2
  71. package/dist/clients/rosterPolicy.d.ts.map +1 -1
  72. package/dist/clients/rosterPolicy.js +41 -24
  73. package/dist/clients/rosterPolicy.js.map +1 -1
  74. package/dist/descriptors/acquire.d.ts.map +1 -1
  75. package/dist/descriptors/acquire.js +6 -23
  76. package/dist/descriptors/acquire.js.map +1 -1
  77. package/dist/descriptors/cipher.d.ts.map +1 -1
  78. package/dist/descriptors/cipher.js +5 -0
  79. package/dist/descriptors/cipher.js.map +1 -1
  80. package/dist/descriptors/errors.d.ts +43 -0
  81. package/dist/descriptors/errors.d.ts.map +1 -0
  82. package/dist/descriptors/errors.js +45 -0
  83. package/dist/descriptors/errors.js.map +1 -0
  84. package/dist/descriptors/index.d.ts +5 -0
  85. package/dist/descriptors/index.d.ts.map +1 -1
  86. package/dist/descriptors/index.js +5 -0
  87. package/dist/descriptors/index.js.map +1 -1
  88. package/dist/enrollment/enrollment.d.ts +37 -10
  89. package/dist/enrollment/enrollment.d.ts.map +1 -1
  90. package/dist/enrollment/enrollment.js +52 -15
  91. package/dist/enrollment/enrollment.js.map +1 -1
  92. package/dist/genesis/accountGenesis.d.ts +42 -11
  93. package/dist/genesis/accountGenesis.d.ts.map +1 -1
  94. package/dist/genesis/accountGenesis.js +80 -22
  95. package/dist/genesis/accountGenesis.js.map +1 -1
  96. package/dist/genesis/index.d.ts +3 -1
  97. package/dist/genesis/index.d.ts.map +1 -1
  98. package/dist/genesis/index.js +3 -1
  99. package/dist/genesis/index.js.map +1 -1
  100. package/dist/identity/agents.d.ts +17 -1
  101. package/dist/identity/agents.d.ts.map +1 -1
  102. package/dist/identity/agents.js +23 -7
  103. package/dist/identity/agents.js.map +1 -1
  104. package/dist/identity/index.d.ts +3 -1
  105. package/dist/identity/index.d.ts.map +1 -1
  106. package/dist/identity/index.js +3 -1
  107. package/dist/identity/index.js.map +1 -1
  108. package/dist/index.d.ts +6 -3
  109. package/dist/index.d.ts.map +1 -1
  110. package/dist/index.js +6 -3
  111. package/dist/index.js.map +1 -1
  112. package/dist/keyring/index.d.ts +2 -1
  113. package/dist/keyring/index.d.ts.map +1 -1
  114. package/dist/keyring/index.js +2 -1
  115. package/dist/keyring/index.js.map +1 -1
  116. package/dist/keyring/record.d.ts.map +1 -1
  117. package/dist/keyring/record.js +3 -6
  118. package/dist/keyring/record.js.map +1 -1
  119. package/dist/keyring/unlockSpace.d.ts +14 -5
  120. package/dist/keyring/unlockSpace.d.ts.map +1 -1
  121. package/dist/keyring/unlockSpace.js +31 -36
  122. package/dist/keyring/unlockSpace.js.map +1 -1
  123. package/dist/keys/index.d.ts +22 -8
  124. package/dist/keys/index.d.ts.map +1 -1
  125. package/dist/keys/index.js +20 -6
  126. package/dist/keys/index.js.map +1 -1
  127. package/dist/keys/rosterLogStore.d.ts +15 -12
  128. package/dist/keys/rosterLogStore.d.ts.map +1 -1
  129. package/dist/keys/rosterLogStore.js +21 -16
  130. package/dist/keys/rosterLogStore.js.map +1 -1
  131. package/dist/keys/rosterStore.d.ts +3 -6
  132. package/dist/keys/rosterStore.d.ts.map +1 -1
  133. package/dist/keys/rosterStore.js +10 -9
  134. package/dist/keys/rosterStore.js.map +1 -1
  135. package/dist/keys/spaceEpochs.d.ts.map +1 -1
  136. package/dist/keys/spaceEpochs.js +2 -3
  137. package/dist/keys/spaceEpochs.js.map +1 -1
  138. package/dist/keys/userKeyCascade.d.ts +8 -5
  139. package/dist/keys/userKeyCascade.d.ts.map +1 -1
  140. package/dist/keys/userKeyCascade.js +7 -6
  141. package/dist/keys/userKeyCascade.js.map +1 -1
  142. package/dist/keys/userKeyRoster.d.ts +95 -8
  143. package/dist/keys/userKeyRoster.d.ts.map +1 -1
  144. package/dist/keys/userKeyRoster.js +278 -35
  145. package/dist/keys/userKeyRoster.js.map +1 -1
  146. package/dist/keys/userKeyRosterCascade.d.ts +117 -16
  147. package/dist/keys/userKeyRosterCascade.d.ts.map +1 -1
  148. package/dist/keys/userKeyRosterCascade.js +184 -43
  149. package/dist/keys/userKeyRosterCascade.js.map +1 -1
  150. package/dist/keys/wasLabelsStore.d.ts +9 -2
  151. package/dist/keys/wasLabelsStore.d.ts.map +1 -1
  152. package/dist/keys/wasLabelsStore.js +14 -6
  153. package/dist/keys/wasLabelsStore.js.map +1 -1
  154. package/dist/log.d.ts +7 -2
  155. package/dist/log.d.ts.map +1 -1
  156. package/dist/log.js +6 -1
  157. package/dist/log.js.map +1 -1
  158. package/dist/recovery/index.d.ts +13 -9
  159. package/dist/recovery/index.d.ts.map +1 -1
  160. package/dist/recovery/index.js +12 -8
  161. package/dist/recovery/index.js.map +1 -1
  162. package/dist/recovery/recoveryCode.d.ts +27 -7
  163. package/dist/recovery/recoveryCode.d.ts.map +1 -1
  164. package/dist/recovery/recoveryCode.js +18 -6
  165. package/dist/recovery/recoveryCode.js.map +1 -1
  166. package/dist/recovery/recoveryDelegation.d.ts +23 -0
  167. package/dist/recovery/recoveryDelegation.d.ts.map +1 -1
  168. package/dist/recovery/recoveryDelegation.js +66 -46
  169. package/dist/recovery/recoveryDelegation.js.map +1 -1
  170. package/dist/recovery/recoveryWebvh.d.ts +75 -63
  171. package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
  172. package/dist/recovery/recoveryWebvh.js +127 -116
  173. package/dist/recovery/recoveryWebvh.js.map +1 -1
  174. package/dist/request/appKey.d.ts +35 -1
  175. package/dist/request/appKey.d.ts.map +1 -1
  176. package/dist/request/appKey.js +29 -10
  177. package/dist/request/appKey.js.map +1 -1
  178. package/dist/request/classify.d.ts +32 -8
  179. package/dist/request/classify.d.ts.map +1 -1
  180. package/dist/request/classify.js +39 -14
  181. package/dist/request/classify.js.map +1 -1
  182. package/dist/request/ephemeralExchange.d.ts +1 -6
  183. package/dist/request/ephemeralExchange.d.ts.map +1 -1
  184. package/dist/request/ephemeralExchange.js.map +1 -1
  185. package/dist/request/onboarding.d.ts.map +1 -1
  186. package/dist/request/onboarding.js +2 -2
  187. package/dist/request/onboarding.js.map +1 -1
  188. package/dist/request/parse.d.ts.map +1 -1
  189. package/dist/request/parse.js +2 -3
  190. package/dist/request/parse.js.map +1 -1
  191. package/dist/resourceLog/controller.d.ts +34 -12
  192. package/dist/resourceLog/controller.d.ts.map +1 -1
  193. package/dist/resourceLog/controller.js +79 -86
  194. package/dist/resourceLog/controller.js.map +1 -1
  195. package/dist/resourceLog/document.d.ts +182 -0
  196. package/dist/resourceLog/document.d.ts.map +1 -0
  197. package/dist/resourceLog/document.js +159 -0
  198. package/dist/resourceLog/document.js.map +1 -0
  199. package/dist/resourceLog/errors.d.ts +47 -8
  200. package/dist/resourceLog/errors.d.ts.map +1 -1
  201. package/dist/resourceLog/errors.js +54 -8
  202. package/dist/resourceLog/errors.js.map +1 -1
  203. package/dist/resourceLog/index.d.ts +7 -3
  204. package/dist/resourceLog/index.d.ts.map +1 -1
  205. package/dist/resourceLog/index.js +7 -3
  206. package/dist/resourceLog/index.js.map +1 -1
  207. package/dist/resourceLog/ladderRungs.d.ts +35 -0
  208. package/dist/resourceLog/ladderRungs.d.ts.map +1 -0
  209. package/dist/resourceLog/ladderRungs.js +352 -0
  210. package/dist/resourceLog/ladderRungs.js.map +1 -0
  211. package/dist/resourceLog/license.d.ts +42 -17
  212. package/dist/resourceLog/license.d.ts.map +1 -1
  213. package/dist/resourceLog/license.js +38 -24
  214. package/dist/resourceLog/license.js.map +1 -1
  215. package/dist/space/activity.d.ts +15 -15
  216. package/dist/space/activity.d.ts.map +1 -1
  217. package/dist/space/activity.js +15 -15
  218. package/dist/space/activity.js.map +1 -1
  219. package/dist/space/collections.d.ts +11 -0
  220. package/dist/space/collections.d.ts.map +1 -1
  221. package/dist/space/collections.js +13 -0
  222. package/dist/space/collections.js.map +1 -1
  223. package/dist/space/deleteSpace.d.ts +28 -0
  224. package/dist/space/deleteSpace.d.ts.map +1 -0
  225. package/dist/space/deleteSpace.js +44 -0
  226. package/dist/space/deleteSpace.js.map +1 -0
  227. package/dist/space/errors.d.ts.map +1 -1
  228. package/dist/space/errors.js +0 -1
  229. package/dist/space/errors.js.map +1 -1
  230. package/dist/space/index.d.ts +6 -0
  231. package/dist/space/index.d.ts.map +1 -1
  232. package/dist/space/index.js +6 -0
  233. package/dist/space/index.js.map +1 -1
  234. package/dist/space/plaintextCollection.d.ts +43 -0
  235. package/dist/space/plaintextCollection.d.ts.map +1 -0
  236. package/dist/space/plaintextCollection.js +17 -0
  237. package/dist/space/plaintextCollection.js.map +1 -0
  238. package/dist/stages.d.ts +23 -0
  239. package/dist/stages.d.ts.map +1 -0
  240. package/dist/stages.js +23 -0
  241. package/dist/stages.js.map +1 -0
  242. package/dist/sync/index.d.ts +7 -0
  243. package/dist/sync/index.d.ts.map +1 -1
  244. package/dist/sync/index.js +7 -0
  245. package/dist/sync/index.js.map +1 -1
  246. package/dist/sync/push.js +4 -4
  247. package/dist/sync/push.js.map +1 -1
  248. package/dist/sync/remint.js +2 -2
  249. package/dist/sync/remint.js.map +1 -1
  250. package/dist/sync/types.d.ts +41 -1
  251. package/dist/sync/types.d.ts.map +1 -1
  252. package/dist/sync/types.js +47 -1
  253. package/dist/sync/types.js.map +1 -1
  254. package/dist/unlock/index.d.ts +5 -1
  255. package/dist/unlock/index.d.ts.map +1 -1
  256. package/dist/unlock/index.js +5 -1
  257. package/dist/unlock/index.js.map +1 -1
  258. package/dist/unlock/retire.d.ts +35 -7
  259. package/dist/unlock/retire.d.ts.map +1 -1
  260. package/dist/unlock/retire.js +52 -14
  261. package/dist/unlock/retire.js.map +1 -1
  262. package/dist/unlock/standingClient.d.ts.map +1 -1
  263. package/dist/unlock/standingClient.js +5 -1
  264. package/dist/unlock/standingClient.js.map +1 -1
  265. package/dist/unlock/standingWebvh.d.ts +217 -35
  266. package/dist/unlock/standingWebvh.d.ts.map +1 -1
  267. package/dist/unlock/standingWebvh.js +469 -210
  268. package/dist/unlock/standingWebvh.js.map +1 -1
  269. package/dist/webvh/accountEntry.d.ts +146 -0
  270. package/dist/webvh/accountEntry.d.ts.map +1 -0
  271. package/dist/webvh/accountEntry.js +239 -0
  272. package/dist/webvh/accountEntry.js.map +1 -0
  273. package/dist/webvh/didWeb.d.ts +12 -7
  274. package/dist/webvh/didWeb.d.ts.map +1 -1
  275. package/dist/webvh/didWeb.js +2 -2
  276. package/dist/webvh/didWeb.js.map +1 -1
  277. package/dist/webvh/didWebProjection.d.ts +164 -0
  278. package/dist/webvh/didWebProjection.d.ts.map +1 -0
  279. package/dist/webvh/didWebProjection.js +230 -0
  280. package/dist/webvh/didWebProjection.js.map +1 -0
  281. package/dist/webvh/didWebvh.d.ts +275 -136
  282. package/dist/webvh/didWebvh.d.ts.map +1 -1
  283. package/dist/webvh/didWebvh.js +307 -340
  284. package/dist/webvh/didWebvh.js.map +1 -1
  285. package/dist/webvh/enrollClient.d.ts +65 -0
  286. package/dist/webvh/enrollClient.d.ts.map +1 -0
  287. package/dist/webvh/enrollClient.js +172 -0
  288. package/dist/webvh/enrollClient.js.map +1 -0
  289. package/dist/webvh/index.d.ts +37 -12
  290. package/dist/webvh/index.d.ts.map +1 -1
  291. package/dist/webvh/index.js +33 -10
  292. package/dist/webvh/index.js.map +1 -1
  293. package/dist/webvh/listClients.d.ts +1 -35
  294. package/dist/webvh/listClients.d.ts.map +1 -1
  295. package/dist/webvh/listClients.js +2 -30
  296. package/dist/webvh/listClients.js.map +1 -1
  297. package/dist/webvh/revokeClient.d.ts +41 -11
  298. package/dist/webvh/revokeClient.d.ts.map +1 -1
  299. package/dist/webvh/revokeClient.js +99 -48
  300. package/dist/webvh/revokeClient.js.map +1 -1
  301. package/dist/webvh/standingZcap.d.ts +61 -14
  302. package/dist/webvh/standingZcap.d.ts.map +1 -1
  303. package/dist/webvh/standingZcap.js +91 -0
  304. package/dist/webvh/standingZcap.js.map +1 -1
  305. package/dist/webvh/verifyLog.d.ts +59 -5
  306. package/dist/webvh/verifyLog.d.ts.map +1 -1
  307. package/dist/webvh/verifyLog.js +76 -11
  308. package/dist/webvh/verifyLog.js.map +1 -1
  309. package/dist/webvh/wasIdStore.d.ts +8 -8
  310. package/dist/webvh/wasIdStore.d.ts.map +1 -1
  311. package/dist/webvh/wasIdStore.js +39 -14
  312. package/dist/webvh/wasIdStore.js.map +1 -1
  313. package/dist/webvh/zcap.d.ts +14 -1
  314. package/dist/webvh/zcap.d.ts.map +1 -1
  315. package/dist/webvh/zcap.js +3 -27
  316. package/dist/webvh/zcap.js.map +1 -1
  317. package/package.json +2 -2
  318. package/dist/webvh/keyAgreement.d.ts +0 -97
  319. package/dist/webvh/keyAgreement.d.ts.map +0 -1
  320. package/dist/webvh/keyAgreement.js +0 -71
  321. package/dist/webvh/keyAgreement.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import { addRecipient, initRecipients, ownerRecipient, removeRecipient, replaceRecipient, unwrapEpochSecret } from '@interop/was-client/edv';
2
2
  import { vmFragmentOf } from '@interop/vh-resource-log';
3
- import { commitmentMatcher, MULTIKEY_COMMITMENT_VM_TYPE } from '../webvh/didWebvh.js';
4
- import { resolvedKeyAgreementMethods } from '../webvh/keyAgreement.js';
3
+ import { clientKeyAgreementController, commitmentMatcher, MULTIKEY_COMMITMENT_VM_TYPE } from '../webvh/didWebvh.js';
4
+ import { resolvedKeyAgreementMethods } from '../resourceLog/document.js';
5
5
  import { clientSigningKeyMultibase } from '../webvh/zcap.js';
6
6
  /**
7
7
  * Thrown when a served roster fails its client-side consistency checks: a
@@ -15,6 +15,46 @@ export class UserKeyRosterIntegrityError extends Error {
15
15
  this.name = 'UserKeyRosterIntegrityError';
16
16
  }
17
17
  }
18
+ /**
19
+ * Resolves a descriptor's current epoch, refusing a descriptor whose
20
+ * `currentEpoch` names no epoch in its own list -- the shape no enrolled
21
+ * client authenticated. Every site that resolves a current epoch goes
22
+ * through here, so the refusal has one implementation and one class.
23
+ *
24
+ * @param options {object}
25
+ * @param options.descriptor {CollectionEncryption}
26
+ * @param options.label {string} names the descriptor in the refusal, e.g.
27
+ * 'The user key roster' or 'The collection descriptor'
28
+ * @returns {CollectionEncryptionEpoch} the current epoch
29
+ * @throws {UserKeyRosterIntegrityError}
30
+ */
31
+ export function currentEpochOf({ descriptor, label }) {
32
+ const currentEpoch = (descriptor.epochs ?? []).find(epoch => epoch.id === descriptor.currentEpoch);
33
+ if (!currentEpoch) {
34
+ throw new UserKeyRosterIntegrityError(`${label} names no current epoch in its own epoch list.`);
35
+ }
36
+ return currentEpoch;
37
+ }
38
+ /**
39
+ * Whether a roster's CURRENT epoch wraps to the named recipient -- the probe
40
+ * the enrollment wrap asks before adding, and the recipient-retiring cascade
41
+ * tail asks before rotating (a recipient with no current-epoch wrap has
42
+ * nothing to rotate off). Resolves the current epoch through
43
+ * {@link currentEpochOf}, so a roster whose `currentEpoch` names no epoch in
44
+ * its own list is refused rather than read as "not wrapped".
45
+ *
46
+ * @param options {object}
47
+ * @param options.descriptor {CollectionEncryption} the roster descriptor
48
+ * @param options.recipientId {string} the roster kid
49
+ * @returns {boolean}
50
+ * @throws {UserKeyRosterIntegrityError}
51
+ */
52
+ export function rosterWrapsRecipient({ descriptor, recipientId }) {
53
+ return currentEpochOf({
54
+ descriptor,
55
+ label: 'The user key roster'
56
+ }).recipients.some(entry => entry.header.kid === recipientId);
57
+ }
18
58
  /**
19
59
  * Thrown when a served roster conflicts with the locally pinned latest-seen
20
60
  * epoch -- the epochs list no longer contains the pinned epoch, or
@@ -205,6 +245,8 @@ export async function ensureUserKeyRoster({ store, userKey, clientKeyAgreementKe
205
245
  * client's own (identity) key-agreement key, unwrapping each epoch for
206
246
  * re-wrapping
207
247
  * @returns {Promise<CollectionEncryption>} the refreshed roster descriptor
248
+ * @throws {UserKeyRosterIntegrityError} the descriptor's `currentEpoch`
249
+ * names no epoch in its own list
208
250
  */
209
251
  export async function addUserKeyRosterRecipient({ store, recipient, ownerKeyAgreementKey }) {
210
252
  const current = await store.read();
@@ -213,9 +255,7 @@ export async function addUserKeyRosterRecipient({ store, recipient, ownerKeyAgre
213
255
  'provisioning before a client can be enrolled.');
214
256
  }
215
257
  const descriptor = current.descriptor;
216
- const currentEpoch = (descriptor.epochs ?? []).find(epoch => epoch.id === descriptor.currentEpoch);
217
- const wrapped = currentEpoch?.recipients.some(entry => entry.header.kid === recipient.id);
218
- if (wrapped) {
258
+ if (rosterWrapsRecipient({ descriptor, recipientId: recipient.id })) {
219
259
  // A completed (or torn-after-the-wrap) earlier run: addRecipient writes
220
260
  // every epoch's wrap in one descriptor write, so the current epoch
221
261
  // standing means the escrow set is complete.
@@ -256,6 +296,83 @@ export async function rotateUserKeyRoster({ store, document, retireRecipientId }
256
296
  pull: async () => { }
257
297
  });
258
298
  }
299
+ /**
300
+ * The error name a lost descriptor compare-and-swap surfaces as --
301
+ * was-client's `PreconditionFailedError`, and whatever an alternative store
302
+ * implementation throws under that name (the `EncryptionDescriptorStore` port
303
+ * documents the class).
304
+ */
305
+ const PRECONDITION_FAILED_ERROR_NAME = 'PreconditionFailedError';
306
+ /**
307
+ * How many times the batched escrow re-reads and re-applies after losing the
308
+ * compare-and-swap. Matches was-client's own recipient-operation budget: a
309
+ * lost race means nothing was appended, so the license shot the append would
310
+ * spend is still standing.
311
+ */
312
+ const ESCROW_CAS_ATTEMPTS = 3;
313
+ /**
314
+ * Escrows several recipients into every epoch in ONE descriptor write.
315
+ *
316
+ * was-client's `addRecipient` takes one recipient and does its own read,
317
+ * mutate and compare-and-swap, so a loop over it costs one write per
318
+ * recipient. On a log-governed store a write IS a log append, and a
319
+ * ladder-signed append is one-shot per licensed version, so the second
320
+ * recipient's append would be refused after the caller's pivot. The escrow
321
+ * crypto stays was-client's: `addRecipient` runs against a buffering store
322
+ * whose reads serve the staged descriptor and whose writes stay in memory,
323
+ * and the staged result is written back through the real store once, under
324
+ * the compare-and-swap token of the read the whole batch was built on.
325
+ *
326
+ * @param options {object}
327
+ * @param options.store {EncryptionDescriptorStore} the roster's descriptor
328
+ * store
329
+ * @param options.recipients {RecipientPublicKey[]} the incoming readers'
330
+ * public key-agreement keys; at least one
331
+ * @param options.ownerKeyAgreementKey {IKeyAgreementKey} a key-agreement
332
+ * key holding a wrap in every epoch, unwrapping each one for the escrow
333
+ * @returns {Promise<CollectionEncryption>} the roster as this write leaves
334
+ * it
335
+ */
336
+ async function escrowRosterRecipients({ store, recipients, ownerKeyAgreementKey }) {
337
+ let lastError;
338
+ for (let attempt = 0; attempt < ESCROW_CAS_ATTEMPTS; attempt++) {
339
+ const read = await store.read();
340
+ if (read === null) {
341
+ throw new UserKeyRosterIntegrityError('The user key roster does not exist; there is nothing to escrow into.');
342
+ }
343
+ let staged = read.descriptor;
344
+ const buffer = {
345
+ read: async () => ({ descriptor: staged }),
346
+ replace: async (next) => {
347
+ staged = next;
348
+ }
349
+ };
350
+ for (const recipient of recipients) {
351
+ staged = await addRecipient({
352
+ store: buffer,
353
+ recipient,
354
+ owner: { keyAgreementKey: ownerKeyAgreementKey }
355
+ });
356
+ }
357
+ try {
358
+ await store.replace(staged, {
359
+ ...(read.etag !== undefined ? { ifMatch: read.etag } : {})
360
+ });
361
+ return staged;
362
+ }
363
+ catch (err) {
364
+ if (err?.name === PRECONDITION_FAILED_ERROR_NAME) {
365
+ // A concurrent writer landed first: nothing of this batch was
366
+ // written, so re-read and re-apply.
367
+ lastError = err;
368
+ continue;
369
+ }
370
+ throw err;
371
+ }
372
+ }
373
+ throw new Error('The user key roster escrow lost the compare-and-swap race after ' +
374
+ `${ESCROW_CAS_ATTEMPTS} attempts. Retry the convergence.`, { cause: lastError });
375
+ }
259
376
  /**
260
377
  * Rotates the roster off one or more recipients while escrowing incoming ones,
261
378
  * in ONE descriptor write -- the transient-recovery continuation's mandatory
@@ -325,10 +442,10 @@ export async function replaceUserKeyRosterRecipients({ store, document, retireRe
325
442
  * @returns {string[]} the current epoch's other kids, in epoch order
326
443
  */
327
444
  export function rosterRecipientsToRetire({ descriptor, keepRecipientIds }) {
328
- const currentEpoch = (descriptor.epochs ?? []).find(epoch => epoch.id === descriptor.currentEpoch);
329
- if (!currentEpoch) {
330
- throw new UserKeyRosterIntegrityError('The user key roster names no current epoch in its own epoch list.');
331
- }
445
+ const currentEpoch = currentEpochOf({
446
+ descriptor,
447
+ label: 'The user key roster'
448
+ });
332
449
  const keep = new Set(keepRecipientIds);
333
450
  return [
334
451
  ...new Set(currentEpoch.recipients
@@ -336,6 +453,53 @@ export function rosterRecipientsToRetire({ descriptor, keepRecipientIds }) {
336
453
  .filter(kid => !keep.has(kid)))
337
454
  ];
338
455
  }
456
+ /**
457
+ * The enrolled clients the account document keys, as roster recipients. A
458
+ * client's `keyAgreement` twin carries the controller marker
459
+ * `did:key:<its signing multibase>` (`clientKeyAgreementController` is the one
460
+ * write-side builder), so the marker names the signing half and the method
461
+ * carries the key-agreement half -- together, exactly the pair
462
+ * {@link rosterRecipientKid} takes. That is what makes the escrow direction of
463
+ * the convergence possible from the document alone.
464
+ *
465
+ * A standing unlock credential is deliberately not here, and not because it is
466
+ * unwanted. Its roster kid names its standing client's SIGNING key, which the
467
+ * document never publishes: the document carries the credential's
468
+ * key-agreement key (or a commitment to it) and nothing else, so no reader can
469
+ * rebuild the kid its own roster reads look for. A credential's missing wrap
470
+ * is therefore mended by the ceremony that holds the credential, never here.
471
+ *
472
+ * @param options {object}
473
+ * @param options.document {KeyAgreementDocument} the locally verified
474
+ * did:webvh document
475
+ * @returns {RecipientPublicKey[]} in document order
476
+ */
477
+ export function enrolledClientRosterRecipients({ document }) {
478
+ const recipients = [];
479
+ for (const method of resolvedKeyAgreementMethods({ doc: document })) {
480
+ const controller = method.controller;
481
+ const keyAgreementKeyMultibase = method.publicKeyMultibase;
482
+ if (method.type === MULTIKEY_COMMITMENT_VM_TYPE ||
483
+ typeof controller !== 'string' ||
484
+ typeof keyAgreementKeyMultibase !== 'string') {
485
+ continue;
486
+ }
487
+ // The marker is read by rebuilding it: whatever the third segment holds is
488
+ // a candidate signing multibase, and the marker matches only when the one
489
+ // write-side builder produces the controller verbatim.
490
+ const [, , signingKeyMultibase] = controller.split(':');
491
+ if (signingKeyMultibase === undefined ||
492
+ signingKeyMultibase === '' ||
493
+ clientKeyAgreementController({ signingKeyMultibase }) !== controller) {
494
+ continue;
495
+ }
496
+ recipients.push({
497
+ id: rosterRecipientKid({ signingKeyMultibase, keyAgreementKeyMultibase }),
498
+ publicKeyMultibase: keyAgreementKeyMultibase
499
+ });
500
+ }
501
+ return recipients;
502
+ }
339
503
  /**
340
504
  * Converges the roster onto the account document: the standing detector for a
341
505
  * revocation cascade torn between its two halves. The cascade edits the
@@ -348,9 +512,30 @@ export function rosterRecipientsToRetire({ descriptor, keepRecipientIds }) {
348
512
  * document-backed resolver cannot answer for is exactly a recipient the
349
513
  * document no longer keys, so a healthy account reads the descriptor and
350
514
  * writes nothing. When any such recipient is found the roster is rotated away
351
- * from ALL of them at once -- a single {@link rotateUserKeyRoster} suffices,
352
- * because the resolver drops every unbacked entry from the fresh epoch, not
353
- * just the one named as retiring.
515
+ * from ALL of them at once, because the resolver drops every unbacked entry
516
+ * from the fresh epoch, not just the one named as retiring.
517
+ *
518
+ * The convergence runs in TWO directions, in one append. The retire direction
519
+ * is above. The escrow direction is its mirror: an enrolled client the
520
+ * document keys that holds no wrap in the current epoch is escrowed into every
521
+ * epoch ({@link enrolledClientRosterRecipients} names the candidates). That is
522
+ * the mender for a ceremony torn between the entry that published a client and
523
+ * the append that was to wrap the user key to it -- the one-request window a
524
+ * ladder-signed enrollment approval leaves, where the ladder's append is
525
+ * licensed only as the tail of its own entry and cannot precede it. A standing
526
+ * unlock credential is not a candidate: its roster kid names a signing key the
527
+ * document does not publish (see the helper), so its missing wrap is mended by
528
+ * the ceremony holding the credential.
529
+ *
530
+ * Either direction, and both together, cost exactly ONE descriptor write. A
531
+ * convergence needing both rides `replaceRecipient`; a pure escrow rides
532
+ * {@link escrowRosterRecipients}, which stages every missing recipient's
533
+ * wraps through was-client's `addRecipient` and writes once, so the user key
534
+ * is not rotated for a missing wrap and a ladder-signed convergence never
535
+ * needs a second append it has no license for. A healthy roster writes
536
+ * nothing at all. The escrow direction needs a key that unwraps every epoch,
537
+ * so it runs only for a caller that supplies `ownerKeyAgreementKey`; without
538
+ * one the retire direction runs alone.
354
539
  *
355
540
  * Rotating onto nobody is refused: a current epoch in which NO recipient is
356
541
  * backed by the document is a mismatched pair (a stale document, the wrong
@@ -370,29 +555,38 @@ export function rosterRecipientsToRetire({ descriptor, keepRecipientIds }) {
370
555
  * @param [options.descriptor] {CollectionEncryption} a descriptor the caller
371
556
  * has just read (a login-time roster read), to save a re-read; omitted, the
372
557
  * roster is read fresh
558
+ * @param [options.ownerKeyAgreementKey] {IKeyAgreementKey} a key-agreement
559
+ * key holding a wrap in every epoch, unwrapping each one for the escrow
560
+ * direction; omitted, only the retire direction runs
373
561
  * @returns {Promise<object>} whether the roster rotated on this call, the
374
- * stale recipient kids found, and the roster descriptor as it now stands
375
- * (`null` when the account has no roster yet)
562
+ * stale recipient kids found, the kids escrowed, and the roster descriptor
563
+ * as it now stands (`null` when the account has no roster yet)
376
564
  */
377
- export async function convergeUserKeyRosterToDocument({ store, document, descriptor }) {
565
+ export async function convergeUserKeyRosterToDocument({ store, document, descriptor, ownerKeyAgreementKey }) {
378
566
  let roster = descriptor;
379
567
  if (!roster) {
380
568
  const read = await store.read();
381
569
  if (read === null) {
382
- return { rotated: false, staleRecipientIds: [], descriptor: null };
570
+ return {
571
+ rotated: false,
572
+ staleRecipientIds: [],
573
+ escrowedRecipientIds: [],
574
+ descriptor: null
575
+ };
383
576
  }
384
577
  roster = read.descriptor;
385
578
  }
386
- const currentEpochId = roster.currentEpoch;
387
- const currentEpoch = (roster.epochs ?? []).find(epoch => epoch.id === currentEpochId);
388
- if (!currentEpoch) {
389
- throw new UserKeyRosterIntegrityError('The user key roster names no current epoch in its own epoch list.');
390
- }
579
+ const currentEpoch = currentEpochOf({
580
+ descriptor: roster,
581
+ label: 'The user key roster'
582
+ });
391
583
  const resolveRecipientKey = userKeyRosterRecipientResolver({ document });
392
584
  const staleRecipientIds = [];
393
585
  let backed = 0;
586
+ const wrappedKids = new Set();
394
587
  for (const entry of currentEpoch.recipients) {
395
588
  const kid = entry.header.kid;
589
+ wrappedKids.add(kid);
396
590
  if ((await resolveRecipientKey(kid)) === null) {
397
591
  staleRecipientIds.push(kid);
398
592
  }
@@ -400,21 +594,71 @@ export async function convergeUserKeyRosterToDocument({ store, document, descrip
400
594
  backed++;
401
595
  }
402
596
  }
403
- if (staleRecipientIds.length === 0) {
404
- return { rotated: false, staleRecipientIds, descriptor: roster };
597
+ const escrow = ownerKeyAgreementKey
598
+ ? {
599
+ ownerKeyAgreementKey,
600
+ recipients: enrolledClientRosterRecipients({ document }).filter(recipient => !wrappedKids.has(recipient.id))
601
+ }
602
+ : undefined;
603
+ const escrowedRecipientIds = (escrow?.recipients ?? []).map(recipient => recipient.id);
604
+ if (staleRecipientIds.length === 0 && escrowedRecipientIds.length === 0) {
605
+ return {
606
+ rotated: false,
607
+ staleRecipientIds,
608
+ escrowedRecipientIds,
609
+ descriptor: roster
610
+ };
405
611
  }
406
- if (backed === 0) {
612
+ if (staleRecipientIds.length > 0 && backed === 0) {
407
613
  throw new UserKeyRosterIntegrityError('No user key roster recipient is keyed by the account document; refusing ' +
408
614
  'to rotate the roster onto no one.');
409
615
  }
410
- // One rotation retires them all: the fresh epoch is wrapped only to the
411
- // recipients the resolver answers for.
412
- const rotated = await rotateUserKeyRoster({
616
+ // A pure removal is `removeRecipient`'s shape and a pure escrow is
617
+ // `addRecipient`'s; was-client refuses `replaceRecipient` for either, and
618
+ // that is also where the append counts differ. One direction at a time:
619
+ if (escrow === undefined || escrow.recipients.length === 0) {
620
+ const rotated = await rotateUserKeyRoster({
621
+ store,
622
+ document,
623
+ retireRecipientId: staleRecipientIds[0]
624
+ });
625
+ return {
626
+ rotated: true,
627
+ staleRecipientIds,
628
+ escrowedRecipientIds,
629
+ descriptor: rotated
630
+ };
631
+ }
632
+ // One append for every incoming recipient together, and no fresh epoch, so
633
+ // a ladder-signed convergence spends exactly one licensed append whatever
634
+ // the tear left missing.
635
+ if (staleRecipientIds.length === 0) {
636
+ return {
637
+ rotated: false,
638
+ staleRecipientIds,
639
+ escrowedRecipientIds,
640
+ descriptor: await escrowRosterRecipients({
641
+ store,
642
+ recipients: escrow.recipients,
643
+ ownerKeyAgreementKey: escrow.ownerKeyAgreementKey
644
+ })
645
+ };
646
+ }
647
+ const converged = await replaceUserKeyRosterRecipients({
413
648
  store,
414
649
  document,
415
- retireRecipientId: staleRecipientIds[0]
650
+ retireRecipientIds: staleRecipientIds,
651
+ recipients: escrow.recipients,
652
+ ownerKeyAgreementKey: escrow.ownerKeyAgreementKey
416
653
  });
417
- return { rotated: true, staleRecipientIds, descriptor: rotated };
654
+ return {
655
+ // An escrow-only convergence writes wraps without minting an epoch, so
656
+ // the fresh epoch id is what says whether the user key rotated.
657
+ rotated: converged.currentEpoch !== roster.currentEpoch,
658
+ staleRecipientIds,
659
+ escrowedRecipientIds,
660
+ descriptor: converged
661
+ };
418
662
  }
419
663
  export async function readUserKeyRoster({ store, descriptor: knownDescriptor, userKey, clientKeyAgreementKey, pinnedEpochId }) {
420
664
  let descriptor = knownDescriptor;
@@ -425,13 +669,12 @@ export async function readUserKeyRoster({ store, descriptor: knownDescriptor, us
425
669
  }
426
670
  descriptor = current.descriptor;
427
671
  }
672
+ const currentEpoch = currentEpochOf({
673
+ descriptor,
674
+ label: 'The user key roster'
675
+ });
428
676
  const epochIds = (descriptor.epochs ?? []).map(epoch => epoch.id);
429
- const currentIndex = descriptor.currentEpoch
430
- ? epochIds.indexOf(descriptor.currentEpoch)
431
- : -1;
432
- if (currentIndex === -1) {
433
- throw new UserKeyRosterIntegrityError('The user key roster names no current epoch in its own epoch list.');
434
- }
677
+ const currentIndex = epochIds.indexOf(currentEpoch.id);
435
678
  if (pinnedEpochId) {
436
679
  const pinnedIndex = epochIds.indexOf(pinnedEpochId);
437
680
  if (pinnedIndex === -1 || currentIndex < pinnedIndex) {
@@ -1 +1 @@
1
-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D,cAAc,GAAG,EAAE,EAAE,EAAE,UAAU,CAAC,YAAa,EAAE,MAAM,EAAE,CAAA;QACzD,OAAO,GAAG,IAAI,CAAA;IAChB,CAAC;IAED,OAAO;QACL,UAAU;QACV,OAAO,EAAE,cAAc;QACvB,OAAO;QACP,aAAa,EAAE,UAAU,CAAC,YAAa;KACxC,CAAA;AACH,CAAC"}
@@ -11,10 +11,11 @@
11
11
  * from the document the edit itself just resolved to (no re-fetch of the
12
12
  * log the ceremony just extended). On a log-governed roster store this
13
13
  * function itself guarantees post-edit anchoring: the controller view built
14
- * from the edit's own post-edit log is set as the store's freshness floor
15
- * (`setControllerFloor`) before anything roster-side runs, so the rotation
16
- * and the seal backstop anchor at or past the edit even where the app's
17
- * injected controller resolution still serves a cached pre-edit view. The
14
+ * from the edit's own post-edit log is set as the store's minimum controller
15
+ * version (`setMinimumControllerVersion`) before anything roster-side
16
+ * runs, so the rotation and the seal backstop anchor at or past the edit
17
+ * even where the app's injected controller resolution still serves a
18
+ * cached pre-edit view. The
18
19
  * roster delivers, never sources, so the stage names no recipient at all:
19
20
  * it converges the roster onto that document (the login sweep's own path),
20
21
  * retiring every current-epoch recipient the document no longer keys in one
@@ -35,6 +36,20 @@
35
36
  * epoch names a non-current key generation -- so a mid-cascade crash strands
36
37
  * nothing permanently and a naive full re-run finishes it (the login-time
37
38
  * completion sweep is the standing backstop).
39
+ *
40
+ * The tail has two entry points over the same preamble and fan-out.
41
+ * `rotateRosterToDocumentAndCascade` is the document-converging one above,
42
+ * for a ceremony whose document edit has already landed.
43
+ * `retireRosterRecipientAndCascade` is the recipient-naming one: for a
44
+ * ceremony that must rotate BEFORE its own document edit -- the two forget
45
+ * ceremonies, where the forgetting client can sign nothing after its removal
46
+ * entry -- the document still lists the retiring recipient, so convergence
47
+ * would retire nothing, and the caller names the roster kid to retire
48
+ * instead. That entry point reads the fresh key back through a key the
49
+ * caller names (the standing credential's, whose wrap survives the rotation)
50
+ * and runs no seal backstop: with the document edit still ahead, there is no
51
+ * removal to seal against, and on the last-client transition the rotation
52
+ * itself is the one ladder-signed append its anchor licenses.
38
53
  */
39
54
  import type { DIDDoc, DIDLog } from '@interop/did-method-webvh';
40
55
  import type { IKeyAgreementKey } from '@interop/data-integrity-core';
@@ -67,8 +82,11 @@ export interface CascadeCollections {
67
82
  isEncrypted?: (collectionId: string) => Promise<boolean>;
68
83
  }
69
84
  /**
70
- * What the shared tail reports: whether the roster actually rotated on this
71
- * run (a re-run of an already-complete ceremony reports `false`), the roster's
85
+ * What the shared tail reports: whether the roster rotated on this run -- a
86
+ * re-run of an already-complete ceremony reports `false`; the
87
+ * document-converging entry point reads it off the adopting read, so a
88
+ * caller holding no cached key sees `true` on its first read either way,
89
+ * while the recipient-retiring one reports whether THIS call appended -- the roster's
72
90
  * seal-backstop report (present when the roster store is sealable and the
73
91
  * roster stage ran), the per-collection fan-out result, and the rotated key
74
92
  * with the roster descriptor it was read from.
@@ -80,6 +98,41 @@ export interface RosterCascadeResult {
80
98
  userKey?: UserKey;
81
99
  rosterDescriptor?: CollectionEncryption;
82
100
  }
101
+ /**
102
+ * The post-edit anchoring guarantee, shared by both entry points: the roster
103
+ * appends -- and the seal backstop's removal detection -- must run under a
104
+ * controller view that includes the log the ceremony is anchoring at, or the
105
+ * rotation anchors before it (a revocation's rotation leaves the log
106
+ * unsealed with the seal blind to the removal; the last-client transition's
107
+ * ladder-signed rotation lands before its reinstall version and the
108
+ * ceremony-tail license refuses it). Rather than leaving that to the
109
+ * injected store's own controller wiring, the view built from the ceremony's
110
+ * log is set as the store's minimum controller version; a fresher resolved
111
+ * view still wins. A store that is not log-governed has no controller view
112
+ * to anchor and is left alone. Exported for the one caller that reads the
113
+ * roster before its anchoring entry exists (the last-client transition's
114
+ * pre-pair probe, anchored at the pre-transition head it verified).
115
+ *
116
+ * @param options {object}
117
+ * @param options.rosterStore {EncryptionDescriptorStore}
118
+ * @param options.did {string}
119
+ * @param options.log {DIDLog}
120
+ */
121
+ export declare function anchorRosterStoreAt({ rosterStore, did, log }: {
122
+ rosterStore: EncryptionDescriptorStore;
123
+ did: string;
124
+ log: DIDLog;
125
+ }): void;
126
+ /**
127
+ * Persists a rotated key: called with `{ userKey, latestEpochId, descriptor }`
128
+ * after the roster read and BEFORE the fan-out. The key and the epoch pin
129
+ * must persist atomically.
130
+ */
131
+ export type UserKeyAdoptedHook = (adopted: {
132
+ userKey: UserKey;
133
+ latestEpochId: string;
134
+ descriptor: CollectionEncryption;
135
+ }) => Promise<void>;
83
136
  /**
84
137
  * Runs the roster rotation (with its seal backstop) and the collection
85
138
  * fan-out over the document a ceremony's own edit just published. See the
@@ -90,16 +143,15 @@ export interface RosterCascadeResult {
90
143
  * `key-map/user-key.jsonl` roster store
91
144
  * @param options.did {string} the account's did:webvh
92
145
  * @param options.doc {DIDDoc} the document as the ceremony's edit left it
93
- * @param options.log {DIDLog} the post-edit log, which the controller floor
94
- * is built from
146
+ * @param options.log {DIDLog} the post-edit log, which the minimum
147
+ * controller version is built from
95
148
  * @param [options.userKey] {UserKey} this client's cached user key
96
149
  * @param options.clientKeyAgreementKey {IKeyAgreementKey} this client's own
97
150
  * (identity) key-agreement key -- its roster entry
98
151
  * @param [options.pinnedEpochId] {string} the locally pinned latest-seen
99
152
  * roster epoch
100
- * @param [options.onUserKeyAdopted] {Function} persists a rotated key:
101
- * called with `{ userKey, latestEpochId, descriptor }` after the roster read
102
- * and BEFORE the fan-out. The key and the epoch pin must persist atomically
153
+ * @param [options.onUserKeyAdopted] {UserKeyAdoptedHook} persists a
154
+ * rotated key
103
155
  * @param options.collections {CascadeCollections} the fan-out's work
104
156
  * @returns {Promise<RosterCascadeResult>}
105
157
  */
@@ -111,11 +163,60 @@ export declare function rotateRosterToDocumentAndCascade({ rosterStore, did, doc
111
163
  userKey?: UserKey;
112
164
  clientKeyAgreementKey: IKeyAgreementKey;
113
165
  pinnedEpochId?: string | null;
114
- onUserKeyAdopted?: (adopted: {
115
- userKey: UserKey;
116
- latestEpochId: string;
117
- descriptor: CollectionEncryption;
118
- }) => Promise<void>;
166
+ onUserKeyAdopted?: UserKeyAdoptedHook;
167
+ collections: CascadeCollections;
168
+ }): Promise<RosterCascadeResult>;
169
+ /**
170
+ * The recipient-naming entry point: retires ONE named roster recipient and
171
+ * runs the collection fan-out, for a ceremony that rotates BEFORE its own
172
+ * document edit (see the module doc). The document handed in still keys the
173
+ * retiring recipient, so the rotation names its kid explicitly; the fresh key
174
+ * is read back through `readBackKeyAgreementKey`, a recipient whose wrap
175
+ * survives the rotation (the standing credential's, on both forgets). No
176
+ * seal backstop runs here.
177
+ *
178
+ * Every stage detects its own completion from durable state: a recipient the
179
+ * current epoch no longer wraps to skips the append (so a re-run of a
180
+ * torn-after-rotation ceremony attempts no second append at the same anchor,
181
+ * which on a ladder-signed roster the one-shot license would refuse), the
182
+ * read-back adopts whatever the roster now delivers, and the fan-out is
183
+ * staleness-driven. An account with no roster yet reports `rotated: false`
184
+ * with an empty fan-out and no key.
185
+ *
186
+ * @param options {object}
187
+ * @param options.rosterStore {EncryptionDescriptorStore} the
188
+ * `key-map/user-key.jsonl` roster store
189
+ * @param options.did {string} the account's did:webvh
190
+ * @param options.doc {DIDDoc} the document the rotation's recipients are
191
+ * resolved from -- the one `log` resolves to
192
+ * @param options.log {DIDLog} the log the rotation anchors at, which the
193
+ * minimum controller version is built from: the pre-edit head for a plain
194
+ * forget, the post-reinstall head for the last-client transition
195
+ * @param options.retireRecipientId {string} the roster kid to retire
196
+ * @param [options.userKey] {UserKey} this client's cached user key
197
+ * @param options.readBackKeyAgreementKey {IKeyAgreementKey} the recipient
198
+ * whose wrap survives the rotation, reading the fresh key back and
199
+ * unwrapping the generations for the fan-out
200
+ * @param [options.pinnedEpochId] {string} the locally pinned latest-seen
201
+ * roster epoch
202
+ * @param [options.onUserKeyAdopted] {UserKeyAdoptedHook} persists a
203
+ * rotated key
204
+ * @param options.collections {CascadeCollections} the fan-out's work
205
+ * @returns {Promise<RosterCascadeResult>} `rotated` says whether THIS run
206
+ * retired the recipient's wrap; `rosterSeal` is never present
207
+ * @throws {UserKeyRosterIntegrityError} the roster's `currentEpoch` names
208
+ * no epoch in its own list
209
+ */
210
+ export declare function retireRosterRecipientAndCascade({ rosterStore, did, doc, log, retireRecipientId, userKey, readBackKeyAgreementKey, pinnedEpochId, onUserKeyAdopted, collections }: {
211
+ rosterStore: EncryptionDescriptorStore;
212
+ did: string;
213
+ doc: DIDDoc;
214
+ log: DIDLog;
215
+ retireRecipientId: string;
216
+ userKey?: UserKey;
217
+ readBackKeyAgreementKey: IKeyAgreementKey;
218
+ pinnedEpochId?: string | null;
219
+ onUserKeyAdopted?: UserKeyAdoptedHook;
119
220
  collections: CascadeCollections;
120
221
  }): Promise<RosterCascadeResult>;
121
222
  //# sourceMappingURL=userKeyRosterCascade.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"userKeyRosterCascade.d.ts","sourceRoot":"","sources":["../../src/keys/userKeyRosterCascade.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AACpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAC/D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAA;AAExE,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,qBAAqB,CAAA;AAM5B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAE3C;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAA;IACrC,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,kBAAkB;IACjC,aA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