@interop/wallet-core 0.62.0 → 0.66.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 (321) hide show
  1. package/README.md +41 -16
  2. package/dist/clientAnnex/credentialAnchoredGenesis.d.ts +46 -26
  3. package/dist/clientAnnex/credentialAnchoredGenesis.d.ts.map +1 -1
  4. package/dist/clientAnnex/credentialAnchoredGenesis.js +91 -39
  5. package/dist/clientAnnex/credentialAnchoredGenesis.js.map +1 -1
  6. package/dist/clientAnnex/establish.d.ts +119 -35
  7. package/dist/clientAnnex/establish.d.ts.map +1 -1
  8. package/dist/clientAnnex/establish.js +227 -160
  9. package/dist/clientAnnex/establish.js.map +1 -1
  10. package/dist/clientAnnex/forget.d.ts +18 -8
  11. package/dist/clientAnnex/forget.d.ts.map +1 -1
  12. package/dist/clientAnnex/forget.js +37 -64
  13. package/dist/clientAnnex/forget.js.map +1 -1
  14. package/dist/clientAnnex/forgetLast.d.ts +85 -38
  15. package/dist/clientAnnex/forgetLast.d.ts.map +1 -1
  16. package/dist/clientAnnex/forgetLast.js +155 -98
  17. package/dist/clientAnnex/forgetLast.js.map +1 -1
  18. package/dist/clientAnnex/gc.d.ts +3 -2
  19. package/dist/clientAnnex/gc.d.ts.map +1 -1
  20. package/dist/clientAnnex/gc.js +16 -7
  21. package/dist/clientAnnex/gc.js.map +1 -1
  22. package/dist/clientAnnex/heal.d.ts +65 -14
  23. package/dist/clientAnnex/heal.d.ts.map +1 -1
  24. package/dist/clientAnnex/heal.js +397 -298
  25. package/dist/clientAnnex/heal.js.map +1 -1
  26. package/dist/clientAnnex/index.d.ts +23 -7
  27. package/dist/clientAnnex/index.d.ts.map +1 -1
  28. package/dist/clientAnnex/index.js +26 -7
  29. package/dist/clientAnnex/index.js.map +1 -1
  30. package/dist/clientAnnex/ladder.d.ts +58 -0
  31. package/dist/clientAnnex/ladder.d.ts.map +1 -1
  32. package/dist/clientAnnex/ladder.js +249 -41
  33. package/dist/clientAnnex/ladder.js.map +1 -1
  34. package/dist/clientAnnex/ladderAnchored.d.ts +148 -22
  35. package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -1
  36. package/dist/clientAnnex/ladderAnchored.js +391 -346
  37. package/dist/clientAnnex/ladderAnchored.js.map +1 -1
  38. package/dist/clientAnnex/log.d.ts +237 -53
  39. package/dist/clientAnnex/log.d.ts.map +1 -1
  40. package/dist/clientAnnex/log.js +533 -198
  41. package/dist/clientAnnex/log.js.map +1 -1
  42. package/dist/clientAnnex/mend.d.ts +12 -6
  43. package/dist/clientAnnex/mend.d.ts.map +1 -1
  44. package/dist/clientAnnex/mend.js +44 -72
  45. package/dist/clientAnnex/mend.js.map +1 -1
  46. package/dist/clientAnnex/recoveryLadderAnchored.d.ts +6 -4
  47. package/dist/clientAnnex/recoveryLadderAnchored.d.ts.map +1 -1
  48. package/dist/clientAnnex/recoveryLadderAnchored.js +56 -35
  49. package/dist/clientAnnex/recoveryLadderAnchored.js.map +1 -1
  50. package/dist/clientAnnex/spaceCapability.d.ts +123 -0
  51. package/dist/clientAnnex/spaceCapability.d.ts.map +1 -0
  52. package/dist/clientAnnex/spaceCapability.js +152 -0
  53. package/dist/clientAnnex/spaceCapability.js.map +1 -0
  54. package/dist/clientAnnex/stages.d.ts +63 -0
  55. package/dist/clientAnnex/stages.d.ts.map +1 -0
  56. package/dist/clientAnnex/stages.js +64 -0
  57. package/dist/clientAnnex/stages.js.map +1 -0
  58. package/dist/clientAnnex/zcap.d.ts +1 -1
  59. package/dist/clientAnnex/zcap.d.ts.map +1 -1
  60. package/dist/clientAnnex/zcap.js +42 -35
  61. package/dist/clientAnnex/zcap.js.map +1 -1
  62. package/dist/clients/policy.d.ts +15 -1
  63. package/dist/clients/policy.d.ts.map +1 -1
  64. package/dist/clients/policy.js +12 -6
  65. package/dist/clients/policy.js.map +1 -1
  66. package/dist/clients/revocation.d.ts +18 -10
  67. package/dist/clients/revocation.d.ts.map +1 -1
  68. package/dist/clients/revocation.js +13 -5
  69. package/dist/clients/revocation.js.map +1 -1
  70. package/dist/clients/rosterPolicy.d.ts +10 -2
  71. package/dist/clients/rosterPolicy.d.ts.map +1 -1
  72. package/dist/clients/rosterPolicy.js +41 -24
  73. package/dist/clients/rosterPolicy.js.map +1 -1
  74. package/dist/descriptors/acquire.d.ts.map +1 -1
  75. package/dist/descriptors/acquire.js +6 -23
  76. package/dist/descriptors/acquire.js.map +1 -1
  77. package/dist/descriptors/cipher.d.ts.map +1 -1
  78. package/dist/descriptors/cipher.js +5 -0
  79. package/dist/descriptors/cipher.js.map +1 -1
  80. package/dist/descriptors/errors.d.ts +43 -0
  81. package/dist/descriptors/errors.d.ts.map +1 -0
  82. package/dist/descriptors/errors.js +45 -0
  83. package/dist/descriptors/errors.js.map +1 -0
  84. package/dist/descriptors/index.d.ts +5 -0
  85. package/dist/descriptors/index.d.ts.map +1 -1
  86. package/dist/descriptors/index.js +5 -0
  87. package/dist/descriptors/index.js.map +1 -1
  88. package/dist/enrollment/enrollment.d.ts +37 -10
  89. package/dist/enrollment/enrollment.d.ts.map +1 -1
  90. package/dist/enrollment/enrollment.js +52 -15
  91. package/dist/enrollment/enrollment.js.map +1 -1
  92. package/dist/genesis/accountGenesis.d.ts +42 -11
  93. package/dist/genesis/accountGenesis.d.ts.map +1 -1
  94. package/dist/genesis/accountGenesis.js +80 -22
  95. package/dist/genesis/accountGenesis.js.map +1 -1
  96. package/dist/genesis/index.d.ts +3 -1
  97. package/dist/genesis/index.d.ts.map +1 -1
  98. package/dist/genesis/index.js +3 -1
  99. package/dist/genesis/index.js.map +1 -1
  100. package/dist/identity/agents.d.ts +17 -1
  101. package/dist/identity/agents.d.ts.map +1 -1
  102. package/dist/identity/agents.js +23 -7
  103. package/dist/identity/agents.js.map +1 -1
  104. package/dist/identity/index.d.ts +3 -1
  105. package/dist/identity/index.d.ts.map +1 -1
  106. package/dist/identity/index.js +3 -1
  107. package/dist/identity/index.js.map +1 -1
  108. package/dist/index.d.ts +6 -3
  109. package/dist/index.d.ts.map +1 -1
  110. package/dist/index.js +6 -3
  111. package/dist/index.js.map +1 -1
  112. package/dist/keyring/index.d.ts +2 -1
  113. package/dist/keyring/index.d.ts.map +1 -1
  114. package/dist/keyring/index.js +2 -1
  115. package/dist/keyring/index.js.map +1 -1
  116. package/dist/keyring/record.d.ts.map +1 -1
  117. package/dist/keyring/record.js +3 -6
  118. package/dist/keyring/record.js.map +1 -1
  119. package/dist/keyring/unlockSpace.d.ts +14 -5
  120. package/dist/keyring/unlockSpace.d.ts.map +1 -1
  121. package/dist/keyring/unlockSpace.js +31 -36
  122. package/dist/keyring/unlockSpace.js.map +1 -1
  123. package/dist/keys/index.d.ts +22 -8
  124. package/dist/keys/index.d.ts.map +1 -1
  125. package/dist/keys/index.js +20 -6
  126. package/dist/keys/index.js.map +1 -1
  127. package/dist/keys/rosterLogStore.d.ts +15 -12
  128. package/dist/keys/rosterLogStore.d.ts.map +1 -1
  129. package/dist/keys/rosterLogStore.js +21 -16
  130. package/dist/keys/rosterLogStore.js.map +1 -1
  131. package/dist/keys/rosterStore.d.ts +3 -6
  132. package/dist/keys/rosterStore.d.ts.map +1 -1
  133. package/dist/keys/rosterStore.js +10 -9
  134. package/dist/keys/rosterStore.js.map +1 -1
  135. package/dist/keys/spaceEpochs.d.ts.map +1 -1
  136. package/dist/keys/spaceEpochs.js +2 -3
  137. package/dist/keys/spaceEpochs.js.map +1 -1
  138. package/dist/keys/userKeyCascade.d.ts +8 -5
  139. package/dist/keys/userKeyCascade.d.ts.map +1 -1
  140. package/dist/keys/userKeyCascade.js +7 -6
  141. package/dist/keys/userKeyCascade.js.map +1 -1
  142. package/dist/keys/userKeyRoster.d.ts +95 -8
  143. package/dist/keys/userKeyRoster.d.ts.map +1 -1
  144. package/dist/keys/userKeyRoster.js +278 -35
  145. package/dist/keys/userKeyRoster.js.map +1 -1
  146. package/dist/keys/userKeyRosterCascade.d.ts +117 -16
  147. package/dist/keys/userKeyRosterCascade.d.ts.map +1 -1
  148. package/dist/keys/userKeyRosterCascade.js +184 -43
  149. package/dist/keys/userKeyRosterCascade.js.map +1 -1
  150. package/dist/keys/wasLabelsStore.d.ts +9 -2
  151. package/dist/keys/wasLabelsStore.d.ts.map +1 -1
  152. package/dist/keys/wasLabelsStore.js +14 -6
  153. package/dist/keys/wasLabelsStore.js.map +1 -1
  154. package/dist/log.d.ts +7 -2
  155. package/dist/log.d.ts.map +1 -1
  156. package/dist/log.js +6 -1
  157. package/dist/log.js.map +1 -1
  158. package/dist/recovery/index.d.ts +13 -9
  159. package/dist/recovery/index.d.ts.map +1 -1
  160. package/dist/recovery/index.js +12 -8
  161. package/dist/recovery/index.js.map +1 -1
  162. package/dist/recovery/recoveryCode.d.ts +27 -7
  163. package/dist/recovery/recoveryCode.d.ts.map +1 -1
  164. package/dist/recovery/recoveryCode.js +18 -6
  165. package/dist/recovery/recoveryCode.js.map +1 -1
  166. package/dist/recovery/recoveryDelegation.d.ts +23 -0
  167. package/dist/recovery/recoveryDelegation.d.ts.map +1 -1
  168. package/dist/recovery/recoveryDelegation.js +66 -46
  169. package/dist/recovery/recoveryDelegation.js.map +1 -1
  170. package/dist/recovery/recoveryWebvh.d.ts +75 -63
  171. package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
  172. package/dist/recovery/recoveryWebvh.js +127 -116
  173. package/dist/recovery/recoveryWebvh.js.map +1 -1
  174. package/dist/request/appKey.d.ts +35 -1
  175. package/dist/request/appKey.d.ts.map +1 -1
  176. package/dist/request/appKey.js +29 -10
  177. package/dist/request/appKey.js.map +1 -1
  178. package/dist/request/classify.d.ts +32 -8
  179. package/dist/request/classify.d.ts.map +1 -1
  180. package/dist/request/classify.js +39 -14
  181. package/dist/request/classify.js.map +1 -1
  182. package/dist/request/ephemeralExchange.d.ts +1 -6
  183. package/dist/request/ephemeralExchange.d.ts.map +1 -1
  184. package/dist/request/ephemeralExchange.js.map +1 -1
  185. package/dist/request/onboarding.d.ts.map +1 -1
  186. package/dist/request/onboarding.js +2 -2
  187. package/dist/request/onboarding.js.map +1 -1
  188. package/dist/request/parse.d.ts.map +1 -1
  189. package/dist/request/parse.js +2 -3
  190. package/dist/request/parse.js.map +1 -1
  191. package/dist/resourceLog/controller.d.ts +34 -12
  192. package/dist/resourceLog/controller.d.ts.map +1 -1
  193. package/dist/resourceLog/controller.js +79 -86
  194. package/dist/resourceLog/controller.js.map +1 -1
  195. package/dist/resourceLog/document.d.ts +182 -0
  196. package/dist/resourceLog/document.d.ts.map +1 -0
  197. package/dist/resourceLog/document.js +159 -0
  198. package/dist/resourceLog/document.js.map +1 -0
  199. package/dist/resourceLog/errors.d.ts +47 -8
  200. package/dist/resourceLog/errors.d.ts.map +1 -1
  201. package/dist/resourceLog/errors.js +54 -8
  202. package/dist/resourceLog/errors.js.map +1 -1
  203. package/dist/resourceLog/index.d.ts +7 -3
  204. package/dist/resourceLog/index.d.ts.map +1 -1
  205. package/dist/resourceLog/index.js +7 -3
  206. package/dist/resourceLog/index.js.map +1 -1
  207. package/dist/resourceLog/ladderRungs.d.ts +35 -0
  208. package/dist/resourceLog/ladderRungs.d.ts.map +1 -0
  209. package/dist/resourceLog/ladderRungs.js +352 -0
  210. package/dist/resourceLog/ladderRungs.js.map +1 -0
  211. package/dist/resourceLog/license.d.ts +42 -17
  212. package/dist/resourceLog/license.d.ts.map +1 -1
  213. package/dist/resourceLog/license.js +38 -24
  214. package/dist/resourceLog/license.js.map +1 -1
  215. package/dist/space/activity.d.ts +15 -15
  216. package/dist/space/activity.d.ts.map +1 -1
  217. package/dist/space/activity.js +15 -15
  218. package/dist/space/activity.js.map +1 -1
  219. package/dist/space/collections.d.ts +11 -0
  220. package/dist/space/collections.d.ts.map +1 -1
  221. package/dist/space/collections.js +13 -0
  222. package/dist/space/collections.js.map +1 -1
  223. package/dist/space/deleteSpace.d.ts +28 -0
  224. package/dist/space/deleteSpace.d.ts.map +1 -0
  225. package/dist/space/deleteSpace.js +44 -0
  226. package/dist/space/deleteSpace.js.map +1 -0
  227. package/dist/space/errors.d.ts.map +1 -1
  228. package/dist/space/errors.js +0 -1
  229. package/dist/space/errors.js.map +1 -1
  230. package/dist/space/index.d.ts +6 -0
  231. package/dist/space/index.d.ts.map +1 -1
  232. package/dist/space/index.js +6 -0
  233. package/dist/space/index.js.map +1 -1
  234. package/dist/space/plaintextCollection.d.ts +43 -0
  235. package/dist/space/plaintextCollection.d.ts.map +1 -0
  236. package/dist/space/plaintextCollection.js +17 -0
  237. package/dist/space/plaintextCollection.js.map +1 -0
  238. package/dist/stages.d.ts +23 -0
  239. package/dist/stages.d.ts.map +1 -0
  240. package/dist/stages.js +23 -0
  241. package/dist/stages.js.map +1 -0
  242. package/dist/sync/index.d.ts +7 -0
  243. package/dist/sync/index.d.ts.map +1 -1
  244. package/dist/sync/index.js +7 -0
  245. package/dist/sync/index.js.map +1 -1
  246. package/dist/sync/push.js +4 -4
  247. package/dist/sync/push.js.map +1 -1
  248. package/dist/sync/remint.js +2 -2
  249. package/dist/sync/remint.js.map +1 -1
  250. package/dist/sync/types.d.ts +41 -1
  251. package/dist/sync/types.d.ts.map +1 -1
  252. package/dist/sync/types.js +47 -1
  253. package/dist/sync/types.js.map +1 -1
  254. package/dist/unlock/index.d.ts +5 -1
  255. package/dist/unlock/index.d.ts.map +1 -1
  256. package/dist/unlock/index.js +5 -1
  257. package/dist/unlock/index.js.map +1 -1
  258. package/dist/unlock/retire.d.ts +35 -7
  259. package/dist/unlock/retire.d.ts.map +1 -1
  260. package/dist/unlock/retire.js +52 -14
  261. package/dist/unlock/retire.js.map +1 -1
  262. package/dist/unlock/standingClient.d.ts.map +1 -1
  263. package/dist/unlock/standingClient.js +5 -1
  264. package/dist/unlock/standingClient.js.map +1 -1
  265. package/dist/unlock/standingWebvh.d.ts +217 -35
  266. package/dist/unlock/standingWebvh.d.ts.map +1 -1
  267. package/dist/unlock/standingWebvh.js +469 -210
  268. package/dist/unlock/standingWebvh.js.map +1 -1
  269. package/dist/webvh/accountEntry.d.ts +146 -0
  270. package/dist/webvh/accountEntry.d.ts.map +1 -0
  271. package/dist/webvh/accountEntry.js +239 -0
  272. package/dist/webvh/accountEntry.js.map +1 -0
  273. package/dist/webvh/didWeb.d.ts +12 -7
  274. package/dist/webvh/didWeb.d.ts.map +1 -1
  275. package/dist/webvh/didWeb.js +2 -2
  276. package/dist/webvh/didWeb.js.map +1 -1
  277. package/dist/webvh/didWebProjection.d.ts +164 -0
  278. package/dist/webvh/didWebProjection.d.ts.map +1 -0
  279. package/dist/webvh/didWebProjection.js +230 -0
  280. package/dist/webvh/didWebProjection.js.map +1 -0
  281. package/dist/webvh/didWebvh.d.ts +275 -136
  282. package/dist/webvh/didWebvh.d.ts.map +1 -1
  283. package/dist/webvh/didWebvh.js +307 -340
  284. package/dist/webvh/didWebvh.js.map +1 -1
  285. package/dist/webvh/enrollClient.d.ts +65 -0
  286. package/dist/webvh/enrollClient.d.ts.map +1 -0
  287. package/dist/webvh/enrollClient.js +172 -0
  288. package/dist/webvh/enrollClient.js.map +1 -0
  289. package/dist/webvh/index.d.ts +37 -12
  290. package/dist/webvh/index.d.ts.map +1 -1
  291. package/dist/webvh/index.js +33 -10
  292. package/dist/webvh/index.js.map +1 -1
  293. package/dist/webvh/listClients.d.ts +1 -35
  294. package/dist/webvh/listClients.d.ts.map +1 -1
  295. package/dist/webvh/listClients.js +2 -30
  296. package/dist/webvh/listClients.js.map +1 -1
  297. package/dist/webvh/revokeClient.d.ts +41 -11
  298. package/dist/webvh/revokeClient.d.ts.map +1 -1
  299. package/dist/webvh/revokeClient.js +99 -48
  300. package/dist/webvh/revokeClient.js.map +1 -1
  301. package/dist/webvh/standingZcap.d.ts +61 -14
  302. package/dist/webvh/standingZcap.d.ts.map +1 -1
  303. package/dist/webvh/standingZcap.js +91 -0
  304. package/dist/webvh/standingZcap.js.map +1 -1
  305. package/dist/webvh/verifyLog.d.ts +59 -5
  306. package/dist/webvh/verifyLog.d.ts.map +1 -1
  307. package/dist/webvh/verifyLog.js +76 -11
  308. package/dist/webvh/verifyLog.js.map +1 -1
  309. package/dist/webvh/wasIdStore.d.ts +8 -8
  310. package/dist/webvh/wasIdStore.d.ts.map +1 -1
  311. package/dist/webvh/wasIdStore.js +39 -14
  312. package/dist/webvh/wasIdStore.js.map +1 -1
  313. package/dist/webvh/zcap.d.ts +14 -1
  314. package/dist/webvh/zcap.d.ts.map +1 -1
  315. package/dist/webvh/zcap.js +3 -27
  316. package/dist/webvh/zcap.js.map +1 -1
  317. package/package.json +2 -2
  318. package/dist/webvh/keyAgreement.d.ts +0 -97
  319. package/dist/webvh/keyAgreement.d.ts.map +0 -1
  320. package/dist/webvh/keyAgreement.js +0 -71
  321. package/dist/webvh/keyAgreement.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plaintextCollection.d.ts","sourceRoot":"","sources":["../../src/space/plaintextCollection.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAEvE;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,GAAG,EACH,OAAO,EACP,YAAY,EACZ,UAAU,EACX,EAAE;IACD,GAAG,EAAE,SAAS,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,KAAK,CAAA;CACnB,GAAG,UAAU,CAIb"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * A lazy handle to one of the wallet's plaintext system collections. No I/O.
