@interop/wallet-core 0.65.0 → 0.67.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 (256) hide show
  1. package/README.md +12 -8
  2. package/dist/clientAnnex/credentialAnchoredGenesis.d.ts +5 -4
  3. package/dist/clientAnnex/credentialAnchoredGenesis.d.ts.map +1 -1
  4. package/dist/clientAnnex/credentialAnchoredGenesis.js +32 -50
  5. package/dist/clientAnnex/credentialAnchoredGenesis.js.map +1 -1
  6. package/dist/clientAnnex/establish.d.ts +112 -21
  7. package/dist/clientAnnex/establish.d.ts.map +1 -1
  8. package/dist/clientAnnex/establish.js +248 -180
  9. package/dist/clientAnnex/establish.js.map +1 -1
  10. package/dist/clientAnnex/forget.d.ts +2 -6
  11. package/dist/clientAnnex/forget.d.ts.map +1 -1
  12. package/dist/clientAnnex/forget.js +31 -61
  13. package/dist/clientAnnex/forget.js.map +1 -1
  14. package/dist/clientAnnex/forgetLast.d.ts +48 -132
  15. package/dist/clientAnnex/forgetLast.d.ts.map +1 -1
  16. package/dist/clientAnnex/forgetLast.js +88 -221
  17. package/dist/clientAnnex/forgetLast.js.map +1 -1
  18. package/dist/clientAnnex/gc.d.ts.map +1 -1
  19. package/dist/clientAnnex/gc.js +9 -0
  20. package/dist/clientAnnex/gc.js.map +1 -1
  21. package/dist/clientAnnex/heal.d.ts +97 -13
  22. package/dist/clientAnnex/heal.d.ts.map +1 -1
  23. package/dist/clientAnnex/heal.js +108 -174
  24. package/dist/clientAnnex/heal.js.map +1 -1
  25. package/dist/clientAnnex/index.d.ts +8 -8
  26. package/dist/clientAnnex/index.d.ts.map +1 -1
  27. package/dist/clientAnnex/index.js +6 -6
  28. package/dist/clientAnnex/index.js.map +1 -1
  29. package/dist/clientAnnex/ladder.d.ts +51 -4
  30. package/dist/clientAnnex/ladder.d.ts.map +1 -1
  31. package/dist/clientAnnex/ladder.js +310 -55
  32. package/dist/clientAnnex/ladder.js.map +1 -1
  33. package/dist/clientAnnex/ladderAnchored.d.ts +37 -3
  34. package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -1
  35. package/dist/clientAnnex/ladderAnchored.js +69 -34
  36. package/dist/clientAnnex/ladderAnchored.js.map +1 -1
  37. package/dist/clientAnnex/log.d.ts +148 -72
  38. package/dist/clientAnnex/log.d.ts.map +1 -1
  39. package/dist/clientAnnex/log.js +211 -137
  40. package/dist/clientAnnex/log.js.map +1 -1
  41. package/dist/clientAnnex/mend.d.ts.map +1 -1
  42. package/dist/clientAnnex/mend.js +63 -81
  43. package/dist/clientAnnex/mend.js.map +1 -1
  44. package/dist/clientAnnex/recoveryLadderAnchored.d.ts +20 -1
  45. package/dist/clientAnnex/recoveryLadderAnchored.d.ts.map +1 -1
  46. package/dist/clientAnnex/recoveryLadderAnchored.js +77 -294
  47. package/dist/clientAnnex/recoveryLadderAnchored.js.map +1 -1
  48. package/dist/clientAnnex/rosterDeliveredEpochs.d.ts +13 -5
  49. package/dist/clientAnnex/rosterDeliveredEpochs.d.ts.map +1 -1
  50. package/dist/clientAnnex/rosterDeliveredEpochs.js +18 -9
  51. package/dist/clientAnnex/rosterDeliveredEpochs.js.map +1 -1
  52. package/dist/clientAnnex/selfEnroll.js +1 -1
  53. package/dist/clientAnnex/selfEnroll.js.map +1 -1
  54. package/dist/clientAnnex/zcap.d.ts +19 -0
  55. package/dist/clientAnnex/zcap.d.ts.map +1 -1
  56. package/dist/clientAnnex/zcap.js +80 -12
  57. package/dist/clientAnnex/zcap.js.map +1 -1
  58. package/dist/clients/index.d.ts +3 -2
  59. package/dist/clients/index.d.ts.map +1 -1
  60. package/dist/clients/index.js +3 -2
  61. package/dist/clients/index.js.map +1 -1
  62. package/dist/clients/listing.d.ts.map +1 -1
  63. package/dist/clients/listing.js +33 -15
  64. package/dist/clients/listing.js.map +1 -1
  65. package/dist/clients/policy.d.ts +18 -0
  66. package/dist/clients/policy.d.ts.map +1 -1
  67. package/dist/clients/policy.js +22 -8
  68. package/dist/clients/policy.js.map +1 -1
  69. package/dist/clients/revocation.d.ts +18 -30
  70. package/dist/clients/revocation.d.ts.map +1 -1
  71. package/dist/clients/revocation.js +12 -27
  72. package/dist/clients/revocation.js.map +1 -1
  73. package/dist/clients/rosterPolicy.d.ts +6 -1
  74. package/dist/clients/rosterPolicy.d.ts.map +1 -1
  75. package/dist/clients/rosterPolicy.js +27 -30
  76. package/dist/clients/rosterPolicy.js.map +1 -1
  77. package/dist/descriptors/errors.d.ts +6 -5
  78. package/dist/descriptors/errors.d.ts.map +1 -1
  79. package/dist/descriptors/errors.js +6 -5
  80. package/dist/descriptors/errors.js.map +1 -1
  81. package/dist/descriptors/index.d.ts +7 -3
  82. package/dist/descriptors/index.d.ts.map +1 -1
  83. package/dist/descriptors/index.js +7 -3
  84. package/dist/descriptors/index.js.map +1 -1
  85. package/dist/descriptors/logSource.d.ts +28 -6
  86. package/dist/descriptors/logSource.d.ts.map +1 -1
  87. package/dist/descriptors/logSource.js +33 -7
  88. package/dist/descriptors/logSource.js.map +1 -1
  89. package/dist/enrollment/enrollment.d.ts.map +1 -1
  90. package/dist/enrollment/enrollment.js +3 -7
  91. package/dist/enrollment/enrollment.js.map +1 -1
  92. package/dist/genesis/accountGenesis.d.ts +8 -10
  93. package/dist/genesis/accountGenesis.d.ts.map +1 -1
  94. package/dist/genesis/accountGenesis.js +39 -41
  95. package/dist/genesis/accountGenesis.js.map +1 -1
  96. package/dist/genesis/kmsAuthentication.d.ts +50 -0
  97. package/dist/genesis/kmsAuthentication.d.ts.map +1 -0
  98. package/dist/genesis/kmsAuthentication.js +49 -0
  99. package/dist/genesis/kmsAuthentication.js.map +1 -0
  100. package/dist/keyring/kdf.d.ts +16 -20
  101. package/dist/keyring/kdf.d.ts.map +1 -1
  102. package/dist/keyring/kdf.js +2 -2
  103. package/dist/keyring/kdf.js.map +1 -1
  104. package/dist/keyring/unlockSpace.d.ts +8 -30
  105. package/dist/keyring/unlockSpace.d.ts.map +1 -1
  106. package/dist/keyring/unlockSpace.js +8 -31
  107. package/dist/keyring/unlockSpace.js.map +1 -1
  108. package/dist/keys/clientKeyRecord.d.ts +2 -1
  109. package/dist/keys/clientKeyRecord.d.ts.map +1 -1
  110. package/dist/keys/clientKeyRecord.js +28 -11
  111. package/dist/keys/clientKeyRecord.js.map +1 -1
  112. package/dist/keys/index.d.ts +19 -5
  113. package/dist/keys/index.d.ts.map +1 -1
  114. package/dist/keys/index.js +17 -3
  115. package/dist/keys/index.js.map +1 -1
  116. package/dist/keys/rosterLogStore.d.ts +3 -1
  117. package/dist/keys/rosterLogStore.d.ts.map +1 -1
  118. package/dist/keys/rosterLogStore.js +20 -8
  119. package/dist/keys/rosterLogStore.js.map +1 -1
  120. package/dist/keys/spaceEpochs.d.ts +92 -3
  121. package/dist/keys/spaceEpochs.d.ts.map +1 -1
  122. package/dist/keys/spaceEpochs.js +110 -4
  123. package/dist/keys/spaceEpochs.js.map +1 -1
  124. package/dist/keys/userKeyCascade.d.ts +8 -5
  125. package/dist/keys/userKeyCascade.d.ts.map +1 -1
  126. package/dist/keys/userKeyCascade.js +7 -6
  127. package/dist/keys/userKeyCascade.js.map +1 -1
  128. package/dist/keys/userKeyRoster.d.ts +68 -4
  129. package/dist/keys/userKeyRoster.d.ts.map +1 -1
  130. package/dist/keys/userKeyRoster.js +146 -33
  131. package/dist/keys/userKeyRoster.js.map +1 -1
  132. package/dist/keys/userKeyRosterCascade.d.ts +110 -10
  133. package/dist/keys/userKeyRosterCascade.d.ts.map +1 -1
  134. package/dist/keys/userKeyRosterCascade.js +184 -40
  135. package/dist/keys/userKeyRosterCascade.js.map +1 -1
  136. package/dist/recovery/continuation.d.ts +255 -0
  137. package/dist/recovery/continuation.d.ts.map +1 -0
  138. package/dist/recovery/continuation.js +471 -0
  139. package/dist/recovery/continuation.js.map +1 -0
  140. package/dist/recovery/index.d.ts +12 -8
  141. package/dist/recovery/index.d.ts.map +1 -1
  142. package/dist/recovery/index.js +11 -7
  143. package/dist/recovery/index.js.map +1 -1
  144. package/dist/recovery/recoveryDelegation.d.ts +40 -120
  145. package/dist/recovery/recoveryDelegation.d.ts.map +1 -1
  146. package/dist/recovery/recoveryDelegation.js +36 -268
  147. package/dist/recovery/recoveryDelegation.js.map +1 -1
  148. package/dist/recovery/recoveryWebvh.d.ts +42 -83
  149. package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
  150. package/dist/recovery/recoveryWebvh.js +44 -380
  151. package/dist/recovery/recoveryWebvh.js.map +1 -1
  152. package/dist/request/appKey.d.ts +35 -1
  153. package/dist/request/appKey.d.ts.map +1 -1
  154. package/dist/request/appKey.js +29 -10
  155. package/dist/request/appKey.js.map +1 -1
  156. package/dist/request/classify.d.ts +3 -14
  157. package/dist/request/classify.d.ts.map +1 -1
  158. package/dist/request/classify.js +19 -40
  159. package/dist/request/classify.js.map +1 -1
  160. package/dist/request/index.d.ts +1 -0
  161. package/dist/request/index.d.ts.map +1 -1
  162. package/dist/request/index.js +1 -0
  163. package/dist/request/index.js.map +1 -1
  164. package/dist/request/onboarding.d.ts.map +1 -1
  165. package/dist/request/onboarding.js +19 -27
  166. package/dist/request/onboarding.js.map +1 -1
  167. package/dist/request/parse.d.ts +5 -3
  168. package/dist/request/parse.d.ts.map +1 -1
  169. package/dist/request/parse.js +7 -6
  170. package/dist/request/parse.js.map +1 -1
  171. package/dist/request/processRequest.d.ts.map +1 -1
  172. package/dist/request/processRequest.js +2 -1
  173. package/dist/request/processRequest.js.map +1 -1
  174. package/dist/request/queryPredicates.d.ts +98 -0
  175. package/dist/request/queryPredicates.d.ts.map +1 -0
  176. package/dist/request/queryPredicates.js +107 -0
  177. package/dist/request/queryPredicates.js.map +1 -0
  178. package/dist/resourceLog/document.d.ts +39 -0
  179. package/dist/resourceLog/document.d.ts.map +1 -1
  180. package/dist/resourceLog/document.js +41 -0
  181. package/dist/resourceLog/document.js.map +1 -1
  182. package/dist/resourceLog/ladderRungs.d.ts.map +1 -1
  183. package/dist/resourceLog/ladderRungs.js +3 -2
  184. package/dist/resourceLog/ladderRungs.js.map +1 -1
  185. package/dist/sync/contactsConflict.d.ts.map +1 -1
  186. package/dist/sync/contactsConflict.js +8 -2
  187. package/dist/sync/contactsConflict.js.map +1 -1
  188. package/dist/sync/engine.d.ts +38 -23
  189. package/dist/sync/engine.d.ts.map +1 -1
  190. package/dist/sync/engine.js +36 -5
  191. package/dist/sync/engine.js.map +1 -1
  192. package/dist/sync/index.d.ts +9 -12
  193. package/dist/sync/index.d.ts.map +1 -1
  194. package/dist/sync/index.js +8 -11
  195. package/dist/sync/index.js.map +1 -1
  196. package/dist/sync/push.d.ts.map +1 -1
  197. package/dist/sync/push.js +1 -2
  198. package/dist/sync/push.js.map +1 -1
  199. package/dist/sync/remint.d.ts +0 -31
  200. package/dist/sync/remint.d.ts.map +1 -1
  201. package/dist/sync/remint.js +32 -1
  202. package/dist/sync/remint.js.map +1 -1
  203. package/dist/sync/types.d.ts +4 -41
  204. package/dist/sync/types.d.ts.map +1 -1
  205. package/dist/sync/types.js +4 -47
  206. package/dist/sync/types.js.map +1 -1
  207. package/dist/unlock/index.d.ts +1 -1
  208. package/dist/unlock/index.d.ts.map +1 -1
  209. package/dist/unlock/index.js +1 -1
  210. package/dist/unlock/index.js.map +1 -1
  211. package/dist/unlock/retire.d.ts +16 -56
  212. package/dist/unlock/retire.d.ts.map +1 -1
  213. package/dist/unlock/retire.js +7 -76
  214. package/dist/unlock/retire.js.map +1 -1
  215. package/dist/unlock/standingWebvh.d.ts +20 -40
  216. package/dist/unlock/standingWebvh.d.ts.map +1 -1
  217. package/dist/unlock/standingWebvh.js +35 -76
  218. package/dist/unlock/standingWebvh.js.map +1 -1
  219. package/dist/unlock/unlockRecord.d.ts.map +1 -1
  220. package/dist/unlock/unlockRecord.js +69 -44
  221. package/dist/unlock/unlockRecord.js.map +1 -1
  222. package/dist/webvh/accountEntry.d.ts +63 -7
  223. package/dist/webvh/accountEntry.d.ts.map +1 -1
  224. package/dist/webvh/accountEntry.js +110 -19
  225. package/dist/webvh/accountEntry.js.map +1 -1
  226. package/dist/webvh/delegatedLogStore.d.ts +18 -12
  227. package/dist/webvh/delegatedLogStore.d.ts.map +1 -1
  228. package/dist/webvh/delegatedLogStore.js +32 -11
  229. package/dist/webvh/delegatedLogStore.js.map +1 -1
  230. package/dist/webvh/didWebvh.d.ts +39 -23
  231. package/dist/webvh/didWebvh.d.ts.map +1 -1
  232. package/dist/webvh/didWebvh.js +63 -45
  233. package/dist/webvh/didWebvh.js.map +1 -1
  234. package/dist/webvh/enrollClient.d.ts.map +1 -1
  235. package/dist/webvh/enrollClient.js +19 -23
  236. package/dist/webvh/enrollClient.js.map +1 -1
  237. package/dist/webvh/index.d.ts +11 -7
  238. package/dist/webvh/index.d.ts.map +1 -1
  239. package/dist/webvh/index.js +9 -6
  240. package/dist/webvh/index.js.map +1 -1
  241. package/dist/webvh/listClients.d.ts.map +1 -1
  242. package/dist/webvh/listClients.js +102 -65
  243. package/dist/webvh/listClients.js.map +1 -1
  244. package/dist/webvh/mergeMethods.d.ts +84 -0
  245. package/dist/webvh/mergeMethods.d.ts.map +1 -0
  246. package/dist/webvh/mergeMethods.js +46 -0
  247. package/dist/webvh/mergeMethods.js.map +1 -0
  248. package/dist/webvh/revokeClient.d.ts +12 -2
  249. package/dist/webvh/revokeClient.d.ts.map +1 -1
  250. package/dist/webvh/revokeClient.js +126 -48
  251. package/dist/webvh/revokeClient.js.map +1 -1
  252. package/dist/webvh/verifyLog.d.ts +21 -0
  253. package/dist/webvh/verifyLog.d.ts.map +1 -1
  254. package/dist/webvh/verifyLog.js +36 -14
  255. package/dist/webvh/verifyLog.js.map +1 -1
  256. package/package.json +11 -11
