@interop/wallet-core 0.66.0 → 0.68.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 (257) hide show
  1. package/README.md +12 -8
  2. package/dist/clientAnnex/credentialAnchoredGenesis.d.ts +6 -10
  3. package/dist/clientAnnex/credentialAnchoredGenesis.d.ts.map +1 -1
  4. package/dist/clientAnnex/credentialAnchoredGenesis.js +34 -56
  5. package/dist/clientAnnex/credentialAnchoredGenesis.js.map +1 -1
  6. package/dist/clientAnnex/establish.d.ts +46 -29
  7. package/dist/clientAnnex/establish.d.ts.map +1 -1
  8. package/dist/clientAnnex/establish.js +111 -86
  9. package/dist/clientAnnex/establish.js.map +1 -1
  10. package/dist/clientAnnex/forget.d.ts +7 -16
  11. package/dist/clientAnnex/forget.d.ts.map +1 -1
  12. package/dist/clientAnnex/forget.js +13 -24
  13. package/dist/clientAnnex/forget.js.map +1 -1
  14. package/dist/clientAnnex/forgetLast.d.ts +33 -129
  15. package/dist/clientAnnex/forgetLast.d.ts.map +1 -1
  16. package/dist/clientAnnex/forgetLast.js +43 -182
  17. package/dist/clientAnnex/forgetLast.js.map +1 -1
  18. package/dist/clientAnnex/gc.d.ts +26 -12
  19. package/dist/clientAnnex/gc.d.ts.map +1 -1
  20. package/dist/clientAnnex/gc.js +60 -57
  21. package/dist/clientAnnex/gc.js.map +1 -1
  22. package/dist/clientAnnex/heal.d.ts +75 -18
  23. package/dist/clientAnnex/heal.d.ts.map +1 -1
  24. package/dist/clientAnnex/heal.js +79 -147
  25. package/dist/clientAnnex/heal.js.map +1 -1
  26. package/dist/clientAnnex/index.d.ts +8 -8
  27. package/dist/clientAnnex/index.d.ts.map +1 -1
  28. package/dist/clientAnnex/index.js +5 -5
  29. package/dist/clientAnnex/index.js.map +1 -1
  30. package/dist/clientAnnex/ladder.d.ts +51 -4
  31. package/dist/clientAnnex/ladder.d.ts.map +1 -1
  32. package/dist/clientAnnex/ladder.js +283 -47
  33. package/dist/clientAnnex/ladder.js.map +1 -1
  34. package/dist/clientAnnex/ladderAnchored.d.ts +62 -73
  35. package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -1
  36. package/dist/clientAnnex/ladderAnchored.js +103 -117
  37. package/dist/clientAnnex/ladderAnchored.js.map +1 -1
  38. package/dist/clientAnnex/log.d.ts +123 -125
  39. package/dist/clientAnnex/log.d.ts.map +1 -1
  40. package/dist/clientAnnex/log.js +174 -233
  41. package/dist/clientAnnex/log.js.map +1 -1
  42. package/dist/clientAnnex/mend.d.ts +0 -4
  43. package/dist/clientAnnex/mend.d.ts.map +1 -1
  44. package/dist/clientAnnex/mend.js +50 -51
  45. package/dist/clientAnnex/mend.js.map +1 -1
  46. package/dist/clientAnnex/recoveryLadderAnchored.d.ts +25 -13
  47. package/dist/clientAnnex/recoveryLadderAnchored.d.ts.map +1 -1
  48. package/dist/clientAnnex/recoveryLadderAnchored.js +80 -303
  49. package/dist/clientAnnex/recoveryLadderAnchored.js.map +1 -1
  50. package/dist/clientAnnex/rosterDeliveredEpochs.d.ts +13 -5
  51. package/dist/clientAnnex/rosterDeliveredEpochs.d.ts.map +1 -1
  52. package/dist/clientAnnex/rosterDeliveredEpochs.js +18 -9
  53. package/dist/clientAnnex/rosterDeliveredEpochs.js.map +1 -1
  54. package/dist/clientAnnex/selfEnroll.d.ts +6 -10
  55. package/dist/clientAnnex/selfEnroll.d.ts.map +1 -1
  56. package/dist/clientAnnex/selfEnroll.js +13 -18
  57. package/dist/clientAnnex/selfEnroll.js.map +1 -1
  58. package/dist/clientAnnex/zcap.d.ts +19 -0
  59. package/dist/clientAnnex/zcap.d.ts.map +1 -1
  60. package/dist/clientAnnex/zcap.js +80 -12
  61. package/dist/clientAnnex/zcap.js.map +1 -1
  62. package/dist/clients/index.d.ts +3 -2
  63. package/dist/clients/index.d.ts.map +1 -1
  64. package/dist/clients/index.js +3 -2
  65. package/dist/clients/index.js.map +1 -1
  66. package/dist/clients/listing.d.ts.map +1 -1
  67. package/dist/clients/listing.js +33 -15
  68. package/dist/clients/listing.js.map +1 -1
  69. package/dist/clients/policy.d.ts +18 -0
  70. package/dist/clients/policy.d.ts.map +1 -1
  71. package/dist/clients/policy.js +22 -8
  72. package/dist/clients/policy.js.map +1 -1
  73. package/dist/clients/revocation.d.ts +18 -30
  74. package/dist/clients/revocation.d.ts.map +1 -1
  75. package/dist/clients/revocation.js +12 -27
  76. package/dist/clients/revocation.js.map +1 -1
  77. package/dist/clients/rosterPolicy.d.ts +6 -1
  78. package/dist/clients/rosterPolicy.d.ts.map +1 -1
  79. package/dist/clients/rosterPolicy.js +27 -30
  80. package/dist/clients/rosterPolicy.js.map +1 -1
  81. package/dist/descriptors/errors.d.ts +6 -5
  82. package/dist/descriptors/errors.d.ts.map +1 -1
  83. package/dist/descriptors/errors.js +6 -5
  84. package/dist/descriptors/errors.js.map +1 -1
  85. package/dist/descriptors/index.d.ts +7 -3
  86. package/dist/descriptors/index.d.ts.map +1 -1
  87. package/dist/descriptors/index.js +7 -3
  88. package/dist/descriptors/index.js.map +1 -1
  89. package/dist/descriptors/logSource.d.ts +28 -6
  90. package/dist/descriptors/logSource.d.ts.map +1 -1
  91. package/dist/descriptors/logSource.js +33 -7
  92. package/dist/descriptors/logSource.js.map +1 -1
  93. package/dist/enrollment/enrollment.d.ts.map +1 -1
  94. package/dist/enrollment/enrollment.js +3 -7
  95. package/dist/enrollment/enrollment.js.map +1 -1
  96. package/dist/genesis/accountGenesis.d.ts +11 -16
  97. package/dist/genesis/accountGenesis.d.ts.map +1 -1
  98. package/dist/genesis/accountGenesis.js +43 -47
  99. package/dist/genesis/accountGenesis.js.map +1 -1
  100. package/dist/genesis/kmsAuthentication.d.ts +50 -0
  101. package/dist/genesis/kmsAuthentication.d.ts.map +1 -0
  102. package/dist/genesis/kmsAuthentication.js +49 -0
  103. package/dist/genesis/kmsAuthentication.js.map +1 -0
  104. package/dist/keyring/kdf.d.ts +16 -20
  105. package/dist/keyring/kdf.d.ts.map +1 -1
  106. package/dist/keyring/kdf.js +2 -2
  107. package/dist/keyring/kdf.js.map +1 -1
  108. package/dist/keyring/unlockSpace.d.ts +8 -30
  109. package/dist/keyring/unlockSpace.d.ts.map +1 -1
  110. package/dist/keyring/unlockSpace.js +8 -31
  111. package/dist/keyring/unlockSpace.js.map +1 -1
  112. package/dist/keys/clientKeyRecord.d.ts +2 -1
  113. package/dist/keys/clientKeyRecord.d.ts.map +1 -1
  114. package/dist/keys/clientKeyRecord.js +28 -11
  115. package/dist/keys/clientKeyRecord.js.map +1 -1
  116. package/dist/keys/index.d.ts +6 -2
  117. package/dist/keys/index.d.ts.map +1 -1
  118. package/dist/keys/index.js +5 -1
  119. package/dist/keys/index.js.map +1 -1
  120. package/dist/keys/rosterLogStore.d.ts.map +1 -1
  121. package/dist/keys/rosterLogStore.js +14 -5
  122. package/dist/keys/rosterLogStore.js.map +1 -1
  123. package/dist/keys/spaceEpochs.d.ts +92 -3
  124. package/dist/keys/spaceEpochs.d.ts.map +1 -1
  125. package/dist/keys/spaceEpochs.js +110 -4
  126. package/dist/keys/spaceEpochs.js.map +1 -1
  127. package/dist/keys/userKeyRoster.d.ts +30 -3
  128. package/dist/keys/userKeyRoster.d.ts.map +1 -1
  129. package/dist/keys/userKeyRoster.js +90 -15
  130. package/dist/keys/userKeyRoster.js.map +1 -1
  131. package/dist/keys/userKeyRosterCascade.d.ts.map +1 -1
  132. package/dist/keys/userKeyRosterCascade.js +5 -1
  133. package/dist/keys/userKeyRosterCascade.js.map +1 -1
  134. package/dist/recovery/continuation.d.ts +250 -0
  135. package/dist/recovery/continuation.d.ts.map +1 -0
  136. package/dist/recovery/continuation.js +467 -0
  137. package/dist/recovery/continuation.js.map +1 -0
  138. package/dist/recovery/index.d.ts +12 -8
  139. package/dist/recovery/index.d.ts.map +1 -1
  140. package/dist/recovery/index.js +11 -7
  141. package/dist/recovery/index.js.map +1 -1
  142. package/dist/recovery/recoveryDelegation.d.ts +23 -126
  143. package/dist/recovery/recoveryDelegation.d.ts.map +1 -1
  144. package/dist/recovery/recoveryDelegation.js +1 -266
  145. package/dist/recovery/recoveryDelegation.js.map +1 -1
  146. package/dist/recovery/recoveryWebvh.d.ts +52 -107
  147. package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
  148. package/dist/recovery/recoveryWebvh.js +54 -403
  149. package/dist/recovery/recoveryWebvh.js.map +1 -1
  150. package/dist/request/classify.d.ts +3 -14
  151. package/dist/request/classify.d.ts.map +1 -1
  152. package/dist/request/classify.js +19 -40
  153. package/dist/request/classify.js.map +1 -1
  154. package/dist/request/index.d.ts +1 -0
  155. package/dist/request/index.d.ts.map +1 -1
  156. package/dist/request/index.js +1 -0
  157. package/dist/request/index.js.map +1 -1
  158. package/dist/request/onboarding.d.ts.map +1 -1
  159. package/dist/request/onboarding.js +19 -27
  160. package/dist/request/onboarding.js.map +1 -1
  161. package/dist/request/parse.d.ts +5 -3
  162. package/dist/request/parse.d.ts.map +1 -1
  163. package/dist/request/parse.js +7 -6
  164. package/dist/request/parse.js.map +1 -1
  165. package/dist/request/processRequest.d.ts.map +1 -1
  166. package/dist/request/processRequest.js +2 -1
  167. package/dist/request/processRequest.js.map +1 -1
  168. package/dist/request/queryPredicates.d.ts +98 -0
  169. package/dist/request/queryPredicates.d.ts.map +1 -0
  170. package/dist/request/queryPredicates.js +107 -0
  171. package/dist/request/queryPredicates.js.map +1 -0
  172. package/dist/resourceLog/document.d.ts +39 -0
  173. package/dist/resourceLog/document.d.ts.map +1 -1
  174. package/dist/resourceLog/document.js +41 -0
  175. package/dist/resourceLog/document.js.map +1 -1
  176. package/dist/resourceLog/index.d.ts +2 -2
  177. package/dist/resourceLog/index.js +2 -2
  178. package/dist/resourceLog/ladderRungs.d.ts.map +1 -1
  179. package/dist/resourceLog/ladderRungs.js +3 -2
  180. package/dist/resourceLog/ladderRungs.js.map +1 -1
  181. package/dist/sync/contactsConflict.d.ts.map +1 -1
  182. package/dist/sync/contactsConflict.js +8 -2
  183. package/dist/sync/contactsConflict.js.map +1 -1
  184. package/dist/sync/engine.d.ts +38 -23
  185. package/dist/sync/engine.d.ts.map +1 -1
  186. package/dist/sync/engine.js +36 -5
  187. package/dist/sync/engine.js.map +1 -1
  188. package/dist/sync/index.d.ts +9 -12
  189. package/dist/sync/index.d.ts.map +1 -1
  190. package/dist/sync/index.js +8 -11
  191. package/dist/sync/index.js.map +1 -1
  192. package/dist/sync/push.d.ts.map +1 -1
  193. package/dist/sync/push.js +1 -2
  194. package/dist/sync/push.js.map +1 -1
  195. package/dist/sync/remint.d.ts +0 -31
  196. package/dist/sync/remint.d.ts.map +1 -1
  197. package/dist/sync/remint.js +32 -1
  198. package/dist/sync/remint.js.map +1 -1
  199. package/dist/sync/types.d.ts +4 -41
  200. package/dist/sync/types.d.ts.map +1 -1
  201. package/dist/sync/types.js +4 -47
  202. package/dist/sync/types.js.map +1 -1
  203. package/dist/unlock/index.d.ts +1 -1
  204. package/dist/unlock/index.d.ts.map +1 -1
  205. package/dist/unlock/index.js +1 -1
  206. package/dist/unlock/index.js.map +1 -1
  207. package/dist/unlock/retire.d.ts +16 -64
  208. package/dist/unlock/retire.d.ts.map +1 -1
  209. package/dist/unlock/retire.js +7 -86
  210. package/dist/unlock/retire.js.map +1 -1
  211. package/dist/unlock/standingWebvh.d.ts +27 -61
  212. package/dist/unlock/standingWebvh.d.ts.map +1 -1
  213. package/dist/unlock/standingWebvh.js +40 -92
  214. package/dist/unlock/standingWebvh.js.map +1 -1
  215. package/dist/unlock/unlockRecord.d.ts.map +1 -1
  216. package/dist/unlock/unlockRecord.js +69 -44
  217. package/dist/unlock/unlockRecord.js.map +1 -1
  218. package/dist/webvh/accountEntry.d.ts +68 -19
  219. package/dist/webvh/accountEntry.d.ts.map +1 -1
  220. package/dist/webvh/accountEntry.js +117 -37
  221. package/dist/webvh/accountEntry.js.map +1 -1
  222. package/dist/webvh/delegatedLogStore.d.ts +24 -13
  223. package/dist/webvh/delegatedLogStore.d.ts.map +1 -1
  224. package/dist/webvh/delegatedLogStore.js +40 -11
  225. package/dist/webvh/delegatedLogStore.js.map +1 -1
  226. package/dist/webvh/didWebvh.d.ts +91 -86
  227. package/dist/webvh/didWebvh.d.ts.map +1 -1
  228. package/dist/webvh/didWebvh.js +117 -142
  229. package/dist/webvh/didWebvh.js.map +1 -1
  230. package/dist/webvh/enrollClient.d.ts +2 -8
  231. package/dist/webvh/enrollClient.d.ts.map +1 -1
  232. package/dist/webvh/enrollClient.js +22 -31
  233. package/dist/webvh/enrollClient.js.map +1 -1
  234. package/dist/webvh/index.d.ts +12 -8
  235. package/dist/webvh/index.d.ts.map +1 -1
  236. package/dist/webvh/index.js +10 -7
  237. package/dist/webvh/index.js.map +1 -1
  238. package/dist/webvh/listClients.d.ts.map +1 -1
  239. package/dist/webvh/listClients.js +102 -65
  240. package/dist/webvh/listClients.js.map +1 -1
  241. package/dist/webvh/mergeMethods.d.ts +84 -0
  242. package/dist/webvh/mergeMethods.d.ts.map +1 -0
  243. package/dist/webvh/mergeMethods.js +46 -0
  244. package/dist/webvh/mergeMethods.js.map +1 -0
  245. package/dist/webvh/revokeClient.d.ts +15 -11
  246. package/dist/webvh/revokeClient.d.ts.map +1 -1
  247. package/dist/webvh/revokeClient.js +130 -57
  248. package/dist/webvh/revokeClient.js.map +1 -1
  249. package/dist/webvh/verifyLog.d.ts +45 -4
  250. package/dist/webvh/verifyLog.d.ts.map +1 -1
  251. package/dist/webvh/verifyLog.js +62 -21
  252. package/dist/webvh/verifyLog.js.map +1 -1
  253. package/dist/webvh/wasIdStore.d.ts +16 -3
  254. package/dist/webvh/wasIdStore.d.ts.map +1 -1
  255. package/dist/webvh/wasIdStore.js +18 -3
  256. package/dist/webvh/wasIdStore.js.map +1 -1
  257. package/package.json +11 -11