3
+ *
4
+ * @param options {object}
5
+ * @param options.was {WasClient} the storage client to address it through
6
+ * @param options.spaceId {string} the Space holding the collection
7
+ * @param options.collectionId {string}
8
+ * @param [options.capability] {IZcap} an invocation capability every request
9
+ * through the handle rides; absent, requests invoke the root capability
10
+ * @returns {Collection}
11
+ */
12
+ export function plaintextCollection({ was, spaceId, collectionId, capability }) {
13
+ return was
14
+ .space(spaceId)
15
+ .collection(collectionId, { capability, encryption: 'plaintext' });
16
+ }
17
+ //# sourceMappingURL=plaintextCollection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plaintextCollection.js","sourceRoot":"","sources":["../../src/space/plaintextCollection.ts"],"names":[],"mappings":"AA0BA;;;;;;;;;;GAUG;AACH,MAAM,UAAU,mBAAmB,CAAC,EAClC,GAAG,EACH,OAAO,EACP,YAAY,EACZ,UAAU,EAMX;IACC,OAAO,GAAG;SACP,KAAK,CAAC,OAAO,CAAC;SACd,UAAU,CAAC,YAAY,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,CAAC,CAAA;AACtE,CAAC"}
@@ -0,0 +1,23 @@
1
+ /*!
2
+ * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
+ */
4
+ /**
5
+ * The ceremony stage tokens more than one subpath emits, and nothing else.
6
+ * This module imports nothing, so any layer may take a name from it and a
7
+ * progress display importing one pulls in no ceremony code. A vocabulary only
8
+ * one subpath emits stays with that subpath (`clientAnnex/stages.ts`).
9
+ */
10
+ /**
11
+ * The KMS-authentication stage, emitted at the join where a genesis waits on
12
+ * the binding it folds into its entry. Both genesis ceremonies emit it at
13
+ * that same boundary, which is why the name lives here rather than in either
14
+ * of them.
15
+ *
16
+ * It fires whether or not the caller supplied a thunk, since it is a stage
17
+ * boundary of the ceremony rather than a report that a key was minted. It
18
+ * marks the join and not the thunk's own completion: the KMS stage overlaps
19
+ * Space provisioning, and a thunk that finished first would mark out of
20
+ * order.
21
+ */
22
+ export declare const KMS_AUTHENTICATION_STAGE = "kms-authentication";
23
+ //# sourceMappingURL=stages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stages.d.ts","sourceRoot":"","sources":["../src/stages.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;GAKG;AAEH;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,wBAAwB,uBAAuB,CAAA"}
package/dist/stages.js ADDED
@@ -0,0 +1,23 @@
1
+ /*!
2
+ * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
+ */
4
+ /**
5
+ * The ceremony stage tokens more than one subpath emits, and nothing else.
6
+ * This module imports nothing, so any layer may take a name from it and a
7
+ * progress display importing one pulls in no ceremony code. A vocabulary only
8
+ * one subpath emits stays with that subpath (`clientAnnex/stages.ts`).
9
+ */
10
+ /**
11
+ * The KMS-authentication stage, emitted at the join where a genesis waits on
12
+ * the binding it folds into its entry. Both genesis ceremonies emit it at
13
+ * that same boundary, which is why the name lives here rather than in either
14
+ * of them.
15
+ *
16
+ * It fires whether or not the caller supplied a thunk, since it is a stage
17
+ * boundary of the ceremony rather than a report that a key was minted. It
18
+ * marks the join and not the thunk's own completion: the KMS stage overlaps
19
+ * Space provisioning, and a thunk that finished first would mark out of
20
+ * order.
21
+ */
22
+ export const KMS_AUTHENTICATION_STAGE = 'kms-authentication';
23
+ //# sourceMappingURL=stages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stages.js","sourceRoot":"","sources":["../src/stages.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;GAKG;AAEH;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,oBAAoB,CAAA"}
@@ -11,6 +11,12 @@
11
11
  * `WasSyncNotFoundError` / `UnknownEpochError` signals) come from
