@interop/wallet-core 0.51.0 → 0.53.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 (292) hide show
  1. package/README.md +7 -11
  2. package/dist/clientAnnex/credentialAnchoredGenesis.d.ts +2 -2
  3. package/dist/clientAnnex/credentialAnchoredGenesis.d.ts.map +1 -1
  4. package/dist/clientAnnex/credentialAnchoredGenesis.js +1 -1
  5. package/dist/clientAnnex/forget.d.ts +18 -6
  6. package/dist/clientAnnex/forget.d.ts.map +1 -1
  7. package/dist/clientAnnex/forget.js +19 -6
  8. package/dist/clientAnnex/forget.js.map +1 -1
  9. package/dist/clientAnnex/forgetLast.d.ts +51 -30
  10. package/dist/clientAnnex/forgetLast.d.ts.map +1 -1
  11. package/dist/clientAnnex/forgetLast.js +72 -26
  12. package/dist/clientAnnex/forgetLast.js.map +1 -1
  13. package/dist/clientAnnex/gc.d.ts +3 -3
  14. package/dist/clientAnnex/gc.d.ts.map +1 -1
  15. package/dist/clientAnnex/gc.js +2 -2
  16. package/dist/clientAnnex/gc.js.map +1 -1
  17. package/dist/clientAnnex/index.d.ts +6 -6
  18. package/dist/clientAnnex/index.d.ts.map +1 -1
  19. package/dist/clientAnnex/index.js +5 -5
  20. package/dist/clientAnnex/index.js.map +1 -1
  21. package/dist/clientAnnex/ladder.d.ts +19 -11
  22. package/dist/clientAnnex/ladder.d.ts.map +1 -1
  23. package/dist/clientAnnex/ladder.js +77 -14
  24. package/dist/clientAnnex/ladder.js.map +1 -1
  25. package/dist/clientAnnex/ladderAnchored.d.ts +146 -10
  26. package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -1
  27. package/dist/clientAnnex/ladderAnchored.js +230 -26
  28. package/dist/clientAnnex/ladderAnchored.js.map +1 -1
  29. package/dist/clientAnnex/log.d.ts +6 -6
  30. package/dist/clientAnnex/log.d.ts.map +1 -1
  31. package/dist/clientAnnex/log.js +8 -8
  32. package/dist/clientAnnex/log.js.map +1 -1
  33. package/dist/clientAnnex/recoveryLadderAnchored.d.ts +18 -7
  34. package/dist/clientAnnex/recoveryLadderAnchored.d.ts.map +1 -1
  35. package/dist/clientAnnex/recoveryLadderAnchored.js +54 -14
  36. package/dist/clientAnnex/recoveryLadderAnchored.js.map +1 -1
  37. package/dist/clientAnnex/selfEnroll.d.ts +67 -6
  38. package/dist/clientAnnex/selfEnroll.d.ts.map +1 -1
  39. package/dist/clientAnnex/selfEnroll.js +91 -15
  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/clients/rosterPolicy.js +10 -7
  49. package/dist/clients/rosterPolicy.js.map +1 -1
  50. package/dist/descriptors/acquire.js +1 -1
  51. package/dist/descriptors/logSource.d.ts +6 -4
  52. package/dist/descriptors/logSource.d.ts.map +1 -1
  53. package/dist/descriptors/logSource.js +7 -4
  54. package/dist/descriptors/logSource.js.map +1 -1
  55. package/dist/enrollment/enrollment.d.ts +1 -1
  56. package/dist/enrollment/enrollment.d.ts.map +1 -1
  57. package/dist/enrollment/enrollment.js +2 -1
  58. package/dist/enrollment/enrollment.js.map +1 -1
  59. package/dist/genesis/accountGenesis.d.ts +1 -1
  60. package/dist/genesis/accountGenesis.d.ts.map +1 -1
  61. package/dist/genesis/accountGenesis.js +1 -1
  62. package/dist/index.d.ts +8 -3
  63. package/dist/index.d.ts.map +1 -1
  64. package/dist/index.js +7 -3
  65. package/dist/index.js.map +1 -1
  66. package/dist/keyring/kdf.d.ts +6 -20
  67. package/dist/keyring/kdf.d.ts.map +1 -1
  68. package/dist/keyring/kdf.js +8 -5
  69. package/dist/keyring/kdf.js.map +1 -1
  70. package/dist/keyring/unlockSpace.js +1 -1
  71. package/dist/keys/clientKeyRecord.d.ts +68 -1
  72. package/dist/keys/clientKeyRecord.d.ts.map +1 -1
  73. package/dist/keys/clientKeyRecord.js +155 -20
  74. package/dist/keys/clientKeyRecord.js.map +1 -1
  75. package/dist/keys/index.d.ts +2 -2
  76. package/dist/keys/index.d.ts.map +1 -1
  77. package/dist/keys/index.js +1 -1
  78. package/dist/keys/index.js.map +1 -1
  79. package/dist/keys/rosterLogStore.d.ts +16 -14
  80. package/dist/keys/rosterLogStore.d.ts.map +1 -1
  81. package/dist/keys/rosterLogStore.js +164 -32
  82. package/dist/keys/rosterLogStore.js.map +1 -1
  83. package/dist/keys/rosterStore.d.ts +8 -7
  84. package/dist/keys/rosterStore.d.ts.map +1 -1
  85. package/dist/keys/rosterStore.js +6 -6
  86. package/dist/keys/rosterStore.js.map +1 -1
  87. package/dist/keys/spaceEpochs.d.ts +1 -1
  88. package/dist/keys/spaceEpochs.js +1 -1
  89. package/dist/keys/userKeyRoster.d.ts +3 -3
  90. package/dist/keys/userKeyRoster.d.ts.map +1 -1
  91. package/dist/keys/userKeyRoster.js +3 -3
  92. package/dist/keys/userKeyRoster.js.map +1 -1
  93. package/dist/log.d.ts +49 -0
  94. package/dist/log.d.ts.map +1 -0
  95. package/dist/log.js +53 -0
  96. package/dist/log.js.map +1 -0
  97. package/dist/recovery/index.d.ts +2 -2
  98. package/dist/recovery/index.js +2 -2
  99. package/dist/recovery/recoveryDelegation.d.ts +6 -2
  100. package/dist/recovery/recoveryDelegation.d.ts.map +1 -1
  101. package/dist/recovery/recoveryDelegation.js +32 -6
  102. package/dist/recovery/recoveryDelegation.js.map +1 -1
  103. package/dist/recovery/recoveryWebvh.d.ts +67 -8
  104. package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
  105. package/dist/recovery/recoveryWebvh.js +114 -19
  106. package/dist/recovery/recoveryWebvh.js.map +1 -1
  107. package/dist/request/appKey.d.ts +9 -3
  108. package/dist/request/appKey.d.ts.map +1 -1
  109. package/dist/request/appKey.js +13 -8
  110. package/dist/request/appKey.js.map +1 -1
  111. package/dist/request/capabilityRequest.d.ts +9 -1
  112. package/dist/request/capabilityRequest.d.ts.map +1 -1
  113. package/dist/request/capabilityRequest.js +13 -2
  114. package/dist/request/capabilityRequest.js.map +1 -1
  115. package/dist/request/classify.d.ts +37 -1
  116. package/dist/request/classify.d.ts.map +1 -1
  117. package/dist/request/classify.js +74 -3
  118. package/dist/request/classify.js.map +1 -1
  119. package/dist/request/ephemeralExchange.d.ts +5 -18
  120. package/dist/request/ephemeralExchange.d.ts.map +1 -1
  121. package/dist/request/ephemeralExchange.js +9 -3
  122. package/dist/request/ephemeralExchange.js.map +1 -1
  123. package/dist/request/exchangeClient.d.ts +0 -23
  124. package/dist/request/exchangeClient.d.ts.map +1 -1
  125. package/dist/request/exchangeClient.js +30 -1
  126. package/dist/request/exchangeClient.js.map +1 -1
  127. package/dist/request/index.d.ts +4 -1
  128. package/dist/request/index.d.ts.map +1 -1
  129. package/dist/request/index.js +4 -1
  130. package/dist/request/index.js.map +1 -1
  131. package/dist/request/interactionRequest.d.ts +23 -0
  132. package/dist/request/interactionRequest.d.ts.map +1 -0
  133. package/dist/request/interactionRequest.js +46 -0
  134. package/dist/request/interactionRequest.js.map +1 -0
  135. package/dist/request/interactionUrl.d.ts +3 -14
  136. package/dist/request/interactionUrl.d.ts.map +1 -1
  137. package/dist/request/interactionUrl.js +24 -3
  138. package/dist/request/interactionUrl.js.map +1 -1
  139. package/dist/request/parse.d.ts +0 -10
  140. package/dist/request/parse.d.ts.map +1 -1
  141. package/dist/request/parse.js +15 -1
  142. package/dist/request/parse.js.map +1 -1
  143. package/dist/request/processRequest.d.ts.map +1 -1
  144. package/dist/request/processRequest.js +2 -1
  145. package/dist/request/processRequest.js.map +1 -1
  146. package/dist/request/types.d.ts +23 -2
  147. package/dist/request/types.d.ts.map +1 -1
  148. package/dist/resourceLog/controller.d.ts +48 -49
  149. package/dist/resourceLog/controller.d.ts.map +1 -1
  150. package/dist/resourceLog/controller.js +41 -20
  151. package/dist/resourceLog/controller.js.map +1 -1
  152. package/dist/resourceLog/errors.d.ts +12 -78
  153. package/dist/resourceLog/errors.d.ts.map +1 -1
  154. package/dist/resourceLog/errors.js +12 -79
  155. package/dist/resourceLog/errors.js.map +1 -1
  156. package/dist/resourceLog/index.d.ts +17 -22
  157. package/dist/resourceLog/index.d.ts.map +1 -1
  158. package/dist/resourceLog/index.js +16 -21
  159. package/dist/resourceLog/index.js.map +1 -1
  160. package/dist/resourceLog/license.d.ts +42 -27
  161. package/dist/resourceLog/license.d.ts.map +1 -1
  162. package/dist/resourceLog/license.js +53 -30
  163. package/dist/resourceLog/license.js.map +1 -1
  164. package/dist/space/activity.d.ts +48 -1
  165. package/dist/space/activity.d.ts.map +1 -1
  166. package/dist/space/activity.js +52 -4
  167. package/dist/space/activity.js.map +1 -1
  168. package/dist/space/index.d.ts +1 -1
  169. package/dist/space/index.d.ts.map +1 -1
  170. package/dist/space/index.js +1 -1
  171. package/dist/space/index.js.map +1 -1
  172. package/dist/sync/pull.d.ts +0 -22
  173. package/dist/sync/pull.d.ts.map +1 -1
  174. package/dist/sync/pull.js +30 -2
  175. package/dist/sync/pull.js.map +1 -1
  176. package/dist/unlock/index.d.ts +7 -7
  177. package/dist/unlock/index.d.ts.map +1 -1
  178. package/dist/unlock/index.js +6 -6
  179. package/dist/unlock/index.js.map +1 -1
  180. package/dist/unlock/retire.d.ts +29 -28
  181. package/dist/unlock/retire.d.ts.map +1 -1
  182. package/dist/unlock/retire.js +25 -16
  183. package/dist/unlock/retire.js.map +1 -1
  184. package/dist/unlock/standingClient.d.ts +1 -1
  185. package/dist/unlock/standingClient.js +3 -3
  186. package/dist/unlock/standingWebvh.d.ts +28 -10
  187. package/dist/unlock/standingWebvh.d.ts.map +1 -1
  188. package/dist/unlock/standingWebvh.js +75 -37
  189. package/dist/unlock/standingWebvh.js.map +1 -1
  190. package/dist/unlock/unlockRecord.d.ts +37 -0
  191. package/dist/unlock/unlockRecord.d.ts.map +1 -1
  192. package/dist/unlock/unlockRecord.js +54 -1
  193. package/dist/unlock/unlockRecord.js.map +1 -1
  194. package/dist/webvh/delegatedLogStore.d.ts +2 -2
  195. package/dist/webvh/delegatedLogStore.js +2 -2
  196. package/dist/webvh/didWeb.js +1 -1
  197. package/dist/webvh/didWeb.js.map +1 -1
  198. package/dist/webvh/didWebvh.d.ts +33 -3
  199. package/dist/webvh/didWebvh.d.ts.map +1 -1
  200. package/dist/webvh/didWebvh.js +40 -11
  201. package/dist/webvh/didWebvh.js.map +1 -1
  202. package/dist/webvh/index.d.ts +1 -1
  203. package/dist/webvh/index.d.ts.map +1 -1
  204. package/dist/webvh/index.js +1 -1
  205. package/dist/webvh/index.js.map +1 -1
  206. package/dist/webvh/listClients.js +1 -1
  207. package/dist/webvh/listClients.js.map +1 -1
  208. package/dist/webvh/verifyLog.d.ts +1 -1
  209. package/dist/webvh/verifyLog.d.ts.map +1 -1
  210. package/dist/webvh/verifyLog.js +1 -2
  211. package/dist/webvh/verifyLog.js.map +1 -1
  212. package/package.json +9 -11
  213. package/dist/display/alignment.d.ts +0 -55
  214. package/dist/display/alignment.d.ts.map +0 -1
  215. package/dist/display/alignment.js +0 -117
  216. package/dist/display/alignment.js.map +0 -1
  217. package/dist/display/credentialName.d.ts +0 -42
  218. package/dist/display/credentialName.d.ts.map +0 -1
  219. package/dist/display/credentialName.js +0 -106
  220. package/dist/display/credentialName.js.map +0 -1
  221. package/dist/display/displayFields.d.ts +0 -59
  222. package/dist/display/displayFields.d.ts.map +0 -1
  223. package/dist/display/displayFields.js +0 -136
  224. package/dist/display/displayFields.js.map +0 -1
  225. package/dist/display/evidence.d.ts +0 -50
  226. package/dist/display/evidence.d.ts.map +0 -1
  227. package/dist/display/evidence.js +0 -67
  228. package/dist/display/evidence.js.map +0 -1
  229. package/dist/display/image.d.ts +0 -18
  230. package/dist/display/image.d.ts.map +0 -1
  231. package/dist/display/image.js +0 -23
  232. package/dist/display/image.js.map +0 -1
  233. package/dist/display/index.d.ts +0 -38
  234. package/dist/display/index.d.ts.map +0 -1
  235. package/dist/display/index.js +0 -32
  236. package/dist/display/index.js.map +0 -1
  237. package/dist/display/issuer.d.ts +0 -105
  238. package/dist/display/issuer.d.ts.map +0 -1
  239. package/dist/display/issuer.js +0 -126
  240. package/dist/display/issuer.js.map +0 -1
  241. package/dist/display/obv3.d.ts +0 -82
  242. package/dist/display/obv3.d.ts.map +0 -1
  243. package/dist/display/obv3.js +0 -117
  244. package/dist/display/obv3.js.map +0 -1
  245. package/dist/display/parse.d.ts +0 -66
  246. package/dist/display/parse.d.ts.map +0 -1
  247. package/dist/display/parse.js +0 -104
  248. package/dist/display/parse.js.map +0 -1
  249. package/dist/display/subject.d.ts +0 -79
  250. package/dist/display/subject.d.ts.map +0 -1
  251. package/dist/display/subject.js +0 -124
  252. package/dist/display/subject.js.map +0 -1
  253. package/dist/display/text.d.ts +0 -53
  254. package/dist/display/text.d.ts.map +0 -1
  255. package/dist/display/text.js +0 -78
  256. package/dist/display/text.js.map +0 -1
  257. package/dist/display/types.d.ts +0 -55
  258. package/dist/display/types.d.ts.map +0 -1
  259. package/dist/display/types.js +0 -41
  260. package/dist/display/types.js.map +0 -1
  261. package/dist/display/validity.d.ts +0 -51
  262. package/dist/display/validity.d.ts.map +0 -1
  263. package/dist/display/validity.js +0 -51
  264. package/dist/display/validity.js.map +0 -1
  265. package/dist/display/verificationView.d.ts +0 -115
  266. package/dist/display/verificationView.d.ts.map +0 -1
  267. package/dist/display/verificationView.js +0 -199
  268. package/dist/display/verificationView.js.map +0 -1
  269. package/dist/resourceLog/append.d.ts +0 -112
  270. package/dist/resourceLog/append.d.ts.map +0 -1
  271. package/dist/resourceLog/append.js +0 -197
  272. package/dist/resourceLog/append.js.map +0 -1
  273. package/dist/resourceLog/entry.d.ts +0 -68
  274. package/dist/resourceLog/entry.d.ts.map +0 -1
  275. package/dist/resourceLog/entry.js +0 -167
  276. package/dist/resourceLog/entry.js.map +0 -1
  277. package/dist/resourceLog/pin.d.ts +0 -82
  278. package/dist/resourceLog/pin.d.ts.map +0 -1
  279. package/dist/resourceLog/pin.js +0 -57
  280. package/dist/resourceLog/pin.js.map +0 -1
  281. package/dist/resourceLog/seal.d.ts +0 -97
  282. package/dist/resourceLog/seal.d.ts.map +0 -1
  283. package/dist/resourceLog/seal.js +0 -113
  284. package/dist/resourceLog/seal.js.map +0 -1
  285. package/dist/resourceLog/verify.d.ts +0 -96
  286. package/dist/resourceLog/verify.d.ts.map +0 -1
  287. package/dist/resourceLog/verify.js +0 -474
  288. package/dist/resourceLog/verify.js.map +0 -1
  289. package/dist/resourceLog/vmFragment.d.ts +0 -33
  290. package/dist/resourceLog/vmFragment.d.ts.map +0 -1
  291. package/dist/resourceLog/vmFragment.js +0 -39
  292. package/dist/resourceLog/vmFragment.js.map +0 -1
