@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
@@ -1,6 +1,40 @@
1
1
  import type { DIDDoc, DIDLog } from '@interop/did-method-webvh';
2
- import type { ClientWebvhUpdateKeys, PublishedWebvhLog, WebvhEnrollmentKeys, WebvhIdStore } from '../webvh/didWebvh.js';
2
+ import type { ClientWebvhUpdateKeys, WebvhEnrollmentKeys, WebvhIdStore } from '../webvh/didWebvh.js';
3
3
  import type { ResourceLogPinStore } from '@interop/vh-resource-log';
4
+ import type { UnlockInventoryPart } from '../unlock/standingWebvh.js';
5
+ import type { AccountLogSigner } from '../webvh/accountEntry.js';
6
+ /**
7
+ * What the add-and-retire entry retired, read back OFF THE LOG -- the resumed
8
+ * spend's answer to the same question the live run answers from the document
9
+ * it is editing. A run torn after that entry but before the caller's registry
10
+ * and unlock-Space teardown resumes into the already-complete branch, and
11
+ * without this it would be told nothing was retired and leave every other
12
+ * credential's registry entry standing.
13
+ *
14
+ * The entry is located by its own signature on the log: it is the first entry
15
+ * whose effective `updateKeys` authorize the successor key (the fresh
16
+ * ladder's rung 0 on the transient continuation, the new client's update key
17
+ * on the remembered one), which only that entry writes. What it retired is
18
+ * then the credential-class `keyAgreement` ids its predecessor published and
19
+ * it does not, less the spent code's own id -- the same exclusion the live
20
+ * branch makes, since the caller retires that one by name.
21
+ *
22
+ * @param options {object}
23
+ * @param options.log {DIDLog} the verified account log
24
+ * @param options.did {string} the account DID the log resolves to
25
+ * @param options.successorKeyMultibase {string} the update key only the
26
+ * add-and-retire entry authorizes
27
+ * @param options.spentVmId {string} the spent code's key-agreement
28
+ * verification-method id, excluded from the result
29
+ * @returns {string[]} the retired credentials' key-agreement ids, empty
30
+ * when no entry authorizes the successor key or it is the genesis entry
31
+ */
32
+ export declare function retiredCredentialVmIdsFromLog({ log, did, successorKeyMultibase, spentVmId }: {
33
+ log: DIDLog;
34
+ did: string;
35
+ successorKeyMultibase: string;
36
+ spentVmId: string;
37
+ }): string[];
4
38
  /**
5
39
  * The verification-method id a code's key-agreement key publishes under --
6
40
  * the ordinary `<did>#<multibase>` form, indistinguishable by id from any
@@ -26,6 +60,18 @@ export interface RecoveryPublicKeys {
26
60
  keyAgreementKeyMultibase: string;
27
61
  updateKeyMultibase: string;
28
62
  }
63
+ /**
64
+ * The public halves a SPEND needs of the replacement code it publishes: the
65
+ * two above plus the code's ladder VM key, which the add-and-retire entry
66
+ * installs under `assertionMethod` and `capabilityDelegation`. A code is a
67
+ * standing unlock credential with a ladder (`decisions/0020`) and its bridge
68
+ * delegation is signed by that ladder's VM (`decisions/0019`), so a
69
+ * replacement published without the VM could neither sign its own bridge nor
70
+ * spend. `recoveryClientFromCode` produces all three.
71
+ */
72
+ export interface ReplacementRecoveryPublicKeys extends RecoveryPublicKeys {
73
+ ladderVmKeyMultibase: string;
74
+ }
29
75
  /**
30
76
  * Thrown by the recovery continuation when the log carries neither the code's
31
77
  * update key nor its committed hash -- the code was revoked (or never
@@ -41,59 +87,33 @@ export declare class RecoveryKeyNotCommittedError extends Error {
41
87
  */
42
88
  export type RecoveryLogStore = Pick<WebvhIdStore, 'getIdResourceRaw' | 'putIdResource'>;
