@interop/wallet-core 0.61.0 → 0.65.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 (313) 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 +55 -34
  7. package/dist/clientAnnex/establish.d.ts.map +1 -1
  8. package/dist/clientAnnex/establish.js +102 -56
  9. package/dist/clientAnnex/establish.js.map +1 -1
  10. package/dist/clientAnnex/forget.d.ts +16 -2
  11. package/dist/clientAnnex/forget.d.ts.map +1 -1
  12. package/dist/clientAnnex/forget.js +11 -9
  13. package/dist/clientAnnex/forget.js.map +1 -1
  14. package/dist/clientAnnex/forgetLast.d.ts +126 -35
  15. package/dist/clientAnnex/forgetLast.d.ts.map +1 -1
  16. package/dist/clientAnnex/forgetLast.js +208 -60
  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 +7 -7
  21. package/dist/clientAnnex/gc.js.map +1 -1
  22. package/dist/clientAnnex/heal.d.ts +101 -33
  23. package/dist/clientAnnex/heal.d.ts.map +1 -1
  24. package/dist/clientAnnex/heal.js +559 -212
  25. package/dist/clientAnnex/heal.js.map +1 -1
  26. package/dist/clientAnnex/index.d.ts +21 -5
  27. package/dist/clientAnnex/index.d.ts.map +1 -1
  28. package/dist/clientAnnex/index.js +24 -5
  29. package/dist/clientAnnex/index.js.map +1 -1
  30. package/dist/clientAnnex/ladder.d.ts +304 -18
  31. package/dist/clientAnnex/ladder.d.ts.map +1 -1
  32. package/dist/clientAnnex/ladder.js +942 -64
  33. package/dist/clientAnnex/ladder.js.map +1 -1
  34. package/dist/clientAnnex/ladderAnchored.d.ts +261 -28
  35. package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -1
  36. package/dist/clientAnnex/ladderAnchored.js +521 -295
  37. package/dist/clientAnnex/ladderAnchored.js.map +1 -1
  38. package/dist/clientAnnex/log.d.ts +193 -38
  39. package/dist/clientAnnex/log.d.ts.map +1 -1
  40. package/dist/clientAnnex/log.js +445 -190
  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 +26 -12
  45. package/dist/clientAnnex/mend.js.map +1 -1
  46. package/dist/clientAnnex/recoveryLadderAnchored.d.ts +38 -11
  47. package/dist/clientAnnex/recoveryLadderAnchored.d.ts.map +1 -1
  48. package/dist/clientAnnex/recoveryLadderAnchored.js +177 -55
  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 +24 -8
  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 +10 -6
  124. package/dist/keys/index.d.ts.map +1 -1
  125. package/dist/keys/index.js +9 -5
  126. package/dist/keys/index.js.map +1 -1
  127. package/dist/keys/rosterLogStore.d.ts +12 -11
  128. package/dist/keys/rosterLogStore.d.ts.map +1 -1
  129. package/dist/keys/rosterLogStore.js +15 -13
  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/userKeyRoster.d.ts +89 -9
  139. package/dist/keys/userKeyRoster.d.ts.map +1 -1
  140. package/dist/keys/userKeyRoster.js +262 -19
  141. package/dist/keys/userKeyRoster.js.map +1 -1
  142. package/dist/keys/userKeyRosterCascade.d.ts +7 -6
  143. package/dist/keys/userKeyRosterCascade.d.ts.map +1 -1
  144. package/dist/keys/userKeyRosterCascade.js +7 -6
  145. package/dist/keys/userKeyRosterCascade.js.map +1 -1
  146. package/dist/keys/wasLabelsStore.d.ts +9 -2
  147. package/dist/keys/wasLabelsStore.d.ts.map +1 -1
  148. package/dist/keys/wasLabelsStore.js +14 -6
  149. package/dist/keys/wasLabelsStore.js.map +1 -1
  150. package/dist/log.d.ts +7 -2
  151. package/dist/log.d.ts.map +1 -1
  152. package/dist/log.js +6 -1
  153. package/dist/log.js.map +1 -1
  154. package/dist/recovery/index.d.ts +12 -8
  155. package/dist/recovery/index.d.ts.map +1 -1
  156. package/dist/recovery/index.js +11 -7
  157. package/dist/recovery/index.js.map +1 -1
  158. package/dist/recovery/recoveryCode.d.ts +27 -7
  159. package/dist/recovery/recoveryCode.d.ts.map +1 -1
  160. package/dist/recovery/recoveryCode.js +18 -6
  161. package/dist/recovery/recoveryCode.js.map +1 -1
  162. package/dist/recovery/recoveryDelegation.d.ts +4 -1
  163. package/dist/recovery/recoveryDelegation.d.ts.map +1 -1
  164. package/dist/recovery/recoveryDelegation.js +25 -36
  165. package/dist/recovery/recoveryDelegation.js.map +1 -1
  166. package/dist/recovery/recoveryWebvh.d.ts +117 -65
  167. package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
  168. package/dist/recovery/recoveryWebvh.js +279 -126
  169. package/dist/recovery/recoveryWebvh.js.map +1 -1
  170. package/dist/request/classify.d.ts +32 -8
  171. package/dist/request/classify.d.ts.map +1 -1
  172. package/dist/request/classify.js +39 -14
  173. package/dist/request/classify.js.map +1 -1
  174. package/dist/request/ephemeralExchange.d.ts +1 -6
  175. package/dist/request/ephemeralExchange.d.ts.map +1 -1
  176. package/dist/request/ephemeralExchange.js.map +1 -1
  177. package/dist/request/onboarding.d.ts.map +1 -1
  178. package/dist/request/onboarding.js +2 -2
  179. package/dist/request/onboarding.js.map +1 -1
  180. package/dist/request/parse.d.ts.map +1 -1
  181. package/dist/request/parse.js +2 -3
  182. package/dist/request/parse.js.map +1 -1
  183. package/dist/resourceLog/controller.d.ts +34 -12
  184. package/dist/resourceLog/controller.d.ts.map +1 -1
  185. package/dist/resourceLog/controller.js +79 -86
  186. package/dist/resourceLog/controller.js.map +1 -1
  187. package/dist/resourceLog/document.d.ts +182 -0
  188. package/dist/resourceLog/document.d.ts.map +1 -0
  189. package/dist/resourceLog/document.js +159 -0
  190. package/dist/resourceLog/document.js.map +1 -0
  191. package/dist/resourceLog/errors.d.ts +47 -8
  192. package/dist/resourceLog/errors.d.ts.map +1 -1
  193. package/dist/resourceLog/errors.js +54 -8
  194. package/dist/resourceLog/errors.js.map +1 -1
  195. package/dist/resourceLog/index.d.ts +7 -3
  196. package/dist/resourceLog/index.d.ts.map +1 -1
  197. package/dist/resourceLog/index.js +7 -3
  198. package/dist/resourceLog/index.js.map +1 -1
  199. package/dist/resourceLog/ladderRungs.d.ts +35 -0
  200. package/dist/resourceLog/ladderRungs.d.ts.map +1 -0
  201. package/dist/resourceLog/ladderRungs.js +352 -0
  202. package/dist/resourceLog/ladderRungs.js.map +1 -0
  203. package/dist/resourceLog/license.d.ts +42 -17
  204. package/dist/resourceLog/license.d.ts.map +1 -1
  205. package/dist/resourceLog/license.js +38 -24
  206. package/dist/resourceLog/license.js.map +1 -1
  207. package/dist/space/activity.d.ts +15 -15
  208. package/dist/space/activity.d.ts.map +1 -1
  209. package/dist/space/activity.js +15 -15
  210. package/dist/space/activity.js.map +1 -1
  211. package/dist/space/collections.d.ts +11 -0
  212. package/dist/space/collections.d.ts.map +1 -1
  213. package/dist/space/collections.js +13 -0
  214. package/dist/space/collections.js.map +1 -1
  215. package/dist/space/deleteSpace.d.ts +28 -0
  216. package/dist/space/deleteSpace.d.ts.map +1 -0
  217. package/dist/space/deleteSpace.js +44 -0
  218. package/dist/space/deleteSpace.js.map +1 -0
  219. package/dist/space/errors.d.ts.map +1 -1
  220. package/dist/space/errors.js +0 -1
  221. package/dist/space/errors.js.map +1 -1
  222. package/dist/space/index.d.ts +6 -0
  223. package/dist/space/index.d.ts.map +1 -1
  224. package/dist/space/index.js +6 -0
  225. package/dist/space/index.js.map +1 -1
  226. package/dist/space/plaintextCollection.d.ts +43 -0
  227. package/dist/space/plaintextCollection.d.ts.map +1 -0
  228. package/dist/space/plaintextCollection.js +17 -0
  229. package/dist/space/plaintextCollection.js.map +1 -0
  230. package/dist/stages.d.ts +23 -0
  231. package/dist/stages.d.ts.map +1 -0
  232. package/dist/stages.js +23 -0
  233. package/dist/stages.js.map +1 -0
  234. package/dist/sync/index.d.ts +7 -0
  235. package/dist/sync/index.d.ts.map +1 -1
  236. package/dist/sync/index.js +7 -0
  237. package/dist/sync/index.js.map +1 -1
  238. package/dist/sync/push.js +4 -4
  239. package/dist/sync/push.js.map +1 -1
  240. package/dist/sync/remint.js +2 -2
  241. package/dist/sync/remint.js.map +1 -1
  242. package/dist/sync/types.d.ts +41 -1
  243. package/dist/sync/types.d.ts.map +1 -1
  244. package/dist/sync/types.js +47 -1
  245. package/dist/sync/types.js.map +1 -1
  246. package/dist/unlock/index.d.ts +6 -2
  247. package/dist/unlock/index.d.ts.map +1 -1
  248. package/dist/unlock/index.js +5 -1
  249. package/dist/unlock/index.js.map +1 -1
  250. package/dist/unlock/retire.d.ts +95 -14
  251. package/dist/unlock/retire.d.ts.map +1 -1
  252. package/dist/unlock/retire.js +102 -10
  253. package/dist/unlock/retire.js.map +1 -1
  254. package/dist/unlock/standingClient.d.ts.map +1 -1
  255. package/dist/unlock/standingClient.js +5 -1
  256. package/dist/unlock/standingClient.js.map +1 -1
  257. package/dist/unlock/standingWebvh.d.ts +341 -49
  258. package/dist/unlock/standingWebvh.d.ts.map +1 -1
  259. package/dist/unlock/standingWebvh.js +608 -164
  260. package/dist/unlock/standingWebvh.js.map +1 -1
  261. package/dist/webvh/accountEntry.d.ts +146 -0
  262. package/dist/webvh/accountEntry.d.ts.map +1 -0
  263. package/dist/webvh/accountEntry.js +239 -0
  264. package/dist/webvh/accountEntry.js.map +1 -0
  265. package/dist/webvh/didWeb.d.ts +12 -7
  266. package/dist/webvh/didWeb.d.ts.map +1 -1
  267. package/dist/webvh/didWeb.js +2 -2
  268. package/dist/webvh/didWeb.js.map +1 -1
  269. package/dist/webvh/didWebProjection.d.ts +164 -0
  270. package/dist/webvh/didWebProjection.d.ts.map +1 -0
  271. package/dist/webvh/didWebProjection.js +230 -0
  272. package/dist/webvh/didWebProjection.js.map +1 -0
  273. package/dist/webvh/didWebvh.d.ts +278 -138
  274. package/dist/webvh/didWebvh.d.ts.map +1 -1
  275. package/dist/webvh/didWebvh.js +314 -345
  276. package/dist/webvh/didWebvh.js.map +1 -1
  277. package/dist/webvh/enrollClient.d.ts +65 -0
  278. package/dist/webvh/enrollClient.d.ts.map +1 -0
  279. package/dist/webvh/enrollClient.js +172 -0
  280. package/dist/webvh/enrollClient.js.map +1 -0
  281. package/dist/webvh/index.d.ts +37 -12
  282. package/dist/webvh/index.d.ts.map +1 -1
  283. package/dist/webvh/index.js +33 -10
  284. package/dist/webvh/index.js.map +1 -1
  285. package/dist/webvh/listClients.d.ts +1 -33
  286. package/dist/webvh/listClients.d.ts.map +1 -1
  287. package/dist/webvh/listClients.js +2 -28
  288. package/dist/webvh/listClients.js.map +1 -1
  289. package/dist/webvh/revokeClient.d.ts +89 -11
  290. package/dist/webvh/revokeClient.d.ts.map +1 -1
  291. package/dist/webvh/revokeClient.js +182 -47
  292. package/dist/webvh/revokeClient.js.map +1 -1
  293. package/dist/webvh/standingZcap.d.ts +61 -14
  294. package/dist/webvh/standingZcap.d.ts.map +1 -1
  295. package/dist/webvh/standingZcap.js +91 -0
  296. package/dist/webvh/standingZcap.js.map +1 -1
  297. package/dist/webvh/verifyLog.d.ts +59 -5
  298. package/dist/webvh/verifyLog.d.ts.map +1 -1
  299. package/dist/webvh/verifyLog.js +76 -11
  300. package/dist/webvh/verifyLog.js.map +1 -1
  301. package/dist/webvh/wasIdStore.d.ts +8 -8
  302. package/dist/webvh/wasIdStore.d.ts.map +1 -1
  303. package/dist/webvh/wasIdStore.js +39 -14
  304. package/dist/webvh/wasIdStore.js.map +1 -1
  305. package/dist/webvh/zcap.d.ts +14 -1
  306. package/dist/webvh/zcap.d.ts.map +1 -1
  307. package/dist/webvh/zcap.js +3 -27
  308. package/dist/webvh/zcap.js.map +1 -1
  309. package/package.json +5 -5
  310. package/dist/webvh/keyAgreement.d.ts +0 -72
  311. package/dist/webvh/keyAgreement.d.ts.map +0 -1
  312. package/dist/webvh/keyAgreement.js +0 -47
  313. package/dist/webvh/keyAgreement.js.map +0 -1