@@ -6,10 +6,10 @@
6
6
  * passphrase" and "remove this passkey", run synchronously in an enrolled
7
7
  * client, in dependency order. A standing credential is not a stored string to
8
8
  * overwrite -- it holds a wrap in the user key roster and a `keyAgreement`
9
- * posture in the account's did:webvh document -- so retiring one is a real
9
+ * inventory in the account's did:webvh document -- so retiring one is a real
10
10
  * rotation, on the same stages the client-revocation cascade runs.
11
11
  *
12
- * 1. **The document posture edit** (`removeUnlockKey`): the credential's
12
+ * 1. **The document inventory edit** (`removeUnlockKey`): the credential's
13
13
  * `keyAgreement` entry (verbatim key or commitment) and its committed
14
14
  * update-key hash leave the document in one log entry. That kills the
15
15
  * credential's latent self-enrollment authority -- with its rung
@@ -26,7 +26,7 @@
26
26
  * first means a run torn anywhere after it leaves the roster keying a
27
27
  * recipient the document no longer backs -- exactly the state the login-time
28
28
  * sweep detects and finishes. Torn the other way around, a rotation with the
29
- * posture still standing would simply re-escrow the credential and look
29
+ * inventory still standing would simply re-escrow the credential and look
30
30
  * healthy.