12
12
  * `@interop/was-client/sync` and are re-exported here so an engine consumer
13
13
  * imports one package.
14
+ * - `isSyncConflictError` / `isSyncNotFoundError` / `isUnknownEpochError` are
15
+ * how those three signals are classified. They are raised inside the app's
16
+ * own injected seams, which may resolve to a second copy of
17
+ * `@interop/was-client`, so they are matched on `err.name`; the engine core
18
+ * and both apps share these predicates rather than each writing an
19
+ * `instanceof` that a duplicated dependency would silently defeat.
14
20
  * - `SyncStore` / `SyncedRow` / `ProjectionAction` / `ResolveConflict` are the
15
21
  * replica-side persistence seam.
16
22
  * - `runPull` / `projectionForDoc`, `runPush`, and `SyncEngine` are the pull,
@@ -31,6 +37,7 @@
31
37
  */
32
38
  export { UnknownEpochError, WasSyncConflictError, WasSyncNotFoundError } from '@interop/was-client/sync';
33
39
  export type { Json, SyncCheckpoint, WireDoc, MasterState, WasSyncPort, DocCipher } from '@interop/was-client/sync';
40
+ export { isSyncConflictError, isSyncNotFoundError, isUnknownEpochError } from './types.js';
34
41
  export type { SyncStore, SyncedRow, ProjectionAction, ResolveConflict } from './types.js';