@@ -2,29 +2,33 @@
2
2
  * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
3
  */
4
4
  /**
5
- * The did:webvh half of recovery-code lifecycle: the split configuration the
6
- * roster identity model gives a code. At issuance the document gains the
7
- * code's `keyAgreement` verification method (an ordinary Multikey entry --
8
- * deliberately unmarked; a recovery key is distinguishable structurally,
9
- * since it appears ONLY under `keyAgreement` while every enrolled client
10
- * also publishes signing relationships, so client listings key on
11
- * `capabilityInvocation` and never see it) and `nextKeyHashes` gains the
12
- * code's update-key hash -- decryption standing, authority latent: the
13
- * code's update key joins `updateKeys` nowhere, and its material exists
14
- * nowhere until the code is typed.
5
+ * The did:webvh half of recovery-code lifecycle: the split configuration a
6
+ * code holds as a standing unlock credential that retires on spend. At
7
+ * issuance the document gains the code's `keyAgreement` verification method
8
+ * (an ordinary Multikey entry -- deliberately unmarked; a recovery key is
9
+ * distinguishable structurally, since it appears under `keyAgreement` and
10
+ * `assertionMethod`/`capabilityDelegation` while every enrolled client also
11
+ * publishes an invocation relationship, so client listings key on
12
+ * `capabilityInvocation` and never see it), the code's ladder VM, and its
13
+ * rung-0 hash in `nextKeyHashes` -- decryption and delegation standing,
14
+ * update authority latent: rung 0 joins `updateKeys` nowhere, and every key
15
+ * of the set exists nowhere until the code is typed.
15
16
  *
16
- * At recovery time the pre-committed update key reveals itself to sign the
17
+ * At recovery time the pre-committed rung 0 reveals itself to sign the
17
18
  * self-enrolling continuation, two entries:
18
19
  *
19
- * 1. **Reveal + commit**: the code's update key joins `updateKeys` (its hash
20
- * stands committed since issuance, which is what makes the entry verify)
21
- * and `nextKeyHashes` extends with the NEW ordinary client's update- and
22
- * staged-key hashes plus the replacement code's update-key hash.
20
+ * 1. **Reveal + commit**: rung 0 joins `updateKeys` (its hash stands
21
+ * committed since issuance, which is what makes the entry verify -- the
22
+ * ordinary ladder reveal) and `nextKeyHashes` extends with the NEW
23
+ * ordinary client's update- and staged-key hashes plus the replacement
24
+ * code's rung-0 hash.
23
25
  * 2. **Add + retire**: signed by the new client's update key (revealed from
24
26
  * the commit), this entry publishes the new client's verification methods
25
- * and update key, removes the spent code's `keyAgreement` VM, publishes
26
- * the replacement code's, and drops the spent code's update key and hash
27
- * -- so no recovery authority stands afterwards.
27
+ * and update key, removes the spent code's `keyAgreement` VM and its
28
+ * ladder VM (with every other standing credential's, by the relation
29
+ * asymmetry), publishes the replacement code's inventory, and drops the
30
+ * spent code's revealed rung and its hash -- so no recovery authority
31
+ * stands afterwards.
28
32
  *
29
33
  * Both entries are written through the caller's store seam; the recovery
30
34
  * continuation publishes ONLY `did.jsonl` (the delegation the record carries
@@ -34,8 +38,53 @@
34
38
  * with the same key material converges without forking the log.
35
39
  */
