@interop/wallet-core 0.50.0 → 0.52.1

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 (241) hide show
  1. package/README.md +7 -11
  2. package/dist/clientAnnex/credentialAnchoredGenesis.d.ts +17 -8
  3. package/dist/clientAnnex/credentialAnchoredGenesis.d.ts.map +1 -1
  4. package/dist/clientAnnex/credentialAnchoredGenesis.js +33 -12
  5. package/dist/clientAnnex/credentialAnchoredGenesis.js.map +1 -1
  6. package/dist/clientAnnex/forget.d.ts +18 -6
  7. package/dist/clientAnnex/forget.d.ts.map +1 -1
  8. package/dist/clientAnnex/forget.js +19 -6
  9. package/dist/clientAnnex/forget.js.map +1 -1
  10. package/dist/clientAnnex/forgetLast.d.ts +65 -28
  11. package/dist/clientAnnex/forgetLast.d.ts.map +1 -1
  12. package/dist/clientAnnex/forgetLast.js +78 -18
  13. package/dist/clientAnnex/forgetLast.js.map +1 -1
  14. package/dist/clientAnnex/gc.d.ts +3 -3
  15. package/dist/clientAnnex/gc.d.ts.map +1 -1
  16. package/dist/clientAnnex/gc.js +2 -2
  17. package/dist/clientAnnex/gc.js.map +1 -1
  18. package/dist/clientAnnex/index.d.ts +6 -6
  19. package/dist/clientAnnex/index.d.ts.map +1 -1
  20. package/dist/clientAnnex/index.js +5 -5
  21. package/dist/clientAnnex/index.js.map +1 -1
  22. package/dist/clientAnnex/ladder.d.ts +19 -11
  23. package/dist/clientAnnex/ladder.d.ts.map +1 -1
  24. package/dist/clientAnnex/ladder.js +77 -14
  25. package/dist/clientAnnex/ladder.js.map +1 -1
  26. package/dist/clientAnnex/ladderAnchored.d.ts +36 -7
  27. package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -1
  28. package/dist/clientAnnex/ladderAnchored.js +80 -18
  29. package/dist/clientAnnex/ladderAnchored.js.map +1 -1
  30. package/dist/clientAnnex/log.d.ts +6 -6
  31. package/dist/clientAnnex/log.d.ts.map +1 -1
  32. package/dist/clientAnnex/log.js +8 -8
  33. package/dist/clientAnnex/log.js.map +1 -1
  34. package/dist/clientAnnex/recoveryLadderAnchored.d.ts +7 -7
  35. package/dist/clientAnnex/recoveryLadderAnchored.js +9 -9
  36. package/dist/clientAnnex/recoveryLadderAnchored.js.map +1 -1
  37. package/dist/clientAnnex/selfEnroll.d.ts +6 -4
  38. package/dist/clientAnnex/selfEnroll.d.ts.map +1 -1
  39. package/dist/clientAnnex/selfEnroll.js +19 -7
  40. package/dist/clientAnnex/selfEnroll.js.map +1 -1
  41. package/dist/clients/listing.d.ts +1 -1
  42. package/dist/clients/listing.d.ts.map +1 -1
  43. package/dist/clients/listing.js +1 -1
  44. package/dist/clients/listing.js.map +1 -1
  45. package/dist/clients/revocation.d.ts +1 -1
  46. package/dist/clients/rosterPolicy.d.ts +1 -1
  47. package/dist/clients/rosterPolicy.d.ts.map +1 -1
  48. package/dist/descriptors/acquire.js +1 -1
  49. package/dist/descriptors/logSource.d.ts +1 -2
  50. package/dist/descriptors/logSource.d.ts.map +1 -1
  51. package/dist/descriptors/logSource.js +2 -2
  52. package/dist/descriptors/logSource.js.map +1 -1
  53. package/dist/enrollment/enrollment.d.ts +1 -1
  54. package/dist/enrollment/enrollment.d.ts.map +1 -1
  55. package/dist/enrollment/enrollment.js +2 -1
  56. package/dist/enrollment/enrollment.js.map +1 -1
  57. package/dist/genesis/accountGenesis.d.ts +13 -1
  58. package/dist/genesis/accountGenesis.d.ts.map +1 -1
  59. package/dist/genesis/accountGenesis.js +1 -1
  60. package/dist/genesis/accountGenesis.js.map +1 -1
  61. package/dist/index.d.ts +1 -3
  62. package/dist/index.d.ts.map +1 -1
  63. package/dist/index.js +1 -3
  64. package/dist/index.js.map +1 -1
  65. package/dist/keyring/kdf.d.ts +6 -20
  66. package/dist/keyring/kdf.d.ts.map +1 -1
  67. package/dist/keyring/kdf.js +8 -5
  68. package/dist/keyring/kdf.js.map +1 -1
  69. package/dist/keyring/unlockSpace.js +1 -1
  70. package/dist/keys/rosterLogStore.d.ts +16 -14
  71. package/dist/keys/rosterLogStore.d.ts.map +1 -1
  72. package/dist/keys/rosterLogStore.js +149 -32
  73. package/dist/keys/rosterLogStore.js.map +1 -1
  74. package/dist/keys/rosterStore.d.ts +8 -7
  75. package/dist/keys/rosterStore.d.ts.map +1 -1
  76. package/dist/keys/rosterStore.js +6 -6
  77. package/dist/keys/rosterStore.js.map +1 -1
  78. package/dist/keys/spaceEpochs.d.ts +1 -1
  79. package/dist/keys/spaceEpochs.js +1 -1
  80. package/dist/keys/userKeyRoster.d.ts +3 -3
  81. package/dist/keys/userKeyRoster.d.ts.map +1 -1
  82. package/dist/keys/userKeyRoster.js +3 -3
  83. package/dist/keys/userKeyRoster.js.map +1 -1
  84. package/dist/recovery/index.d.ts +2 -2
  85. package/dist/recovery/index.js +2 -2
  86. package/dist/recovery/recoveryDelegation.js +1 -1
  87. package/dist/recovery/recoveryDelegation.js.map +1 -1
  88. package/dist/recovery/recoveryWebvh.d.ts +4 -4
  89. package/dist/recovery/recoveryWebvh.js +5 -5
  90. package/dist/request/appKey.d.ts +9 -3
  91. package/dist/request/appKey.d.ts.map +1 -1
  92. package/dist/request/appKey.js +13 -8
  93. package/dist/request/appKey.js.map +1 -1
  94. package/dist/request/classify.d.ts.map +1 -1
  95. package/dist/request/classify.js +13 -1
  96. package/dist/request/classify.js.map +1 -1
  97. package/dist/request/ephemeralExchange.d.ts +6 -1
  98. package/dist/request/ephemeralExchange.d.ts.map +1 -1
  99. package/dist/request/ephemeralExchange.js +6 -1
  100. package/dist/request/ephemeralExchange.js.map +1 -1
  101. package/dist/request/exchangeClient.d.ts +0 -23
  102. package/dist/request/exchangeClient.d.ts.map +1 -1
  103. package/dist/request/exchangeClient.js +30 -1
  104. package/dist/request/exchangeClient.js.map +1 -1
  105. package/dist/request/index.d.ts +4 -1
  106. package/dist/request/index.d.ts.map +1 -1
  107. package/dist/request/index.js +4 -1
  108. package/dist/request/index.js.map +1 -1
  109. package/dist/request/interactionRequest.d.ts +23 -0
  110. package/dist/request/interactionRequest.d.ts.map +1 -0
  111. package/dist/request/interactionRequest.js +46 -0
  112. package/dist/request/interactionRequest.js.map +1 -0
  113. package/dist/request/interactionUrl.d.ts +3 -14
  114. package/dist/request/interactionUrl.d.ts.map +1 -1
  115. package/dist/request/interactionUrl.js +20 -1
  116. package/dist/request/interactionUrl.js.map +1 -1
  117. package/dist/resourceLog/controller.d.ts +48 -49
  118. package/dist/resourceLog/controller.d.ts.map +1 -1
  119. package/dist/resourceLog/controller.js +40 -20
  120. package/dist/resourceLog/controller.js.map +1 -1
  121. package/dist/resourceLog/errors.d.ts +12 -78
  122. package/dist/resourceLog/errors.d.ts.map +1 -1
  123. package/dist/resourceLog/errors.js +12 -79
  124. package/dist/resourceLog/errors.js.map +1 -1
  125. package/dist/resourceLog/index.d.ts +17 -22
  126. package/dist/resourceLog/index.d.ts.map +1 -1
  127. package/dist/resourceLog/index.js +16 -21
  128. package/dist/resourceLog/index.js.map +1 -1
  129. package/dist/resourceLog/license.d.ts +27 -26
  130. package/dist/resourceLog/license.d.ts.map +1 -1
  131. package/dist/resourceLog/license.js +31 -30
  132. package/dist/resourceLog/license.js.map +1 -1
  133. package/dist/unlock/index.d.ts +6 -6
  134. package/dist/unlock/index.d.ts.map +1 -1
  135. package/dist/unlock/index.js +5 -5
  136. package/dist/unlock/retire.d.ts +29 -28
  137. package/dist/unlock/retire.d.ts.map +1 -1
  138. package/dist/unlock/retire.js +25 -16
  139. package/dist/unlock/retire.js.map +1 -1
  140. package/dist/unlock/standingClient.d.ts +1 -1
  141. package/dist/unlock/standingClient.js +3 -3
  142. package/dist/unlock/standingWebvh.d.ts +28 -10
  143. package/dist/unlock/standingWebvh.d.ts.map +1 -1
  144. package/dist/unlock/standingWebvh.js +75 -37
  145. package/dist/unlock/standingWebvh.js.map +1 -1
  146. package/dist/unlock/unlockRecord.js +1 -1
  147. package/dist/webvh/delegatedLogStore.d.ts +2 -2
  148. package/dist/webvh/delegatedLogStore.js +2 -2
  149. package/dist/webvh/didWeb.js +1 -1
  150. package/dist/webvh/didWeb.js.map +1 -1
  151. package/dist/webvh/didWebvh.d.ts +3 -3
  152. package/dist/webvh/didWebvh.d.ts.map +1 -1
  153. package/dist/webvh/didWebvh.js +5 -5
  154. package/dist/webvh/didWebvh.js.map +1 -1
  155. package/dist/webvh/listClients.js +1 -1
  156. package/dist/webvh/listClients.js.map +1 -1
  157. package/dist/webvh/verifyLog.d.ts +1 -1
  158. package/dist/webvh/verifyLog.d.ts.map +1 -1
  159. package/dist/webvh/verifyLog.js +1 -2
  160. package/dist/webvh/verifyLog.js.map +1 -1
  161. package/package.json +6 -10
  162. package/dist/display/alignment.d.ts +0 -55
  163. package/dist/display/alignment.d.ts.map +0 -1
  164. package/dist/display/alignment.js +0 -117
  165. package/dist/display/alignment.js.map +0 -1
  166. package/dist/display/credentialName.d.ts +0 -42
  167. package/dist/display/credentialName.d.ts.map +0 -1
  168. package/dist/display/credentialName.js +0 -106
  169. package/dist/display/credentialName.js.map +0 -1
  170. package/dist/display/displayFields.d.ts +0 -59
  171. package/dist/display/displayFields.d.ts.map +0 -1
  172. package/dist/display/displayFields.js +0 -136
  173. package/dist/display/displayFields.js.map +0 -1
  174. package/dist/display/evidence.d.ts +0 -50
  175. package/dist/display/evidence.d.ts.map +0 -1
  176. package/dist/display/evidence.js +0 -67
  177. package/dist/display/evidence.js.map +0 -1
  178. package/dist/display/image.d.ts +0 -18
  179. package/dist/display/image.d.ts.map +0 -1
  180. package/dist/display/image.js +0 -23
  181. package/dist/display/image.js.map +0 -1
  182. package/dist/display/index.d.ts +0 -38
  183. package/dist/display/index.d.ts.map +0 -1
  184. package/dist/display/index.js +0 -32
  185. package/dist/display/index.js.map +0 -1
  186. package/dist/display/issuer.d.ts +0 -105
  187. package/dist/display/issuer.d.ts.map +0 -1
  188. package/dist/display/issuer.js +0 -126
  189. package/dist/display/issuer.js.map +0 -1
  190. package/dist/display/obv3.d.ts +0 -82
  191. package/dist/display/obv3.d.ts.map +0 -1
  192. package/dist/display/obv3.js +0 -117
  193. package/dist/display/obv3.js.map +0 -1
  194. package/dist/display/parse.d.ts +0 -66
  195. package/dist/display/parse.d.ts.map +0 -1
  196. package/dist/display/parse.js +0 -104
  197. package/dist/display/parse.js.map +0 -1
  198. package/dist/display/subject.d.ts +0 -79
  199. package/dist/display/subject.d.ts.map +0 -1
  200. package/dist/display/subject.js +0 -124
  201. package/dist/display/subject.js.map +0 -1
  202. package/dist/display/text.d.ts +0 -53
  203. package/dist/display/text.d.ts.map +0 -1
  204. package/dist/display/text.js +0 -78
  205. package/dist/display/text.js.map +0 -1
  206. package/dist/display/types.d.ts +0 -55
  207. package/dist/display/types.d.ts.map +0 -1
  208. package/dist/display/types.js +0 -41
  209. package/dist/display/types.js.map +0 -1
  210. package/dist/display/validity.d.ts +0 -51
  211. package/dist/display/validity.d.ts.map +0 -1
  212. package/dist/display/validity.js +0 -51
  213. package/dist/display/validity.js.map +0 -1
  214. package/dist/display/verificationView.d.ts +0 -115
  215. package/dist/display/verificationView.d.ts.map +0 -1
  216. package/dist/display/verificationView.js +0 -199
  217. package/dist/display/verificationView.js.map +0 -1
  218. package/dist/resourceLog/append.d.ts +0 -112
  219. package/dist/resourceLog/append.d.ts.map +0 -1
  220. package/dist/resourceLog/append.js +0 -197
  221. package/dist/resourceLog/append.js.map +0 -1
  222. package/dist/resourceLog/entry.d.ts +0 -68
  223. package/dist/resourceLog/entry.d.ts.map +0 -1
  224. package/dist/resourceLog/entry.js +0 -167
  225. package/dist/resourceLog/entry.js.map +0 -1
  226. package/dist/resourceLog/pin.d.ts +0 -82
  227. package/dist/resourceLog/pin.d.ts.map +0 -1
  228. package/dist/resourceLog/pin.js +0 -57
  229. package/dist/resourceLog/pin.js.map +0 -1
  230. package/dist/resourceLog/seal.d.ts +0 -97
  231. package/dist/resourceLog/seal.d.ts.map +0 -1
  232. package/dist/resourceLog/seal.js +0 -113
  233. package/dist/resourceLog/seal.js.map +0 -1
  234. package/dist/resourceLog/verify.d.ts +0 -96
  235. package/dist/resourceLog/verify.d.ts.map +0 -1
  236. package/dist/resourceLog/verify.js +0 -474
  237. package/dist/resourceLog/verify.js.map +0 -1
  238. package/dist/resourceLog/vmFragment.d.ts +0 -33
  239. package/dist/resourceLog/vmFragment.d.ts.map +0 -1
  240. package/dist/resourceLog/vmFragment.js +0 -39
  241. package/dist/resourceLog/vmFragment.js.map +0 -1