35
42
  export { runPull, projectionForDoc } from './pull.js';
36
43
  export { runPush, formatEtag } from './push.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sync/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,0BAA0B,CAAA;AACjC,YAAY,EACV,IAAI,EACJ,cAAc,EACd,OAAO,EACP,WAAW,EACX,WAAW,EACX,SAAS,EACV,MAAM,0BAA0B,CAAA;AAEjC,YAAY,EACV,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,eAAe,EAChB,MAAM,YAAY,CAAA;AAEnB,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AACrD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAC7D,YAAY,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAE5D,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC3B,MAAM,uBAAuB,CAAA;AAC9B,YAAY,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sync/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,0BAA0B,CAAA;AACjC,YAAY,EACV,IAAI,EACJ,cAAc,EACd,OAAO,EACP,WAAW,EACX,WAAW,EACX,SAAS,EACV,MAAM,0BAA0B,CAAA;AAEjC,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,YAAY,CAAA;AACnB,YAAY,EACV,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,eAAe,EAChB,MAAM,YAAY,CAAA;AAEnB,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AACrD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAC7D,YAAY,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAE5D,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC3B,MAAM,uBAAuB,CAAA;AAC9B,YAAY,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA"}
@@ -11,6 +11,12 @@
11
11
  * `WasSyncNotFoundError` / `UnknownEpochError` signals) come from