36
40
  import { deriveNextKeyHash, updateDID } from '@interop/did-method-webvh';
37
- import { assertCanonicalClientKeys, assertCarryOverCommitments, markedVerificationMethodPair, MULTIKEY_VM_TYPE, pinOfLog, putLogResource, readPublishedLog, relationIds, servedHead, updateKeySigner, withLogConflictRetry } from '../webvh/didWebvh.js';
41
+ import { assertCanonicalClientKeys, assertCarryOverCommitments, effectiveParameters, ladderVerificationMethod, markedVerificationMethodPair, MULTIKEY_VM_TYPE, publishEntryPinned, readPublishedLogOrThrow, servedHead, updateKeySigner, withLogConflictRetry } from '../webvh/didWebvh.js';
38
42
  import { publishUnlockKey, removeUnlockKey } from '../unlock/standingWebvh.js';
43
+ import { credentialKeyAgreementMethods, ladderVmIds, relationIds } from '../resourceLog/document.js';
44
+ // The base-side dependency the lint config pins: the ladder ATTRIBUTION
45
+ // helpers only, never the annex log machinery. The add-and-retire entry
46
+ // resolves each retired credential's standing rungs from the log with them.
47
+ import { assertNextKeyHashesRemain, attributeRetiredCredentialRungs, retiredCredentialRungsBeforeKey } from '../clientAnnex/ladder.js';
48
+ /**
49
+ * What the add-and-retire entry retired, read back OFF THE LOG -- the resumed
50
+ * spend's answer to the same question the live run answers from the document
51
+ * it is editing. A run torn after that entry but before the caller's registry
52
+ * and unlock-Space teardown resumes into the already-complete branch, and
53
+ * without this it would be told nothing was retired and leave every other
54
+ * credential's registry entry standing.
55
+ *
56
+ * The entry is located by its own signature on the log: it is the first entry
57
+ * whose effective `updateKeys` authorize the successor key (the fresh
58
+ * ladder's rung 0 on the transient continuation, the new client's update key
59
+ * on the remembered one), which only that entry writes. What it retired is
60
+ * then the credential-class `keyAgreement` ids its predecessor published and
61
+ * it does not, less the spent code's own id -- the same exclusion the live
62
+ * branch makes, since the caller retires that one by name.
63
+ *
64
+ * @param options {object}
65
+ * @param options.log {DIDLog} the verified account log
66
+ * @param options.did {string} the account DID the log resolves to
67
+ * @param options.successorKeyMultibase {string} the update key only the
68
+ * add-and-retire entry authorizes
69
+ * @param options.spentVmId {string} the spent code's key-agreement
70
+ * verification-method id, excluded from the result
71
+ * @returns {string[]} the retired credentials' key-agreement ids, empty
72
+ * when no entry authorizes the successor key or it is the genesis entry
73
+ */
74
+ export function retiredCredentialVmIdsFromLog({ log, did, successorKeyMultibase, spentVmId }) {
75
+ const params = effectiveParameters(log);
76
+ const index = params.findIndex(entry => (entry.updateKeys ?? []).includes(successorKeyMultibase));
77
+ const previous = index > 0 ? log[index - 1]?.state : undefined;
78
+ const entryDoc = index > 0 ? log[index]?.state : undefined;
79
+ if (previous === undefined || entryDoc === undefined) {
80
+ return [];
81
+ }
82
+ const standing = new Set(credentialKeyAgreementMethods({ doc: entryDoc, did }).map(method => method.id));
83
+ return credentialKeyAgreementMethods({ doc: previous, did })
84
+ .map(method => method.id)
85
+ .filter((id) => typeof id === 'string')
86
+ .filter(id => !standing.has(id) && id !== spentVmId);
87
+ }
39
88
  /**
40
89
  * The verification-method id a code's key-agreement key publishes under --
41
90
  * the ordinary `<did>#<multibase>` form, indistinguishable by id from any
@@ -64,64 +113,33 @@ export class RecoveryKeyNotCommittedError extends Error {
64
113
  }
65
114
  }
66
115
  /**
67
- * Reads and resolves the published log through the narrow recovery seam.
68
- *
69
- * @param options {object}
70
- * @param options.store {RecoveryLogStore}
71
- * @param [options.expectedDid] {string} the account DID the log must resolve
72
- * to, where the caller holds one
73
- * @param [options.pinStore] {ResourceLogPinStore} the caller's chain-head
74
- * pins; a served log that is a rollback, a fork, or an identity switch
75
- * against the pinned head is refused (`ResourceLogContinuityError`)
76
- * @param [options.logId] {string} the account log's pin slot
77
- * (`accountLogPinId({ spaceId })`); required whenever a `pinStore` is
78
- * supplied
79
- * @returns {Promise<PublishedWebvhLog>}
80
- */
81
- export async function readLogOrThrow({ store, expectedDid, pinStore, logId }) {
82
- // readPublishedLog only calls getIdResourceRaw, so the narrow seam is safe.
83
- const published = await readPublishedLog({
84
- idStore: store,
85
- ...(expectedDid !== undefined ? { expectedDid } : {}),
86
- ...(pinStore ? { pinStore } : {}),
87
- ...(logId !== undefined ? { logId } : {})
88
- });
89
- if (!published) {
90
- throw new Error('did:webvh: did.jsonl is missing; nothing to recover.');
91
- }
92
- return published;
93
- }
94
- /**
95
- * Publishes `did.jsonl` through the narrow recovery seam -- the log only,
96
- * never `did.json` (the delegation covers nothing else; the recovered
97
- * session republishes the projection once it is the controller). The write is
98
- * conditional on the read the entry was built on, and a lost race surfaces as
99
- * a `WebvhLogConflictError` (the mapping lives in `putLogResource`).
116
+ * ISSUANCE: publishes a recovery code's split configuration into the
117
+ * document -- the code's `keyAgreement` verification method (an ordinary,
118
+ * unmarked Multikey entry, the key published verbatim: a code is
119
+ * high-entropy, so no commitment is needed), its rung-0 hash committed in
120
+ * `nextKeyHashes`, and its ladder VM. The code's update key joins
121
+ * `updateKeys` nowhere. A thin wrapper over the
122
+ * standing unlock-key inventory core ({@link publishUnlockKey}), which owns
123
+ * idempotence and the conditional publish.
100
124
  *
101
- * @param options {object}
102
- * @param options.store {RecoveryLogStore}
103
- * @param options.log {DIDLog}
104
- * @param [options.ifMatch] {string} publish only if `did.jsonl` is unchanged
105
- * @returns {Promise<void>}
106
- */
107
- export async function publishLogOnly({ store, log, ifMatch }) {
108
- await putLogResource({ store, log, ifMatch });
109
- }
110
- /**
111
- * ISSUANCE (run by an enrolled client, root authority): publishes a recovery
112
- * code's split configuration into the document -- one entry adding the code's
113
- * `keyAgreement` verification method (an ordinary, unmarked Multikey entry,
114
- * the key published verbatim: a code is high-entropy, so no commitment is
115
- * needed) and committing its update-key hash in `nextKeyHashes`. The code's
116
- * update key joins `updateKeys` nowhere. A thin wrapper over the standing
117
- * unlock-key inventory core ({@link publishUnlockKey}), which owns idempotence
118
- * and the conditional publish.
125
+ * `part` is how the ladder branch splits the entry so the code's decryption
126
+ * material precedes its authority: a key entry (`'key'`), then the escrow,
127
+ * then an authority entry (`'authority'`) carrying the ladder VM and the
128
+ * rung-0 commitment. An enrolled client's issuance escrows before the entry
129
+ * and writes the merged `'all'` entry.
119
130
  *
120
131
  * @param options {object}
121
132
  * @param options.idStore {WebvhIdStore}
122
- * @param options.updateKeys {ClientWebvhUpdateKeys} the ISSUING client's
123
- * own did:webvh update-key seeds
133
+ * @param options.signer {AccountLogSigner} who signs the entry: the ISSUING
134
+ * client's own did:webvh update-key seeds, or the acting credential's
135
+ * ladder seed
124
136
  * @param options.recovery {RecoveryPublicKeys} the code's public halves
137
+ * @param options.ladderSeed {Uint8Array} the code's OWN ladder seed,
138
+ * derived from the code bytes (`recoveryClientFromCode`). The entry
139
+ * installs that ladder's VM, and `recovery.updateKeyMultibase` is its
140
+ * rung 0
141
+ * @param [options.part] {string} `'all'` (the default), `'key'`, or
142
+ * `'authority'` -- see above
125
143
  * @param [options.expectedDid] {string} the account DID the log must
126
144
  * resolve to, from the caller's stored account pointer
127
145
  * @param [options.pinStore] {ResourceLogPinStore} the caller's chain-head
@@ -133,16 +151,20 @@ export async function publishLogOnly({ store, log, ifMatch }) {
133
151
  * @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog }>} the account
134
152
  * DID and the document and log as this call leaves them
135
153
  */