@@ -1,7 +1,28 @@
1
+ /*!
2
+ * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
+ */
4
+ /**
5
+ * The recovery code's authorization bridge: the pre-minted PUT-on-`did.jsonl`
6
+ * delegation. The delegation is a wire artifact both apps must mint
7
+ * byte-identically (issuance and every re-bind produce the record another
8
+ * replica later recovers with), so its builder lives here: PUT on the one
9
+ * `did.jsonl` resource, one-year TTL, delegated to the code-derived signing
10
+ * DID. Its narrow scope is what keeps recovery loud -- a stolen code must
11
+ * extend the world-readable log before it can read anything.
12
+ *
13
+ * No ceremony re-mints another credential's bridge. A record's bridge and
14
+ * `delegatedClients` sibling are signed by that record's own credential's
15
+ * ladder VM, and its frame proof by that credential's own unlock identity
16
+ * key (`decisions/0019`), so the only thing that can rot a bridge is
17
+ * retiring the credential it belongs to -- which deletes the record with it.
18
+ * A bridge that ages out, or one a pre-rule bind left signed by a foreign
19
+ * key, is refreshed by that credential's own login on the house staleness
20
+ * axes ({@link zcapExpiring}, `recordedZcapStale`), and the registry fields
21
+ * a refresh records are built here ({@link recordedDelegationFields}).
22
+ */
1
23
  import type { IZcap } from '@interop/data-integrity-core';