12
12
  * `@interop/was-client/sync` and are re-exported here so an engine consumer
13
13
  * imports one package.
14
+ * - `isSyncConflictError` / `isSyncNotFoundError` / `isUnknownEpochError` are
15
+ * how those three signals are classified. They are raised inside the app's
16
+ * own injected seams, which may resolve to a second copy of
17
+ * `@interop/was-client`, so they are matched on `err.name`; the engine core
18
+ * and both apps share these predicates rather than each writing an
19
+ * `instanceof` that a duplicated dependency would silently defeat.
14
20
  * - `SyncStore` / `SyncedRow` / `ProjectionAction` / `ResolveConflict` are the
15
21
  * replica-side persistence seam.
16
22
  * - `runPull` / `projectionForDoc`, `runPush`, and `SyncEngine` are the pull,
@@ -30,6 +36,7 @@
30
36
  * `push.ts` for why the metadata half is left out of the shared core.
31
37
  */
32
38
  export { UnknownEpochError, WasSyncConflictError, WasSyncNotFoundError } from '@interop/was-client/sync';
39
+ export { isSyncConflictError, isSyncNotFoundError, isUnknownEpochError } from './types.js';
33
40
  export { runPull, projectionForDoc } from './pull.js';
34
41
  export { runPush, formatEtag } from './push.js';
35
42
  export { remintPendingEnvelopes } from './remint.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sync/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,0BAA0B,CAAA;AAiBjC,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AACrD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAIxC,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC3B,MAAM,uBAAuB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sync/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,0BAA0B,CAAA;AAUjC,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,YAAY,CAAA;AAQnB,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AACrD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAIxC,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC3B,MAAM,uBAAuB,CAAA"}
package/dist/sync/push.js CHANGED
@@ -26,7 +26,7 @@
26
26
  * optional on the port for the driver that needs it.
27
27
  */
28
28
  import { formatEtag } from '@interop/was-client/sync';
29
- import { WasSyncConflictError, WasSyncNotFoundError } from './types.js';
29
+ import { isSyncConflictError, isSyncNotFoundError } from './types.js';
30
30
  // Formats a master revision as the quoted strong ETag the server compares
31
31
  // `If-Match` against (revision `3` becomes `"3"`). Re-exported so callers keep
32
32
  // importing it from here.
@@ -67,7 +67,7 @@ async function pushUpsert({ port, store, row, resolveConflict }) {
67
67
  return { conflictResolved: false };
68
68
  }