136
- export async function publishRecoveryKey({ idStore, updateKeys, recovery, expectedDid, pinStore, logId }) {
154
+ export async function publishRecoveryKey({ idStore, signer, recovery, ladderSeed, part, expectedDid, pinStore, logId }) {
137
155
  return publishUnlockKey({
138
156
  idStore,
139
- updateKeys,
157
+ signer,
140
158
  unlockKeys: {
141
159
  keyAgreement: {
142
160
  publicKeyMultibase: recovery.keyAgreementKeyMultibase
143
161
  },
144
162
  updateKeyMultibase: recovery.updateKeyMultibase
145
163
  },
164
+ // Every code carries a ladder, so the authority half of its inventory is
165
+ // that ladder's VM beside the rung-0 commitment.
166
+ ladderSeed,
167
+ ...(part !== undefined ? { part } : {}),
146
168
  ...(expectedDid !== undefined ? { expectedDid } : {}),
147
169
  ...(pinStore ? { pinStore } : {}),
148
170
  ...(logId !== undefined ? { logId } : {}),
@@ -150,27 +172,48 @@ export async function publishRecoveryKey({ idStore, updateKeys, recovery, expect
150
172
  });
151
173
  }
152
174
  /**
153
- * REVOCATION (run by an enrolled client, root authority): removes a recovery
154
- * code's inventory from the document -- its `keyAgreement` verification method
155
- * and its committed update-key hash -- in one entry, through the same shared
156
- * inventory core ({@link removeUnlockKey}). The roster-side half (rotating the
157
- * user key epoch off the code's wrap) is the caller's, and runs after this so
158
- * the resolver's document no longer backs the removed entry.
175
+ * REVOCATION: removes a recovery code's whole inventory from the document --
176
+ * its `keyAgreement` verification method, its committed rung-0 hash, and its
177
+ * ladder VM -- in one entry, through the same shared inventory core
178
+ * ({@link removeUnlockKey}). The roster-side half (rotating the user key
179
+ * epoch off the code's wrap) is the caller's, and runs after this so the
180
+ * resolver's document no longer backs the removed entry.
159
181
  *
160
- * @param options {object} see {@link publishRecoveryKey}
182
+ * The revoker holds neither the code bytes nor its ladder seed, so the VM
183
+ * claim is seedless: the removal attributes it from the log, anchored on the
184
+ * rung-0 update-key multibase the registry recorded at issuance
185
+ * (`recovery.updateKeyMultibase`). The claim is required rather than
186
+ * best-effort. A VM no attribution arm claims refuses the whole revocation
187
+ * with `UnclaimedLadderVmRetirementError` before anything is written, since a
188
+ * standing ladder VM whose credential is otherwise retired keeps its
189
+ * delegation authority -- including the DELETE-only capability on the account
190
+ * Space that the account-deletion ceremony mints.
191
+ *
192
+ * @param options {object} see {@link publishRecoveryKey}, except that
193
+ * `ladderSeed` is optional here: a revoking client does not hold it, and
194
+ * the code's own holder is the only party who can supply it
195
+ * @param [options.projectionStore] {object} an `id`-collection store the
196
+ * caller may write through, passed straight to the inventory edit: the
197
+ * post-strike `did:web` projection is PUT through it immediately before
198
+ * that entry publishes, so a ladder-signed revocation does not leave
199
+ * `did.json` naming the revoked code. Best-effort, and omitted the
200
+ * behavior is unchanged (see `removeUnlockKey`)
161
201
  * @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog }>} see
162
202
  * {@link publishRecoveryKey}
163
203
  */
164
- export async function removeRecoveryKey({ idStore, updateKeys, recovery, expectedDid, pinStore, logId }) {
204
+ export async function removeRecoveryKey({ idStore, signer, recovery, ladderSeed, projectionStore, expectedDid, pinStore, logId }) {
165
205
  return removeUnlockKey({
166
206
  idStore,
167
- updateKeys,
207
+ signer,
168
208
  unlockKeys: {
169
209
  keyAgreement: {
170
210
  publicKeyMultibase: recovery.keyAgreementKeyMultibase
171
211
  },
172
212
  updateKeyMultibase: recovery.updateKeyMultibase
173
213
  },
214
+ ...(ladderSeed ? { ladderSeed } : {}),
215
+ ...(projectionStore ? { projectionStore } : {}),
216
+ requireLadderVmClaim: true,
174
217
  ...(expectedDid !== undefined ? { expectedDid } : {}),
175
218
  ...(pinStore ? { pinStore } : {}),
176
219
  ...(logId !== undefined ? { logId } : {}),
@@ -203,8 +246,10 @@ export async function removeRecoveryKey({ idStore, updateKeys, recovery, expecte
203
246
  * @param options.newClientUpdateSeeds {ClientWebvhUpdateKeys} the new
204
247
  * client's update-key seeds (minted by the recovery flow, which therefore
205
248
  * holds them and can sign the add entry)
206
- * @param options.replacement {RecoveryPublicKeys} the replacement code's
207
- * public halves, committed and published in the same continuation
249
+ * @param options.replacement {ReplacementRecoveryPublicKeys} the
250
+ * replacement code's public halves -- its key-agreement key, its rung-0
251
+ * update key, and its ladder VM key -- committed and published in the same
252
+ * continuation
208
253
  * @param options.onCommitted {function}
209
254
  * `(committed: { builtOnHead: { scid, versionId } }) => Promise<void>` --
210
255
  * the REQUIRED persist-before-publish seam. It runs once per attempt, after
@@ -242,7 +287,7 @@ export async function removeRecoveryKey({ idStore, updateKeys, recovery, expecte
242
287
  * @param [options.logId] {string} the account log's pin slot
243
288
  * (`accountLogPinId({ spaceId })`); required whenever a `pinStore` is
244
289
  * supplied
245
- * @returns {Promise<{ did: string, webDoc?: object, committed: boolean }>}
290
+ * @returns {Promise<object>}
246
291
  * the account DID, the final `did.json` projection when the add-and-retire
247
292
  * entry ran here, and `committed` -- whether THIS call published the pivot
248
293
  * entry (`false` exactly on the idempotent completed branch, where a torn
@@ -250,7 +295,12 @@ export async function removeRecoveryKey({ idStore, updateKeys, recovery, expecte
250
295
  * a success flag: a returning call means the continuation stands either
251
296
  * way, so a caller clears its pending state on the RETURN, whatever
252
297
  * `committed` says. Its absence from a return value is a build skew, which
253
- * is why it is stated rather than inferred
298
+ * is why it is stated rather than inferred.
299
+ * `retiredCredentialVmIds` lists the `keyAgreement` verification-method ids
300
+ * this entry struck for pre-recovery credentials OTHER than the spent code
301
+ * -- what the caller drops registry entries and deletes unlock Spaces for.
302
+ * On the completed branch, whose entry already landed, it is derived from
303
+ * the log, so a resume reports the same list the first run did
254
304
  */
255
305
  export async function recoverWebvhClient(options) {
256
306
  // The seam is what gets the successor material persisted before the pivot
@@ -274,7 +324,7 @@ export async function recoverWebvhClient(options) {
274
324
  * One attempt of {@link recoverWebvhClient}, re-invoked by the conflict retry.
275
325
  *
276
326
  * @param options {object} see {@link recoverWebvhClient}
277
- * @returns {Promise<{ did: string, webDoc?: object, committed: boolean }>}
327
+ * @returns {Promise<object>} see {@link recoverWebvhClient}
278
328
  */
279
329
  async function recoverWebvhClientOnce({ store, recovery, newClientKeys, newClientUpdateSeeds, replacement, onCommitted, expectedDid, pinStore, logId }) {
280
330
  // Each attempt's own read is what the CAS publish is built on, so the
@@ -284,22 +334,55 @@ async function recoverWebvhClientOnce({ store, recovery, newClientKeys, newClien
284
334
  ...(pinStore ? { pinStore } : {}),
285
335
  ...(logId !== undefined ? { logId } : {})
286
336
  };
287
- let published = await readLogOrThrow({
288
- store,
337
+ let published = await readPublishedLogOrThrow({
338
+ idStore: store,
289
339
  ...(expectedDid !== undefined ? { expectedDid } : {}),
290
- ...pinned
340
+ ...pinned,
341
+ missingMessage: 'did:webvh: did.jsonl is missing; nothing to recover.'
291
342
  });
343
+ // Derived before the completion check, because a resume recomputes the
344
+ // strike with the same protected sets the first run used.
345
+ const recoveryHash = await deriveNextKeyHash(recovery.updateKeyMultibase);
346
+ const newUpdateHash = await deriveNextKeyHash(newClientKeys.updateKeyMultibase);
347
+ const newStagedHash = await deriveNextKeyHash(newClientKeys.stagedUpdateKeyMultibase);
348
+ const replacementHash = await deriveNextKeyHash(replacement.updateKeyMultibase);
292
349
  // Already complete (a torn earlier run finished the add entry): the new
293
350
  // client's update key is authorized, which only the add entry writes. The
294
351
  // seam is deliberately NOT entered here -- nothing is about to be
295
352
  // published, so there is no pivot to persist ahead of.
296
353
  if (published.updateKeys.includes(newClientKeys.updateKeyMultibase)) {
297
- return { did: published.did, committed: false };
354
+ // The add entry already struck the pre-recovery credentials, so the
355
+ // document names none of them any more. The report is derived from the
356
+ // log instead ({@link retiredCredentialVmIdsFromLog}), so a resume tells
357
+ // the caller exactly what the first run told it.
358
+ const retired = retiredCredentialVmIdsFromLog({
359
+ log: published.log,
360
+ did: published.did,
361
+ successorKeyMultibase: newClientKeys.updateKeyMultibase,
362
+ spentVmId: recoveryVmId({
363
+ did: published.did,
364
+ keyAgreementKeyMultibase: recovery.keyAgreementKeyMultibase
365
+ })
366
+ });
367
+ // The strike is recomputed by re-running it over the log as it stood just
368
+ // before the add entry, with the same protected sets, so a resume reports
369
+ // exactly what the first run reported rather than a second definition of
370
+ // the same question.
371
+ const strike = await retiredCredentialRungsBeforeKey({
372
+ log: published.log,
373
+ authorizedKeyMultibase: newClientKeys.updateKeyMultibase,
374
+ credentialVmIds: retired,
375
+ protectedHashes: [newUpdateHash, newStagedHash, replacementHash],
376
+ protectedKeys: [newClientKeys.updateKeyMultibase]
377
+ });
378
+ return {
379
+ did: published.did,
380
+ committed: false,
381
+ retiredCredentialVmIds: retired,
382
+ struckRungHashes: strike.struckHashes,
383
+ unclaimedCredentialVmIds: strike.unclaimedCredentialVmIds
384
+ };
298
385
  }
299
- const recoveryHash = await deriveNextKeyHash(recovery.updateKeyMultibase);
300
- const newUpdateHash = await deriveNextKeyHash(newClientKeys.updateKeyMultibase);
301
- const newStagedHash = await deriveNextKeyHash(newClientKeys.stagedUpdateKeyMultibase);
302
- const replacementHash = await deriveNextKeyHash(replacement.updateKeyMultibase);
303
386
  // The reveal-and-commit entry, skipped when a torn earlier run already
304
387
  // published it (the revealed key authorized AND every needed hash
305
388
  // committed).
@@ -330,22 +413,21 @@ async function recoverWebvhClientOnce({ store, recovery, newClientKeys, newClien
330
413
  ])
331
414
  ]
332
415
  });
333
- await publishLogOnly({
416
+ // The pin advances with the publish, so the re-read below (and any read
417
+ // after a tear here) refuses a host that rolls the log back behind the
418
+ // reveal entry.
419
+ await publishEntryPinned({
334
420
  store,
335
421
  log: updated.log,
336
- ifMatch: published.etag
422
+ ifMatch: published.etag,
423
+ ...pinned
337
424
  });
338
- // Advance the pin to what the reveal entry just published, so the re-read
339
- // below (and any read after a tear here) refuses a host that rolls the
340
- // log back behind it.
341
- if (pinStore && logId !== undefined) {
342
- await pinStore.write({ logId, pin: pinOfLog(updated.log) });
343
- }
344
425
  // The same account the reveal entry just extended, under the same pin.
345
- published = await readLogOrThrow({
346
- store,
426
+ published = await readPublishedLogOrThrow({
427
+ idStore: store,
347
428
  expectedDid: published.did,
348
- ...pinned
429
+ ...pinned,
430
+ missingMessage: 'did:webvh: did.jsonl is missing; nothing to recover.'
349
431
  });
350
432
  }
351
433
  // The persist-before-publish seam: the successor material is persisted
@@ -355,9 +437,12 @@ async function recoverWebvhClientOnce({ store, recovery, newClientKeys, newClien
355
437
  // above, or a torn earlier run's reveal entry standing already.
356
438
  await onCommitted({ builtOnHead: servedHead(published.log) });
357
439
  // The add-and-retire entry: the new client's verification methods and
358
- // update key in; the spent code's VM, update key, and hash out; the
359
- // replacement code's VM in. Signed by the new client's update key, whose
360
- // hash the commit entry just committed.
440
+ // update key in; the replacement code's VM in; every pre-recovery standing
441
+ // credential fully retired -- the spent code by name, and every other one
442
+ // by the same structural rule the transient continuation uses (its ladder
443
+ // VM by the relation asymmetry, its keyAgreement member by the account-DID
444
+ // controller). Signed by the new client's update key, whose hash the commit
445
+ // entry just committed.
361
446
  const { did, doc } = published;
362
447
  const vmId = (publicKeyMultibase) => `${did}#${publicKeyMultibase}`;
363
448
  const spentVmId = recoveryVmId({
@@ -376,6 +461,13 @@ async function recoverWebvhClientOnce({ store, recovery, newClientKeys, newClien
376
461
  // through the shared builder, which refuses a new client whose key-agreement
377
462
  // key is not its signing key's canonical twin; the replacement code's
378
463
  // unmarked method is appended after it.
464
+ // The replacement code's ladder VM, published in the same entry as its
465
+ // key-agreement member: a code is a standing credential with a ladder, and
466
+ // its own bridge delegation is signed by this VM, so a replacement without
467
+ // it could never spend (`decisions/0019`, `decisions/0020`). Its rung-0
468
+ // hash needs nothing here -- the reveal-and-commit entry committed it, and
469
+ // this entry carries it through.
470
+ const replacementLadderVmId = vmId(replacement.ladderVmKeyMultibase);
379
471
  const addedMethods = [
380
472
  ...markedVerificationMethodPair({
381
473
  controller: did,
@@ -387,15 +479,61 @@ async function recoverWebvhClientOnce({ store, recovery, newClientKeys, newClien
387
479
  type: MULTIKEY_VM_TYPE,
388
480
  controller: did,
389
481
  publicKeyMultibase: replacement.keyAgreementKeyMultibase
390
- }
482
+ },
483
+ ladderVerificationMethod({
484
+ controller: did,
485
+ publicKeyMultibase: replacement.ladderVmKeyMultibase
486
+ })
391
487
  ];
488
+ // The full retirement, recognized structurally rather than from a list the
489
+ // caller supplies: every standing ladder VM, and every keyAgreement member
490
+ // the account DID controls, less the ids this entry itself adds. Other
491
+ // unspent recovery codes retire with the rest -- a code's member is
492
+ // unmarked and verbatim, indistinguishable from a passkey's. Each retired
493
+ // credential's committed rungs and revealed rungs go in the same entry (see
494
+ // the strike below and `decisions/0014`), because striking the VM rots only
495
+ // a ladder-signed bridge and a bridge an enrolled client minted outlives
496
+ // this entry. The bridge itself stays live but inert; nothing revokes it.
497
+ // The new client's marked pair and the KMS
498
+ // convenience key are untouched -- neither is account-DID-controlled
499
+ // keyAgreement.
500
+ const ladderVms = ladderVmIds({ doc });
501
+ const addedVmIds = addedMethods
502
+ .map(method => method.id)
503
+ .filter((id) => typeof id === 'string');
504
+ const struckCredentialVmIds = credentialKeyAgreementMethods({ doc, did })
505
+ .map(method => method.id)
506
+ .filter((id) => typeof id === 'string')
507
+ .filter(id => !addedVmIds.includes(id));
508
+ const retiredCredentialVmIds = struckCredentialVmIds.filter(id => id !== spentVmId);
509
+ // Each retired credential's committed rungs and any revealed rung of its own
510
+ // go in the SAME entry. Striking the ladder VM rots only a ladder-signed
511
+ // bridge; a bridge an enrolled client minted outlives the strike, and that
512
+ // client survives this entry, so a committed rung left standing is a reveal
513
+ // the retired credential could still perform. Anchored from the log alone,
514
+ // and an unanchorable credential is reported rather than struck.
515
+ const strike = await attributeRetiredCredentialRungs({
516
+ log: published.log,
517
+ credentialVmIds: retiredCredentialVmIds,
518
+ protectedHashes: [newUpdateHash, newStagedHash, replacementHash],
519
+ protectedKeys: [newClientKeys.updateKeyMultibase]
520
+ });
521
+ const struck = (id) => id !== undefined &&
522
+ (id === spentVmId ||
523
+ ladderVms.includes(id) ||
524
+ struckCredentialVmIds.includes(id));
392
525
  const existingMethods = (doc.verificationMethod ?? []);
393
526
  const verificationMethods = [
394
- ...existingMethods.filter(method => method.id !== spentVmId &&
527
+ ...existingMethods.filter(method => !struck(method.id) &&
395
528
  !addedMethods.some(added => added.id === method.id)),
396
529
  ...addedMethods
397
530
  ];
398
- const withReference = (relation, id) => [...new Set([...relationIds(relation), id])];
531
+ const withReference = (relation, ...ids) => [
532
+ ...new Set([
533
+ ...relationIds(relation).filter(referencedId => !struck(referencedId)),
534
+ ...ids
535
+ ])
536
+ ];
399
537
  const signingVmId = vmId(newClientKeys.signingKeyMultibase);
400
538
  const signer = await updateKeySigner({
401
539
  seed: newClientUpdateSeeds.updateSeed
@@ -406,32 +544,47 @@ async function recoverWebvhClientOnce({ store, recovery, newClientKeys, newClien
406
544
  alsoKnownAsWeb: true,
407
545
  updateKeys: [
408
546
  ...new Set([
409
- ...published.updateKeys.filter(key => key !== recovery.updateKeyMultibase),
547
+ ...published.updateKeys.filter(key => key !== recovery.updateKeyMultibase &&
548
+ !strike.struckKeys.includes(key)),
410
549
  newClientKeys.updateKeyMultibase
411
550
  ])
412
551
  ],
413
- nextKeyHashes: published.nextKeyHashes.filter(hash => hash !== recoveryHash),
552
+ nextKeyHashes: assertNextKeyHashesRemain({
553
+ nextKeyHashes: published.nextKeyHashes.filter(hash => hash !== recoveryHash && !strike.struckHashes.includes(hash)),
554
+ ceremony: 'the recovery add-and-retire entry'
555
+ }),
414
556
  verificationMethods,
415
557
  authentication: withReference(doc.authentication, signingVmId),
416
- assertionMethod: withReference(doc.assertionMethod, signingVmId),
558
+ // The ladder VM's relation asymmetry: `assertionMethod` and
559
+ // `capabilityDelegation` only, so it never reads as an enrolled client.
560
+ assertionMethod: withReference(doc.assertionMethod, signingVmId, replacementLadderVmId),
417
561
  keyAgreement: [
418
562
  ...new Set([
419
- ...relationIds(doc.keyAgreement).filter(id => id !== spentVmId),
563
+ ...relationIds(doc.keyAgreement).filter(id => !struck(id)),
420
564
  vmId(newClientKeys.keyAgreementKeyMultibase),
421
565
  replacementVmId
422
566
  ])
423
567
  ],
424
568
  capabilityInvocation: withReference(doc.capabilityInvocation, signingVmId),
425
- capabilityDelegation: withReference(doc.capabilityDelegation, signingVmId)
569
+ capabilityDelegation: withReference(doc.capabilityDelegation, signingVmId, replacementLadderVmId)
426
570
  });
427
571
  // Conditional on the read this entry was built on: the re-read above when
428
- // the commit entry ran here, the first read when it was skipped.
429
- await publishLogOnly({ store, log: updated.log, ifMatch: published.etag });
430
- // Advance the pin to what this entry just published, so a host rolling the
431
- // log back straight afterwards is refused on the next read.
432
- if (pinStore && logId !== undefined) {
433
- await pinStore.write({ logId, pin: pinOfLog(updated.log) });
434
- }
435
- return { did: updated.did, webDoc: updated.webDoc, committed: true };
572
+ // the commit entry ran here, the first read when it was skipped. The pin
573
+ // advances with the publish, so a host rolling the log back straight
574
+ // afterwards is refused on the next read.
575
+ await publishEntryPinned({
576
+ store,
577
+ log: updated.log,
578
+ ifMatch: published.etag,
579
+ ...pinned
580
+ });
581
+ return {
582
+ did: updated.did,
583
+ webDoc: updated.webDoc,
584
+ committed: true,
585
+ retiredCredentialVmIds,
586
+ struckRungHashes: strike.struckHashes,
587
+ unclaimedCredentialVmIds: strike.unclaimedCredentialVmIds
588
+ };
436
589
  }
437
590
  //# sourceMappingURL=recoveryWebvh.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"recoveryWebvh.js","sourceRoot":"","sources":["../../src/recovery/recoveryWebvh.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAMxE,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,4BAA4B,EAC5B,gBAAgB,EAChB,QAAQ,EACR,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,eAAe,EACf,oBAAoB,EACrB,MAAM,sBAAsB,CAAA;AAQ7B,OAAO,EAAE,gBAA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