@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
@@ -1 +1 @@
1
- {"version":3,"file":"cipher.js","sourceRoot":"","sources":["../../src/descriptors/cipher.ts"],"names":[],"mappings":"AAsCA,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EAElB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EACL,iBAAiB,EAGlB,MAAM,cAAc,CAAA;AAErB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAAC,EACjD,eAAe,EACf,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,MAAM,EACN,KAAK,EACL,YAAY,EASb;IACC,MAAM,KAAK,GAAG,KAAK,IAAwB,EAAE;QAC3C,MAAM,UAAU,GAAG,MAAM,iBAAiB,CAAC;YACzC,MAAM;YACN,KAAK;YACL,YAAY;YACZ,YAAY;SACb,CAAC,CAAA;QACF,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,MAAM,IAAI,KAAK,CACb,eAAe,YAAY,2CAA2C;gBACpE,kEAAkE;gBAClE,oEAAoE,CACvE,CAAA;QACH,CAAC;QACD,OAAO,kBAAkB,CAAC;YACxB,eAAe;YACf,WAAW;YACX,YAAY;YACZ,YAAY;YACZ,UAAU;SACX,CAAC,CAAA;IACJ,CAAC,CAAA;IAED,IA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S,CAAA;gBACjB,CAAC;gBAAC,MAAM,CAAC;oBACP,mEAAmE;oBACnE,gEAAgE;oBAChE,+DAA+D;oBAC/D,mDAAmD;oBACnD,MAAM,GAAG,CAAA;gBACX,CAAC;gBACD,iEAAiE;gBACjE,8DAA8D;gBAC9D,+DAA+D;gBAC/D,iEAAiE;gBACjE,2BAA2B;gBAC3B,OAAO,KAAK,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAA;YACpC,CAAC;QACH,CAAC;KACF,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"cipher.js","sourceRoot":"","sources":["../../src/descriptors/cipher.ts"],"names":[],"mappings":"AAsCA,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EAElB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EACL,iBAAiB,EAGlB,MAAM,cAAc,CAAA;AAErB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAAC,EACjD,eAAe,EACf,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,MAAM,EACN,KAAK,EACL,YAAY,EASb;IACC,MAAM,KAAK,GAAG,KAAK,IAAwB,EAAE;QAC3C,MAAM,UAAU,GAAG,MAAM,iBAAiB,CAAC;YACzC,MAAM;YACN,KAAK;YACL,YAAY;YACZ,YAAY;SACb,CAAC,CAAA;QACF,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,MAAM,IAAI,KAAK,CACb,eAAe,YAAY,2CAA2C;gBACpE,kEAAkE;gBAClE,oEAAoE,CACvE,CAAA;QACH,CAAC;QACD,OAAO,kBAAkB,CAAC;YACxB,eAAe;YACf,WAAW;YACX,YAAY;YACZ,YAAY;YACZ,UAAU;SACX,CAAC,CAAA;IACJ,CAAC,CAAA;IAED,IAAI,KAAK,GAAG,MAAM,KAAK,EAAE,CAAA;IACzB,0EAA0E;IAC1E,yEAAyE;IACzE,+CAA+C;IAC/C,IAAI,SAAS,GAAyB,IAAI,CAAA;IA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mEAAmE;oBACnE,gEAAgE;oBAChE,+DAA+D;oBAC/D,mDAAmD;oBACnD,MAAM,GAAG,CAAA;gBACX,CAAC;gBACD,iEAAiE;gBACjE,8DAA8D;gBAC9D,+DAA+D;gBAC/D,iEAAiE;gBACjE,2BAA2B;gBAC3B,OAAO,KAAK,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAA;YACpC,CAAC;QACH,CAAC;KACF,CAAA;AACH,CAAC"}
@@ -0,0 +1,43 @@
1
+ /*!
2
+ * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
+ */
4
+ /**
5
+ * The read-side classification of what an injected `DocCipher` throws when it
6
+ * cannot open an envelope.
7
+ *
8
+ * A decrypt has two distinguishable no-key outcomes, and a host that scans
9
+ * rows must tell them apart: an epoch the descriptor this reader holds does
10
+ * not list at all (`UnknownEpochError` -- possibly fresh data behind a stale
11
+ * descriptor, so a re-read may fix it), and an epoch the descriptor does list
12
+ * but this reader holds no key for (`KeyUnwrapError` -- real data, and
13
+ * permanently unreadable here, since re-reading the same descriptor cannot
14
+ * produce a key the reader was not given). Neither is corruption, so neither
15
+ * row may be treated as garbage.
16
+ *
17
+ * Both are matched on `err.name`, never `instanceof`: the cipher is an
18
+ * injected seam, and in a wallet whose `@interop/was-client` resolves to a
19
+ * second copy (a `link:` dev setup, a dedupe miss through a dependency tree)
20
+ * the class the cipher throws is not the class the caller imported. The cost
21
+ * of the miss lands on real data -- a scan that misses `KeyUnwrapError` drops
22
+ * the row into its undecryptable bucket, which a host is entitled to purge.
23
+ * Both classes assign their `name` explicitly, which is what makes the string
24
+ * a contract.
25
+ *
26
+ * The unknown-epoch half of the pair ships from `@interop/wallet-core/sync`
27
+ * as `isUnknownEpochError`: the create-loss re-mint dispatches on it, and
28
+ * `sync` deliberately imports nothing else in this library. This file is the
29
+ * home of the other half, beside the cipher that raises it, and stays
30
+ * import-free for the same reason `resourceLog/errors.ts` does.
31
+ */
32
+ /**
33
+ * Whether an error is the cipher's not-a-recipient signal (`KeyUnwrapError`):
34
+ * the envelope's epoch IS on the descriptor this reader holds, but the reader
35
+ * has no key for it -- never a recipient of that epoch, or removed and the
36
+ * epoch rotated since. Real data, unreadable by this wallet, and never
37
+ * garbage: a caller skips such a row and leaves it in place.
38
+ *
39
+ * @param err {unknown}
40
+ * @returns {boolean}
41
+ */
42
+ export declare function isKeyUnwrapError(err: unknown): boolean;
43
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/descriptors/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEtD"}
@@ -0,0 +1,45 @@
1
+ /*!
2
+ * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
+ */
4
+ /**
5
+ * The read-side classification of what an injected `DocCipher` throws when it
6
+ * cannot open an envelope.
7
+ *
8
+ * A decrypt has two distinguishable no-key outcomes, and a host that scans
9
+ * rows must tell them apart: an epoch the descriptor this reader holds does
10
+ * not list at all (`UnknownEpochError` -- possibly fresh data behind a stale
11
+ * descriptor, so a re-read may fix it), and an epoch the descriptor does list
12
+ * but this reader holds no key for (`KeyUnwrapError` -- real data, and
13
+ * permanently unreadable here, since re-reading the same descriptor cannot
14
+ * produce a key the reader was not given). Neither is corruption, so neither
15
+ * row may be treated as garbage.
16
+ *
17
+ * Both are matched on `err.name`, never `instanceof`: the cipher is an
18
+ * injected seam, and in a wallet whose `@interop/was-client` resolves to a
19
+ * second copy (a `link:` dev setup, a dedupe miss through a dependency tree)
20
+ * the class the cipher throws is not the class the caller imported. The cost
21
+ * of the miss lands on real data -- a scan that misses `KeyUnwrapError` drops
22
+ * the row into its undecryptable bucket, which a host is entitled to purge.
23
+ * Both classes assign their `name` explicitly, which is what makes the string
24
+ * a contract.
25
+ *
26
+ * The unknown-epoch half of the pair ships from `@interop/wallet-core/sync`
27
+ * as `isUnknownEpochError`: the create-loss re-mint dispatches on it, and
28
+ * `sync` deliberately imports nothing else in this library. This file is the
29
+ * home of the other half, beside the cipher that raises it, and stays
30
+ * import-free for the same reason `resourceLog/errors.ts` does.
31
+ */
32
+ /**
33
+ * Whether an error is the cipher's not-a-recipient signal (`KeyUnwrapError`):
34
+ * the envelope's epoch IS on the descriptor this reader holds, but the reader
35
+ * has no key for it -- never a recipient of that epoch, or removed and the
36
+ * epoch rotated since. Real data, unreadable by this wallet, and never
37
+ * garbage: a caller skips such a row and leaves it in place.
38
+ *
39
+ * @param err {unknown}
40
+ * @returns {boolean}
41
+ */
42
+ export function isKeyUnwrapError(err) {
43
+ return err?.name === 'KeyUnwrapError';
44
+ }
45
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/descriptors/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH;;;;;;;;;GASG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAY;IAC3C,OAAQ,GAAiC,EAAE,IAAI,KAAK,gBAAgB,CAAA;AACtE,CAAC"}
@@ -35,10 +35,15 @@
35
35
  * cipher that acquires its own descriptor and, on an unknown-epoch decrypt,
36
36
  * re-reads the description, swaps itself, and retries exactly once per
37
37
  * instance.
38
+ * - `isKeyUnwrapError` -- how a host scanning rows tells "not a recipient of
39
+ * this epoch" from corruption, matched by `err.name` because the cipher is
40
+ * an injected seam. Its sibling `isUnknownEpochError` ships from
41
+ * `@interop/wallet-core/sync`.
38
42
  */
39
43
  export { acquireDescriptor, acquireDescriptors, wasDescriptorSource } from './acquire.js';
40
44
  export type { EncryptionDescriptorCache, EncryptionDescriptorSource } from './acquire.js';
41
45
  export { EPOCH_CONFIGURATION_STATE_TYPE, logGovernedDescriptorSource, readGovernedEpochConfiguration } from './logSource.js';
42
46
  export { DescriptorRefreshPolicy } from './refresh.js';
43
47
  export { createRefreshingEdvDocCipher } from './cipher.js';
48
+ export { isKeyUnwrapError } from './errors.js';
44
49
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/descriptors/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,cAAc,CAAA;AACrB,YAAY,EACV,yBAAyB,EACzB,0BAA0B,EAC3B,MAAM,cAAc,CAAA;AAErB,OAAO,EACL,8BAA8B,EAC9B,2BAA2B,EAC3B,8BAA8B,EAC/B,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAEtD,OAAO,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/descriptors/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,cAAc,CAAA;AACrB,YAAY,EACV,yBAAyB,EACzB,0BAA0B,EAC3B,MAAM,cAAc,CAAA;AAErB,OAAO,EACL,8BAA8B,EAC9B,2BAA2B,EAC3B,8BAA8B,EAC/B,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAEtD,OAAO,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAA;AAE1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA"}
@@ -35,9 +35,14 @@
35
35
  * cipher that acquires its own descriptor and, on an unknown-epoch decrypt,
36
36
  * re-reads the description, swaps itself, and retries exactly once per
37
37
  * instance.
38
+ * - `isKeyUnwrapError` -- how a host scanning rows tells "not a recipient of
39
+ * this epoch" from corruption, matched by `err.name` because the cipher is
40
+ * an injected seam. Its sibling `isUnknownEpochError` ships from
41
+ * `@interop/wallet-core/sync`.
38
42
  */
39
43
  export { acquireDescriptor, acquireDescriptors, wasDescriptorSource } from './acquire.js';
40
44
  export { EPOCH_CONFIGURATION_STATE_TYPE, logGovernedDescriptorSource, readGovernedEpochConfiguration } from './logSource.js';
41
45
  export { DescriptorRefreshPolicy } from './refresh.js';
42
46
  export { createRefreshingEdvDocCipher } from './cipher.js';
47
+ export { isKeyUnwrapError } from './errors.js';
43
48
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/descriptors/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,cAAc,CAAA;AAMrB,OAAO,EACL,8BAA8B,EAC9B,2BAA2B,EAC3B,8BAA8B,EAC/B,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAEtD,OAAO,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/descriptors/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,cAAc,CAAA;AAMrB,OAAO,EACL,8BAA8B,EAC9B,2BAA2B,EAC3B,8BAA8B,EAC/B,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAEtD,OAAO,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAA;AAE1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA"}
@@ -29,6 +29,7 @@
29
29
  */
30
30
  import type { IKeyAgreementKey } from '@interop/data-integrity-core';
31
31
  import type { EncryptionDescriptorStore } from '@interop/was-client/edv';
32
+ import type { AccountLogSigner } from '../webvh/accountEntry.js';
32
33
  import type { ClientWebvhUpdateKeys, WebvhEnrollmentKeys, WebvhIdStore } from '../webvh/didWebvh.js';
33
34
  import { type ResourceLogPinStore } from '@interop/vh-resource-log';
34
35
  import type { UserKey } from '../keys/userKey.js';
@@ -140,21 +141,47 @@ export declare function mintEnrollmentRequest(): Promise<{
140
141
  clientDid: string;
141
142
  }>;
142
143
  /**
143
- * ENROLLING CLIENT: the whole approval, in the push order -- the user key
144
- * wrapped into the roster first (escrow: every epoch, so the new client reads
145
- * pre-enrollment history), then the two log entries. Quorum-of-one: this
146
- * client's own update key signs both entries. Idempotent at every stage, so
144
+ * THE APPROVING SIDE: the whole approval -- the user key wrapped into the
145
+ * roster (escrow: every epoch, so the new client reads pre-enrollment
146
+ * history) and the two log entries. Idempotent at every stage, so
147
147
  * re-approving the same code after any tear converges. A request whose
148
148
  * key-agreement key is not its signing key's canonical twin is refused before
149
149
  * anything is written ({@link assertCanonicalEnrollmentKeys}).
150
150
  *
151
+ * The escrow is placed by signer kind (`decisions/0018`). A CLIENT signer
152
+ * keeps the push order, the escrow first: an enrolled client's roster append
153
+ * needs no license, so it may precede the entries, and no enrolled client is
154
+ * ever authorized but blind. Quorum-of-one there: any single enrolled
155
+ * client's own update key signs both entries.
156
+ *
157
+ * A LADDER signer runs commit, add, then escrow, because a ladder-signed
158
+ * append is licensed only at an inventory-changing version its own ladder
159
+ * signed, which the add entry is what mints. The one-request window between
160
+ * the add entry and the append is the ladder branch's stated cost: a client
161
+ * the add entry published holds `assertionMethod` and its own update key
162
+ * while holding no wrap. It is bounded three ways -- one request wide on the
163
+ * happy path, mended by a re-run with the same connect code and by the
164
+ * escrow-direction convergence of any later ladder-branch ceremony (the
165
+ * document carries the client's key verbatim), and visible as a row in the
166
+ * connected-wallets listing, where a disconnect removes it.
167
+ *
168
+ * On that branch the escrow must ANCHOR at the add entry's version, and the
169
+ * ceremony does not leave that to the roster store's own controller wiring:
170
+ * a store resolving its controller view through a document cached before
171
+ * the entries (an app's session-verified log) would anchor the append at the
172
+ * pre-add head, and the license would refuse it after the ceremony's pivot.
173
+ * So, on a sealable roster store, the view built from the add entry's own
174
+ * post-add log is set as the store's minimum controller version before the
175
+ * escrow runs -- the same guarantee `revokeAccountClient` gives its rotation
176
+ * from its post-edit log. A fresher resolved view still wins.
177
+ *
151
178
  * @param options {object}
152
179
  * @param options.request {EnrollmentRequest} the parsed connect code
153
- * @param options.clientWebvhKeys {ClientWebvhUpdateKeys} the approving
154
- * client's own did:webvh update-key seeds
180
+ * @param options.signer {AccountLogSigner} who signs the two entries: the
181
+ * approving client's own did:webvh update-key seeds, or the acting
182
+ * credential's ladder seed
155
183
  * @param options.clientKeyAgreementKey {IKeyAgreementKey} the approving
156
- * client's own (identity) key-agreement key, unwrapping each epoch for
157
- * re-wrapping
184
+ * party's own key-agreement key, unwrapping each epoch for re-wrapping
158
185
  * @param options.userKeyRosterStore {EncryptionDescriptorStore} the account's
159
186
  * `key-map/user-key.jsonl` descriptor store
160
187
  * @param options.idStore {WebvhIdStore} the account's `id` collection
@@ -163,9 +190,9 @@ export declare function mintEnrollmentRequest(): Promise<{
163
190
  * multibase (the key a label or a listing row is filed under), so the caller
164
191
  * needs no second parse of the connect code
165
192
  */
166
- export declare function approveEnrollment({ request, clientWebvhKeys, clientKeyAgreementKey, userKeyRosterStore, idStore }: {
193
+ export declare function approveEnrollment({ request, signer, clientKeyAgreementKey, userKeyRosterStore, idStore }: {
167
194
  request: EnrollmentRequest;
168
- clientWebvhKeys: ClientWebvhUpdateKeys;
195
+ signer: AccountLogSigner;
169
196
  clientKeyAgreementKey: IKeyAgreementKey;
170
197
  userKeyRosterStore: EncryptionDescriptorStore;
171
198
  idStore: WebvhIdStore;
@@ -1 +1 @@
1
- {"version":3,"file":"enrollment.d.ts","sourceRoot":"","sources":["../../src/enrollment/enrollment.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AACpE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAA;AAaxE,OAAO,KAAK,EACV,qBAAqB,EACrB,mBAAmB,EACnB,YAAY,EACb,MAAM,sBAAsB,CAAA;AAc7B,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,0BAA0B,CAAA;AAEjC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAQ1D;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,mBAAmB,CAAA;AAEnD;;;;GAIG;AACH,qBAAa,sBAAuB,SAAQ,KAAK;gBAE7C,OAAO,SAC+C;CAKzD;AAiDD;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,OAAO,EACR,EAAE;IACD,OAAO,EAAE,iBAAiB,CAAA;CAC3B,GAAG,MAAM,CAKT;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,IAAI,EACL,EAAE;IACD,IAAI,EAAE,MAAM,CAAA;CACb,GAAG,iBAAiB,CAwDpB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,6BAA6B,CAAC,EAC5C,OAAO,EACR,EAAE;IACD,OAAO,EAAE,iBAAiB,CAAA;CAC3B,GAAG,IAAI,CAYP;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,OAAO,EACR,EAAE;IACD,OAAO,EAAE,iBAAiB,CAAA;CAC3B,G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IACD,OAAO,EAAE,iBAAiB,CAAA;CAC3B,GAAG,MAAM,CAKT;AAED;;;;;;;;;GASG;AACH,wBAAsB,qBAAqB,IAAI,OAAO,CAAC;IACrD,UAAU,EAAE,UAAU,CAAA;IACtB,eAAe,EAAE,qBAAqB,CAAA;IACtC,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;CAClB,CAAC,CA2BD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,wBAAsB,iBAAiB,CAAC,EACtC,OAAO,EACP,MAAM,EACN,qBAAqB,EACrB,kBAAkB,EAClB,OAAO,EACR,EAAE;IACD,OAAO,EAAE,iBAAiB,CAAA;IAC1B,MAAM,EAAE,gBAAgB,CAAA;IACxB,qBAAqB,EAAE,gBAAgB,CAAA;IACvC,kBAAkB,EAAE,yBAAyB,CAAA;IAC7C,OAAO,EAAE,YAAY,CAAA;CACtB,GAAG,OAAO,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,mBAAmB,EAAE,MAAM,CAAA;CAAE,CAAC,CAuC3E;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAsB,sBAAsB,CAAC,EAC3C,UAAU,EACV,eAAe,EACf,OAAO,EACP,kBAAkB,EACnB,EAAE;IACD,UAAU,EAAE,UAAU,CAAA;IACtB,eAAe,EAAE,qBAAqB,CAAA;IACtC,OAAO,EAAE,cAAc,CAAA;IACvB,kBAAkB,CAAC,EAAE,mBAAmB,CAAA;CACzC,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC,CAyEvD"}
@@ -1,12 +1,14 @@
1
1
  import { decodeMultikey, MultikeyCodec } from '@interop/data-integrity-core/multihash';
2
2
  import { base64urlnopad } from '@scure/base';
3
3
  import { agentsFromSeed } from '../identity/agents.js';
4
- import { enrollWebvhClient, keyAgreementTwinMultibase, mintClientWebvhUpdateKeys, updateKeyMultibase } from '../webvh/didWebvh.js';
4
+ import { keyAgreementTwinMultibase, mintClientWebvhUpdateKeys, updateKeyMultibase } from '../webvh/didWebvh.js';
5
+ import { enrollWebvhClient } from '../webvh/enrollClient.js';
5
6
  import { clientSigningKeyMultibase, isWebvhDid, webvhZcapClient } from '../webvh/zcap.js';
6
7
  import { AccountLogMissingError, verifyAccountLog } from '../webvh/verifyLog.js';
7
8
  import { addUserKeyRosterRecipient } from '../keys/userKeyRoster.js';
8
9
  import { readUserKeyRoster, rosterRecipientKid, userKeyRosterLogSigner } from '../keys/userKeyRoster.js';
9
10
  import { userKeyRosterDescriptorStore } from '../keys/rosterStore.js';
11
+ import { isSealableDescriptorStore } from '../keys/rosterLogStore.js';
10
12
  import { memoryResourceLogPinStore } from '@interop/vh-resource-log';
11
13
  import { webvhResourceLogController } from '../resourceLog/index.js';
12
14
  import { CONNECT_CODE_PREFIX } from './connectCode.js';
@@ -231,21 +233,47 @@ export async function mintEnrollmentRequest() {
231
233
  };
232
234
  }
233
235
  /**
234
- * ENROLLING CLIENT: the whole approval, in the push order -- the user key
235
- * wrapped into the roster first (escrow: every epoch, so the new client reads
236
- * pre-enrollment history), then the two log entries. Quorum-of-one: this
237
- * client's own update key signs both entries. Idempotent at every stage, so
236
+ * THE APPROVING SIDE: the whole approval -- the user key wrapped into the
237
+ * roster (escrow: every epoch, so the new client reads pre-enrollment
238
+ * history) and the two log entries. Idempotent at every stage, so
238
239
  * re-approving the same code after any tear converges. A request whose
239
240
  * key-agreement key is not its signing key's canonical twin is refused before
240
241
  * anything is written ({@link assertCanonicalEnrollmentKeys}).
241
242
  *
243
+ * The escrow is placed by signer kind (`decisions/0018`). A CLIENT signer
244
+ * keeps the push order, the escrow first: an enrolled client's roster append
245
+ * needs no license, so it may precede the entries, and no enrolled client is
246
+ * ever authorized but blind. Quorum-of-one there: any single enrolled
247
+ * client's own update key signs both entries.
248
+ *
249
+ * A LADDER signer runs commit, add, then escrow, because a ladder-signed
250
+ * append is licensed only at an inventory-changing version its own ladder
251
+ * signed, which the add entry is what mints. The one-request window between
252
+ * the add entry and the append is the ladder branch's stated cost: a client
253
+ * the add entry published holds `assertionMethod` and its own update key
254
+ * while holding no wrap. It is bounded three ways -- one request wide on the
255
+ * happy path, mended by a re-run with the same connect code and by the
256
+ * escrow-direction convergence of any later ladder-branch ceremony (the
257
+ * document carries the client's key verbatim), and visible as a row in the
258
+ * connected-wallets listing, where a disconnect removes it.
259
+ *
260
+ * On that branch the escrow must ANCHOR at the add entry's version, and the
261
+ * ceremony does not leave that to the roster store's own controller wiring:
262
+ * a store resolving its controller view through a document cached before
263
+ * the entries (an app's session-verified log) would anchor the append at the
264
+ * pre-add head, and the license would refuse it after the ceremony's pivot.
265
+ * So, on a sealable roster store, the view built from the add entry's own
266
+ * post-add log is set as the store's minimum controller version before the
267
+ * escrow runs -- the same guarantee `revokeAccountClient` gives its rotation
268
+ * from its post-edit log. A fresher resolved view still wins.
269
+ *
242
270
  * @param options {object}
243
271
  * @param options.request {EnrollmentRequest} the parsed connect code
244
- * @param options.clientWebvhKeys {ClientWebvhUpdateKeys} the approving
245
- * client's own did:webvh update-key seeds
272
+ * @param options.signer {AccountLogSigner} who signs the two entries: the
273
+ * approving client's own did:webvh update-key seeds, or the acting
274
+ * credential's ladder seed
246
275
  * @param options.clientKeyAgreementKey {IKeyAgreementKey} the approving
247
- * client's own (identity) key-agreement key, unwrapping each epoch for
248
- * re-wrapping
276
+ * party's own key-agreement key, unwrapping each epoch for re-wrapping
249
277
  * @param options.userKeyRosterStore {EncryptionDescriptorStore} the account's
250
278
  * `key-map/user-key.jsonl` descriptor store
251
279
  * @param options.idStore {WebvhIdStore} the account's `id` collection
@@ -254,14 +282,12 @@ export async function mintEnrollmentRequest() {
254
282
  * multibase (the key a label or a listing row is filed under), so the caller
255
283
  * needs no second parse of the connect code
256
284
  */
257
- export async function approveEnrollment({ request, clientWebvhKeys, clientKeyAgreementKey, userKeyRosterStore, idStore }) {
285
+ export async function approveEnrollment({ request, signer, clientKeyAgreementKey, userKeyRosterStore, idStore }) {
258
286
  // Re-checked here rather than trusted from the parse: this is the one seam
259
287
  // every approval path runs through, and it is what publishes the key under
260
288
  // the controller marker.
261
289
  assertCanonicalEnrollmentKeys({ request });
262
- // Decryption material before authorization: the wrap lands first, so no
263
- // enrolled client is ever authorized but blind.
264
- await addUserKeyRosterRecipient({
290
+ const escrow = async () => addUserKeyRosterRecipient({
265
291
  store: userKeyRosterStore,
266
292
  recipient: {
267
293
  id: enrollmentRecipientKid({ request }),
@@ -269,11 +295,22 @@ export async function approveEnrollment({ request, clientWebvhKeys, clientKeyAgr
269
295
  },
270
296
  ownerKeyAgreementKey: clientKeyAgreementKey
271
297
  });
272
- const { did } = await enrollWebvhClient({
298
+ if (signer.kind === 'client') {
299
+ await escrow();
300
+ }
301
+ const { did, log } = await enrollWebvhClient({
273
302
  idStore,
274
- updateKeys: clientWebvhKeys,
303
+ signer,
275
304
  newClient: request
276
305
  });
306
+ if (signer.kind === 'ladder') {
307
+ if (isSealableDescriptorStore(userKeyRosterStore)) {
308
+ userKeyRosterStore.setMinimumControllerVersion({
309
+ controller: webvhResourceLogController({ did, log })
310
+ });
311
+ }
312
+ await escrow();
313
+ }
277
314
  return {
278
315
  did,
279
316
  clientDid: enrollmentClientDid({ request }),
@@ -1 +1 @@
1
- {"version":3,"file":"enrollment.js","sourceRoot":"","sources":["../../src/enrollment/enrollment.ts"],"names":[],"mappings":"AA+BA,OAAO,EACL,cAAc,EACd,aAAa,EACd,MAAM,wCAAwC,CAAA;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EACL,iBAAiB,EACjB,yBAAyB,EACzB,yBAAyB,EACzB,kBAAkB,EACnB,MAAM,sBAAsB,CAAA;AAM7B,OAAO,E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'@interop/was-client/edv';
3
3
  import type { IKeyAgreementKey } from '@interop/data-integrity-core';
4
- import { type ClientWebvhUpdateKeys, type DidWebKeyMapV2, type ICapabilityAgent, type WebvhIdStore } from '../webvh/index.js';
4
+ import { type ClientWebvhUpdateKeys, type ICapabilityAgent, type KmsAuthenticationBinding, type PublishedWebvhLog, type WebvhIdStore } from '../webvh/index.js';
5
5
  import { type UserKey, type WalletSpaceEpochsResult } from '../keys/index.js';
6
6
  import type { ResourceLogPinStore } from '@interop/vh-resource-log';
7
+ import { type StageNotifier } from '../log.js';
7
8
  /**
8
9
  * The complete key set a brand-new account mints locally before anything
9
10
  * touches the network: the data Space id, this founding client's identity
@@ -102,7 +103,7 @@ export declare class AccountGenesisSpaceError extends Error {
102
103
  * The stages whose failures the ceremony collects instead of throwing (see
103
104
  * the module doc for the split).
104
105
  */
105
- export type AccountGenesisStage = 'didWebKeys' | 'roster' | 'epochs' | 'promotion';
106
+ export type AccountGenesisStage = 'kmsAuthentication' | 'roster' | 'epochs' | 'promotion';
106
107
  /**
107
108
  * What a completed ceremony reports: the account DID, each collected stage's
108
109
  * outcome where it ran (the roster descriptor, the per-collection epoch
@@ -113,6 +114,23 @@ export type AccountGenesisStage = 'didWebKeys' | 'roster' | 'epochs' | 'promotio
113
114
  */
114
115
  export interface AccountGenesisResult {
115
116
  did: string;
117
+ /**
118
+ * The account log's verified head as the did:webvh stage left it -- the
119
+ * served head it adopted, or the one it minted paired with its create PUT's
120
+ * ETag -- for the stage after the ceremony to build on rather than re-read.
121
+ * Set by the credential-anchored ceremony alone; the plain genesis's
122
+ * did:webvh stage hands no head back.
123
+ */
124
+ published?: PublishedWebvhLog;
125
+ /**
126
+ * Whether the did:webvh stage MINTED that head (a fresh signup) rather than
127
+ * adopting a served one (a heal re-run). A later stage may reuse a minted
128
+ * head freely -- the account did not exist a moment ago, so no other writer
129
+ * holds it -- but an adopted head is only a snapshot: its document's
130
+ * completion tests are unprotected by any ETag and another client may have
131
+ * moved past them by the time a later stage reads them.
132
+ */
133
+ logMinted?: boolean;
116
134
  rosterDescriptor?: CollectionEncryption;
117
135
  epochs?: WalletSpaceEpochsResult;
118
136
  /**
@@ -170,13 +188,19 @@ export interface AccountGenesisResult {
170
188
  * EncryptionDescriptorStore` -- builds the user-key roster's descriptor
171
189
  * store once the account DID is known (the log-governed store's controller
172
190
  * view and chain-head pin are the app's wiring)
173
- * @param [options.provideDidWebKeys] {Function} `() =>
174
- * Promise<DidWebKeyMapV2 | undefined>` -- the KMS key-map acquisition (a
175
- * wallet that keeps a KMS runs its did:web provisioning here, after the
176
- * Space exists); absent or resolving `undefined`, the genesis is
177
- * client-keys-only and no `keys.json` is ever written. A throw is
178
- * collected, not fatal: the genesis proceeds client-keys-only and a later
179
- * run heals the document with the convenience key
191
+ * @param [options.provideKmsAuthentication] {Function} `({ spaceReady }) =>
192
+ * Promise<KmsAuthenticationBinding | undefined>` -- the KMS authentication
193
+ * binding's acquisition; absent or resolving `undefined`, the genesis is
194
+ * client-keys-only and no `keys.json` is ever written. It is started before
195
+ * the Space is awaited and joined before the genesis entry, so its
196
+ * `spaceReady` argument is what its own `keys.json` write waits on. A throw
197
+ * is collected, not fatal: the genesis proceeds client-keys-only, and the
198
+ * document it publishes never gains the key. The thunk's own obligation,
199
+ * since this ceremony takes `authentication.vmId` VERBATIM into the
200
+ * world-readable genesis entry: a served `keys.json` may be adopted only
201
+ * after the multibase in its `vmId` is checked against the session's own
202
+ * keystore listing; on a mismatch, or when the keystore cannot be listed,
203
+ * the thunk mints instead of adopting
180
204
  * @param [options.expectedDid] {string} the account's did:webvh from the
181
205
  * caller's stored account pointer, when it already names one; the genesis
182
206
  * read then refuses a published log resolving to any other account
@@ -192,9 +216,13 @@ export interface AccountGenesisResult {
192
216
  * pointer write lives outside this call (freewallet's keyring re-bind) --
193
217
  * passes `false` and runs {@link ensurePromotedSpaceController} itself
194
218
  * after that write
219
+ * @param [options.onStage] {StageNotifier} observational: called at the
220
+ * KMS-authentication join, with {@link KMS_AUTHENTICATION_STAGE} -- the one
221
+ * boundary this ceremony names, and the same token the credential-anchored
222
+ * genesis emits at the same point
195
223
  * @returns {Promise<AccountGenesisResult>}
196
224
  */
197
- export declare function ensureAccountGenesis({ was, wasAsClient, wasServerUrl, spaceId, keyAgent, clientKeyAgreementKey, userKey, updateKeys, idStore, rosterStoreFor, provideDidWebKeys, expectedDid, accountLogPinStore, onDidPublished, promoteController }: {
225
+ export declare function ensureAccountGenesis({ was, wasAsClient, wasServerUrl, spaceId, keyAgent, clientKeyAgreementKey, userKey, updateKeys, idStore, rosterStoreFor, provideKmsAuthentication, expectedDid, accountLogPinStore, onDidPublished, promoteController, onStage }: {
198
226
  was: WasClient;
199
227
  wasAsClient?: WasClient;
200
228
  wasServerUrl: string;
@@ -207,12 +235,15 @@ export declare function ensureAccountGenesis({ was, wasAsClient, wasServerUrl, s
207
235
  rosterStoreFor: (options: {
208
236
  did: string;
209
237
  }) => EncryptionDescriptorStore;
210
- provideDidWebKeys?: () => Promise<DidWebKeyMapV2 | undefined>;
238
+ provideKmsAuthentication?: (options: {
239
+ spaceReady: Promise<unknown>;
240
+ }) => Promise<KmsAuthenticationBinding | undefined>;
211
241
  expectedDid?: string;
212
242
  accountLogPinStore?: ResourceLogPinStore;
213
243
  onDidPublished?: (published: {
214
244
  did: string;
215
245
  }) => Promise<void>;
216
246
  promoteController?: boolean;
247
+ onStage?: StageNotifier;
217
248
  }): Promise<AccountGenesisResult>;
218
249
  //# sourceMappingURL=accountGenesis.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"accountGenesis.d.ts","sourceRoot":"","sources":["../../src/genesis/accountGenesis.ts"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC1E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAA;AACxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAGpE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