43
89
  /**
44
- * Reads and resolves the published log through the narrow recovery seam.
90
+ * ISSUANCE: publishes a recovery code's split configuration into the
91
+ * document -- the code's `keyAgreement` verification method (an ordinary,
92
+ * unmarked Multikey entry, the key published verbatim: a code is
93
+ * high-entropy, so no commitment is needed), its rung-0 hash committed in
94
+ * `nextKeyHashes`, and its ladder VM. The code's update key joins
95
+ * `updateKeys` nowhere. A thin wrapper over the
96
+ * standing unlock-key inventory core ({@link publishUnlockKey}), which owns
97
+ * idempotence and the conditional publish.
45
98
  *
46
- * @param options {object}
47
- * @param options.store {RecoveryLogStore}
48
- * @param [options.expectedDid] {string} the account DID the log must resolve
49
- * to, where the caller holds one
50
- * @param [options.pinStore] {ResourceLogPinStore} the caller's chain-head
51
- * pins; a served log that is a rollback, a fork, or an identity switch
52
- * against the pinned head is refused (`ResourceLogContinuityError`)
53
- * @param [options.logId] {string} the account log's pin slot
54
- * (`accountLogPinId({ spaceId })`); required whenever a `pinStore` is
55
- * supplied
56
- * @returns {Promise<PublishedWebvhLog>}
57
- */
58
- export declare function readLogOrThrow({ store, expectedDid, pinStore, logId }: {
59
- store: RecoveryLogStore;
60
- expectedDid?: string;
61
- pinStore?: ResourceLogPinStore;
62
- logId?: string;
63
- }): Promise<PublishedWebvhLog>;
64
- /**
65
- * Publishes `did.jsonl` through the narrow recovery seam -- the log only,
66
- * never `did.json` (the delegation covers nothing else; the recovered
67
- * session republishes the projection once it is the controller). The write is
68
- * conditional on the read the entry was built on, and a lost race surfaces as
69
- * a `WebvhLogConflictError` (the mapping lives in `putLogResource`).
70
- *
71
- * @param options {object}
72
- * @param options.store {RecoveryLogStore}
73
- * @param options.log {DIDLog}
74
- * @param [options.ifMatch] {string} publish only if `did.jsonl` is unchanged
75
- * @returns {Promise<void>}
76
- */
77
- export declare function publishLogOnly({ store, log, ifMatch }: {
78
- store: RecoveryLogStore;
79
- log: DIDLog;
80
- ifMatch?: string;
81
- }): Promise<void>;
82
- /**
83
- * ISSUANCE (run by an enrolled client, root authority): publishes a recovery
84
- * code's split configuration into the document -- one entry adding the code's
85
- * `keyAgreement` verification method (an ordinary, unmarked Multikey entry,
86
- * the key published verbatim: a code is high-entropy, so no commitment is
87
- * needed) and committing its update-key hash in `nextKeyHashes`. The code's
88
- * update key joins `updateKeys` nowhere. A thin wrapper over the standing
89
- * unlock-key inventory core ({@link publishUnlockKey}), which owns idempotence
90
- * and the conditional publish.
99
+ * `part` is how the ladder branch splits the entry so the code's decryption
100
+ * material precedes its authority: a key entry (`'key'`), then the escrow,
101
+ * then an authority entry (`'authority'`) carrying the ladder VM and the
102
+ * rung-0 commitment. An enrolled client's issuance escrows before the entry
103
+ * and writes the merged `'all'` entry.
91
104
  *
92
105
  * @param options {object}
93
106
  * @param options.idStore {WebvhIdStore}
94
- * @param options.updateKeys {ClientWebvhUpdateKeys} the ISSUING client's
95
- * own did:webvh update-key seeds
107
+ * @param options.signer {AccountLogSigner} who signs the entry: the ISSUING
108
+ * client's own did:webvh update-key seeds, or the acting credential's
109
+ * ladder seed
96
110
  * @param options.recovery {RecoveryPublicKeys} the code's public halves
111
+ * @param options.ladderSeed {Uint8Array} the code's OWN ladder seed,
112
+ * derived from the code bytes (`recoveryClientFromCode`). The entry
113
+ * installs that ladder's VM, and `recovery.updateKeyMultibase` is its
114
+ * rung 0
115
+ * @param [options.part] {string} `'all'` (the default), `'key'`, or
116
+ * `'authority'` -- see above
97
117
  * @param [options.expectedDid] {string} the account DID the log must
98
118
  * resolve to, from the caller's stored account pointer
99
119
  * @param [options.pinStore] {ResourceLogPinStore} the caller's chain-head
@@ -105,10 +125,12 @@ export declare function publishLogOnly({ store, log, ifMatch }: {
105
125
  * @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog }>} the account
106
126
  * DID and the document and log as this call leaves them
107
127
  */