2
24
  import type { ZcapClient } from '@interop/ezcap';
3
- import type { PublishedKeyDocument } from '../webvh/listClients.js';
4
- import type { AccountPointer, RecordSigner } from '../keyring/record.js';
25
+ import type { AccountPointer } from '../keyring/record.js';
5
26
  import { delegationProofKeyId } from '../webvh/standingZcap.js';
6
27
  /**
7
28
  * The recovery delegation's lifetime: the house standing-zcap value
@@ -64,128 +85,4 @@ export declare function recordedDelegationFields({ delegation, delegatedClients
64
85
  delegatedClientsKeyId?: string;
65
86
  delegatedClientsExpires?: string;
66
87
  };
67
- /**
68
- * The members of a recovery-code registry entry the re-mint reads: where the
69
- * code's unlock Space and record are (`unlockSpaceId`, `manageCapability`),
70
- * which key signed the recorded delegation and when it expires
71
- * (`delegationKeyId` / `delegationExpires` -- either absent on an entry
72
- * predating its field, which the staleness checks conservatively flag), and
73
- * the re-mint fields: the code-derived signing DID the fresh delegation names
74
- * and the unlock KAK public half the record is re-wrapped to. A standing
75
- * credential's entry additionally tracks its annex Space sibling
76
- * delegation as a second scalar pair (`delegatedClientsKeyId` /
77
- * `delegatedClientsExpires` -- absent for recovery codes, mirroring the
78
- * record member's optionality); the sibling rots on exactly the bridge's
79
- * axis, so one pass reseals both. Structural on
80
- * purpose -- an app's richer registry entry satisfies it, and the re-mint
81
- * hands the SAME entry back (with the fresh key ids and expiries) through the
82
- * record seam, extra members untouched.
83
- */
84
- export interface RecoveryDelegationEntry {
85
- label: string;
86
- unlockSpaceId: string;
87
- manageCapability?: IZcap;
88
- delegationKeyId?: string;
89
- delegationExpires?: string;
90
- delegatedClientsKeyId?: string;
91
- delegatedClientsExpires?: string;
92
- recoveryClientDid?: string;
93
- unlockKeyAgreementKeyId?: string;
94
- unlockKeyAgreementKeyMultibase?: string;
95
- }
96
- /**
97
- * One registry entry's fate in a re-mint pass: `current` (both members stand
98
- * and are outside the renewal window -- nothing written), `reminted` (the
99
- * record re-sealed and the entry handed back fresh; `siblingCarriedVerbatim`
100
- * flags a recorded sibling the pass could not rebuild because the document
101
- * points at no generation, which stays flagged for the health check),
102
- * `incomplete-entry` (an entry predating the re-mint fields, skipped until
103
- * the credential is re-bound), `pending-entry` (the entry's recorded
104
- * unlock-key members do not match the credential the record at its unlock
105
- * Space is sealed to -- a passphrase change torn before its retirement; the
106
- * next passphrase login's repair finishes it, and re-minting here would
107
- * re-arm the retired credential into the new one's record), or `failed` (the record could not be read,
108
- * re-sealed, or re-PUT -- `error` carries the cause). A skipped or failed
109
- * entry is named here so no caller can lose it silently.
110
- */
111
- export interface RecordRemintOutcome {
112
- label: string;
113
- unlockSpaceId: string;
114
- outcome: 'current' | 'reminted' | 'incomplete-entry' | 'pending-entry' | 'failed';
115
- siblingCarriedVerbatim?: boolean;
116
- error?: unknown;
117
- }
118
- /**
119
- * Re-mints the recovery delegations the current document no longer backs --
120
- * the recovery-code delta riding the revocation cascade (see the module doc
121
- * for the mechanism and the skip policy).
122
- *
123
- * The record's credential-authenticated core is preserved verbatim: the
124
- * re-mint reads the standing record through the entry's management zcap and
125
- * replaces only its delegation members
126
- * ({@link remintUnlockRecordDelegations}) -- the bridge always, and the
127
- * annex Space sibling where the entry records one (the two rot on one
128
- * axis, so both reseal in the same atomic pass and one registry-entry
129
- * rewrite records both fresh pairs). The
130
- * shell, the ladder member (where one rides), and the binding tag all travel
131
- * untouched, since the re-mint can decrypt none of them and does not need to.
132
- * A re-mint therefore can never change the pointer or controller the
133
- * credential was bound against -- and after a host migration the tag no
134
- * longer matches the moved pointer, so credentials must be rebound (codes
135
- * re-issued) when the account moves hosts.
136
- *
137
- * The re-mint holds the code's KAK public half but not its signing key, so
138
- * every record it re-PUTs is signed with the acting client's own account key
139
- * (`recordSigner`) -- the mixed-signer case a reader settles against the
140
- * verified did:webvh document.
141
- *
142
- * Best-effort per entry: a skipped entry stays flagged by the login-time
143
- * health check, whose regenerate nudge remains the backstop.
144
- *
145
- * @param options {object}
146
- * @param options.doc {PublishedKeyDocument} the locally verified did:webvh
147
- * document, AFTER the revocation edit
148
- * @param options.entries {RecoveryDelegationEntry[]} the registry's
149
- * recovery-code entries, as the app's registry read returned them
150
- * @param options.pointer {AccountPointer}
151
- * @param options.storageServerUrl {string} the unlock Spaces' storage server
152
- * @param options.zcapClient {ZcapClient} the acting client's promoted
153
- * signer, which mints the fresh delegations
154
- * @param options.recordSigner {RecordSigner} the acting client's account
155
- * key, which signs the re-wrapped records
156
- * @param options.managementZcapClient {Function} `({ capability }) =>
157
- * ZcapClient` -- the client an entry's management zcap is invoked with
158
- * @param options.recordEntry {Function} `({ entry }) => Promise<void>` --
159
- * persists one updated registry entry (matching on the app's entry key)
160
- * @param [options.mintDelegatedClientsDelegation] {Function} `({ controller })
161
- * => Promise<IZcap | undefined>` -- the annex-side mint of a fresh
162
- * `delegatedClients` sibling delegation, injected by the caller (the
163
- * annex subpath's `delegatedClientsDelegationMinter` builds one over the
164
- * verified document); `undefined` when the document points at no
165
- * generation, in which case the old sealed member travels verbatim
166
- * @returns {Promise<{ reminted: number; skipped: number }>}
167
- */
168
- export declare function remintRecoveryDelegations<Entry extends RecoveryDelegationEntry>({ doc, entries, pointer, storageServerUrl, zcapClient, recordSigner, managementZcapClient, recordEntry, mintDelegatedClientsDelegation, retiringKeyMultibases, now }: {
169
- doc: PublishedKeyDocument;
170
- entries: Entry[];
171
- pointer: AccountPointer;
172
- storageServerUrl: string;
173
- zcapClient: ZcapClient;
174
- recordSigner: RecordSigner;
175
- managementZcapClient: (options: {
176
- capability: IZcap;
177
- }) => ZcapClient;
178
- recordEntry: (options: {
179
- entry: Entry;
180
- }) => Promise<void>;
181
- mintDelegatedClientsDelegation?: (options: {
182
- controller: string;
183
- }) => Promise<IZcap | undefined>;
184
- retiringKeyMultibases?: string[];
185
- now?: number;
186
- }): Promise<{
187
- reminted: number;
188
- skipped: number;
189
- outcomes: RecordRemintOutcome[];
190
- }>;
191
88
  //# sourceMappingURL=recoveryDelegation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"recoveryDelegation.d.ts","sourceRoot":"","sources":["../../src/recovery/recoveryDelegation.ts"],"names":[],"mappings":"AA8CA,OAAO,KAAK,EAAoB,KAAK,EAAE,MAAM,8BAA8B,CAAA;AAC3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAIhD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AAKnE,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAKxE,OAAO,EACL,oBAAoB,EAGrB,MAAM,0BAA0B,CAAA;AAEjC;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,0BAA0B,QAAuB,CAAA;AAI9D,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAqB/E;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,gBAAgB,CAAC,EACrC,UAAU,EACV,OAAO,EACP,iBAAiB,EACjB,GAAgB,EACjB,EAAE;IACD,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,cAAc,CAAA;IACvB,iBAAiB,EAAE,M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,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EACL,oBAAoB,EAErB,MAAM,0BAA0B,CAAA;AAEjC;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,0BAA0B,QAAuB,CAAA;AAI9D,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAqB/E;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,gBAAgB,CAAC,EACrC,UAAU,EACV,OAAO,EACP,iBAAiB,EACjB,GAAgB,EACjB,EAAE;IACD,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,cAAc,CAAA;IACvB,iBAAiB,EAAE,MAAM,CAAA;IACzB,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,GAAG,OAAO,CAAC,KAAK,CAAC,CAOjB;AAID,OAAO,EAAE,oBAAoB,EAAE,CAAA;AAE/B;;;;;;;;;;;;;GAaG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,UAAU,EACV,gBAAgB,EACjB,EAAE;IACD,UAAU,CAAC,EAAE,KAAK,CAAA;IAClB,gBAAgB,CAAC,EAAE,KAAK,CAAA;CACzB,GAAG;IACF,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,uBAAuB,CAAC,EAAE,MAAM,CAAA;CACjC,CAiBA"}