31
31
  *
32
32
  * There is deliberately no recovery-delegation re-mint stage here (the
@@ -36,7 +36,7 @@
36
36
  * credential's bridge chains through it.
37
37
  *
38
38
  * The client annex reach is its own stage (1b, the injected
39
- * `retireClientAnnexPosture` closure), between the document edit and the
39
+ * `retireClientAnnexInventory` closure), between the document edit and the
40
40
  * roster tail: a standing credential's annex rung-0 key and hash live in
41
41
  * the pointed generation's log, kept nowhere the account document edit can
42
42
  * reach, so without it a retired credential keeps annex-write authority
@@ -49,12 +49,13 @@
49
49
  * `delegatedClients` sibling: no server revocation is possible or needed --
50
50
  * the sibling delegation's record dies with the unlock Space the caller
51
51
  * deletes, and a swap (or the ordinary GC cadence) retires the generation it
52
- * targeted. Best-effort by contract: the closure catches its own failures
53
- * and reports them, so the roster rotation -- the ceremony's essential
54
- * remedy -- always runs.
52
+ * targeted. Best-effort by contract, enforced by the ceremony itself: a
53
+ * throw escaping the closure is caught here and reported as the `failed`
54
+ * skip, so the roster rotation -- the ceremony's essential remedy -- always
55
+ * runs.
55
56
  *