108
- export declare function publishRecoveryKey({ idStore, updateKeys, recovery, expectedDid, pinStore, logId }: {
128
+ export declare function publishRecoveryKey({ idStore, signer, recovery, ladderSeed, part, expectedDid, pinStore, logId }: {
109
129
  idStore: WebvhIdStore;
110
- updateKeys: ClientWebvhUpdateKeys;
130
+ signer: AccountLogSigner;
111
131
  recovery: RecoveryPublicKeys;
132
+ ladderSeed: Uint8Array;
133
+ part?: UnlockInventoryPart;
112
134
  expectedDid?: string;
113
135
  pinStore?: ResourceLogPinStore;
114
136
  logId?: string;
@@ -118,21 +140,41 @@ export declare function publishRecoveryKey({ idStore, updateKeys, recovery, expe
118
140
  log: DIDLog;
119
141
  }>;
120
142
  /**
121
- * REVOCATION (run by an enrolled client, root authority): removes a recovery
122
- * code's inventory from the document -- its `keyAgreement` verification method
123
- * and its committed update-key hash -- in one entry, through the same shared
124
- * inventory core ({@link removeUnlockKey}). The roster-side half (rotating the
125
- * user key epoch off the code's wrap) is the caller's, and runs after this so
126
- * the resolver's document no longer backs the removed entry.
143
+ * REVOCATION: removes a recovery code's whole inventory from the document --
144
+ * its `keyAgreement` verification method, its committed rung-0 hash, and its
145
+ * ladder VM -- in one entry, through the same shared inventory core
146
+ * ({@link removeUnlockKey}). The roster-side half (rotating the user key
147
+ * epoch off the code's wrap) is the caller's, and runs after this so the
148
+ * resolver's document no longer backs the removed entry.
149
+ *
150
+ * The revoker holds neither the code bytes nor its ladder seed, so the VM
151
+ * claim is seedless: the removal attributes it from the log, anchored on the
152
+ * rung-0 update-key multibase the registry recorded at issuance
153
+ * (`recovery.updateKeyMultibase`). The claim is required rather than
154
+ * best-effort. A VM no attribution arm claims refuses the whole revocation
155
+ * with `UnclaimedLadderVmRetirementError` before anything is written, since a
156
+ * standing ladder VM whose credential is otherwise retired keeps its
157
+ * delegation authority -- including the DELETE-only capability on the account
158
+ * Space that the account-deletion ceremony mints.
127
159
  *
128
- * @param options {object} see {@link publishRecoveryKey}
160
+ * @param options {object} see {@link publishRecoveryKey}, except that
161
+ * `ladderSeed` is optional here: a revoking client does not hold it, and
162
+ * the code's own holder is the only party who can supply it
163
+ * @param [options.projectionStore] {object} an `id`-collection store the
164
+ * caller may write through, passed straight to the inventory edit: the
165
+ * post-strike `did:web` projection is PUT through it immediately before
166
+ * that entry publishes, so a ladder-signed revocation does not leave
167
+ * `did.json` naming the revoked code. Best-effort, and omitted the
168
+ * behavior is unchanged (see `removeUnlockKey`)
129
169
  * @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog }>} see
130
170
  * {@link publishRecoveryKey}
131
171
  */
132
- export declare function removeRecoveryKey({ idStore, updateKeys, recovery, expectedDid, pinStore, logId }: {
172
+ export declare function removeRecoveryKey({ idStore, signer, recovery, ladderSeed, projectionStore, expectedDid, pinStore, logId }: {
133
173
  idStore: WebvhIdStore;
134
- updateKeys: ClientWebvhUpdateKeys;
174
+ signer: AccountLogSigner;
135
175
  recovery: RecoveryPublicKeys;
176
+ ladderSeed?: Uint8Array;
177
+ projectionStore?: Pick<WebvhIdStore, 'getIdResourceRaw' | 'putIdResource'>;
136
178
  expectedDid?: string;
137
179
  pinStore?: ResourceLogPinStore;
138
180
  logId?: string;
@@ -167,8 +209,10 @@ export declare function removeRecoveryKey({ idStore, updateKeys, recovery, expec
167
209
  * @param options.newClientUpdateSeeds {ClientWebvhUpdateKeys} the new
168
210
  * client's update-key seeds (minted by the recovery flow, which therefore
169
211
  * holds them and can sign the add entry)
170
- * @param options.replacement {RecoveryPublicKeys} the replacement code's
171
- * public halves, committed and published in the same continuation
212
+ * @param options.replacement {ReplacementRecoveryPublicKeys} the
213
+ * replacement code's public halves -- its key-agreement key, its rung-0
214
+ * update key, and its ladder VM key -- committed and published in the same
215
+ * continuation
172
216
  * @param options.onCommitted {function}
173
217
  * `(committed: { builtOnHead: { scid, versionId } }) => Promise<void>` --
174
218
  * the REQUIRED persist-before-publish seam. It runs once per attempt, after
@@ -206,7 +250,7 @@ export declare function removeRecoveryKey({ idStore, updateKeys, recovery, expec
206
250
  * @param [options.logId] {string} the account log's pin slot
207
251
  * (`accountLogPinId({ spaceId })`); required whenever a `pinStore` is
208
252
  * supplied
209
- * @returns {Promise<{ did: string, webDoc?: object, committed: boolean }>}
253
+ * @returns {Promise<object>}
210
254
  * the account DID, the final `did.json` projection when the add-and-retire
211
255
  * entry ran here, and `committed` -- whether THIS call published the pivot
212
256
  * entry (`false` exactly on the idempotent completed branch, where a torn
@@ -214,7 +258,12 @@ export declare function removeRecoveryKey({ idStore, updateKeys, recovery, expec
214
258
  * a success flag: a returning call means the continuation stands either
215
259
  * way, so a caller clears its pending state on the RETURN, whatever
216
260
  * `committed` says. Its absence from a return value is a build skew, which
217
- * is why it is stated rather than inferred
261
+ * is why it is stated rather than inferred.
262
+ * `retiredCredentialVmIds` lists the `keyAgreement` verification-method ids
263
+ * this entry struck for pre-recovery credentials OTHER than the spent code
264
+ * -- what the caller drops registry entries and deletes unlock Spaces for.
265
+ * On the completed branch, whose entry already landed, it is derived from
266
+ * the log, so a resume reports the same list the first run did
218
267
  */
219
268
  export declare function recoverWebvhClient(options: {
220
269
  store: RecoveryLogStore;
@@ -223,7 +272,7 @@ export declare function recoverWebvhClient(options: {
223
272
  };
224
273
  newClientKeys: WebvhEnrollmentKeys;
225
274
  newClientUpdateSeeds: ClientWebvhUpdateKeys;
226
- replacement: RecoveryPublicKeys;
275
+ replacement: ReplacementRecoveryPublicKeys;
227
276
  onCommitted: (committed: {
228
277
  builtOnHead: {
229
278
  scid: string;
@@ -237,5 +286,8 @@ export declare function recoverWebvhClient(options: {
237
286
  did: string;
238
287
  webDoc?: object;
239
288
  committed: boolean;
289
+ retiredCredentialVmIds: string[];
290
+ struckRungHashes: string[];
291
+ unclaimedCredentialVmIds: string[];
240
292
  }>;
241
293
  //# sourceMappingURL=recoveryWebvh.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"recoveryWebvh.d.ts","sourceRoot":"","sources":["../../src/recovery/recoveryWebvh.ts"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EACV,MAAM,EACN,MAAM,EAEP,MAAM,2BAA2B,CAAA;AAclC,OAAO,KAAK,EACV,qBAAqB,EACrB,iBAAiB,EACjB,mBAAmB,EACnB,YAAY,EACb,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAGnE;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,EAC3B,GAAG,EACH,wBAAwB,EACzB,EAAE;IACD,GAAG,EAAE,MAAM,CAAA;IACX,wBAAwB,EAAE,MAAM,CAAA;CACjC,GAAG,MAAM,CAET;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,wBAAwB,EAAE,MAAM,CAAA;IAChC,kBAAkB,EAAE,MAAM,CAAA;CAC3B;AA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