@@ -1,55 +1,6 @@
1
- /*!
2
- * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
- */
4
- /**
5
- * The recovery code's authorization bridge: the pre-minted PUT-on-`did.jsonl`
6
- * delegation and the revocation cascade's re-mint of it. The delegation is a
7
- * wire artifact both apps must mint byte-identically (issuance and every
8
- * re-mint produce the record another replica later recovers with), so its
9
- * builder lives here: PUT on the one `did.jsonl` resource, one-year TTL,
10
- * delegated to the code-derived signing DID. Its narrow scope is what keeps
11
- * recovery loud -- a stolen code must extend the world-readable log before it
12
- * can read anything.
13
- *
14
- * Beside the builder lives the re-mint core (`remintRecoveryDelegations`):
15
- * revoking a client kills, by the current-key-set rule, every `did.jsonl`
16
- * delegation that client signed, which would brick recovery exactly when it
17
- * is needed -- and a delegation left standing eventually reaches its own
18
- * expiry. For each registry entry whose recorded delegation no longer
19
- * chains (its signing verification method left `capabilityDelegation` in the
20
- * document) or is expired or inside the renewal window, the acting client
21
- * signs a fresh delegation to the code's signing DID, re-wraps the
22
- * record to the code's unlock KAK (the public half the registry records --
23
- * the record carries no secrets, so re-encryption needs none), re-PUTs it
24
- * through the entry's management zcap, and updates the registry's
25
- * `delegationKeyId` and `delegationExpires`. A standing credential's
26
- * client-annex Space sibling delegation rides the same pass (its scalar pair is
27
- * `delegatedClientsKeyId` / `delegatedClientsExpires`): either member going
28
- * stale reseals both, and the one registry rewrite records both fresh pairs
29
- * -- a re-mint handling only the bridge is incomplete. The skip policy is
30
- * cross-replica correctness and is
31
- * decided here once: an entry that predates the re-mint fields, or whose
32
- * standing record cannot be read or carries no binding, is skipped and stays
33
- * flagged by the login-time health check. Every entry's fate is reported
34
- * (`RecordRemintOutcome`), so a record the pass could not reach is named
35
- * rather than silently left with a rotted bridge. What stays app-side is the
36
- * seams: the management-zcap client factory, the storage server URL, and the
37
- * registry read/record halves.
38
- *
39
- * The same pass serves the last-client forget ceremony, whose acting signer
40
- * is the ladder VM rather than an enrolled client: there the rot check runs
41
- * against the post-install document, in which the client about to be removed
42
- * still stands, so the ceremony names it as retiring
43
- * (`retiringKeyMultibases`) and every delegation it signed counts as rotted
44
- * ahead of the removal entry.
45
- */
46
- import { X25519KeyAgreementKey2020 } from '@interop/x25519-key-agreement-key';
47
1
  import { resourcePath, toUrl } from '@interop/was-client/paths';