69
69
  catch (err) {
70
- if (!(err instanceof WasSyncConflictError)) {
70
+ if (!isSyncConflictError(err)) {
71
71
  throw err;
72
72
  }
73
73
  if (resolveConflict) {
@@ -116,11 +116,11 @@ async function tryDelete({ port, store, id, ifMatch, revision }) {
116
116
  return true;
117
117
  }
118
118
  catch (err) {
119
- if (err instanceof WasSyncNotFoundError) {
119
+ if (isSyncNotFoundError(err)) {
120
120
  await store.markDeletedPushed({ id, ...revisionAck });
121
121
  return true;
122
122
  }
123
- if (err instanceof WasSyncConflictError) {
123
+ if (isSyncConflictError(err)) {
124
124
  return false;
125
125
  }
126
126
  throw err;
@@ -1 +1 @@
1
- {"version":3,"file":"push.js","sourceRoot":"","sources":["../../src/sync/push.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAErD,OAAO,EAAE,oBAAoB,EAAE,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KAAK,EACL,eAAe,EACf,MAAM,EAMP;IACC,MAAM,IAAI,GAAG,MAAM,KAAK,CAAC,YAAY,EAAE,CAAA;IACvC,IAAI,MAAM,GAAG,CAAC,CAAA;IACd,IAAI,iBAAiB,GAAG,CAAC,CAAA;IACzB,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,IAAI,MAAM,EAAE,OAAO,EAAE,CAAC;YACpB,MAAK;QACP,CAAC;QACD,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC;YAChB,MAAM,UAAU,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAA;QACxC,CAAC;aAAM,CAAC;YACN,MAAM,EAAE,gBAAgB,EAAE,GAAG,MAAM,UAAU,CAAC;gBAC5C,IAAI;gBACJ,KAAK;gBACL,GAAG;gBACH,eAAe;aAChB,CAAC,CAAA;YACF,IAAI,gBAAgB,EAAE,CAAC;gBACrB,iBAAiB,IAAI,CAAC,CAAA;YACxB,CAAC;QACH,CAAC;QACD,MAAM,IAAI,CAAC,CAAA;IACb,CAAC;IACD,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,CAAA;AACtC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { UnknownEpochError } from './types.js';
1
+ import { isUnknownEpochError } from './types.js';
2
2
  /**
3
3
  * How many full re-mint passes are attempted before giving up. A pass that
4
4
  * ends with skipped rows (a local write bumped a row's revision between the
@@ -75,7 +75,7 @@ export async function remintPendingEnvelopes({ store, cipher, decryptStale, sign
75
75
  continue;
76
76
  }
77
77
  catch (err) {
78
- if (!(err instanceof UnknownEpochError)) {
78
+ if (!isUnknownEpochError(err)) {
79
79
  throw err;
80
80
  }
81
81
  }
@@ -1 +1 @@
1
- {"version":3,"file":"remint.js","sourceRoot":"","sources":["../../src/sync/remint.ts"],"names":[],"mappings":"AAgCA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAE9C;;;;;GAKG;AACH,MAAM,mBAA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interop/was-client/sync` and are re-exported here so a single import gives
11
- * a consumer both the wire types and the replica-side seams.
11
+ * a consumer both the wire types and the replica-side seams. Beside the three
12
+ * signal classes sit the three predicates that CLASSIFY them
13
+ * ({@link isSyncConflictError}, {@link isSyncNotFoundError},
14
+ * {@link isUnknownEpochError}): each is raised inside an app-injected seam --
15
+ * the port for the two wire signals, the caller's `DocCipher` for the third --
16
+ * which can resolve to a second copy of `@interop/was-client` (a `link:` dev
17
+ * setup, a dedupe miss through a dependency tree), so they are matched on
18
+ * `err.name` and never with `instanceof`. The same rule the resource-log
19
+ * refusal classes follow, and for the same reason: an `instanceof` miss here
20
+ * turns every push 412 into a fatal cycle error and makes the create-loss
21
+ * re-mint rethrow instead of re-minting. Every one of the three classes
22
+ * assigns its `name` explicitly, which is what makes the string a contract.
12
23
  *
13
24
  * The local-persistence seam (`SyncStore`, `SyncedRow`, `ProjectionAction`,
14
25
  * `ResolveConflict`) is the replica's side of the contract: it stands in for a
@@ -24,6 +35,35 @@
24
35
  export { UnknownEpochError, WasSyncConflictError, WasSyncNotFoundError } from '@interop/was-client/sync';
25
36
  export type { Json, SyncCheckpoint, WireDoc, MasterState, WasSyncPort, DocCipher } from '@interop/was-client/sync';
26
37
  import type { Json, MasterState, SyncCheckpoint, WireDoc } from '@interop/was-client/sync';
38
+ /**
39
+ * Whether an error is the replication port's rejected-conditional-write signal
40
+ * (`WasSyncConflictError`, HTTP 412): a lost-update `If-Match` mismatch, or a
41
+ * create-if-absent whose target already exists. The push loop's one settle-and-
42
+ * reconcile branch; everything else propagates to the engine's backoff.
43
+ *
44
+ * @param err {unknown}
45
+ * @returns {boolean}
46
+ */
47
+ export declare function isSyncConflictError(err: unknown): boolean;
48
+ /**
49
+ * Whether an error is the replication port's absent-target signal
50
+ * (`WasSyncNotFoundError`, HTTP 404). On a delete that is a settled outcome
51
+ * -- already gone, or the write never reached the server -- not a conflict.
52
+ *
53
+ * @param err {unknown}
54
+ * @returns {boolean}
55
+ */
56
+ export declare function isSyncNotFoundError(err: unknown): boolean;
57
+ /**
58
+ * Whether an error is the cipher's unknown-epoch signal (`UnknownEpochError`):
59
+ * an envelope naming recipient key ids whose epoch the descriptor this reader
60
+ * holds does not list at all. Distinct from a key the reader simply does not
61
+ * have (`KeyUnwrapError`), which re-reading the descriptor cannot fix.
62
+ *
63
+ * @param err {unknown}
64
+ * @returns {boolean}
65
+ */
66
+ export declare function isUnknownEpochError(err: unknown): boolean;
27
67
  /**
28
68
  * A dirty local synced-docs row awaiting push. `data` is the stored body (the
29
69
  * EDV envelope on an encrypted collection, or the plaintext JSON on a plaintext
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/sync/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,0BAA0B,CAAA;AACjC,YAAY,EACV,IAAI,EACJ,cAAc,EACd,OAAO,EACP,WAAW,EACX,WAAW,EACX,SAAS,EACV,MAAM,0BAA0B,CAAA;AAEjC,OAAO,KAAK,EACV,IAAI,EACJ,WAAW,EACX,cAAc,EACd,OAAO,EACR,MAAM,0BAA0B,CAAA;AAEjC;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,OAAO,CAAA;IAChB,IAAI,EAAE,IAAI,GAAG,IAAI,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAC3B;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,gBAAgB,GAC1B;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,MAA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CAAA;IAEjB;;;;;;OAMG;IACH,WAAW,CAAC,OAAO,EAAE;QACnB,EAAE,EAAE,MAAM,CAAA;QACV,MAAM,EAAE,WAAW,GAAG,IAAI,CAAA;QAC1B,UAAU,EAAE,gBAAgB,CAAA;KAC7B,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAEjB;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,cAAc,CAAC,CAAC,OAAO,EAAE;QACvB,EAAE,EAAE,MAAM,CAAA;QACV,KAAK,EAAE,MAAM,CAAA;QACb,QAAQ,EAAE,IAAI,CAAA;QACd,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;KAC3B,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAA;CAClC"}
@@ -8,7 +8,18 @@
8
8
  * `MasterState`, `WasSyncPort`, `DocCipher`, and the `WasSyncConflictError` /
9
9
  * `WasSyncNotFoundError` / `UnknownEpochError` signals) come from
10
10
  * `@interop/was-client/sync` and are re-exported here so a single import gives
11
- * a consumer both the wire types and the replica-side seams.
11
+ * a consumer both the wire types and the replica-side seams. Beside the three
12
+ * signal classes sit the three predicates that CLASSIFY them
13
+ * ({@link isSyncConflictError}, {@link isSyncNotFoundError},
14
+ * {@link isUnknownEpochError}): each is raised inside an app-injected seam --
15
+ * the port for the two wire signals, the caller's `DocCipher` for the third --
16
+ * which can resolve to a second copy of `@interop/was-client` (a `link:` dev
17
+ * setup, a dedupe miss through a dependency tree), so they are matched on
18
+ * `err.name` and never with `instanceof`. The same rule the resource-log
19
+ * refusal classes follow, and for the same reason: an `instanceof` miss here
20
+ * turns every push 412 into a fatal cycle error and makes the create-loss
21
+ * re-mint rethrow instead of re-minting. Every one of the three classes
22
+ * assigns its `name` explicitly, which is what makes the string a contract.
12
23
  *
13
24
  * The local-persistence seam (`SyncStore`, `SyncedRow`, `ProjectionAction`,
14
25
  * `ResolveConflict`) is the replica's side of the contract: it stands in for a
@@ -22,4 +33,39 @@
22
33
  * Native, against a fake port and an in-memory store.
23
34
  */
24
35
  export { UnknownEpochError, WasSyncConflictError, WasSyncNotFoundError } from '@interop/was-client/sync';
36
+ /**
37
+ * Whether an error is the replication port's rejected-conditional-write signal
38
+ * (`WasSyncConflictError`, HTTP 412): a lost-update `If-Match` mismatch, or a
39
+ * create-if-absent whose target already exists. The push loop's one settle-and-
40
+ * reconcile branch; everything else propagates to the engine's backoff.
41
+ *
42
+ * @param err {unknown}
43
+ * @returns {boolean}
44
+ */
45
+ export function isSyncConflictError(err) {
46
+ return err?.name === 'WasSyncConflictError';
47
+ }
48
+ /**
49
+ * Whether an error is the replication port's absent-target signal
50
+ * (`WasSyncNotFoundError`, HTTP 404). On a delete that is a settled outcome
51
+ * -- already gone, or the write never reached the server -- not a conflict.
52
+ *
53
+ * @param err {unknown}
54
+ * @returns {boolean}
55
+ */
56
+ export function isSyncNotFoundError(err) {
57
+ return err?.name === 'WasSyncNotFoundError';
58
+ }
59
+ /**
60
+ * Whether an error is the cipher's unknown-epoch signal (`UnknownEpochError`):
61
+ * an envelope naming recipient key ids whose epoch the descriptor this reader
62
+ * holds does not list at all. Distinct from a key the reader simply does not
63
+ * have (`KeyUnwrapError`), which re-reading the descriptor cannot fix.
64
+ *
65
+ * @param err {unknown}
66
+ * @returns {boolean}
67
+ */
68
+ export function isUnknownEpochError(err) {
69
+ return err?.name === 'UnknownEpochError';
70
+ }
25
71
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/sync/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,0BAA0B,CAAA"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/sync/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,0BAA0B,CAAA;AAiBjC;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CAAC,GAAY;IAC9C,OAAQ,GAAiC,EAAE,IAAI,KAAK,sBAAsB,CAAA;AAC5E,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,mBAAmB,CAAC,GAAY;IAC9C,OAAQ,GAAiC,EAAE,IAAI,KAAK,sBAAsB,CAAA;AAC5E,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CAAC,GAAY;IAC9C,OAAQ,GAAiC,EAAE,IAAI,KAAK,mBAAmB,CAAA;AACzE,CAAC"}
@@ -22,6 +22,10 @@
22
22
  * - `retireUnlockCredential` -- the retirement ceremony behind "change my
23
23
  * passphrase" and "remove this passkey": the inventory edit, then the shared
24
24
  * roster rotation and collection fan-out off the retired credential's wrap.
25
+ * It refuses (`UnclaimedLadderVmRetirementError`) when the ladder
26
+ * attribution cannot claim the retired credential's ladder VM;
27
+ * `preflightUnlockCredentialRetirement` runs that gate read-only, before a
28
+ * caller establishes anything.
25
29
  *
26
30
  * The ladder itself, and every ceremony that exercises it (the ladder-anchored
27
31
  * genesis, self-enrollment, the forget ceremony), live in
@@ -35,7 +39,7 @@ export { standingClientFromUnlockSeed, STANDING_CLIENT_SALT, unlockClientIdentit
35
39
  export type { StandingUnlockClient, UnlockClientIdentity } from './standingClient.js';
36
40
  export { computeUnlockBinding, LADDER_SEED_BYTES, recordSealedRecipientKeys, remintUnlockRecordDelegations, UnlockBindingError, unlockRecordBinding, unlockRecordSealedTo, unwrapUnlockRecord, wrapUnlockRecord } from './unlockRecord.js';
37
41
  export type { SealedRecordMember, SignedUnlockRecord, UnlockRecordContents, UnlockRecordProofState } from './unlockRecord.js';
38
- export { LadderInventoryDriftError, publishUnlockKey, removeUnlockKey, unlockKeyVerificationMethod, unlockKeyVmId } from './standingWebvh.js';
42
+ export { assertLadderVmClaimed, LadderInventoryDriftError, ladderVmClaimOf, preflightUnlockCredentialRetirement, publishUnlockKey, removeUnlockKey, UnclaimedLadderVmRetirementError, unlockKeyVerificationMethod, unlockKeyVmId } from './standingWebvh.js';
39
43
  export type { LadderVmRemovalReport, StandingUnlockKeys, UnlockKeyAgreementPublication, UnlockLogStore } from './standingWebvh.js';
40
44
  export { retireUnlockCredential } from './retire.js';
41
45
  export type { ClientAnnexInventoryRetirement, UnlockCredentialRetirementResult } from './retire.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/unlock/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EACL,4BAA4B,EAC5B,oBAAoB,EACpB,4BAA4B,EAC7B,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EACV,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,yBAAyB,EACzB,6BAA6B,EAC7B,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EACL,yBAAyB,EACzB,gBAAgB,EAChB,eAAe,EACf,2BAA2B,EAC3B,aAAa,EACd,MAAM,oBAAoB,CAAA;AAC3B,YAAY,EACV,qBAAqB,EACrB,kBAAkB,EAClB,6BAA6B,EAC7B,cAAc,EACf,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AACpD,YAAY,EACV,8BAA8B,EAC9B,gCAAgC,EACjC,MAAM,aAAa,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/unlock/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,EACL,4BAA4B,EAC5B,oBAAoB,EACpB,4BAA4B,EAC7B,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EACV,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,yBAAyB,EACzB,6BAA6B,EAC7B,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EACL,qBAAqB,EACrB,yBAAyB,EACzB,eAAe,EACf,mCAAmC,EACnC,gBAAgB,EAChB,eAAe,EACf,gCAAgC,EAChC,2BAA2B,EAC3B,aAAa,EACd,MAAM,oBAAoB,CAAA;AAC3B,YAAY,EACV,qBAAqB,EACrB,kBAAkB,EAClB,6BAA6B,EAC7B,cAAc,EACf,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AACpD,YAAY,EACV,8BAA8B,EAC9B,gCAAgC,EACjC,MAAM,aAAa,CAAA"}
@@ -22,6 +22,10 @@
22
22
  * - `retireUnlockCredential` -- the retirement ceremony behind "change my
23
23
  * passphrase" and "remove this passkey": the inventory edit, then the shared
24
24
  * roster rotation and collection fan-out off the retired credential's wrap.
25
+ * It refuses (`UnclaimedLadderVmRetirementError`) when the ladder
26
+ * attribution cannot claim the retired credential's ladder VM;
27
+ * `preflightUnlockCredentialRetirement` runs that gate read-only, before a
28
+ * caller establishes anything.
25
29
  *
26
30
  * The ladder itself, and every ceremony that exercises it (the ladder-anchored
27
31
  * genesis, self-enrollment, the forget ceremony), live in
@@ -33,6 +37,6 @@
33
37
  */
34
38
  export { standingClientFromUnlockSeed, STANDING_CLIENT_SALT, unlockClientIdentityFromSeed } from './standingClient.js';
35
39
  export { computeUnlockBinding, LADDER_SEED_BYTES, recordSealedRecipientKeys, remintUnlockRecordDelegations, UnlockBindingError, unlockRecordBinding, unlockRecordSealedTo, unwrapUnlockRecord, wrapUnlockRecord } from './unlockRecord.js';
36
- export { LadderInventoryDriftError, publishUnlockKey, removeUnlockKey, unlockKeyVerificationMethod, unlockKeyVmId } from './standingWebvh.js';
40
+ export { assertLadderVmClaimed, LadderInventoryDriftError, ladderVmClaimOf, preflightUnlockCredentialRetirement, publishUnlockKey, removeUnlockKey, UnclaimedLadderVmRetirementError, unlockKeyVerificationMethod, unlockKeyVmId } from './standingWebvh.js';
37
41
  export { retireUnlockCredential } from './retire.js';
38
42
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/unlock/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EACL,4BAA4B,EAC5B,oBAAoB,EACpB,4BAA4B,EAC7B,MAAM,qBAAqB,CAAA;AAM5B,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,yBAAyB,EACzB,6BAA6B,EAC7B,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,mBAAmB,CAAA;AAQ1B,OAAO,EACL,yBAAyB,EACzB,gBAAgB,EAChB,eAAe,EACf,2BAA2B,EAC3B,aAAa,EACd,MAAM,oBAAoB,CAAA;AAQ3B,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/unlock/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,EACL,4BAA4B,EAC5B,oBAAoB,EACpB,4BAA4B,EAC7B,MAAM,qBAAqB,CAAA;AAM5B,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,yBAAyB,EACzB,6BAA6B,EAC7B,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,mBAAmB,CAAA;AAQ1B,OAAO,EACL,qBAAqB,EACrB,yBAAyB,EACzB,eAAe,EACf,mCAAmC,EACnC,gBAAgB,EAChB,eAAe,EACf,gCAAgC,EAChC,2BAA2B,EAC3B,aAAa,EACd,MAAM,oBAAoB,CAAA;AAQ3B,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA"}
@@ -71,6 +71,21 @@
71
71
  * skip, so the roster rotation -- the ceremony's essential remedy -- always
72
72
  * runs.
73
73
  *
74
+ * Both stages carry the retirement gate (`decisions/0015`): a credential
75
+ * retired here carries a ladder, so its ladder VM must be claimed -- by the
76
+ * seed, or by the log's attribution -- before the edit strikes anything. A
77
+ * claim that strikes nothing while ladder VMs stand unclaimed refuses with
78
+ * `UnclaimedLadderVmRetirementError`, at stage 0 before the re-mint pass
79
+ * writes a sibling record and again inside the edit before its entry
80
+ * publishes, so the credential still stands and the log is unchanged. The
81
+ * leftover the gate closes is a retired credential's VM standing under
82
+ * `capabilityDelegation`, which could still sign a DELETE-only capability on
83
+ * the account Space. Callers that establish a replacement before retiring
84
+ * run `preflightUnlockCredentialRetirement` first, so the refusal lands
85
+ * before establishment rather than in a torn state. The recovery-code
86
+ * removal shares the edit but not the gate: a code carries no ladder VM to
87
+ * claim.
88
+ *
74
89
  * Stage 0 and stage 1 each read the log for themselves, and the two reads are
75
90
  * tied by a cross-check rather than by luck: stage 0 hands its attributed
76
91
  * ladder VM ids to the edit as `expectedLadderVmIds`, and the edit refuses
@@ -96,7 +111,8 @@ import type { IKeyAgreementKey } from '@interop/data-integrity-core';
96
111
  import type { CollectionEncryption } from '@interop/was-client';
97
112
  import type { EncryptionDescriptorStore } from '@interop/was-client/edv';
98
113
  import { type CascadeCollections, type RosterSealReport, type UserKey, type UserKeyCascadeResult } from '../keys/index.js';
99
- import type { ClientWebvhUpdateKeys, WebvhIdStore } from '../webvh/index.js';
114
+ import type { WebvhIdStore } from '../webvh/index.js';
115
+ import type { AccountLogSigner } from '../webvh/accountEntry.js';
100
116
  import type { ResourceLogPinStore } from '@interop/vh-resource-log';
101
117
  import { type LadderVmRemovalReport, type StandingUnlockKeys } from './standingWebvh.js';
102
118
  /**
@@ -143,15 +159,23 @@ export interface ClientAnnexInventoryRetirement {
143
159
  *
144
160
  * @param options {object}
145
161
  * @param options.idStore {WebvhIdStore} the account's `id` collection store
146
- * @param options.updateKeys {ClientWebvhUpdateKeys} the RETIRING (enrolled)
147
- * client's own did:webvh update-key seeds, which sign the inventory edit
162
+ * @param options.signer {AccountLogSigner} who signs the inventory edit:
163
+ * the retiring enrolled client's own did:webvh update-key seeds, or the
164
+ * ACTING (surviving or successor) credential's ladder seed
148
165
  * @param options.unlockKeys {StandingUnlockKeys} the retired credential's
149
166
  * public inventory (its key-agreement publication and its recorded update
150
167
  * key, which the inventory edit treats as a ladder anchor rather than truth
151
168
  * -- see `removeUnlockKey`)
152
169
  * @param [options.ladderSeed] {Uint8Array} the retired credential's ladder
153
170
  * seed, when the ceremony holds the credential's secret; it strengthens the
154
- * ladder attribution but is not required
171
+ * ladder attribution, and it is what a retry supplies after a seedless run
172
+ * refused with `UnclaimedLadderVmRetirementError`
173
+ * @param [options.projectionStore] {object} an `id`-collection store the
174
+ * caller may write through, passed straight to the inventory edit: the
175
+ * post-strike `did:web` projection is PUT through it immediately before
176
+ * that entry publishes, so a ladder-signed retirement does not leave
177
+ * `did.json` naming the retired credential. Best-effort, and omitted the
178
+ * behavior is unchanged (see `removeUnlockKey`)
155
179
  * @param [options.expectedDid] {string} the account DID from the caller's
156
180
  * stored account pointer; supplied, the inventory edit refuses a `did.jsonl`
157
181
  * resolving to any other account
@@ -181,7 +205,10 @@ export interface ClientAnnexInventoryRetirement {
181
205
  * re-mint (stage 0), run against the PRE-edit document with the ladder VM
182
206
  * ids this retirement is about to strike. Fail-closed: a throw aborts the
183
207
  * retirement before the document edit. Absent, the stage is skipped and no
184
- * log read happens for it (the no-WAS path)
208
+ * log read happens for it (the no-WAS path). It is also skipped on the
209
+ * ladder arm: every unlock record is signed by its own credential's ladder
210
+ * VM, so this strike rots no sibling record, and there is nothing to
211
+ * re-mint (`decisions/0019`)
185
212
  * @param [options.retireClientAnnexInventory] {Function} `({ document }) =>
186
213
  * Promise<ClientAnnexInventoryRetirement>` -- the annex reach (stage 1b in
187
214
  * the module doc), run against the post-edit document; a throw is caught
@@ -191,11 +218,12 @@ export interface ClientAnnexInventoryRetirement {
191
218
  * the session keeps operating without a re-login
192
219
  * @returns {Promise<UnlockCredentialRetirementResult>}
193
220
  */
194
- export declare function retireUnlockCredential({ idStore, updateKeys, unlockKeys, ladderSeed, expectedDid, pinStore, logId, verb, rosterStore, userKey, clientKeyAgreementKey, pinnedEpochId, onUserKeyAdopted, collections, remintDependentRecords, retireClientAnnexInventory, onRotationAdopted }: {
221
+ export declare function retireUnlockCredential({ idStore, signer, unlockKeys, ladderSeed, projectionStore, expectedDid, pinStore, logId, verb, rosterStore, userKey, clientKeyAgreementKey, pinnedEpochId, onUserKeyAdopted, collections, remintDependentRecords, retireClientAnnexInventory, onRotationAdopted }: {
195
222
  idStore: WebvhIdStore;
196
- updateKeys: ClientWebvhUpdateKeys;
223
+ signer: AccountLogSigner;
197
224
  unlockKeys: StandingUnlockKeys;
198
225
  ladderSeed?: Uint8Array;
226
+ projectionStore?: Pick<WebvhIdStore, 'getIdResourceRaw' | 'putIdResource'>;
199
227
  expectedDid?: string;
200
228
  pinStore?: ResourceLogPinStore;
201
229
  logId?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"retire.d.ts","sourceRoot":"","sources":["../../src/unlock/retire.ts"],"names":[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