@@ -1,22 +1,7 @@
1
- /*!
2
- * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
- */
4
- /**
5
- * The transient-recovery continuation -- the ladder-anchored variant of the
6
- * recovery subpath's `recoverWebvhClient`, split out beside the rest of the
7
- * annex-anchored ceremonies: a code spent on a non-remembered browser mints
8
- * no enrolled client, and the ladder VM the fresh credential's own bind
9
- * publishes is what anchors the account, so it lands client-less and
10
- * ladder-anchored. The enrolled-client
11
- * continuation and the recovery-key inventory edits stay in
12
- * `recovery/recoveryWebvh.ts`.
13
- */
14
- import { deriveNextKeyHash, updateDID } from '@interop/did-method-webvh';
15
- import { assertCarryOverCommitments, ladderVerificationMethod, MULTIKEY_VM_TYPE, publishEntryPinned, readPublishedLogOrThrow, updateKeySigner, withLogConflictRetry } from '../webvh/didWebvh.js';
16
- import { credentialKeyAgreementMethods, ladderVmIds, relationIds } from '../resourceLog/document.js';
1
+ import { ladderVerificationMethod, withLogConflictRetry } from '../webvh/didWebvh.js';
17
2
  import { unlockKeyVerificationMethod, unlockKeyVmId } from '../unlock/standingWebvh.js';