56
57
  * Convergence is the design: every stage detects its own completion from
57
- * durable state alone -- the posture edit no-ops when the document is already
58
+ * durable state alone -- the inventory edit no-ops when the document is already
58
59
  * settled, the rotation no-ops once every current-epoch recipient is
59
60
  * document-backed, and a collection is stale exactly when its current epoch
60
61
  * names a non-current user key generation -- so a naive full re-run finishes
@@ -76,7 +77,7 @@ import { type StandingUnlockKeys } from './standingWebvh.js';
76
77
  * this run (a re-run of an already-complete retirement reports `false`), the
77
78
  * roster's seal-backstop report (present when the roster store is sealable and
78
79
  * the roster stage ran), the per-collection fan-out result, the document as
79
- * the posture edit left it, and the rotated key with the roster descriptor it
80
+ * the inventory edit left it, and the rotated key with the roster descriptor it
80
81
  * was read from.
81
82
  */
82
83
  export interface UnlockCredentialRetirementResult {
@@ -86,40 +87,40 @@ export interface UnlockCredentialRetirementResult {
86
87
  document: object;
87
88
  userKey?: UserKey;
88
89
  rosterDescriptor?: CollectionEncryption;
89
- clientAnnex?: ClientAnnexPostureRetirement;
90
+ clientAnnex?: ClientAnnexInventoryRetirement;
90
91
  }
91
92
  /**
92
- * What the annex-posture stage reports: `struck` (a strike entry dropped
93
+ * What the annex-inventory stage reports: `struck` (a strike entry dropped
93
94
  * the retired rung's key and hash), `swapped` (a fresh generation replaced
94
- * the old one wholesale), `clean` (the pointed generation held no posture
95
+ * the old one wholesale), `clean` (the pointed generation held no inventory
95
96
  * for the retired credential), or `skipped` with the reason (`no-pointer`:
96
- * the account has no annex posture; `no-ladder-seed`: the ceremony holds
97
- * no seed that could strike or swap; `failed`: the closure's best-effort
98
- * catch).
97
+ * the account has no annex inventory; `no-ladder-seed`: the ceremony holds
98
+ * no seed that could strike or swap; `failed`: the closure reported a
99
+ * failure, or threw and the ceremony caught it).
99
100
  */
100
- export interface ClientAnnexPostureRetirement {
101
+ export interface ClientAnnexInventoryRetirement {
101
102
  action: 'struck' | 'swapped' | 'clean' | 'skipped';
102
103
  reason?: 'no-pointer' | 'no-ladder-seed' | 'failed';
103
104
  }
104
105
  /**
105
106
  * Retires one standing unlock credential from an account. See the module doc
106
- * for the order and the convergence story. Once the posture edit lands, a
107
+ * for the order and the convergence story. Once the inventory edit lands, a
107
108
  * thrown later stage leaves durable state a naive re-run -- or the login-time
108
109
  * sweep -- converges from.
109
110
  *
110
111
  * @param options {object}
111
112
  * @param options.idStore {WebvhIdStore} the account's `id` collection store
112
113
  * @param options.updateKeys {ClientWebvhUpdateKeys} the RETIRING (enrolled)
113
- * client's own did:webvh update-key seeds, which sign the posture edit
114
+ * client's own did:webvh update-key seeds, which sign the inventory edit
114
115
  * @param options.unlockKeys {StandingUnlockKeys} the retired credential's
115
- * public posture (its key-agreement publication and its recorded update
116
- * key, which the posture edit treats as a ladder anchor rather than truth
116
+ * public inventory (its key-agreement publication and its recorded update
117
+ * key, which the inventory edit treats as a ladder anchor rather than truth
117
118
  * -- see `removeUnlockKey`)
118
119
  * @param [options.ladderSeed] {Uint8Array} the retired credential's ladder
119
120
  * seed, when the ceremony holds the credential's secret; it strengthens the
120
121
  * ladder attribution but is not required
121
122
  * @param [options.expectedDid] {string} the account DID from the caller's
122
- * stored account pointer; supplied, the posture edit refuses a `did.jsonl`
123
+ * stored account pointer; supplied, the inventory edit refuses a `did.jsonl`
123
124
  * resolving to any other account
124
125
  * @param [options.verb] {string} what the caller is doing, for the
125
126
  * pending-rotation refusal message (e.g. `'changing your passphrase'`)
@@ -134,16 +135,16 @@ export interface ClientAnnexPostureRetirement {
134
135
  * called with `{ userKey, latestEpochId, descriptor }` after the roster read
135
136
  * and BEFORE the fan-out. The key and the epoch pin must persist atomically
136
137
  * @param options.collections {CascadeCollections} the fan-out's work
137
- * @param [options.retireClientAnnexPosture] {Function} `({ document }) =>
138
- * Promise<ClientAnnexPostureRetirement>` -- the annex reach (stage 1b in
139
- * the module doc), run against the post-edit document; expected to catch
140
- * its own failures and report them
138
+ * @param [options.retireClientAnnexInventory] {Function} `({ document }) =>
139
+ * Promise<ClientAnnexInventoryRetirement>` -- the annex reach (stage 1b in
140
+ * the module doc), run against the post-edit document; a throw is caught
141
+ * and reported as `{ action: 'skipped', reason: 'failed' }`
141
142
  * @param [options.onRotationAdopted] {Function} `({ userKey }) =>
142
143
  * Promise<void>` -- the live-session adoption of a rotated key, run last so
143
144
  * the session keeps operating without a re-login
144
145
  * @returns {Promise<UnlockCredentialRetirementResult>}
145
146
  */
146
- export declare function retireUnlockCredential({ idStore, updateKeys, unlockKeys, ladderSeed, expectedDid, verb, rosterStore, userKey, clientKeyAgreementKey, pinnedEpochId, onUserKeyAdopted, collections, retireClientAnnexPosture, onRotationAdopted }: {
147
+ export declare function retireUnlockCredential({ idStore, updateKeys, unlockKeys, ladderSeed, expectedDid, verb, rosterStore, userKey, clientKeyAgreementKey, pinnedEpochId, onUserKeyAdopted, collections, retireClientAnnexInventory, onRotationAdopted }: {
147
148
  idStore: WebvhIdStore;
148
149
  updateKeys: ClientWebvhUpdateKeys;
149
150
  unlockKeys: StandingUnlockKeys;
@@ -160,9 +161,9 @@ export declare function retireUnlockCredential({ idStore, updateKeys, unlockKeys
160
161
  descriptor: CollectionEncryption;
161
162
  }) => Promise<void>;
162
163
  collections: CascadeCollections;
163
- retireClientAnnexPosture?: (options: {
164
+ retireClientAnnexInventory?: (options: {
164
165
  document: object;
165
- }) => Promise<ClientAnnexPostureRetirement>;
166
+ }) => Promise<ClientAnnexInventoryRetirement>;
166
167
  onRotationAdopted?: (rotation: {
167
168
  userKey: UserKey;
168
169
  }) => Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"retire.d.ts","sourceRoot":"","sources":["../../src/unlock/retire.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;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,yBAAyB,CAAA;AACxE,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,OAAO,EACZ,KAAK,oBAAoB,EAC1B,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAC5E,OAAO,EAAmB,KAAK,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAE7E;;;;;;;GAOG;AACH,MAAM,WAAW,gCAAgC;IAC/C,OAAO,EAAE,OAAO,CAAA;IAChB,UAAU,CAAC,EAAE,gBAAgB,CAAA;IAC7B,WAAW,EAAE,oBAAoB,CAAA;IACjC,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,gBAAgB,CAAC,EAAE,oBAAoB,CAAA;IACvC,WAAW,CAAC,EAAE,4BAA4B,CAAA;CAC3C;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE,QA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,EACV,WAAW,EACX,IAAI,EACJ,WAAW,EACX,OAAO,EACP,qBAAqB,EACrB,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,0BAA0B,EAC1B,iBAAiB,EAClB,EAAE;IACD,OAAO,EAAE,YAAY,CAAA;IACrB,UAAU,EAAE,qBAAqB,CAAA;IACjC,UAAU,EAAE,kBAAkB,CAAA;IAC9B,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,yBAAyB,CAAA;IACtC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,qBAAqB,EAAE,gBAAgB,CAAA;IACvC,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;IAC/B,0BAA0B,CAAC,EAAE,CAAC,OAAO,EAAE;QACrC,QAAQ,EAAE,MAAM,CAAA;KACjB,KAAK,OAAO,CAAC,8BAA8B,CAAC,CAAA;IAC7C,iBAAiB,CAAC,EAAE,CAAC,QAAQ,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CACtE,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAiE5C"}
@@ -2,23 +2,23 @@ import { rotateRosterToDocumentAndCascade } from '../keys/index.js';
2
2
  import { removeUnlockKey } from './standingWebvh.js';
3
3
  /**
4
4
  * Retires one standing unlock credential from an account. See the module doc
5
- * for the order and the convergence story. Once the posture edit lands, a
5
+ * for the order and the convergence story. Once the inventory edit lands, a
6
6
  * thrown later stage leaves durable state a naive re-run -- or the login-time
7
7
  * sweep -- converges from.
8
8
  *
9
9
  * @param options {object}
10
10
  * @param options.idStore {WebvhIdStore} the account's `id` collection store
11
11
  * @param options.updateKeys {ClientWebvhUpdateKeys} the RETIRING (enrolled)
12
- * client's own did:webvh update-key seeds, which sign the posture edit
12
+ * client's own did:webvh update-key seeds, which sign the inventory edit
13
13
  * @param options.unlockKeys {StandingUnlockKeys} the retired credential's
14
- * public posture (its key-agreement publication and its recorded update
15
- * key, which the posture edit treats as a ladder anchor rather than truth
14
+ * public inventory (its key-agreement publication and its recorded update
15
+ * key, which the inventory edit treats as a ladder anchor rather than truth
16
16
  * -- see `removeUnlockKey`)
17
17
  * @param [options.ladderSeed] {Uint8Array} the retired credential's ladder
18
18
  * seed, when the ceremony holds the credential's secret; it strengthens the
19
19
  * ladder attribution but is not required
20
20
  * @param [options.expectedDid] {string} the account DID from the caller's
21
- * stored account pointer; supplied, the posture edit refuses a `did.jsonl`
21
+ * stored account pointer; supplied, the inventory edit refuses a `did.jsonl`
22
22
  * resolving to any other account
23
23
  * @param [options.verb] {string} what the caller is doing, for the
24
24
  * pending-rotation refusal message (e.g. `'changing your passphrase'`)
@@ -33,17 +33,17 @@ import { removeUnlockKey } from './standingWebvh.js';
33
33
  * called with `{ userKey, latestEpochId, descriptor }` after the roster read
34
34
  * and BEFORE the fan-out. The key and the epoch pin must persist atomically
35
35
  * @param options.collections {CascadeCollections} the fan-out's work
36
- * @param [options.retireClientAnnexPosture] {Function} `({ document }) =>
37
- * Promise<ClientAnnexPostureRetirement>` -- the annex reach (stage 1b in
38
- * the module doc), run against the post-edit document; expected to catch
39
- * its own failures and report them
36
+ * @param [options.retireClientAnnexInventory] {Function} `({ document }) =>
37
+ * Promise<ClientAnnexInventoryRetirement>` -- the annex reach (stage 1b in
38
+ * the module doc), run against the post-edit document; a throw is caught
39
+ * and reported as `{ action: 'skipped', reason: 'failed' }`
40
40
  * @param [options.onRotationAdopted] {Function} `({ userKey }) =>
41
41
  * Promise<void>` -- the live-session adoption of a rotated key, run last so
42
42
  * the session keeps operating without a re-login
43
43
  * @returns {Promise<UnlockCredentialRetirementResult>}
44
44
  */
45
- export async function retireUnlockCredential({ idStore, updateKeys, unlockKeys, ladderSeed, expectedDid, verb, rosterStore, userKey, clientKeyAgreementKey, pinnedEpochId, onUserKeyAdopted, collections, retireClientAnnexPosture, onRotationAdopted }) {
46
- // 1. The document posture edit -- the credential's standing, first. It
45
+ export async function retireUnlockCredential({ idStore, updateKeys, unlockKeys, ladderSeed, expectedDid, verb, rosterStore, userKey, clientKeyAgreementKey, pinnedEpochId, onUserKeyAdopted, collections, retireClientAnnexInventory, onRotationAdopted }) {
46
+ // 1. The document inventory edit -- the credential's standing, first. It
47
47
  // resolves the document as it now stands, which is what stage 2 resolves
48
48
  // its remaining recipients from.
49
49
  const { did, doc, log } = await removeUnlockKey({
@@ -55,10 +55,19 @@ export async function retireUnlockCredential({ idStore, updateKeys, unlockKeys,
55
55
  ...(verb !== undefined ? { verb } : {})
56
56
  });
57
57
  // 1b. The annex reach, against the post-edit document: strike the
58
- // retired credential's rung posture out of the pointed generation, or swap
59
- // the generation out from under it. Best-effort by the closure's own
60
- // contract, so the roster rotation below always runs.
61
- const clientAnnex = await retireClientAnnexPosture?.({ document: doc });
58
+ // retired credential's rung inventory out of the pointed generation, or swap
59
+ // the generation out from under it. Best-effort by contract, enforced here:
60
+ // a throw escaping the closure maps to the `failed` skip, so the roster
61
+ // rotation below always runs.
62
+ let clientAnnex;
63
+ if (retireClientAnnexInventory) {
64
+ try {
65
+ clientAnnex = await retireClientAnnexInventory({ document: doc });
66
+ }
67
+ catch {
68
+ clientAnnex = { action: 'skipped', reason: 'failed' };
69
+ }
70
+ }
62
71
  // 2. The shared roster-and-cascade tail: the roster rotation onto the
63
72
  // post-edit document (with its post-edit controller floor and its seal
64
73
  // backstop), then the collection fan-out onto the fresh key.
@@ -74,7 +83,7 @@ export async function retireUnlockCredential({ idStore, updateKeys, unlockKeys,
74
83
  collections
75
84
  });
76
85
  if (!tail.rosterDescriptor || !tail.userKey) {
77
- // No roster to rotate: the posture edit has landed, so the credential IS
86
+ // No roster to rotate: the inventory edit has landed, so the credential IS
78
87
  // retired -- a completed ceremony with nothing rotated.
79
88
  return {
80
89
  rotated: false,
@@ -1 +1 @@
1
- {"version":3,"file":"retire.js","sourceRoot":"","sources":["../../src/unlock/retire.ts"],"names":[],"mappings":"AAsEA,OAAO,EACL,gCAAgC,EAKjC,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAE,eAAe,EAA2B,MAAM,oBAAoB,CAAA;AAkC7E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,EAC3C,OAAO,EACP,UAAU,EACV,UAAU,EACV,UAAU,EACV,WAAW,EACX,IAAI,EACJ,WAAW,EACX,OAAO,EACP,qBAAqB,EACrB,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,wBAAwB,EACxB,iBAAiB,EAsBlB;IACC,uEAAuE;IACvE,yEAAyE;IACzE,iCAAiC;IACjC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,MAAM,eAAe,CAAC;QAC9C,OAAO;QACP,UAAU;QACV,UAAU;QACV,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACrC,GAAG,CAAC,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACrD,GAAG,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACxC,CAAC,CAAA;IAEF,kEAAkE;IAClE,2EAA2E;IAC3E,qEAAqE;IACrE,sDAAsD;IACtD,MAAM,WAAW,GAAG,MAAM,wBAAwB,EAAE,CAAC,EAAE,QAAQ,EAAE,GAAG,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AAI,CAAC,gBAAgB;QACvC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACxC,CAAA;AACH,CAAC"}
@@ -32,7 +32,7 @@ export interface UnlockClientIdentity {
32
32
  * Assembles a client identity from its 32-byte client seed: the one place the
33
33
  * agents, multibases, and roster kid are derived, shared by the standing
34
34
  * credential derivation here and the recovery code's
35
- * (`recoveryClientFromCode`), so the two postures can never disagree on how a
35
+ * (`recoveryClientFromCode`), so the two derivations can never disagree on how a
36
36
  * seed becomes an identity.
37
37
  *
38
38
  * @param options {object}
@@ -4,8 +4,8 @@
4
4
  /**
5
5
  * The standing unlock credential's client identity: the deterministic key set
6
6
  * every unlock method (a passphrase, a passkey PRF output) derives from its
7
- * own unlock seed under the standing-credential posture -- the recovery-code
8
- * posture minus spend-on-use. The credential's key-agreement key holds a
7
+ * own unlock seed under the standing-credential configuration -- the recovery-code
8
+ * configuration minus spend-on-use. The credential's key-agreement key holds a
9
9
  * standing wrap in the user key roster (escrowed into every epoch, kept alive
10
10
  * by rotation fan-out), and its binding MAC key authenticates the unlock
11
11
  * record's account core, so a fresh browser holding nothing but the
@@ -37,7 +37,7 @@ const STANDING_BINDING_MAC_INFO = 'binding-mac';
37
37
  * Assembles a client identity from its 32-byte client seed: the one place the
38
38
  * agents, multibases, and roster kid are derived, shared by the standing
39
39
  * credential derivation here and the recovery code's
40
- * (`recoveryClientFromCode`), so the two postures can never disagree on how a
40
+ * (`recoveryClientFromCode`), so the two derivations can never disagree on how a
41
41
  * seed becomes an identity.
42
42
  *
43
43
  * @param options {object}
@@ -1,5 +1,6 @@
1
1
  import type { DIDDoc, DIDLog, VerificationMethod } from '@interop/did-method-webvh';
2
2
  import type { ClientWebvhUpdateKeys, PublishedWebvhLog, WebvhIdStore } from '../webvh/didWebvh.js';
3
+ import type { ResourceLogPinStore } from '@interop/vh-resource-log';
3
4
  /**
4
5
  * The narrow store seam the self-enrolling and delegated-bridge ceremonies
5
6
  * write through: a public read of the log and the delegated `did.jsonl` PUT.
@@ -20,7 +21,7 @@ export type UnlockKeyAgreementPublication = {
20
21
  commitment: string;
21
22
  };
22
23
  /**
23
- * A standing credential's public posture as the document and log carry it:
24
+ * A standing credential's public inventory as the document and log carry it:
24
25
  * its key-agreement publication and the update key whose hash stands in
25
26
  * `nextKeyHashes` (ladder rung 0 at bind time; a code's single derived key).
26
27
  */
@@ -70,18 +71,26 @@ export declare function unlockKeyVerificationMethod({ did, keyAgreement }: {
70
71
  * @param options.store {UnlockLogStore}
71
72
  * @param [options.expectedDid] {string} the account DID the log must resolve
72
73
  * to, where the caller holds one
74
+ * @param [options.pinStore] {ResourceLogPinStore} the caller's chain-head
75
+ * pins; a served log that is a rollback, a fork, or an identity switch
76
+ * against the pinned head is refused (`ResourceLogContinuityError`)
77
+ * @param [options.logId] {string} the account log's pin slot
78
+ * (`accountLogPinId({ spaceId })`); required whenever a `pinStore` is
79
+ * supplied
73
80
  * @returns {Promise<PublishedWebvhLog>}
74
81
  */
75
- export declare function readLogOrThrow({ store, expectedDid }: {
82
+ export declare function readLogOrThrow({ store, expectedDid, pinStore, logId }: {
76
83
  store: UnlockLogStore;
77
84
  expectedDid?: string;
85
+ pinStore?: ResourceLogPinStore;
86
+ logId?: string;
78
87
  }): Promise<PublishedWebvhLog>;
79
88
  /**
80
89
  * BIND (run by an enrolled client, root authority): publishes a standing
81
- * credential's split posture into the document -- one entry adding the
90
+ * credential's split configuration into the document -- one entry adding the
82
91
  * credential's `keyAgreement` entry (verbatim or commitment) and committing
83
92
  * its current update key's hash in `nextKeyHashes`. The update key joins
84
- * `updateKeys` nowhere. Idempotent: a posture already published is a no-op,
93
+ * `updateKeys` nowhere. Idempotent: an inventory already published is a no-op,
85
94
  * so re-running a torn bind converges. The entry publishes conditionally on
86
95
  * the log this call read; a race lost to a concurrent ceremony re-runs and
87
96
  * rebases on the new head.
@@ -91,14 +100,14 @@ export declare function readLogOrThrow({ store, expectedDid }: {
91
100
  * @param options.updateKeys {ClientWebvhUpdateKeys} the BINDING client's own
92
101
  * did:webvh update-key seeds
93
102
  * @param options.unlockKeys {StandingUnlockKeys} the credential's public
94
- * posture
103
+ * inventory
95
104
  * @param [options.expectedDid] {string} the account DID the log must resolve
96
105
  * to, from the caller's stored account pointer
97
106
  * @param [options.verb] {string} what the caller is doing, for the
98
107
  * pending-rotation refusal message (e.g. `'issuing a recovery code'`)
99
108
  * @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog }>} the account
100
109
  * DID and the document and log as this call leaves them (unchanged when the
101
- * posture was already settled), which is what the caller's roster-side half
110
+ * inventory was already settled), which is what the caller's roster-side half
102
111
  * converges onto
103
112
  */
104
113
  export declare function publishUnlockKey(options: {
@@ -114,7 +123,7 @@ export declare function publishUnlockKey(options: {
114
123
  }>;
115
124
  /**
116
125
  * REMOVAL (run by an enrolled client, root authority): removes a standing
117
- * credential's posture from the document -- its `keyAgreement` entry and
126
+ * credential's inventory from the document -- its `keyAgreement` entry and
118
127
  * everything of its ladder that still stands -- in one entry. Idempotent. The
119
128
  * roster-side half (rotating the user key epoch off the credential's wrap) is
120
129
  * the caller's, and runs after this so the resolver's document no longer
@@ -123,18 +132,27 @@ export declare function publishUnlockKey(options: {
123
132
  * The recorded `unlockKeys.updateKeyMultibase` is treated as an ANCHOR, not
124
133
  * as truth: a credential that has self-enrolled since its bind advanced its
125
134
  * standing commitment past the recorded rung, so the removal resolves the
126
- * ladder's current footprint from the log itself
127
- * ({@link attributeLadderPosture}) and strikes all of it -- every committed
135
+ * ladder's current inventory from the log itself
136
+ * ({@link attributeLadderInventory}) and strikes all of it -- every committed
128
137
  * hash the ladder accounts for AND, for a torn self-enrollment, the revealed
129
138
  * rung key still sitting in `updateKeys` (plus the never-claimed hashes its
130
139
  * reveal entry committed). Trusting the recorded multibase alone would leave
131
140
  * the live rung commitment standing: a latent re-seizure credential via the
132
141
  * reveal mechanism. A supplied `ladderSeed` strengthens the attribution (every
133
142
  * rung known a priori, independent of the anchor's staleness); without it the
134
- * log walk alone resolves the footprint. For a single-key credential (a
143
+ * log walk alone resolves the inventory. For a single-key credential (a
135
144
  * recovery code, a never-self-enrolled bind) the resolution degenerates to
136
145
  * exactly the recorded key's hash, as before.
137
146
  *
147
+ * The seed also names the credential's LADDER VM -- the stable sibling a
148
+ * last-client forget's install entry publishes under `assertionMethod` and
149
+ * `capabilityDelegation`, left standing by a forget torn after that entry --
150
+ * and the removal strikes it in the same entry, so a retired seed no longer
151
+ * signs governed-log appends or account delegations. The sibling is derived
152
+ * from the seed alone, with nothing in the log attributing it to a ladder, so
153
+ * a removal without the seed leaves it: rotation is the remedy for a leaked
154
+ * seed exactly when the ceremony holds the credential.
155
+ *
138
156
  * @param options {object} see {@link publishUnlockKey}, plus
139
157
  * `[ladderSeed]` -- the retired credential's ladder seed, when in hand
140
158
  * @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog }>} see
@@ -1 +1 @@
1
- {"version":3,"file":"standingWebvh.d.ts","sourceRoot":"","sources":["../../src/unlock/standingWebvh.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EACV,MAAM,EACN,MAAM,EACN,kBAAkB,EACnB,MAAM,2BAA2B,CAAA;AAalC,OAAO,KAAK,EACV,qBAAqB,EACrB,iBAAiB,EACjB,YAAY,EACb,MAAM,sBAAsB,CAAA;AAQ7B;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,IAAI,CAC/B,YAAY,EACZ,kBAAkB,GAAG,eAAe,CACrC,CAAA;AAED;;;;;;GAMG;AACH,MAAM,MAAM,6BAA6B,GACvC;IAAE,kBAAkB,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,CAAA;AAEzD;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,YAAY,EAAE,6BAA6B,CAAA;IAC3C,kBAAkB,EAAE,MAAM,CAAA;CAC3B;AAED;;;;;;;;;;GAUG;AACH,wBAAg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