48
- import { log } from '../log.js';
49
2
  import { DID_LOG_RESOURCE, ID_COLLECTION } from '../space/collections.js';
50
- import { getUnlockKeyringWithCapability, putUnlockKeyringWithCapability } from '../keyring/unlockSpace.js';
51
- import { remintUnlockRecordDelegations, unlockRecordSealedTo } from '../unlock/unlockRecord.js';
52
- import { delegationProofKeyId, recordedZcapStale, STANDING_ZCAP_TTL_MS } from '../webvh/standingZcap.js';
3
+ import { delegationProofKeyId, STANDING_ZCAP_TTL_MS } from '../webvh/standingZcap.js';
53
4
  /**
54
5
  * The recovery delegation's lifetime: the house standing-zcap value
55
6
  * ({@link STANDING_ZCAP_TTL_MS} -- one year, per NIST SP 800-57's
@@ -153,220 +104,4 @@ export function recordedDelegationFields({ delegation, delegatedClients }) {
153
104
  function zcapExpires(zcap) {
154
105
  return zcap.expires;
155
106
  }
156
- /**
157
- * Re-mints the recovery delegations the current document no longer backs --
158
- * the recovery-code delta riding the revocation cascade (see the module doc
159
- * for the mechanism and the skip policy).
160
- *
161
- * The record's credential-authenticated core is preserved verbatim: the
162
- * re-mint reads the standing record through the entry's management zcap and
163
- * replaces only its delegation members
164
- * ({@link remintUnlockRecordDelegations}) -- the bridge always, and the
165
- * annex Space sibling where the entry records one (the two rot on one
166
- * axis, so both reseal in the same atomic pass and one registry-entry
167
- * rewrite records both fresh pairs). The
168
- * shell, the ladder member (where one rides), and the binding tag all travel
169
- * untouched, since the re-mint can decrypt none of them and does not need to.
170
- * A re-mint therefore can never change the pointer or controller the
171
- * credential was bound against -- and after a host migration the tag no
172
- * longer matches the moved pointer, so credentials must be rebound (codes
173
- * re-issued) when the account moves hosts.
174
- *
175
- * The re-mint holds the code's KAK public half but not its signing key, so
176
- * every record it re-PUTs is signed with the acting client's own account key
177
- * (`recordSigner`) -- the mixed-signer case a reader settles against the
178
- * verified did:webvh document.
179
- *
180
- * Best-effort per entry: a skipped entry stays flagged by the login-time
181
- * health check, whose regenerate nudge remains the backstop.
182
- *
183
- * @param options {object}
184
- * @param options.doc {PublishedKeyDocument} the locally verified did:webvh
185
- * document, AFTER the revocation edit
186
- * @param options.entries {RecoveryDelegationEntry[]} the registry's
187
- * recovery-code entries, as the app's registry read returned them
188
- * @param options.pointer {AccountPointer}
189
- * @param options.storageServerUrl {string} the unlock Spaces' storage server
190
- * @param options.zcapClient {ZcapClient} the acting client's promoted
191
- * signer, which mints the fresh delegations
192
- * @param options.recordSigner {RecordSigner} the acting client's account
193
- * key, which signs the re-wrapped records
194
- * @param options.managementZcapClient {Function} `({ capability }) =>
195
- * ZcapClient` -- the client an entry's management zcap is invoked with
196
- * @param options.recordEntry {Function} `({ entry }) => Promise<void>` --
197
- * persists one updated registry entry (matching on the app's entry key)
198
- * @param [options.mintDelegatedClientsDelegation] {Function} `({ controller })
199
- * => Promise<IZcap | undefined>` -- the annex-side mint of a fresh
200
- * `delegatedClients` sibling delegation, injected by the caller (the
201
- * annex subpath's `delegatedClientsDelegationMinter` builds one over the
202
- * verified document); `undefined` when the document points at no
203
- * generation, in which case the old sealed member travels verbatim
204
- * @returns {Promise<{ reminted: number; skipped: number }>}
205
- */
206
- export async function remintRecoveryDelegations({ doc, entries, pointer, storageServerUrl, zcapClient, recordSigner, managementZcapClient, recordEntry, mintDelegatedClientsDelegation, retiringKeyMultibases = [], now = Date.now() }) {
207
- let reminted = 0;
208
- let skipped = 0;
209
- const outcomes = [];
210
- // The house staleness policy, decided once in `webvh` and asked here over
211
- // the scalars a registry entry records: expiry, the current-key-set rule
212
- // (a recorded signing key the document no longer lists under
213
- // `capabilityDelegation` -- or no recorded key at all -- has rotted), and
214
- // the caller's retiring set, which the document still lists only until the
215
- // entry that removes those keys lands.
216
- const recordedStale = (delegationKeyId, expires) => recordedZcapStale({
217
- doc,
218
- ...(delegationKeyId ? { delegationKeyId } : {}),
219
- ...(expires ? { expires } : {}),
220
- retiringKeyMultibases,
221
- now
222
- });
223
- for (const entry of entries) {
224
- const stale = recordedStale(entry.delegationKeyId, entry.delegationExpires);
225
- // The annex Space sibling, where the entry records one, is checked on the
226
- // same axes; either member going stale re-mints BOTH in one atomic pass
227
- // (both resealed, one registry-entry rewrite).
228
- const siblingRecorded = entry.delegatedClientsKeyId !== undefined ||
229
- entry.delegatedClientsExpires !== undefined;
230
- const siblingStale = siblingRecorded &&
231
- recordedStale(entry.delegatedClientsKeyId, entry.delegatedClientsExpires);
232
- if (!stale && !siblingStale) {
233
- outcomes.push({
234
- label: entry.label,
235
- unlockSpaceId: entry.unlockSpaceId,
236
- outcome: 'current'
237
- });
238
- continue;
239
- }
240
- if (!entry.recoveryClientDid ||
241
- !entry.unlockKeyAgreementKeyId ||
242
- !entry.unlockKeyAgreementKeyMultibase ||
243
- !entry.manageCapability) {
244
- // An entry issued before the re-mint fields existed: the health check
245
- // keeps flagging it until the code is regenerated.
246
- skipped += 1;
247
- outcomes.push({
248
- label: entry.label,
249
- unlockSpaceId: entry.unlockSpaceId,
250
- outcome: 'incomplete-entry'
251
- });
252
- continue;
253
- }
254
- try {
255
- // The standing record, whose credential-authenticated core travels
256
- // verbatim (a record with no binding predates the standing layout and
257
- // cannot be re-minted -- `remintUnlockRecordDelegations` refuses, and the
258
- // entry is skipped into the health check's regenerate nudge).
259
- const standing = await getUnlockKeyringWithCapability({
260
- storageServerUrl,
261
- zcapClient: managementZcapClient({
262
- capability: entry.manageCapability
263
- }),
264
- spaceId: entry.unlockSpaceId,
265
- capability: entry.manageCapability
266
- });
267
- // The pending-shaped guard: the entry's `unlockSpaceId` and
268
- // `manageCapability` name one credential while its identity members
269
- // name another -- the state a passphrase change torn before its
270
- // retirement leaves. Re-minting here would seal a fresh
271
- // current-client-signed bridge for the OLD credential into the NEW
272
- // credential's record, re-arming the half-retired credential and
273
- // bricking the new one's entry paths. Nothing is written; the next
274
- // passphrase login's repair is the mender.
275
- if (!unlockRecordSealedTo({
276
- record: standing,
277
- keyAgreementKeyMultibase: entry.unlockKeyAgreementKeyMultibase
278
- })) {
279
- log.warn('The unlock record at the Space recorded for this entry is ' +
280
- 'sealed to another credential (a passphrase change torn before ' +
281
- 'its retirement landed); its delegations are not re-minted', { label: entry.label });
282
- skipped += 1;
283
- outcomes.push({
284
- label: entry.label,
285
- unlockSpaceId: entry.unlockSpaceId,
286
- outcome: 'pending-entry'
287
- });
288
- continue;
289
- }
290
- const delegation = await delegateLogWrite({
291
- zcapClient,
292
- pointer,
293
- recoveryClientDid: entry.recoveryClientDid
294
- });
295
- // The fresh annex Space sibling, for an entry that records one --
296
- // minted through the injected annex-side closure, so this orchestrator
297
- // never imports the annex module. A document not (yet) pointing at a
298
- // generation (or a caller wiring no minter) leaves nothing to rebuild
299
- // the target from, so the old sealed member travels verbatim and the
300
- // pair stays stale-flagged for the login-time health check.
301
- let delegatedClients;
302
- let siblingCarriedVerbatim = false;
303
- if (siblingRecorded) {
304
- delegatedClients = await mintDelegatedClientsDelegation?.({
305
- controller: entry.recoveryClientDid
306
- });
307
- if (!delegatedClients) {
308
- siblingCarriedVerbatim = true;
309
- log.warn('The account document names no client-annex generation; the ' +
310
- 'delegatedClients delegation for this entry is carried verbatim', { label: entry.label });
311
- }
312
- }
313
- // The credential's unlock KAK, public half only -- exactly enough to
314
- // seal the fresh bridge to the same recipient the credential derives
315
- // (sealing goes through the encrypt-only cipher, so no secret is
316
- // needed).
317
- const unlockKak = (await X25519KeyAgreementKey2020.from({
318
- id: entry.unlockKeyAgreementKeyId,
319
- controller: entry.unlockKeyAgreementKeyId.split('#')[0],
320
- type: 'X25519KeyAgreementKey2020',
321
- publicKeyMultibase: entry.unlockKeyAgreementKeyMultibase
322
- }));
323
- const wrapped = await remintUnlockRecordDelegations({
324
- record: standing,
325
- delegation,
326
- ...(delegatedClients ? { delegatedClients } : {}),
327
- keyAgreementKey: unlockKak,
328
- signer: recordSigner
329
- });
330
- await putUnlockKeyringWithCapability({
331
- storageServerUrl,
332
- zcapClient: managementZcapClient({
333
- capability: entry.manageCapability
334
- }),
335
- spaceId: entry.unlockSpaceId,
336
- record: wrapped,
337
- capability: entry.manageCapability
338
- });
339
- await recordEntry({
340
- entry: {
341
- ...entry,
342
- ...recordedDelegationFields({
343
- delegation,
344
- ...(delegatedClients ? { delegatedClients } : {})
345
- })
346
- }
347
- });
348
- reminted += 1;
349
- outcomes.push({
350
- label: entry.label,
351
- unlockSpaceId: entry.unlockSpaceId,
352
- outcome: 'reminted',
353
- ...(siblingCarriedVerbatim ? { siblingCarriedVerbatim } : {})
354
- });
355
- }
356
- catch (err) {
357
- log.warn('Could not re-mint the recovery delegation', {
358
- label: entry.label,
359
- err
360
- });
361
- skipped += 1;
362
- outcomes.push({
363
- label: entry.label,
364
- unlockSpaceId: entry.unlockSpaceId,
365
- outcome: 'failed',
366
- error: err
367
- });
368
- }
369
- }
370
- return { reminted, skipped, outcomes };
371
- }
372
107
  //# sourceMappingURL=recoveryDelegation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"recoveryDelegation.js","sourceRoot":"","sources":["../../src/recovery/recoveryDelegation.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAA;AAG7E,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAA;AAC/B,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAEzE,OAAO,EACL,8BAA8B,EAC9B,8BAA8B,EAC/B,MAAM,2BAA2B,CAAA;AAElC,OAAO,EACL,6BAA6B,EAC7B,oBAAoB,EACrB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,0BAA0B,CAAA;AAEjC;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,oBAAoB,CAAA;AAE9D,wEAAwE;AACxE,2DAA2D;AAC3D,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAE/E;;;;;;;;;;;GAWG;AACH,SAAS,SAAS,CAAC,EAAE,OAAO,EAA+B;IACzD,OAAO,KAAK,CAAC;QACX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