package/README.md CHANGED
@@ -65,10 +65,6 @@ The subpaths:
65
65
  [`@interop/data-integrity-core`](https://npm.im/@interop/data-integrity-core)
66
66
  and is re-exported here.
67
67
 
68
- - **`@interop/wallet-core/display`** -- pure verifiable-credential derivation /
69
- display helpers and credential input parsing. Raw values out (ISO strings,
70
- `Date`, booleans); date formatting, i18n, and UI concerns stay in the app.
71
-
72
68
  - **`@interop/wallet-core/webvh`** -- the account's did:webvh identity: the
73
69
  hosted DID log, its per-client update-key rotation, the client enrollment
74
70
  entries, the one-entry client-revocation edit (verification methods, update
@@ -145,13 +141,13 @@ The subpaths:
145
141
 
146
142
  - **`@interop/wallet-core/unlock`** -- standing unlock credentials: every unlock
147
143
  method (passphrase, passkey PRF, recovery code) as a standing credential in
148
- the recovery-code posture, with self-enrolling login. The credential-derived
149
- client identity and binding MAC key, the update-key ladder
144
+ the recovery-code configuration, with self-enrolling login. The
145
+ credential-derived client identity and binding MAC key, the update-key ladder
150
146
  (latent-and-consumed did:webvh update authority from a random seed carried in
151
147
  the unlock record, the current rung recovered from the log itself), the unlock
152
148
  record codec (shell / bridge delegation / ladder members under a
153
149
  credential-authenticated binding, with the bridge-only re-mint), the merged
154
- document-posture edit (a verbatim `keyAgreement` entry or a
150
+ document-inventory edit (a verbatim `keyAgreement` entry or a
155
151
  `publicKeyCommitment` entry for a low-entropy-derived key), and the
156
152
  self-enrolling continuation with its composed completion.
157
153
 
@@ -192,10 +188,10 @@ import {
192
188
  ```
193
189
 
194
190
  The `sync` and `space` subpaths are re-exported from the package root as well.
195
- Every other subpath (`identity`, `request`, `display`, `webvh`, `keys`,
196
- `clients`, `descriptors`, `keyring`, `enrollment`, `recovery`) is
197
- import-directly-only, so consumers of the root never pull the signing / KMS /
198
- document-loader dependency graph.
191
+ Every other subpath (`identity`, `request`, `webvh`, `keys`, `clients`,
192
+ `descriptors`, `keyring`, `enrollment`, `recovery`) is import-directly-only, so
193
+ consumers of the root never pull the signing / KMS / document-loader dependency
194
+ graph.
199
195
 
200
196
  ## Contribute
201
197
 
@@ -15,7 +15,7 @@
15
15
  * 2. The ladder-anchored did:webvh genesis
16
16
  * (`ensureLadderAnchoredDidWebvh`): the entry signed by ladder rung 0, `updateKeys` = [rung 0], `nextKeyHashes`
17
17
  * = [hash(rung 0), hash(rung 1)], the ladder VM and the credential's
18
- * `keyAgreement` posture folded in, `portable` unchanged. There is no KMS
18
+ * `keyAgreement` inventory folded in, `portable` unchanged. There is no KMS
19
19
  * stage: the keystore is DEFERRED to the first durable enrollment (a
20
20
  * ladder-anchored account has no consumer for the convenience VM, and a
21
21
  * keystore under an evaporating identity would orphan).
@@ -24,12 +24,21 @@
24
24
  * -- with the entry proof signed by the ladder VM (the ceremony-tail
25
25
  * license's first-entry shape). The account is credential-recoverable
26
26
  * from the moment this lands.
27
- * 4. Epoch[0] on every encrypted roster collection -- gated on the roster
28
- * stage landing, unlike the durable flow: the user key here exists only
29
- * in this tab's memory, so installing collection epochs under a key the
30
- * roster does not deliver would strand the collections on a key that
31
- * dies with the tab. With the gate, the tear heal is always clean: no
32
- * roster means no epochs, and a fresh user key re-runs both.
27
+ * 4. Epoch[0] on every encrypted roster collection -- gated twice, unlike
28
+ * the durable flow. The roster stage must have landed, AND the roster's
29
+ * current epoch must BE the `userKey` this run was handed: the user key
30
+ * here exists only in this tab's memory, so installing collection epochs
31
+ * under a key the roster does not deliver would strand the collections
32
+ * on a key that dies with the tab. The second gate is what a re-run over
33
+ * an earlier run's roster hits: `read()` adopts a roster keyed to that
34
+ * run's user key, and this run's candidate key is a throwaway nobody
35
+ * holds -- installing epoch[0] under it on a collection the earlier run
36
+ * never reached would key that collection to nothing, permanently, since
37
+ * the install is create-if-absent and every later ensure adopts it. So
38
+ * the stage is skipped whole and reported on `epochsSkipped`; the caller
39
+ * that recovers the roster's real key is the one installer. With both
40
+ * gates the tear heal is always clean: no roster means no epochs, and a
41
+ * fresh user key re-runs both.
33
42
  * 5. Space-controller promotion, last -- every earlier stage ran under the
34
43
  * bootstrap did:key the Space's stored controller authorizes.
35
44
  *
@@ -43,7 +52,7 @@ import type { EncryptionDescriptorStore } from '@interop/was-client/edv';
43
52
  import type { WebvhIdStore } from '../webvh/didWebvh.js';
44
53
  import type { UnlockKeyAgreementPublication } from '../unlock/standingWebvh.js';
45
54
  import { type UserKey } from '../keys/index.js';
46
- import type { ResourceLogPinStore } from '../resourceLog/index.js';
55
+ import type { ResourceLogPinStore } from '@interop/vh-resource-log';
47
56
  import { type AccountGenesisResult } from '../genesis/accountGenesis.js';
48
57
  /**
49
58
  * The key set a credential-anchored signup mints locally before anything
@@ -1 +1 @@
1
- {"version":3,"file":"credentialAnchoredGenesis.d.ts","sourceRoot":"","sources":["../../src/clientAnnex/credentialAnchoredGenesis.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAAK,EAAwB,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC1E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAA;AAIxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAExD,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAA;AAC/E,OAAO,EAGL,KAAK,OAAO,EAEb,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAClE,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,8BAA8B,CAAA;AAErC;;;;;;;;GAQG;AACH,wBAAsB,mCAAmC,IAAI,OAAO,CAAC;IACnE,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;CAC3B,CAAC,CAED;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAsB,sCAAsC,CAAC,EAC3D,GAAG,EACH,YAAY,EACZ,OAAO,EACP,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,OAAO,EACP,OAAO,EACP,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,cAAc,EACd,iBAAwB,EACzB,EAAE;IACD,GAAG,EAAE,SAAS,CAAA;IACd,YAAY,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,UAAU,CAAA;IACtB,YAAY,EAAE,6BAA6B,CAAA;IAC3C,iBAAiB,EAAE,kBAAkB,CAAA;IACrC,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,YAAY,CAAA;IACrB,cAAc,EAAE,CAAC,OAAO,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,KAAK,yBAAyB,CAAA;IACvE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,kBAAkB,CAAC,EAAE,mBAAmB,CAAA;IACxC,cAAc,CAAC,EAAE,CAAC,SAAS,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC9D,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAC5B,GAAG,OAAO,CAAC,oBAAoB,CAAC,CA+EhC"}
1
+ {"version":3,"file":"credentialAnchoredGenesis.d.ts","sourceRoot":"","sources":["../../src/clientAnnex/credentialAnchoredGenesis.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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ACvE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,kBAAkB,CAAC,EAAE,mBAAmB,CAAA;IACxC,cAAc,CAAC,EAAE,CAAC,SAAS,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC9D,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAC5B,GAAG,OAAO,CAAC,oBAAoB,CAAC,CA0FhC"}
@@ -15,7 +15,7 @@
15
15
  * 2. The ladder-anchored did:webvh genesis
16
16
  * (`ensureLadderAnchoredDidWebvh`): the entry signed by ladder rung 0, `updateKeys` = [rung 0], `nextKeyHashes`
17
17
  * = [hash(rung 0), hash(rung 1)], the ladder VM and the credential's
18
- * `keyAgreement` posture folded in, `portable` unchanged. There is no KMS
18
+ * `keyAgreement` inventory folded in, `portable` unchanged. There is no KMS
19
19
  * stage: the keystore is DEFERRED to the first durable enrollment (a
20
20
  * ladder-anchored account has no consumer for the convenience VM, and a
21
21
  * keystore under an evaporating identity would orphan).
@@ -24,12 +24,21 @@
24
24
  * -- with the entry proof signed by the ladder VM (the ceremony-tail
25
25
  * license's first-entry shape). The account is credential-recoverable
26
26
  * from the moment this lands.
27
- * 4. Epoch[0] on every encrypted roster collection -- gated on the roster
28
- * stage landing, unlike the durable flow: the user key here exists only
29
- * in this tab's memory, so installing collection epochs under a key the
30
- * roster does not deliver would strand the collections on a key that
31
- * dies with the tab. With the gate, the tear heal is always clean: no
32
- * roster means no epochs, and a fresh user key re-runs both.
27
+ * 4. Epoch[0] on every encrypted roster collection -- gated twice, unlike
28
+ * the durable flow. The roster stage must have landed, AND the roster's
29
+ * current epoch must BE the `userKey` this run was handed: the user key
30
+ * here exists only in this tab's memory, so installing collection epochs
31
+ * under a key the roster does not deliver would strand the collections
32
+ * on a key that dies with the tab. The second gate is what a re-run over
33
+ * an earlier run's roster hits: `read()` adopts a roster keyed to that
34
+ * run's user key, and this run's candidate key is a throwaway nobody
35
+ * holds -- installing epoch[0] under it on a collection the earlier run
36
+ * never reached would key that collection to nothing, permanently, since
37
+ * the install is create-if-absent and every later ensure adopts it. So
38
+ * the stage is skipped whole and reported on `epochsSkipped`; the caller
39
+ * that recovers the roster's real key is the one installer. With both
40
+ * gates the tear heal is always clean: no roster means no epochs, and a
41
+ * fresh user key re-runs both.
33
42
  * 5. Space-controller promotion, last -- every earlier stage ran under the
34
43
  * bootstrap did:key the Space's stored controller authorizes.
35
44
  *
@@ -137,14 +146,25 @@ export async function ensureCredentialAnchoredAccountGenesis({ was, wasServerUrl
137
146
  failed.push({ stage: 'roster', error: err });
138
147
  }
139
148
  // 4. Epoch[0] on every encrypted roster collection, only behind a landed
140
- // roster (see the module doc: the user key is memory-only here).
149
+ // roster whose current epoch IS this run's user key (see the module doc:
150
+ // the user key is memory-only here, and an adopted roster keyed to another
151
+ // run's key would have the collections installed under a throwaway).
141
152
  let epochs;
153
+ let epochsSkipped;
142
154
  if (rosterDescriptor) {
143
- try {
144
- epochs = await ensureWalletSpaceEpochs({ was, spaceId, userKey });
155
+ if (rosterDescriptor.currentEpoch === userKey.id) {
156
+ try {
157
+ epochs = await ensureWalletSpaceEpochs({ was, spaceId, userKey });
158
+ }
159
+ catch (err) {
160
+ failed.push({ stage: 'epochs', error: err });
161
+ }
145
162
  }
146
- catch (err) {
147
- failed.push({ stage: 'epochs', error: err });
163
+ else {
164
+ epochsSkipped =
165
+ rosterDescriptor.currentEpoch !== undefined
166
+ ? { rosterEpochId: rosterDescriptor.currentEpoch }
167
+ : {};
148
168
  }
149
169
  }
150
170
  // 5. The controller promotion, last. The bootstrap client IS the bare
@@ -167,6 +187,7 @@ export async function ensureCredentialAnchoredAccountGenesis({ was, wasServerUrl
167
187
  did,
168
188
  ...(rosterDescriptor ? { rosterDescriptor } : {}),
169
189
  ...(epochs ? { epochs } : {}),
190
+ ...(epochsSkipped ? { epochsSkipped } : {}),
170
191
  ...(promotion ? { promotion } : {}),
171
192
  failed
172
193
  };
@@ -1 +1 @@
1
- {"version":3,"file":"credentialAnchoredGenesis.js","sourceRoot":"","sources":["../../src/clientAnnex/credentialAnchoredGenesis.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,OAAO,EACL,cAAc,EAEf,MAAM,yBAAyB,CAAA;AAIhC,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAEzC,OAAO,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAA;AAElE,OAAO,EACL,uBAAuB,EACvB,WAAW,EAGZ,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EACL,wBAAwB,EACxB,6BAA6B,EAC7B,WAAW,EAEZ,MAAM,8BAA8B,CAAA;AAErC;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,mCAAmC;IAIvD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,MAAM,WAAW,EAAE,EAAE,CAAA;AACjE,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,CAAC,KAAK,UAAU,sCAAsC,CAAC,EAC3D,GAAG,EACH,YAAY,EACZ,OAAO,EACP,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,OAAO,EACP,OAAO,EACP,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,cAAc,EACd,iBAAiB,GAAG,IAAI,EAezB;IACC,MAAM,MAAM,GAAmC,EAAE,CAAA;IACjD,MAAM,SAAS,GAAG,MAAM,aAAa,CAAC,EAAE,UAAU,EAAE,CAAC,CAAA;IAErD,qEAAqE;IACrE,yEAAyE;IACzE,wDAAwD;IACxD,IAAI,CAAC;QACH,MAAM,oBAAoB,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,aAAa,EAAE,SAAS,CAAC,EAAE,EAAE,CAAC,CAAA;IAC3E,CAA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;IACjE,IAAI,MAA2C,CAAA;IAC/C,IAAI,gBAAgB,EAAE,CAAC;QACrB,IAAI,CAAC;YACH,MAAM,GAAG,MAAM,uBAAuB,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAA;QACnE,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAA;QAC9C,CAAC;IACH,CAAC;IAED,sEAAsE;IACtE,oDAAoD;IACpD,IAAI,SAA4C,CAAA;IAChD,IAAI,iBAAiB,EAAE,CAAC;QACtB,IAAI,CAAC;YACH,SAAS,GAAG,MAAM,6BAA6B,CAAC;gBAC9C,GAAG;gBACH,WAAW,EAAE,GAAG;gBAChB,OAAO;gBACP,GAAG;aACJ,CAAC,CAAA;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAA;QACjD,CAAC;IACH,CAAC;IAED,OAAO;QACL,GAAG;QACH,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACjD,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7B,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACnC,MAAM;KACP,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"credentialAnchoredGenesis.js","sourceRoot":"","sources":["../../src/clientAnnex/credentialAnchoredGenesis.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,OAAO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C;QACnC,MAAM;KACP,CAAA;AACH,CAAC"}
@@ -16,7 +16,7 @@
16
16
  * so it can sign no roster append (the entry-proof rule), and its WAS
17
17
  * invocations stop verifying (the current-key-set rule), so the collection
18
18
  * fan-out cannot run either -- while a ladder-signed append is licensed only
19
- * at a posture-changing document version, which a not-last-client removal is
19
+ * at a inventory-changing document version, which a not-last-client removal is
20
20
  * not. So:
21
21
  *
22
22
  * 1. **The roster rotation**, PRE-edit, signed by the still-enrolled
@@ -31,7 +31,7 @@
31
31
  * residue could open.
32
32
  * 3. **The removal entry** ({@link forgetWebvhClient}): one atomic
33
33
  * ladder-signed entry through the bridge takes the client's whole document
34
- * footprint out. The app's local wipe runs after this ceremony returns, so
34
+ * inventory out. The app's local wipe runs after this ceremony returns, so
35
35
  * a tear anywhere before the entry reads as "not forgotten" and a re-click
36
36
  * resumes.
37
37
  *
@@ -60,6 +60,7 @@
60
60
  import type { IKeyAgreementKey } from '@interop/data-integrity-core';
61
61
  import type { CollectionEncryption } from '@interop/was-client';
62
62
  import type { EncryptionDescriptorStore } from '@interop/was-client/edv';
63
+ import type { ResourceLogPinStore } from '@interop/vh-resource-log';
63
64
  import type { RevokedClientKeys } from '../webvh/revokeClient.js';
64
65
  import { type CascadeCollections, type UserKey, type UserKeyCascadeResult } from '../keys/index.js';
65
66
  import type { UnlockLogStore } from '../unlock/standingWebvh.js';
@@ -88,9 +89,18 @@ export interface DurableClientForgetResult {
88
89
  * @param options {object}
89
90
  * @param options.logStore {UnlockLogStore} the credential's delegated
90
91
  * `did.jsonl` bridge store; also serves the ceremony's public pre-edit
91
- * read. The caller is expected to have verified the account log under its
92
- * own chain-head pins in the same session (the ceremony re-reads through
93
- * the seam and checks `expectedDid`, but carries no pin store itself)
92
+ * read
93
+ * @param [options.pinStore] {ResourceLogPinStore} this client's chain-head
94
+ * pins. Every read the ceremony makes -- the pre-edit read the roster
95
+ * rotation's recipient document comes from, and the removal entry's own
96
+ * read inside its conflict-retry loop -- is checked against the pinned
97
+ * head, so a served truncated prefix is refused (`ResourceLogContinuityError`,
98
+ * `rollback`) before any roster append or log publish, and the pin
99
+ * advances to the head the removal entry publishes. Without it the
100
+ * ceremony checks `expectedDid` only
101
+ * @param [options.logId] {string} the account log's pin slot
102
+ * (`accountLogPinId({ spaceId })`); required whenever a `pinStore` is
103
+ * supplied
94
104
  * @param options.ladderSeed {Uint8Array} the credential's ladder seed
95
105
  * @param options.forgottenClient {RevokedClientKeys} this client's public
96
106
  * halves; an `updateKeyMultibase` the log does not authorize (stale, or the
@@ -117,8 +127,10 @@ export interface DurableClientForgetResult {
117
127
  * @param options.collections {CascadeCollections} the fan-out's work
118
128
  * @returns {Promise<DurableClientForgetResult>}
119
129
  */
120
- export declare function forgetDurableClient({ logStore, ladderSeed, forgottenClient, forgottenKeyAgreementKeyMultibase, knownLatentHashes, expectedDid, rosterStore, credentialKeyAgreementKey, userKey, pinnedEpochId, onUserKeyAdopted, collections }: {
130
+ export declare function forgetDurableClient({ logStore, pinStore, logId, ladderSeed, forgottenClient, forgottenKeyAgreementKeyMultibase, knownLatentHashes, expectedDid, rosterStore, credentialKeyAgreementKey, userKey, pinnedEpochId, onUserKeyAdopted, collections }: {
121
131
  logStore: UnlockLogStore;
132
+ pinStore?: ResourceLogPinStore;
133
+ logId?: string;
122
134
  ladderSeed: Uint8Array;
123
135
  forgottenClient: RevokedClientKeys;
124
136
  forgottenKeyAgreementKeyMultibase: string;
@@ -1 +1 @@
1
- {"version":3,"file":"forget.d.ts","sourceRoot":"","sources":["../../src/clientAnnex/forget.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AACpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAC/D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBA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B,WAAW,EACZ,EAAE;IACD,QAAQ,EAAE,cAAc,CAAA;IACxB,QAAQ,CAAC,EAAE,mBAAmB,CAAA;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,UAAU,CAAA;IACtB,eAAe,EAAE,iBAAiB,CAAA;IAClC,iCAAiC,EAAE,MAAM,CAAA;IACzC,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC5B,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,yBAAyB,CAAA;IACtC,yBAAyB,EAAE,gBAAgB,CAAA;IAC3C,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE;QAC3B,OAAO,EAAE,OAAO,CAAA;QAChB,aAAa,EAAE,MAAM,CAAA;QACrB,UAAU,EAAE,oBAAoB,CAAA;KACjC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACnB,WAAW,EAAE,kBAAkB,CAAA;CAChC,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAwGrC"}
@@ -10,9 +10,18 @@ import { forgetWebvhClient, LastDurableClientForgetError } from './ladderAnchore
10
10
  * @param options {object}
11
11
  * @param options.logStore {UnlockLogStore} the credential's delegated
12
12
  * `did.jsonl` bridge store; also serves the ceremony's public pre-edit
13
- * read. The caller is expected to have verified the account log under its
14
- * own chain-head pins in the same session (the ceremony re-reads through
15
- * the seam and checks `expectedDid`, but carries no pin store itself)
13
+ * read
14
+ * @param [options.pinStore] {ResourceLogPinStore} this client's chain-head
15
+ * pins. Every read the ceremony makes -- the pre-edit read the roster
16
+ * rotation's recipient document comes from, and the removal entry's own
17
+ * read inside its conflict-retry loop -- is checked against the pinned
18
+ * head, so a served truncated prefix is refused (`ResourceLogContinuityError`,
19
+ * `rollback`) before any roster append or log publish, and the pin
20
+ * advances to the head the removal entry publishes. Without it the
21
+ * ceremony checks `expectedDid` only
22
+ * @param [options.logId] {string} the account log's pin slot
23
+ * (`accountLogPinId({ spaceId })`); required whenever a `pinStore` is
24
+ * supplied
16
25
  * @param options.ladderSeed {Uint8Array} the credential's ladder seed
17
26
  * @param options.forgottenClient {RevokedClientKeys} this client's public
18
27
  * halves; an `updateKeyMultibase` the log does not authorize (stale, or the
@@ -39,7 +48,7 @@ import { forgetWebvhClient, LastDurableClientForgetError } from './ladderAnchore
39
48
  * @param options.collections {CascadeCollections} the fan-out's work
40
49
  * @returns {Promise<DurableClientForgetResult>}
41
50
  */
42
- export async function forgetDurableClient({ logStore, ladderSeed, forgottenClient, forgottenKeyAgreementKeyMultibase, knownLatentHashes, expectedDid, rosterStore, credentialKeyAgreementKey, userKey, pinnedEpochId, onUserKeyAdopted, collections }) {
51
+ export async function forgetDurableClient({ logStore, pinStore, logId, ladderSeed, forgottenClient, forgottenKeyAgreementKeyMultibase, knownLatentHashes, expectedDid, rosterStore, credentialKeyAgreementKey, userKey, pinnedEpochId, onUserKeyAdopted, collections }) {
43
52
  // The pre-edit read, doing double duty: the last-client refusal must fire
44
53
  // BEFORE the rotation (or a refused forget would already have retired this
45
54
  // client's wrap), and the rotation's recipient resolver needs the pre-edit
@@ -48,7 +57,9 @@ export async function forgetDurableClient({ logStore, ladderSeed, forgottenClien
48
57
  // readPublishedLog only calls getIdResourceRaw, so the narrow seam is
49
58
  // safe.
50
59
  idStore: logStore,
51
- expectedDid
60
+ expectedDid,
61
+ ...(pinStore ? { pinStore } : {}),
62
+ ...(logId !== undefined ? { logId } : {})
52
63
  });
53
64
  if (!published) {
54
65
  throw new Error('did:webvh: did.jsonl is missing; nothing to forget from.');
@@ -118,7 +129,9 @@ export async function forgetDurableClient({ logStore, ladderSeed, forgottenClien
118
129
  ladderSeed,
119
130
  forgottenClient,
120
131
  ...(knownLatentHashes ? { knownLatentHashes } : {}),
121
- expectedDid
132
+ expectedDid,
133
+ ...(pinStore ? { pinStore } : {}),
134
+ ...(logId !== undefined ? { logId } : {})
122
135
  });
123
136
  return {
124
137
  rotated,
@@ -1 +1 @@
1
- {"version":3,"file":"forget.js","sourceRoot":"","sources":["../../src/clientAnnex/forget.ts"],"names":[],"mappings":"AA8DA,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAGpE,OAAO,EACL,2BAA2B,EAC3B,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EAIpB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,iBAAiB,EACjB,4BAA4B,EAC7B,MAAM,qBAAqB,CAAA;AAoB5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,EACxC,QAAQ,EACR,UAAU,EACV,eAAe,EACf,iCAAiC,EACjC,iBAAiB,EACjB,WAAW,EACX,WAAW,EACX,yBAAyB,EACzB,OAAO,EACP,aAAa,EACb,gBAAgB,EAChB,WAAW,EAkBZ;IACC,0EAA0E;IAC1E,2EAA2E;IAC3E,2EAA2E;IAC3E,qDAAqD;IACrD,MAAM,SAAS,GAAG,MAAM,gBAAgB,CAAC;QACvC,sEAAsE;QACtE,QAAQ;QACR,OAAO,EAAE,QAAwB;QACjC,WAAW;KACZ,CAAC,CAAA;IACF,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAA;IAC7E,CAAC;IACD,MAAM,WAAW,GAAG,GAAG,SAAS,CAAC,GAAG,IAAI,eAAe,CAAC,mBAAmB,EAAE,CAAA;IAC7E,MAAM,aAAa,GAAG,WAAW,CAAC,SAAS,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAA;IACrE,IACE,aAAa,CAAC,QAAQ,CAAC,WAAW,CAAC;QACnC,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,WAAW,CAAC,EAC7C,CAAC;QACD,MAAM,IAAI,4BAA4B,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Q;QACf,UAAU;QACV,eAAe;QACf,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACnD,WAAW;QACX,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACjC,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC1C,CAAC,CAAA;IAEF,OAAO;QACL,OAAO;QACP,WAAW,EAAE,OAAO;QACpB,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,QAAQ,EAAE,OAAO,CAAC,GAAG;QACrB,GAAG,CAAC,IAAI;YACN,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,gBAAgB,EAAE,IAAI,CAAC,UAAU,EAAE;YAC9D,CAAC,CAAC,EAAE,CAAC;KACR,CAAA;AACH,CAAC"}
@@ -14,9 +14,9 @@
14
14
  * POST at all). So:
15
15
  *
16
16
  * 1. **The install entry** ({@link installLadderVmWebvh}): the ladder VM
17
- * joins the document while the client's whole footprint stays -- the
17
+ * joins the document while the client's whole inventory stays -- the
18
18
  * both-present transitional state. This is the ceremony's
19
- * posture-changing document version under the ceremony-tail license.
19
+ * inventory-changing document version under the ceremony-tail license.
20
20
  * 2. **The roster rotation**, ladder-signed, anchored at the install entry,
21
21
  * HTTP-invoked under the still-standing client: the user key rotates off
22
22
  * this client's wrap in ONE append (the license's one-shot shape), read
@@ -50,14 +50,25 @@
50
50
  * HTTP side still invokes under the still-standing client (the
51
51
  * management zcaps are granted to the account DID, which only an enrolled
52
52
  * client can invoke) -- which is why the stage must run before the
53
- * removal entry. Best-effort per entry, every entry's fate reported.
54
- * 6. **The record re-bind seam** (`onBeforeRemoval`): the caller re-signs
55
- * the LOGIN credential's bridge and `delegatedClients` sibling with the
56
- * ladder VM and re-seals its unlock record with the credential in hand
57
- * (a full re-wrap, proof verified rather than settled) -- the one record
58
- * stage 5 need not reach.
53
+ * removal entry. The pass walks every entry and reports each one's fate,
54
+ * but the ceremony does not carry a failure past this point: a `failed`
55
+ * entry refuses the removal entry ({@link RecordRemintFailedError},
56
+ * naming the records the pass could not reach), since after the removal
57
+ * nothing could ever re-sign that record's bridge. The client stays
58
+ * enrolled, and a re-run reaches the entry again.
59
+ * 6. **The record re-bind seam** (`onBeforeRemoval`, required): the caller
60
+ * re-signs the LOGIN credential's bridge and `delegatedClients` sibling
61
+ * with the ladder VM and re-seals its unlock record with the credential
62
+ * in hand (a full re-wrap, proof verified rather than settled). Stage 5
63
+ * deliberately skips that credential (its record is re-sealed with the
64
+ * credential in hand rather than through a management zcap), so the
65
+ * seam is the only thing that ever re-signs the login credential's own
66
+ * bridge with the ladder VM. Without it the removal entry would leave
67
+ * every bridge signed by the struck key on an account with no durable
68
+ * client -- an account nothing can write to -- which is why a call that
69
+ * omits the seam is refused before any read.
59
70
  * 7. **The removal entry** ({@link forgetLastWebvhClient}): the client's
60
- * whole document footprint out while the installed ladder VM keeps the
71
+ * whole document inventory out while the installed ladder VM keeps the
61
72
  * account anchored. The app's local wipe runs after this ceremony
62
73
  * returns.
63
74
  *
@@ -70,8 +81,9 @@
70
81
  * and the forced replacement re-mints (the prior run's fresh delegation is
71
82
  * then revoked as history, so a re-run churns one delegation and strands
72
83
  * nothing), and the record re-mint re-checks staleness per entry (a record
73
- * already ladder-signed reads as current). Torn after the removal entry is
74
- * the finish-the-wipe state the app's next login maps.
84
+ * already ladder-signed reads as current, one whose re-mint failed is still
85
+ * rotted and is re-minted). Torn after the removal entry is the
86
+ * finish-the-wipe state the app's next login maps.
75
87
  *
76
88
  * The honest limitation is the cascade's, as everywhere: ciphertext this
77
89
  * browser already fetched stays forensically recoverable from its storage,
@@ -83,7 +95,7 @@ import type { ZcapClient } from '@interop/ezcap';
83
95
  import type { CollectionEncryption, IDelegatedZcap } from '@interop/was-client';
84
96
  import type { EncryptionDescriptorStore } from '@interop/was-client/edv';
85
97
  import { type RevokedClientKeys } from '../webvh/revokeClient.js';
86
- import type { ResourceLogPinStore } from '../resourceLog/index.js';
98
+ import type { ResourceLogPinStore } from '@interop/vh-resource-log';
87
99
  import { type CascadeCollections, type UserKey, type UserKeyCascadeResult } from '../keys/index.js';
88
100
  import type { UnlockLogStore } from '../unlock/standingWebvh.js';
89
101
  import type { AccountPointer } from '../keyring/record.js';
@@ -132,10 +144,10 @@ export interface UnlockMethodsRemintReach<Entry extends RecoveryDelegationEntry
132
144
  * forgotten client was retired on this run, the per-collection fan-out
133
145
  * result, the generation stage's report, the other unlock methods' record
134
146
  * re-mint report (present when the caller supplied the reach: the counts and
135
- * every entry's fate, so a record the pass could not reach is named rather
136
- * than silently left with a rotted bridge), the document as the removal entry
137
- * left it, and -- when the account has a roster -- the rotated key with the
138
- * roster descriptor it was read from.
147
+ * every entry's fate; a completed ceremony never carries a `failed` outcome,
148
+ * since that refuses the removal entry instead), the document as the removal
149
+ * entry left it, and -- when the account has a roster -- the rotated key with
150
+ * the roster descriptor it was read from.
139
151
  */
140
152
  export interface LastDurableClientForgetResult {
141
153
  installed: boolean;
@@ -152,6 +164,22 @@ export interface LastDurableClientForgetResult {
152
164
  userKey?: UserKey;
153
165
  rosterDescriptor?: CollectionEncryption;
154
166
  }
167
+ /**
168
+ * The record re-mint stage could not reach every other unlock method's
169
+ * record, so the removal entry was refused: `failed` names the entries whose
170
+ * re-mint threw (each carrying its cause), and `unlockMethods` is the whole
171
+ * stage report. The forgotten client is still enrolled and every stage
172
+ * before this one has landed, so a re-run resumes at the re-mint. Matched
173
+ * on `name` (the errors cross app-injected seams that may resolve to another
174
+ * copy of this package).
175
+ */
176
+ export declare class RecordRemintFailedError extends Error {
177
+ readonly failed: RecordRemintOutcome[];
178
+ readonly unlockMethods: NonNullable<LastDurableClientForgetResult['unlockMethods']>;
179
+ constructor({ unlockMethods }: {
180
+ unlockMethods: NonNullable<LastDurableClientForgetResult['unlockMethods']>;
181
+ });
182
+ }
155
183
  /**
156
184
  * Forgets the account's LAST enrolled durable client -- this browser's own
157
185
  * -- transitioning the account to the client-less, ladder-anchored state.
@@ -163,11 +191,15 @@ export interface LastDurableClientForgetResult {
163
191
  *
164
192
  * @param options {object}
165
193
  * @param options.logStore {UnlockLogStore} the credential's delegated
166
- * `did.jsonl` bridge store; also serves the ceremony's public reads. The
167
- * caller is expected to have verified the account log under its own
168
- * chain-head pins in the same session (the ceremony re-reads through the
169
- * seam and checks `expectedDid`, but carries no account-log pin store
170
- * itself)
194
+ * `did.jsonl` bridge store; also serves the ceremony's public reads
195
+ * @param [options.pinStore] {ResourceLogPinStore} this client's chain-head
196
+ * pins, the account log's slot derived from `annex.accountSpaceId`. Every
197
+ * account-log read the ceremony makes -- the pre-install read, and the
198
+ * install and removal entries' own reads inside their conflict-retry
199
+ * loops -- is checked against the pinned head, so a served truncated
200
+ * prefix is refused (`ResourceLogContinuityError`, `rollback`) before any
201
+ * roster append or log publish, and each entry advances the pin to the
202
+ * head it publishes. Without it the ceremony checks `expectedDid` only
171
203
  * @param options.ladderSeed {Uint8Array} the login credential's ladder seed
172
204
  * @param options.forgottenClient {RevokedClientKeys} this client's public
173
205
  * halves; an `updateKeyMultibase` the log does not authorize (stale, or the
@@ -182,7 +214,7 @@ export interface LastDurableClientForgetResult {
182
214
  * @param options.rosterStoreFor {Function} `({ did, log }) => store` --
183
215
  * builds the `key-map/user-key.jsonl` roster store whose appends are
184
216
  * SIGNED BY THE LADDER VM and whose controller view resolves from the
185
- * supplied post-install log (the posture-changing anchor the ceremony-tail
217
+ * supplied post-install log (the inventory-changing anchor the ceremony-tail
186
218
  * license admits), while its HTTP requests invoke under the still-standing
187
219
  * client
188
220
  * @param options.credentialKeyAgreementKey {IKeyAgreementKey} the standing
@@ -215,19 +247,24 @@ export interface LastDurableClientForgetResult {
215
247
  * whose bridge (and sibling) the ladder VM re-signs and whose records it
216
248
  * re-seals through their management zcaps, invoked as the still-standing
217
249
  * client. Omitted, the stage is skipped and the result carries no
218
- * `unlockMethods` report -- the residue decision 0004's amendment stated
219
- * @param [options.onBeforeRemoval] {Function}
250
+ * `unlockMethods` report -- the residue decision 0004's amendment stated.
251
+ * Supplied, an entry the pass could not re-mint refuses the removal entry
252
+ * (`RecordRemintFailedError`)
253
+ * @param options.onBeforeRemoval {Function}
220
254
  * `({ did, doc, log }) => Promise<void>` -- the record re-bind seam: runs
221
255
  * after the record re-mint stage, immediately before the removal entry,
222
256
  * with the post-install published state. The caller re-signs the login
223
257
  * credential's bridge and `delegatedClients` sibling with the ladder VM
224
- * and re-seals its unlock record here. Must be idempotent (a resumed run
225
- * invokes it again)
258
+ * and re-seals its unlock record here -- the only stage that reaches the
259
+ * login credential's record, which the `unlockMethods` pass skips. Must
260
+ * be idempotent (a resumed run invokes it again). Required: a call
261
+ * without it throws a `TypeError` before any read
226
262
  * @param [options.now] {number} epoch milliseconds, for tests
227
263
  * @returns {Promise<LastDurableClientForgetResult>}
228
264
  */
229
- export declare function forgetLastDurableClient({ logStore, ladderSeed, forgottenClient, forgottenKeyAgreementKeyMultibase, knownLatentHashes, expectedDid, rosterStoreFor, credentialKeyAgreementKey, userKey, pinnedEpochId, onUserKeyAdopted, collections, annex, unlockMethods, onBeforeRemoval, now }: {
265
+ export declare function forgetLastDurableClient({ logStore, pinStore, ladderSeed, forgottenClient, forgottenKeyAgreementKeyMultibase, knownLatentHashes, expectedDid, rosterStoreFor, credentialKeyAgreementKey, userKey, pinnedEpochId, onUserKeyAdopted, collections, annex, unlockMethods, onBeforeRemoval, now }: {
230
266
  logStore: UnlockLogStore;
267
+ pinStore?: ResourceLogPinStore;
231
268
  ladderSeed: Uint8Array;
232
269
  forgottenClient: RevokedClientKeys;
233
270
  forgottenKeyAgreementKeyMultibase: string;
@@ -257,7 +294,7 @@ export declare function forgetLastDurableClient({ logStore, ladderSeed, forgotte
257
294
  pinStore?: ResourceLogPinStore;
258
295
  };
259
296
  unlockMethods?: UnlockMethodsRemintReach;
260
- onBeforeRemoval?: (published: {
297
+ onBeforeRemoval: (published: {
261
298
  did: string;
262
299
  doc: object;
263
300
  log: DIDLog;
@@ -1 +1 @@
1
- {"version":3,"file":"forgetLast.d.ts","sourceRoot":"","sources":["../../src/clientAnnex/forgetLast.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2EG;AACH,OAAO,KAAK,EAAU,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA;AAC3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,KAAK,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAC/E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAA;AAGxE,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,0BAA0B,CAAA;AAEjC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAElE,OAAO,EAKL,KAAK,kBAAkB,EACvB,KAAK,OAAO,EACZ,KAAK,oBAAoB,EAC1B,MAAM,kBAAkB,CAAA;AAEzB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC7B,MAAM,mCAAmC,CAAA;AAO1C,OAAO,EASL,KAAK,qBAAqB,EAC3B,MAAM,UAAU,CAAA;AAEjB;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,8BAA8B;IAC7C,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,QAAQ,EAAE,OAAO,CAA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