18
- import { RecoveryKeyNotCommittedError, recoveryVmId, retiredCredentialVmIdsFromLog } from '../recovery/recoveryWebvh.js';
19
- import { assertNextKeyHashesRemain, attributeRetiredCredentialRungs, ladderRung, ladderVmKeyMultibase, retiredCredentialRungsBeforeKey } from './ladder.js';
3
+ import { recoveryContinuationOnce } from '../recovery/continuation.js';
4
+ import { ladderRung, ladderVmKeyMultibase } from './ladder.js';
20
5
  import { clientAnnexDidParts, servicesPointedAtClientAnnex } from './log.js';
21
6
  /**
22
7
  * THE TRANSIENT-RECOVERY CONTINUATION (run by the code-derived client through
@@ -88,6 +73,12 @@ import { clientAnnexDidParts, servicesPointedAtClientAnnex } from './log.js';
88
73
  * completed branch WITHOUT re-entering `onCommitted`, so it must be able to
89
74
  * treat an already-complete continuation as success on its own.
90
75
  *
76
+ * A fresh credential whose `keyAgreement` id already stands in the document
77
+ * (the same passphrase re-typed) is refused before the reveal entry with
78
+ * `RecoveryCredentialStandingError`: this entry retires every pre-recovery
79
+ * credential, and one it re-bound instead would keep its old rung
80
+ * commitments under a struck ladder VM.
81
+ *
91
82
  * @param options {object}
92
83
  * @param options.store {RecoveryLogStore} public log read + delegated PUT
93
84
  * @param options.recovery {object} the spent code's update seed and public
@@ -141,285 +132,77 @@ export async function recoverWebvhLadderAnchored(options) {
141
132
  'code and the fresh credential record must be persisted before the ' +
142
133
  'add entry publishes the ladder VM.');
143
134
  }
144
- return withLogConflictRetry(() => recoverWebvhLadderAnchoredOnce(options));
145
- }
146
- /**
147
- * One attempt of {@link recoverWebvhLadderAnchored}, re-invoked by the
148
- * conflict retry.
149
- *
150
- * @param options {object} see {@link recoverWebvhLadderAnchored}
151
- * @returns {Promise<object>} see {@link recoverWebvhLadderAnchored}
152
- */
153
- async function recoverWebvhLadderAnchoredOnce({ store, recovery, ladderSeed, credentialKeyAgreement, replacement, expectedDid, onCommitted, pinStore, logId }) {
154
- // Each attempt's own read is what the CAS publish is built on, so the
155
- // continuity check runs here -- and again on a conflict-retry re-run -- not
156
- // only on the verify that follows both entries.
157
- let published = await readPublishedLogOrThrow({
158
- idStore: store,
159
- expectedDid,
160
- pinStore,
161
- logId,
162
- missingMessage: 'did:webvh: did.jsonl is missing; nothing to recover.'
163
- });
164
- const rung0 = await ladderRung({ ladderSeed, index: 0 });
165
- const rung1 = await ladderRung({ ladderSeed, index: 1 });
166
- const ladderVmKey = await ladderVmKeyMultibase({ ladderSeed });
167
- // Derived before the completion check, because a resume recomputes the
168
- // strike with the same protected sets the first run used.
169
- const recoveryHash = await deriveNextKeyHash(recovery.updateKeyMultibase);
170
- const rung0Hash = await deriveNextKeyHash(rung0.keyMultibase);
171
- const rung1Hash = await deriveNextKeyHash(rung1.keyMultibase);
172
- const replacementHash = await deriveNextKeyHash(replacement.updateKeyMultibase);
173
- // Already complete (a torn earlier run finished the add entry): the fresh
174
- // ladder's rung 0 is authorized, which only the add entry writes.
175
- if (published.updateKeys.includes(rung0.keyMultibase)) {
176
- // The add entry already struck the pre-recovery credentials, so the
177
- // document names none of them any more. The report is derived from the
178
- // log instead (`retiredCredentialVmIdsFromLog`), so a resume tells the
179
- // caller exactly what the first run told it.
180
- const retired = retiredCredentialVmIdsFromLog({
181
- log: published.log,
182
- did: published.did,
183
- successorKeyMultibase: rung0.keyMultibase,
184
- spentVmId: recoveryVmId({
185
- did: published.did,
186
- keyAgreementKeyMultibase: recovery.keyAgreementKeyMultibase
187
- })
188
- });
189
- // The strike is recomputed by re-running it over the log as it stood just
190
- // before the add entry, with the same protected sets, so a resume reports
191
- // exactly what the first run reported rather than a second definition of
192
- // the same question.
193
- const strike = await retiredCredentialRungsBeforeKey({
194
- log: published.log,
195
- authorizedKeyMultibase: rung0.keyMultibase,
196
- credentialVmIds: retired,
197
- protectedHashes: [rung0Hash, rung1Hash, replacementHash],
198
- protectedKeys: [rung0.keyMultibase]
199
- });
200
- return {
201
- did: published.did,
202
- doc: published.doc,
203
- log: published.log,
204
- retiredCredentialVmIds: retired,
205
- struckRungHashes: strike.struckHashes,
206
- unclaimedCredentialVmIds: strike.unclaimedCredentialVmIds
207
- };
208
- }
209
- // The reveal-and-commit entry, skipped when a torn earlier run already
210
- // published it (the revealed key authorized AND every needed hash
211
- // committed).
212
- const revealed = published.updateKeys.includes(recovery.updateKeyMultibase);
213
- const committed = [rung0Hash, rung1Hash, replacementHash].every(hash => published.nextKeyHashes.includes(hash));
214
- if (!revealed || !committed) {
215
- if (!revealed && !published.nextKeyHashes.includes(recoveryHash)) {
216
- throw new RecoveryKeyNotCommittedError();
217
- }
218
- await assertCarryOverCommitments({ published });
219
- const signer = await updateKeySigner({ seed: recovery.updateSeed });
220
- const updated = await updateDID({
221
- log: published.log,
222
- signer,
223
- alsoKnownAsWeb: true,
224
- updateKeys: [
225
- ...new Set([...published.updateKeys, recovery.updateKeyMultibase])
226
- ],
227
- // The spent code's own hash is kept through this entry (so a resumed
228
- // commit can re-state the revealed key); the add entry drops it.
229
- nextKeyHashes: [
230
- ...new Set([
231
- ...published.nextKeyHashes,
232
- recoveryHash,
233
- rung0Hash,
234
- rung1Hash,
235
- replacementHash
236
- ])
237
- ]
238
- });
239
- // The publish advances the pin to what the reveal entry just published,
240
- // so the re-read below (and any read after a tear here) refuses a host
241
- // that rolls the log back behind it.
242
- await publishEntryPinned({
243
- store,
244
- log: updated.log,
245
- ifMatch: published.etag,
246
- pinStore,
247
- logId
248
- });
249
- // The same account the reveal entry just extended, under the same pin.
250
- published = await readPublishedLogOrThrow({
251
- idStore: store,
252
- expectedDid: published.did,
253
- pinStore,
254
- logId,
255
- missingMessage: 'did:webvh: did.jsonl is missing; nothing to recover.'
256
- });
257
- }
258
- // The persist-before-publish seam: the replacement code's record and the
259
- // fresh credential's unlock record (the ladder seed inside) become durable
260
- // HERE, before the add entry publishes the ladder VM that seed backs.
261
- const persisted = await onCommitted();
262
- // Refuses a malformed pointer target before the entry is built.
263
- clientAnnexDidParts({ did: persisted.clientAnnexDid });
264
- // The add-and-retire entry: the ladder VM, the fresh credential's
265
- // keyAgreement inventory, and the replacement code's inventory in; the spent
266
- // code's VM, update key, and hash out; every pre-recovery standing
267
- // credential fully retired -- its ladder VM and its keyAgreement member
268
- // both. Signed by rung 0, whose hash the commit entry just committed.
269
- const { did, doc } = published;
270
- const spentVmId = recoveryVmId({
271
- did,
272
- keyAgreementKeyMultibase: recovery.keyAgreementKeyMultibase
273
- });
274
- const replacementVmId = recoveryVmId({
275
- did,
276
- keyAgreementKeyMultibase: replacement.keyAgreementKeyMultibase
277
- });
278
- const ladderVms = ladderVmIds({ doc });
279
- const ladderVm = ladderVerificationMethod({
280
- controller: did,
281
- publicKeyMultibase: ladderVmKey
282
- });
283
- const ladderVmId = `${did}#${ladderVmKey}`;
284
- const credentialVm = unlockKeyVerificationMethod({
285
- did,
286
- keyAgreement: credentialKeyAgreement
287
- });
288
- const credentialVmId = unlockKeyVmId({
289
- did,
290
- keyAgreement: credentialKeyAgreement
291
- });
292
- // Every pre-recovery credential's keyAgreement member, by the account-DID
293
- // controller (an enrolled client's carries the client marker instead), less
294
- // the ids this entry itself adds. The spent code's own id is reported
295
- // separately: the caller already retires that one by name.
296
- // The replacement code's ladder VM, published beside its key-agreement
297
- // member: a code is a standing credential with a ladder, and its own bridge
298
- // delegation is signed by this VM, so a replacement without it could never
299
- // spend (`decisions/0019`, `decisions/0020`). Its rung-0 hash is already
300
- // committed by the reveal-and-commit entry, which this entry carries
301
- // through.
302
- const replacementLadderVmId = `${did}#${replacement.ladderVmKeyMultibase}`;
303
- const addedVmIds = [
304
- ladderVmId,
305
- credentialVmId,
306
- replacementVmId,
307
- replacementLadderVmId
308
- ];
309
- const struckCredentialVmIds = credentialKeyAgreementMethods({ doc, did })
310
- .map(method => method.id)
311
- .filter((id) => typeof id === 'string')
312
- .filter(id => !addedVmIds.includes(id));
313
- const retiredCredentialVmIds = struckCredentialVmIds.filter(id => id !== spentVmId);
314
- // Each retired credential's committed rungs and any revealed rung of its
315
- // own go in the SAME entry. Striking the VM alone rots a ladder-signed
316
- // bridge, but a bridge an enrolled client minted outlives the strike, and
317
- // that client survives this entry -- so a committed rung left standing is a
318
- // reveal the retired credential could still perform. The anchoring is
319
- // log-only (this browser holds no registry), and an unanchorable credential
320
- // is reported rather than struck.
321
- const strike = await attributeRetiredCredentialRungs({
322
- log: published.log,
323
- credentialVmIds: retiredCredentialVmIds,
324
- protectedHashes: [rung0Hash, rung1Hash, replacementHash],
325
- protectedKeys: [rung0.keyMultibase]
326
- });
327
- const addedMethods = [
328
- ladderVm,
329
- credentialVm,
330
- {
331
- id: replacementVmId,
332
- type: MULTIKEY_VM_TYPE,
333
- controller: did,
334
- publicKeyMultibase: replacement.keyAgreementKeyMultibase
135
+ const { ladderSeed, credentialKeyAgreement, onCommitted, expectedDid, pinStore, logId, ...shared } = options;
136
+ // The fresh ladder: rung 0 is the successor key the add entry authorizes
137
+ // and signs with, rung 1 its staged partner (the ladder-anchored genesis
138
+ // configuration), and the VM the stable sibling the entry installs.
139
+ const [rung0, rung1, ladderVmKey] = await Promise.all([
140
+ ladderRung({ ladderSeed, index: 0 }),
141
+ ladderRung({ ladderSeed, index: 1 }),
142
+ ladderVmKeyMultibase({ ladderSeed })
143
+ ]);
144
+ const outcome = await withLogConflictRetry(() => recoveryContinuationOnce({
145
+ ...shared,
146
+ successor: {
147
+ updateKeyMultibase: rung0.keyMultibase,
148
+ updateSeed: rung0.seed,
149
+ stagedKeyMultibase: rung1.keyMultibase
335
150
  },
336
- ladderVerificationMethod({
337
- controller: did,
338
- publicKeyMultibase: replacement.ladderVmKeyMultibase
339
- })
340
- ];
341
- const existingMethods = (doc.verificationMethod ?? []);
342
- const verificationMethods = [
343
- ...existingMethods.filter(method => method.id !== spentVmId &&
344
- !addedMethods.some(added => added.id === method.id) &&
345
- (method.id === undefined ||
346
- (!ladderVms.includes(method.id) &&
347
- !struckCredentialVmIds.includes(method.id)))),
348
- ...addedMethods
349
- ];
350
- // The retirement filter runs over the EXISTING relation ids only, and the
351
- // added ids join afterwards: a resumed run's fresh ladder VM already stands
352
- // in `doc.capabilityDelegation`, so filtering the union would strike the
353
- // very method this entry is publishing.
354
- const withoutRemoved = (relation, added) => [
355
- ...new Set([
356
- ...relationIds(relation).filter(referencedId => referencedId !== spentVmId &&
357
- !ladderVms.includes(referencedId) &&
358
- !struckCredentialVmIds.includes(referencedId)),
359
- ...(added ?? [])
360
- ])
361
- ];
362
- const signer = await updateKeySigner({ seed: rung0.seed });
363
- const updated = await updateDID({
364
- log: published.log,
365
- signer,
366
- alsoKnownAsWeb: true,
367
- updateKeys: [
368
- ...new Set([
369
- ...published.updateKeys.filter(key => key !== recovery.updateKeyMultibase &&
370
- !strike.struckKeys.includes(key)),
371
- rung0.keyMultibase
372
- ])
151
+ // The persist-before-publish seam: the replacement code's record and
152
+ // the fresh credential's unlock record (the ladder seed inside) become
153
+ // durable HERE, before the add entry publishes the ladder VM that seed
154
+ // backs.
155
+ onCommitted,
156
+ // A passphrase the account already stands on is refused before the
157
+ // reveal entry: this continuation retires that credential, and
158
+ // re-binding it would leave its old rungs standing under a new VM.
159
+ credentialVmIds: did => [
160
+ unlockKeyVmId({ did, keyAgreement: credentialKeyAgreement })
373
161
  ],
374
- nextKeyHashes: assertNextKeyHashesRemain({
375
- nextKeyHashes: published.nextKeyHashes.filter(hash => hash !== recoveryHash && !strike.struckHashes.includes(hash)),
376
- ceremony: 'the transient-recovery add-and-retire entry'
377
- }),
378
- verificationMethods,
379
- // The ladder VM's relation asymmetry: `assertionMethod` and
162
+ // The ladder VM (under the relation asymmetry: `assertionMethod` and
380
163
  // `capabilityDelegation` only -- no `authentication`, no
381
164
  // `capabilityInvocation` -- which is also what keeps it out of every
382
- // client listing.
383
- authentication: withoutRemoved(doc.authentication),
384
- assertionMethod: withoutRemoved(doc.assertionMethod, [
385
- ladderVmId,
386
- replacementLadderVmId
387
- ]),
388
- keyAgreement: withoutRemoved(doc.keyAgreement, [
389
- credentialVmId,
390
- replacementVmId
391
- ]),
392
- capabilityInvocation: withoutRemoved(doc.capabilityInvocation),
393
- capabilityDelegation: withoutRemoved(doc.capabilityDelegation, [
394
- ladderVmId,
395
- replacementLadderVmId
396
- ]),
397
- // Atomic with the retirement above: the pointer and the ladder-VM set
398
- // change in one entry, so no window exists in which the document points
399
- // at a generation the surviving record cannot reach.
400
- services: servicesPointedAtClientAnnex({
401
- doc,
402
- accountDid: did,
403
- clientAnnexDid: persisted.clientAnnexDid
404
- })
405
- });
406
- // Conditional on the read this entry was built on: the re-read above when
407
- // the commit entry ran here, the first read when it was skipped.
408
- await publishEntryPinned({
409
- store,
410
- log: updated.log,
411
- ifMatch: published.etag,
412
- pinStore,
413
- logId
414
- });
415
- return {
416
- did: updated.did,
417
- doc: updated.doc,
418
- log: updated.log,
419
- retiredCredentialVmIds,
420
- struckRungHashes: strike.struckHashes,
421
- unclaimedCredentialVmIds: strike.unclaimedCredentialVmIds,
422
- webDoc: updated.webDoc
423
- };
165
+ // client listing) and the fresh credential's keyAgreement inventory in;
166
+ // the core appends the replacement code's after them. Atomic with the
167
+ // retirement: the `#DelegatedClients` pointer and the ladder-VM set
168
+ // change in one entry, so no window exists in which the document
169
+ // points at a generation the surviving record cannot reach.
170
+ added: ({ did, doc, persisted }) => {
171
+ // Refuses a malformed pointer target before the entry is built.
172
+ clientAnnexDidParts({ did: persisted.clientAnnexDid });
173
+ const ladderVmId = `${did}#${ladderVmKey}`;
174
+ const credentialVmId = unlockKeyVmId({
175
+ did,
176
+ keyAgreement: credentialKeyAgreement
177
+ });
178
+ return {
179
+ methods: [
180
+ ladderVerificationMethod({
181
+ controller: did,
182
+ publicKeyMultibase: ladderVmKey
183
+ }),
184
+ unlockKeyVerificationMethod({
185
+ did,
186
+ keyAgreement: credentialKeyAgreement
187
+ })
188
+ ],
189
+ assertionMethod: [ladderVmId],
190
+ keyAgreement: [credentialVmId],
191
+ capabilityDelegation: [ladderVmId],
192
+ services: servicesPointedAtClientAnnex({
193
+ doc,
194
+ accountDid: did,
195
+ clientAnnexDid: persisted.clientAnnexDid
196
+ })
197
+ };
198
+ },
199
+ ...(expectedDid !== undefined ? { expectedDid } : {}),
200
+ ...(pinStore ? { pinStore } : {}),
201
+ ...(logId !== undefined ? { logId } : {})
202
+ }));
203
+ // `committed` is the remembered variant's signal; this one has no
204
+ // cross-process resume for it to serve.
205
+ const { committed: _committed, ...rest } = outcome;
206
+ return rest;
424
207
  }
425
208
  //# sourceMappingURL=recoveryLadderAnchored.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"recoveryLadderAnchored.js","sourceRoot":"","sources":["../../src/clientAnnex/recoveryLadderAnchored.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;GASG;AACH,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAMxE,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,gBAAgB,EAChB,kBAAkB,EAClB,uBAAuB,EACvB,eAAe,EACf,oBAAoB,EACrB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EACL,6BAA6B,EAC7B,WAAW,EACX,WAAW,EACZ,MAAM,4BAA4B,CAAA;AACnC,OAAO,EACL,2BAA2B,EAC3B,aAAa,EAEd,MAAM,4BAA4B,CAAA;AACnC,OAAO,EACL,4BAA4B,EA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AAC;QACF,sEAAsE;QACtE,wEAAwE;QACxE,qDAAqD;QACrD,QAAQ,EAAE,4BAA4B,CAAC;YACrC,GAAG;YACH,UAAU,EAAE,GAAG;YACf,cAAc,EAAE,SAAS,CAAC,cAAc;SACzC,CAAC;KACH,CAAC,CAAA;IACF,0EAA0E;IAC1E,iEAAiE;IACjE,MAAM,kBAAkB,CAAC;QACvB,KAAK;QACL,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,OAAO,EAAE,SAAS,CAAC,IAAI;QACvB,QAAQ;QACR,KAAK;KACN,CAAC,CAAA;IACF,OAAO;QACL,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,sBAAsB;QACtB,gBAAgB,EAAE,MAAM,CAAC,YAAY;QACrC,wBAAwB,EAAE,MAAM,CAAC,wBAAwB;QACzD,MAAM,EAAE,OAAO,CAAC,MAAM;KACvB,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"recoveryLadderAnchored.js","sourceRoot":"","sources":["../../src/clientAnnex/recoveryLadderAnchored.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EACL,2BAA2B,EAC3B,aAAa,EAEd,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAA;AAMtE,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAC9D,OAAO,EAAE,mBAAmB,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAA;AAE5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsHG;AACH,MAAM,CAAC,KAAK,UAAU,0BAA0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,CAAA;AACb,CAAC"}
@@ -6,8 +6,12 @@
6
6
  * roster delivers after the ensure, not the minted candidate**. The ensure
7
7
  * adopts a roster another run landed first, and epoch[0] is create-if-absent,
8
8
  * so installing under this run's candidate would key a collection to a key
9
- * nobody holds. One function, two callers: the credential-anchored
10
- * establishment's adopted-roster arm, and the mend entry point's roster arm.
9
+ * nobody holds. The key-versus-roster test itself is `ensureWalletSpaceEpochs`'s
10
+ * mint gate, which this stage hands the settled descriptor; what this stage
11
+ * owns is the ensure-then-re-read order around it and the mint guard. One
12
+ * function, two callers: the credential-anchored establishment's
13
+ * adopted-roster arm, and the mend entry point's roster arm, each supplying
14
+ * the mint preconditions through the required `beforeMint` seam.
11
15
  *
12
16
  * The stage order: ensure the roster (create-if-absent with the supplied
13
17
  * candidate; the entry proof rides the caller's store signer -- the ladder VM
@@ -93,12 +97,16 @@ export type RosterDeliveredEpochsResult = {
93
97
  * delegation); absent, requests invoke the root capability
94
98
  * @param [options.collectionIds] {string[]} the fan-out's collection set
95
99
  * override, threaded through to `ensureWalletSpaceEpochs`
96
- * @param [options.beforeMint] {Function} `() => Promise<void>` -- the mint
100
+ * @param options.beforeMint {Function} `() => Promise<void>` -- the mint
97
101
  * guard, awaited exactly when THIS run's own decide-read observed the
98
102
  * roster absent and is about to install the candidate as epoch[0]. A
99
103
  * throw refuses the mint and propagates unchanged (never folded into the
100
104
  * create-race adoption), so a caller's mint preconditions run against the
101
- * same observation the mint acts on
105
+ * same observation the mint acts on. Required: a served absent roster is
106
+ * the one observation that can turn this stage into a single-recipient
107
+ * roster genesis evicting every other standing credential, so no caller
108
+ * gets the mint without stating what licenses it. A call without the seam
109
+ * is refused with a `TypeError` before any read
102
110
  * @returns {Promise<RosterDeliveredEpochsResult>}
103
111
  */
104
112
  export declare function ensureRosterDeliveredEpochs({ store, candidateUserKey, clientKeyAgreementKey, was, spaceId, capability, collectionIds, beforeMint }: {
@@ -109,6 +117,6 @@ export declare function ensureRosterDeliveredEpochs({ store, candidateUserKey, c
109
117
  spaceId: string;
110
118
  capability?: IZcap;
111
119
  collectionIds?: string[];
112
- beforeMint?: () => Promise<void>;
120
+ beforeMint: () => Promise<void>;
113
121
  }): Promise<RosterDeliveredEpochsResult>;
114
122
  //# sourceMappingURL=rosterDeliveredEpochs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rosterDeliveredEpochs.d.ts","sourceRoot":"","sources":["../../src/clientAnnex/rosterDeliveredEpochs.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AACpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC1E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAA;AACxE,OAAO,EAIL,KAAK,OAAO,EACZ,KAAK,uBAAuB,EAC7B,MAAM,kBAAkB,CAAA;AAczB;;;;;;;GAOG;AACH,MAAM,MAAM,2BAA2B,GACnC;IACE,OAAO,EAAE,WAAW,GAAG,qBAAqB,CAAA;IAC5C;;OAEG;IACH,OAAO,EAAE,OAAO,CAAA;IAChB,gBAAgB,EAAE,oBAAoB,CAAA;IACtC;;OAEG;IACH,MAAM,EAAE,OAAO,CAAA;IACf,MAAM,EAAE,uBAAuB,CAAA;CAChC,GACD;IACE,OAAO,EAAE,SAAS,CAAA;IAClB,gBAAgB,EAAE,oBAAoB,CAAA;IACtC;;OAEG;IACH,KAAK,EAAE,OAAO,CAAA;CACf,CAAA;AAEL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAsB,2BAA2B,CAAC,EAChD,KAAK,EACL,gBAAgB,EAChB,qBAAqB,EACrB,GAAG,EACH,OAAO,EACP,UAAU,EACV,aAAa,EACb,UAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAsB,2BAA2B,CAAC,EAChD,KAAK,EACL,gBAAgB,EAChB,qBAAqB,EACrB,GAAG,EACH,OAAO,EACP,UAAU,EACV,aAAa,EACb,UAAU,EACX,EAAE;IACD,KAAK,EAAE,yBAAyB,CAAA;IAChC,gBAAgB,EAAE,OAAO,CAAA;IACzB,qBAAqB,EAAE,gBAAgB,CAAA;IACvC,GAAG,EAAE,SAAS,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,KAAK,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;IACxB,UAAU,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAChC,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAoFvC"}
@@ -34,15 +34,23 @@ const CREATE_RACE_ERROR_NAMES = new Set([
34
34
  * delegation); absent, requests invoke the root capability
35
35
  * @param [options.collectionIds] {string[]} the fan-out's collection set
36
36
  * override, threaded through to `ensureWalletSpaceEpochs`
37
- * @param [options.beforeMint] {Function} `() => Promise<void>` -- the mint
37
+ * @param options.beforeMint {Function} `() => Promise<void>` -- the mint
38
38
  * guard, awaited exactly when THIS run's own decide-read observed the
39
39
  * roster absent and is about to install the candidate as epoch[0]. A
40
40
  * throw refuses the mint and propagates unchanged (never folded into the
41
41
  * create-race adoption), so a caller's mint preconditions run against the
42
- * same observation the mint acts on
42
+ * same observation the mint acts on. Required: a served absent roster is
43
+ * the one observation that can turn this stage into a single-recipient
44
+ * roster genesis evicting every other standing credential, so no caller
45
+ * gets the mint without stating what licenses it. A call without the seam
46
+ * is refused with a `TypeError` before any read
43
47
  * @returns {Promise<RosterDeliveredEpochsResult>}
44
48
  */
45
49
  export async function ensureRosterDeliveredEpochs({ store, candidateUserKey, clientKeyAgreementKey, was, spaceId, capability, collectionIds, beforeMint }) {
50
+ if (typeof beforeMint !== 'function') {
51
+ throw new TypeError('ensureRosterDeliveredEpochs requires a beforeMint seam: the mint ' +
52
+ 'preconditions that license installing the candidate as epoch[0].');
53
+ }
46
54
  // The ensure: create-if-absent with the candidate, the mint guard fired
47
55
  // on this run's own absent observation. A read failure is a transport
48
56
  // error and rethrows unchanged; only the guarded create's lost race is
@@ -55,9 +63,7 @@ export async function ensureRosterDeliveredEpochs({ store, candidateUserKey, cli
55
63
  descriptor = current.descriptor;
56
64
  }
57
65
  else {
58
- if (beforeMint !== undefined) {
59
- await beforeMint();
60
- }
66
+ await beforeMint();
61
67
  descriptor = await ensureUserKeyRoster({
62
68
  store,
63
69
  userKey: candidateUserKey,
@@ -66,7 +72,7 @@ export async function ensureRosterDeliveredEpochs({ store, candidateUserKey, cli
66
72
  }
67
73
  }
68
74
  catch (err) {
69
- if (!CREATE_RACE_ERROR_NAMES.has(err.name ?? '')) {
75
+ if (!CREATE_RACE_ERROR_NAMES.has(err?.name ?? '')) {
70
76
  throw err;
71
77
  }
72
78
  const reread = await store.read();
@@ -91,19 +97,22 @@ export async function ensureRosterDeliveredEpochs({ store, candidateUserKey, cli
91
97
  userKey = read.userKey;
92
98
  }
93
99
  catch (err) {
94
- if (err.name === 'UserKeyRosterUnwrapError') {
100
+ if (err?.name === 'UserKeyRosterUnwrapError') {
95
101
  return { outcome: 'no-wrap', rosterDescriptor: descriptor, error: err };
96
102
  }
97
103
  throw err;
98
104
  }
99
105
  // The fan-out, under the DELIVERED key -- create-if-absent per collection,
100
106
  // so this call is also the completion test's re-entry on an epoch-less
101
- // encrypted collection behind a present roster. Per-collection failures
102
- // ride the result's `failed` list to the caller.
107
+ // encrypted collection behind a present roster. The settled descriptor
108
+ // rides along so the fan-out's own mint gate stands between the key and
109
+ // the install. Per-collection failures ride the result's `failed` list to
110
+ // the caller.
103
111
  const epochs = await ensureWalletSpaceEpochs({
104
112
  was,
105
113
  spaceId,
106
114
  userKey,
115
+ rosterDescriptor: descriptor,
107
116
  ...(capability !== undefined ? { capability } : {}),
108
117
  ...(collectionIds !== undefined ? { collectionIds } : {})
109
118
  });
@@ -1 +1 @@
1
- {"version":3,"file":"rosterDeliveredEpochs.js","sourceRoot":"","sources":["../../src/clientAnnex/rosterDeliveredEpochs.ts"],"names":[],"mappings":"AA0CA,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,iBAAiB,EAGlB,MAAM,kBAAkB,CAAA;AAEzB;;;;;;GAMG;AACH,MAAM,uBAAuB,GAAG,IAAI,GAAG,CAAC;IACtC,yBAAyB;IACzB,uBAAuB;CACxB,CAAC,CAAA;AAiCF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAAC,EAChD,KAAK,EACL,gBAAgB,EAChB,qBAAqB,EACrB,GAAG,EACH,OAAO,EACP,UAAU,EACV,aAAa,EACb,UAAU,EAUX;IACC,wEAAwE;IACxE,sEAAsE;IACtE,uEAAuE;IACvE,gCAAgC;IAChC,IAAI,UAAgC,CAAA;IACpC,IAAI,kBAAkB,GAAG,KAAK,CAAA;IAC9B,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,IAAI,EAAE,CAAA;QAClC,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;YACrB,UAAU,GAAG,OAAO,CAAC,UAAU,CAAA;QACjC,CAAC;aAAM,CAAC;YACN,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;gBAC7B,MAAM,UAAU,EAAE,CAAA;YACpB,CAAC;YACD,UAAU,GAAG,MAAM,mBAAmB,CAAC;gBACrC,KAAK;gBACL,OAAO,EAAE,gBAAgB;gBACzB,qBAAqB;aACtB,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,uBAAuB,CAAC,GAAG,CAAE,GAAyB,CAAC,IAAI,IAAI,EAAE,CAAC,EAAE,CAAC;YACxE,MAAM,GAAG,CAAA;QACX,CAAC;QACD,MAAM,MAAM,G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O;QACP,gBAAgB,EAAE,UAAU;QAC5B,MAAM;QACN,MAAM;KACP,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"rosterDeliveredEpochs.js","sourceRoot":"","sources":["../../src/clientAnnex/rosterDeliveredEpochs.ts"],"names":[],"mappings":"AA8CA,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,iBAAiB,EAGlB,MAAM,kBAAkB,CAAA;AAEzB;;;;;;GAMG;AACH,MAAM,uBAAuB,GAAG,IAAI,GAAG,CAAC;IACtC,yBAAyB;IACzB,uBAAuB;CACxB,CAAC,CAAA;AAiCF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAAC,EAChD,KAAK,EACL,gBAAgB,EAChB,qBAAqB,EACrB,GAAG,EACH,OAAO,EACP,UAAU,EACV,aAAa,EACb,UAAU,EAUX;IACC,IAAI,OAAO,UAAU,KAAK,UAAU,EAAE,CAAC;QACrC,MAAM,IAAI,SAAS,CACjB,mEAAmE;YACjE,kEAAkE,CACrE,CAAA;IACH,CAAC;IACD,wEAAwE;IACxE,sEAAsE;IACtE,uEAAuE;IACvE,gCAAgC;IAChC,IAAI,UAAgC,CAAA;IACpC,IAAI,kBAAkB,GAAG,KAAK,CAAA;IAC9B,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,IAAI,EAAE,CAAA;QAClC,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;YACrB,UAAU,GAAG,OAAO,CAAC,UAAU,CAAA;QACjC,CAAC;aAAM,CAAC;YACN,MAAM,UAAU,EAAE,CAAA;YAClB,UAAU,GAAG,MAAM,mBAAmB,CAAC;gBACrC,KAAK;gBACL,OAAO,EAAE,gBAAgB;gBACzB,qBAAqB;aACtB,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IACE,CAAC,uBAAuB,CAAC,GAAG,CACzB,G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EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC1D,CAAC,CAAA;IACF,OAAO;QACL,OAAO,EAAE,kBAAkB,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,WAAW;QACjE,OAAO;QACP,gBAAgB,EAAE,UAAU;QAC5B,MAAM;QACN,MAAM;KACP,CAAA;AACH,CAAC"}
@@ -106,7 +106,7 @@ export async function selfEnrollClientCore({ pointer, ladderSeed, credentialKeyA
106
106
  const signingKeyMultibase = clientSigningKeyMultibase({ keyAgent });
107
107
  const webvhUpdateKeys = resume
108
108
  ? resume.webvhUpdateKeys
109
- : await mintClientWebvhUpdateKeys();
109
+ : mintClientWebvhUpdateKeys();
110
110
  const newClientKeys = {
111
111
  signingKeyMultibase,
112
112
  keyAgreementKeyMultibase,
@@ -1 +1 @@
1
- {"version":3,"file":"selfEnroll.js","sourceRoot":"","sources":["../../src/clientAnnex/selfEnroll.ts"],"names":[],"mappings":"AA4CA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAA;AAGrE,OAAO,EACL,yBAAyB,EAE1B,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAA;AACpE,OAAO,EACL,yBAAyB,EACzB,kBAAkB,EACnB,MAAM,sBAAsB,CAAA;AAK7B,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACzE,OAAO,EACL,yBAAyB,EACzB,UAAU,EACV,eAAe,EAChB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACtB,MAAM,qBAAqB,CAAA;AAG5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,MAAM,KAAK,GAAG,4BAA4B,CAAC;QACzC,gBAAgB,EAAE,OAAO,CAAC,IAAI;QAC9B,UAAU;QACV,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,iBAAiB,EAAE,KAAK,IAAI,EAAE,CAC5B,0BAA0B,CAAC,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,QAAQ,CAAC,GAAG,EAAE,CAAC;QACrE,QAAQ,EAAE,yBAAyB,EAAE;QACrC,MAAM,EAAE,sBAAsB,CAAC,EAAE,QAAQ,EAAE,CAAC;KAC7C,CAAC,CAAA;IACF,MAAM,IAAI,GAAG,MAAM,iBAAiB,CAAC;QACnC,KAAK;QACL,qBAAqB,EAAE,yBAAyB;KACjD,CAAC,CAAA;IACF,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,IAAI,KAAK,CACb,kEAAkE;YAChE,kCAAkC,CACrC,CAAA;IACH,CAAC;IAED,uEAAuE;IACvE,oEAAoE;IACpE,yDAAyD;IACzD,MAAM,yBAAyB,CAAC;QAC9B,KAAK;QACL,SAAS,EAAE;YACT,EAAE,EAAE,kBAAkB,CAAC;gBACrB,mBAAmB;gBACnB,wBAAwB;aACzB,CAAC;YACF,kBAAkB,EAAE,wBAAwB;SAC7C;QACD,oBAAoB,EAAE,yBAAyB;KAChD,CAAC,CAAA;IAEF,OAAO;QACL,UAAU;QACV,eAAe;QACf,SAAS,EAAE,QAAQ,CAAC,EAAE;QACtB,GAAG,EAAE,WAAW;QAChB,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,aAAa,EAAE,IAAI,CAAC,aAAa;QACjC,wEAAwE;QACxE,wEAAwE;QACxE,gBAAgB;QAChB,SAAS,EAAE,QAAQ,CAAC,SAAS;KAC9B,CAAA;AACH,CAAC"}
@@ -52,4 +52,23 @@ export declare function ladderVmZcapClient({ accountDid, ladderSeed }: {
52
52
  export declare function ladderVmAgent({ ladderSeed }: {
53
53
  ladderSeed: Uint8Array;
54
54
  }): Promise<ICapabilityAgent>;
55
+ /**
56
+ * The ladder VM's two presentations from ONE key generation: the bare did:key
57
+ * agent a bootstrap identity invokes as, and the ZcapClient that delegates
58
+ * under `<accountDid>#<multibase>`. A caller needing both -- a ceremony that
59
+ * mints delegations while invoking as the ladder -- takes them here instead of
60
+ * paying the Ed25519 generation twice.
61
+ *
62
+ * @param options {object}
63
+ * @param options.accountDid {string} the account did:webvh
64
+ * @param options.ladderSeed {Uint8Array} the credential's ladder seed
65
+ * @returns {Promise<{ agent: ICapabilityAgent, zcapClient: ZcapClient }>}
66
+ */
67
+ export declare function ladderVmSigners({ accountDid, ladderSeed }: {
68
+ accountDid: string;
69
+ ladderSeed: Uint8Array;
70
+ }): Promise<{
71
+ agent: ICapabilityAgent;
72
+ zcapClient: ZcapClient;
73
+ }>;
55
74
  //# sourceMappingURL=zcap.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"zcap.d.ts","sourceRoot":"","sources":["../../src/clientAnnex/zcap.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEhD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAgDxD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsB,kBAAkB,CAAC,EACvC,UAAU,EACV,UAAU,EACX,EAAE;IACD,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,UAAU,CAAA;CACvB,GAAG,OAAO,CAAC,UAAU,CAAC,CAGtB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,aAAa,CAAC,EAClC,UAAU,EACX,EAAE;IACD,UAAU,EAAE,UAAU,CAAA;CACvB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAkB5B"}
1
+ {"version":3,"file":"zcap.d.ts","sourceRoot":"","sources":["../../src/clientAnnex/zcap.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB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