@interop/wallet-core 0.62.0 → 0.65.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 (312) 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 +55 -34
  7. package/dist/clientAnnex/establish.d.ts.map +1 -1
  8. package/dist/clientAnnex/establish.js +102 -56
  9. package/dist/clientAnnex/establish.js.map +1 -1
  10. package/dist/clientAnnex/forget.d.ts +16 -2
  11. package/dist/clientAnnex/forget.d.ts.map +1 -1
  12. package/dist/clientAnnex/forget.js +11 -9
  13. package/dist/clientAnnex/forget.js.map +1 -1
  14. package/dist/clientAnnex/forgetLast.d.ts +62 -18
  15. package/dist/clientAnnex/forgetLast.d.ts.map +1 -1
  16. package/dist/clientAnnex/forgetLast.js +92 -26
  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 +7 -7
  21. package/dist/clientAnnex/gc.js.map +1 -1
  22. package/dist/clientAnnex/heal.d.ts +38 -5
  23. package/dist/clientAnnex/heal.d.ts.map +1 -1
  24. package/dist/clientAnnex/heal.js +346 -236
  25. package/dist/clientAnnex/heal.js.map +1 -1
  26. package/dist/clientAnnex/index.d.ts +21 -5
  27. package/dist/clientAnnex/index.d.ts.map +1 -1
  28. package/dist/clientAnnex/index.js +24 -5
  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 +222 -33
  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 +162 -43
  39. package/dist/clientAnnex/log.d.ts.map +1 -1
  40. package/dist/clientAnnex/log.js +423 -192
  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 +26 -12
  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 +10 -6
  124. package/dist/keys/index.d.ts.map +1 -1
  125. package/dist/keys/index.js +9 -5
  126. package/dist/keys/index.js.map +1 -1
  127. package/dist/keys/rosterLogStore.d.ts +12 -11
  128. package/dist/keys/rosterLogStore.d.ts.map +1 -1
  129. package/dist/keys/rosterLogStore.js +15 -13
  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/userKeyRoster.d.ts +57 -7
  139. package/dist/keys/userKeyRoster.d.ts.map +1 -1
  140. package/dist/keys/userKeyRoster.js +222 -17
  141. package/dist/keys/userKeyRoster.js.map +1 -1
  142. package/dist/keys/userKeyRosterCascade.d.ts +7 -6
  143. package/dist/keys/userKeyRosterCascade.d.ts.map +1 -1
  144. package/dist/keys/userKeyRosterCascade.js +7 -6
  145. package/dist/keys/userKeyRosterCascade.js.map +1 -1
  146. package/dist/keys/wasLabelsStore.d.ts +9 -2
  147. package/dist/keys/wasLabelsStore.d.ts.map +1 -1
  148. package/dist/keys/wasLabelsStore.js +14 -6
  149. package/dist/keys/wasLabelsStore.js.map +1 -1
  150. package/dist/log.d.ts +7 -2
  151. package/dist/log.d.ts.map +1 -1
  152. package/dist/log.js +6 -1
  153. package/dist/log.js.map +1 -1
  154. package/dist/recovery/index.d.ts +12 -8
  155. package/dist/recovery/index.d.ts.map +1 -1
  156. package/dist/recovery/index.js +11 -7
  157. package/dist/recovery/index.js.map +1 -1
  158. package/dist/recovery/recoveryCode.d.ts +27 -7
  159. package/dist/recovery/recoveryCode.d.ts.map +1 -1
  160. package/dist/recovery/recoveryCode.js +18 -6
  161. package/dist/recovery/recoveryCode.js.map +1 -1
  162. package/dist/recovery/recoveryDelegation.d.ts.map +1 -1
  163. package/dist/recovery/recoveryDelegation.js +21 -34
  164. package/dist/recovery/recoveryDelegation.js.map +1 -1
  165. package/dist/recovery/recoveryWebvh.d.ts +75 -63
  166. package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
  167. package/dist/recovery/recoveryWebvh.js +127 -116
  168. package/dist/recovery/recoveryWebvh.js.map +1 -1
  169. package/dist/request/classify.d.ts +32 -8
  170. package/dist/request/classify.d.ts.map +1 -1
  171. package/dist/request/classify.js +39 -14
  172. package/dist/request/classify.js.map +1 -1
  173. package/dist/request/ephemeralExchange.d.ts +1 -6
  174. package/dist/request/ephemeralExchange.d.ts.map +1 -1
  175. package/dist/request/ephemeralExchange.js.map +1 -1
  176. package/dist/request/onboarding.d.ts.map +1 -1
  177. package/dist/request/onboarding.js +2 -2
  178. package/dist/request/onboarding.js.map +1 -1
  179. package/dist/request/parse.d.ts.map +1 -1
  180. package/dist/request/parse.js +2 -3
  181. package/dist/request/parse.js.map +1 -1
  182. package/dist/resourceLog/controller.d.ts +34 -12
  183. package/dist/resourceLog/controller.d.ts.map +1 -1
  184. package/dist/resourceLog/controller.js +79 -86
  185. package/dist/resourceLog/controller.js.map +1 -1
  186. package/dist/resourceLog/document.d.ts +182 -0
  187. package/dist/resourceLog/document.d.ts.map +1 -0
  188. package/dist/resourceLog/document.js +159 -0
  189. package/dist/resourceLog/document.js.map +1 -0
  190. package/dist/resourceLog/errors.d.ts +47 -8
  191. package/dist/resourceLog/errors.d.ts.map +1 -1
  192. package/dist/resourceLog/errors.js +54 -8
  193. package/dist/resourceLog/errors.js.map +1 -1
  194. package/dist/resourceLog/index.d.ts +7 -3
  195. package/dist/resourceLog/index.d.ts.map +1 -1
  196. package/dist/resourceLog/index.js +7 -3
  197. package/dist/resourceLog/index.js.map +1 -1
  198. package/dist/resourceLog/ladderRungs.d.ts +35 -0
  199. package/dist/resourceLog/ladderRungs.d.ts.map +1 -0
  200. package/dist/resourceLog/ladderRungs.js +352 -0
  201. package/dist/resourceLog/ladderRungs.js.map +1 -0
  202. package/dist/resourceLog/license.d.ts +42 -17
  203. package/dist/resourceLog/license.d.ts.map +1 -1
  204. package/dist/resourceLog/license.js +38 -24
  205. package/dist/resourceLog/license.js.map +1 -1
  206. package/dist/space/activity.d.ts +15 -15
  207. package/dist/space/activity.d.ts.map +1 -1
  208. package/dist/space/activity.js +15 -15
  209. package/dist/space/activity.js.map +1 -1
  210. package/dist/space/collections.d.ts +11 -0
  211. package/dist/space/collections.d.ts.map +1 -1
  212. package/dist/space/collections.js +13 -0
  213. package/dist/space/collections.js.map +1 -1
  214. package/dist/space/deleteSpace.d.ts +28 -0
  215. package/dist/space/deleteSpace.d.ts.map +1 -0
  216. package/dist/space/deleteSpace.js +44 -0
  217. package/dist/space/deleteSpace.js.map +1 -0
  218. package/dist/space/errors.d.ts.map +1 -1
  219. package/dist/space/errors.js +0 -1
  220. package/dist/space/errors.js.map +1 -1
  221. package/dist/space/index.d.ts +6 -0
  222. package/dist/space/index.d.ts.map +1 -1
  223. package/dist/space/index.js +6 -0
  224. package/dist/space/index.js.map +1 -1
  225. package/dist/space/plaintextCollection.d.ts +43 -0
  226. package/dist/space/plaintextCollection.d.ts.map +1 -0
  227. package/dist/space/plaintextCollection.js +17 -0
  228. package/dist/space/plaintextCollection.js.map +1 -0
  229. package/dist/stages.d.ts +23 -0
  230. package/dist/stages.d.ts.map +1 -0
  231. package/dist/stages.js +23 -0
  232. package/dist/stages.js.map +1 -0
  233. package/dist/sync/index.d.ts +7 -0
  234. package/dist/sync/index.d.ts.map +1 -1
  235. package/dist/sync/index.js +7 -0
  236. package/dist/sync/index.js.map +1 -1
  237. package/dist/sync/push.js +4 -4
  238. package/dist/sync/push.js.map +1 -1
  239. package/dist/sync/remint.js +2 -2
  240. package/dist/sync/remint.js.map +1 -1
  241. package/dist/sync/types.d.ts +41 -1
  242. package/dist/sync/types.d.ts.map +1 -1
  243. package/dist/sync/types.js +47 -1
  244. package/dist/sync/types.js.map +1 -1
  245. package/dist/unlock/index.d.ts +5 -1
  246. package/dist/unlock/index.d.ts.map +1 -1
  247. package/dist/unlock/index.js +5 -1
  248. package/dist/unlock/index.js.map +1 -1
  249. package/dist/unlock/retire.d.ts +35 -7
  250. package/dist/unlock/retire.d.ts.map +1 -1
  251. package/dist/unlock/retire.js +52 -14
  252. package/dist/unlock/retire.js.map +1 -1
  253. package/dist/unlock/standingClient.d.ts.map +1 -1
  254. package/dist/unlock/standingClient.js +5 -1
  255. package/dist/unlock/standingClient.js.map +1 -1
  256. package/dist/unlock/standingWebvh.d.ts +217 -35
  257. package/dist/unlock/standingWebvh.d.ts.map +1 -1
  258. package/dist/unlock/standingWebvh.js +469 -210
  259. package/dist/unlock/standingWebvh.js.map +1 -1
  260. package/dist/webvh/accountEntry.d.ts +146 -0
  261. package/dist/webvh/accountEntry.d.ts.map +1 -0
  262. package/dist/webvh/accountEntry.js +239 -0
  263. package/dist/webvh/accountEntry.js.map +1 -0
  264. package/dist/webvh/didWeb.d.ts +12 -7
  265. package/dist/webvh/didWeb.d.ts.map +1 -1
  266. package/dist/webvh/didWeb.js +2 -2
  267. package/dist/webvh/didWeb.js.map +1 -1
  268. package/dist/webvh/didWebProjection.d.ts +164 -0
  269. package/dist/webvh/didWebProjection.d.ts.map +1 -0
  270. package/dist/webvh/didWebProjection.js +230 -0
  271. package/dist/webvh/didWebProjection.js.map +1 -0
  272. package/dist/webvh/didWebvh.d.ts +275 -136
  273. package/dist/webvh/didWebvh.d.ts.map +1 -1
  274. package/dist/webvh/didWebvh.js +307 -340
  275. package/dist/webvh/didWebvh.js.map +1 -1
  276. package/dist/webvh/enrollClient.d.ts +65 -0
  277. package/dist/webvh/enrollClient.d.ts.map +1 -0
  278. package/dist/webvh/enrollClient.js +172 -0
  279. package/dist/webvh/enrollClient.js.map +1 -0
  280. package/dist/webvh/index.d.ts +37 -12
  281. package/dist/webvh/index.d.ts.map +1 -1
  282. package/dist/webvh/index.js +33 -10
  283. package/dist/webvh/index.js.map +1 -1
  284. package/dist/webvh/listClients.d.ts +1 -35
  285. package/dist/webvh/listClients.d.ts.map +1 -1
  286. package/dist/webvh/listClients.js +2 -30
  287. package/dist/webvh/listClients.js.map +1 -1
  288. package/dist/webvh/revokeClient.d.ts +41 -11
  289. package/dist/webvh/revokeClient.d.ts.map +1 -1
  290. package/dist/webvh/revokeClient.js +99 -48
  291. package/dist/webvh/revokeClient.js.map +1 -1
  292. package/dist/webvh/standingZcap.d.ts +61 -14
  293. package/dist/webvh/standingZcap.d.ts.map +1 -1
  294. package/dist/webvh/standingZcap.js +91 -0
  295. package/dist/webvh/standingZcap.js.map +1 -1
  296. package/dist/webvh/verifyLog.d.ts +59 -5
  297. package/dist/webvh/verifyLog.d.ts.map +1 -1
  298. package/dist/webvh/verifyLog.js +76 -11
  299. package/dist/webvh/verifyLog.js.map +1 -1
  300. package/dist/webvh/wasIdStore.d.ts +8 -8
  301. package/dist/webvh/wasIdStore.d.ts.map +1 -1
  302. package/dist/webvh/wasIdStore.js +39 -14
  303. package/dist/webvh/wasIdStore.js.map +1 -1
  304. package/dist/webvh/zcap.d.ts +14 -1
  305. package/dist/webvh/zcap.d.ts.map +1 -1
  306. package/dist/webvh/zcap.js +3 -27
  307. package/dist/webvh/zcap.js.map +1 -1
  308. package/package.json +2 -2
  309. package/dist/webvh/keyAgreement.d.ts +0 -97
  310. package/dist/webvh/keyAgreement.d.ts.map +0 -1
  311. package/dist/webvh/keyAgreement.js +0 -71
  312. package/dist/webvh/keyAgreement.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"standingZcap.js","sourceRoot":"","sources":["../../src/webvh/standingZcap.ts"],"names":[],"mappings":"AAgBA;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAA;AAE7D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAA;AAE9D;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,YAAY,CAAC,EAC3B,OAAO,EACP,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,EAIjB;IACC,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,IAAI,CAAA;IACb,CAAC;IACD,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;IACrC,IAAI,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC;QAC5B,OAAO,IAAI,CAAA;IACb,CAAC;IACD,OAAO,SAAS,GAAG,GAAG,IAAI,sBAAsB,CAAA;AAClD,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,oBAAoB,CAAC,UAAiB;IACpD,MAAM,EAAE,KAAK,EAAE,GAAG,UAMjB,CAAA;IACD,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAA;IACtD,OAAO,MAAM,EAAE,kBAAkB,CAAA;AACnC,CAAC"}
1
+ {"version":3,"file":"standingZcap.js","sourceRoot":"","sources":["../../src/webv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,SAAS,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7D,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7C,GAAG,CAAC,qBAAqB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,qBAAqB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACzE,GAAG,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACtC,CAAC,CAAA;AACJ,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import type { DIDDoc, DIDLog } from '@interop/did-method-webvh';
2
+ import type { PublishedWebvhLog } from './didWebvh.js';
2
3
  import { type ResourceLogHeadPin, type ResourceLogPinStore } from '@interop/vh-resource-log';
3
4
  /**
4
5
  * The pin-slot key for an account's did:webvh log (`id/did.jsonl`) -- what a
@@ -45,6 +46,27 @@ export declare function checkAccountLogContinuity({ log, pin }: {
45
46
  log: DIDLog;
46
47
  pin: ResourceLogHeadPin | null;
47
48
  }): ResourceLogHeadPin;
49
+ /**
50
+ * Checks a served account log against the pin held for it and advances the
51
+ * pin to the served head, which the check has just proven is genuinely ahead.
52
+ *
53
+ * The one implementation of the account log's check-and-advance step, shared
54
+ * by {@link verifyAccountLog} and by the ceremony-side reads in `didWebvh.ts`:
55
+ * a rollback, a fork, or an SCID / method switch refuses inside
56
+ * {@link checkAccountLogContinuity}, so nothing that is not ahead ever
57
+ * reaches the write.
58
+ *
59
+ * @param options {object}
60
+ * @param options.pinStore {ResourceLogPinStore}
61
+ * @param options.logId {string} this log's slot in the store
62
+ * @param options.log {DIDLog} the served, already-resolved log
63
+ * @returns {Promise<void>}
64
+ */
65
+ export declare function checkAndAdvanceAccountLogPin({ pinStore, logId, log }: {
66
+ pinStore: ResourceLogPinStore;
67
+ logId: string;
68
+ log: DIDLog;
69
+ }): Promise<void>;
48
70
  /**
49
71
  * Fetches and locally verifies the account's world-readable DID log.
50
72
  *
@@ -73,18 +95,50 @@ export declare function checkAccountLogContinuity({ log, pin }: {
73
95
  * @param [options.pinStore] {ResourceLogPinStore} this client's chain-head
74
96
  * pins; the account log's slot is keyed by {@link accountLogPinId} over the
75
97
  * `spaceId` above
76
- * @returns {Promise<object>} the resolved document, the raw log, and the
77
- * log's effective `updateKeys` / `nextKeyHashes`
98
+ * @param [options.published] {PublishedWebvhLog} a head this same run
99
+ * already read and resolved (an establishment handing its `accountLog`
100
+ * forward), reused in place of the fetch. Every check below still runs on
101
+ * it: the substituted-account refusal, and the chain-head check-and-advance
102
+ * under the same slot, so a supplied head behind the pin is refused with a
103
+ * {@link ResourceLogContinuityError} exactly as a served one would be.
104
+ * Reuse is only ever WITHIN one run or visit, never across writers: the
105
+ * head is evidence of what this client itself just saw or published, and a
106
+ * head carried in from anywhere else would defeat the freshness the fetch
107
+ * exists for
108
+ * @returns {Promise<VerifiedAccountLog>} the resolved document, the raw
109
+ * log, and the log's effective `updateKeys` / `nextKeyHashes`
78
110
  */
79
- export declare function verifyAccountLog({ did, spaceId, host, pinStore }: {
111
+ export declare function verifyAccountLog({ did, spaceId, host, pinStore, published }: {
80
112
  did: string;
81
113
  spaceId: string;
82
114
  host: string;
83
115
  pinStore?: ResourceLogPinStore;
84
- }): Promise<{
116
+ published?: PublishedWebvhLog;
117
+ }): Promise<VerifiedAccountLog>;
118
+ /**
119
+ * What {@link verifyAccountLog} returns: the account document as the log
120
+ * resolves it, the raw log, and the log's effective update-key parameters.
121
+ * Named because it is also what a caller seeds a session-scoped verified-log
122
+ * memo with, from a head a ceremony handed it.
123
+ */
124
+ export interface VerifiedAccountLog {
85
125
  doc: DIDDoc;
86
126
  log: DIDLog;
87
127
  updateKeys: string[];
88
128
  nextKeyHashes: string[];
89
- }>;
129
+ }
130
+ /**
131
+ * The {@link VerifiedAccountLog} view of a head a ceremony already read or
132
+ * published -- a projection, not a check. The caller that seeds a memo from
133
+ * an establishment's own `accountLog` uses it rather than re-fetching the log
134
+ * that run just wrote; a caller wanting the DID and pin checks too calls
135
+ * {@link verifyAccountLog} with the head instead.
136
+ *
137
+ * @param options {object}
138
+ * @param options.published {PublishedWebvhLog} the resolved head
139
+ * @returns {VerifiedAccountLog}
140
+ */
141
+ export declare function verifiedAccountLogOf({ published }: {
142
+ published: PublishedWebvhLog;
143
+ }): VerifiedAccountLog;
90
144
  //# sourceMappingURL=verifyLog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"verifyLog.d.ts","sourceRoot":"","sources":["../../src/webvh/verifyLog.ts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAG/D,OAAO,EAGL,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACzB,MAAM,0BAA0B,CAAA;AAEjC;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAMxE;AAED;;;;;;GAMG;AACH,qBAAa,sBAAuB,SAAQ,KAAK;gBACnC,OAAO,SAA0C;CAI9D;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,yBAAyB,CAAC,EACxC,GAAG,EACH,GAAG,EACJ,EAAE;IACD,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,kBAAkB,GAAG,IAAI,CAAA;CAC/B,GAAG,kBAAkB,CA4CrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAsB,gBAAgB,CAAC,EACrC,GAAG,EACH,OAAO,EACP,IAAI,EACJ,QAAQ,EACT,EAAE;IACD,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,mBAAmB,CAA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,QAAQ,EACR,SAAS,EACV,EAAE;IACD,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,mBAAmB,CAAA;IAC9B,SAAS,CAAC,EAAE,iBAAiB,CAAA;CAC9B,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA0D9B;AAED;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,aAAa,EAAE,MAAM,EAAE,CAAA;CACxB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,SAAS,EACV,EAAE;IACD,SAAS,EAAE,iBAAiB,CAAA;CAC7B,GAAG,kBAAkB,CAOrB"}
@@ -123,6 +123,31 @@ export function checkAccountLogContinuity({ log, pin }) {
123
123
  }
124
124
  return { method, scid, head: head.versionId };
125
125
  }
126
+ /**
127
+ * Checks a served account log against the pin held for it and advances the
128
+ * pin to the served head, which the check has just proven is genuinely ahead.
129
+ *
130
+ * The one implementation of the account log's check-and-advance step, shared
131
+ * by {@link verifyAccountLog} and by the ceremony-side reads in `didWebvh.ts`:
132
+ * a rollback, a fork, or an SCID / method switch refuses inside
133
+ * {@link checkAccountLogContinuity}, so nothing that is not ahead ever
134
+ * reaches the write.
135
+ *
136
+ * @param options {object}
137
+ * @param options.pinStore {ResourceLogPinStore}
138
+ * @param options.logId {string} this log's slot in the store
139
+ * @param options.log {DIDLog} the served, already-resolved log
140
+ * @returns {Promise<void>}
141
+ */
142
+ export async function checkAndAdvanceAccountLogPin({ pinStore, logId, log }) {
143
+ const pin = await pinStore.read({ logId });
144
+ const served = checkAccountLogContinuity({ log, pin });
145
+ // Advanced only when the served head is genuinely ahead of the pin: the
146
+ // continuity check has already refused everything that is not.
147
+ if (!pin || pin.head !== served.head) {
148
+ await pinStore.write({ logId, pin: served });
149
+ }
150
+ }
126
151
  /**
127
152
  * Fetches and locally verifies the account's world-readable DID log.
128
153
  *
@@ -151,10 +176,34 @@ export function checkAccountLogContinuity({ log, pin }) {
151
176
  * @param [options.pinStore] {ResourceLogPinStore} this client's chain-head
152
177
  * pins; the account log's slot is keyed by {@link accountLogPinId} over the
153
178
  * `spaceId` above
154
- * @returns {Promise<object>} the resolved document, the raw log, and the
155
- * log's effective `updateKeys` / `nextKeyHashes`
179
+ * @param [options.published] {PublishedWebvhLog} a head this same run
180
+ * already read and resolved (an establishment handing its `accountLog`
181
+ * forward), reused in place of the fetch. Every check below still runs on
182
+ * it: the substituted-account refusal, and the chain-head check-and-advance
183
+ * under the same slot, so a supplied head behind the pin is refused with a
184
+ * {@link ResourceLogContinuityError} exactly as a served one would be.
185
+ * Reuse is only ever WITHIN one run or visit, never across writers: the
186
+ * head is evidence of what this client itself just saw or published, and a
187
+ * head carried in from anywhere else would defeat the freshness the fetch
188
+ * exists for
189
+ * @returns {Promise<VerifiedAccountLog>} the resolved document, the raw
190
+ * log, and the log's effective `updateKeys` / `nextKeyHashes`
156
191
  */
157
- export async function verifyAccountLog({ did, spaceId, host, pinStore }) {
192
+ export async function verifyAccountLog({ did, spaceId, host, pinStore, published }) {
193
+ if (published !== undefined) {
194
+ if (published.did !== did) {
195
+ throw new Error('The published DID log resolves to a different DID than the account ' +
196
+ 'pointer names.');
197
+ }
198
+ if (pinStore) {
199
+ await checkAndAdvanceAccountLogPin({
200
+ pinStore,
201
+ logId: accountLogPinId({ spaceId }),
202
+ log: published.log
203
+ });
204
+ }
205
+ return verifiedAccountLogOf({ published });
206
+ }
158
207
  const url = toUrl({
159
208
  serverUrl: host,
160
209
  path: resourcePath(spaceId, ID_COLLECTION.id, DID_LOG_RESOURCE)
@@ -176,14 +225,11 @@ export async function verifyAccountLog({ did, spaceId, host, pinStore }) {
176
225
  'pointer names.');
177
226
  }
178
227
  if (pinStore) {
179
- const logId = accountLogPinId({ spaceId });
180
- const pin = await pinStore.read({ logId });
181
- const served = checkAccountLogContinuity({ log, pin });
182
- // Advanced only when the served head is genuinely ahead of the pin: the
183
- // checks above have already refused everything that is not.
184
- if (!pin || pin.head !== served.head) {
185
- await pinStore.write({ logId, pin: served });
186
- }
228
+ await checkAndAdvanceAccountLogPin({
229
+ pinStore,
230
+ logId: accountLogPinId({ spaceId }),
231
+ log
232
+ });
187
233
  }
188
234
  return {
189
235
  doc: resolved.doc,
@@ -192,4 +238,23 @@ export async function verifyAccountLog({ did, spaceId, host, pinStore }) {
192
238
  nextKeyHashes: resolved.meta.nextKeyHashes ?? []
193
239
  };
194
240
  }
241
+ /**
242
+ * The {@link VerifiedAccountLog} view of a head a ceremony already read or
243
+ * published -- a projection, not a check. The caller that seeds a memo from
244
+ * an establishment's own `accountLog` uses it rather than re-fetching the log
245
+ * that run just wrote; a caller wanting the DID and pin checks too calls
246
+ * {@link verifyAccountLog} with the head instead.
247
+ *
248
+ * @param options {object}
249
+ * @param options.published {PublishedWebvhLog} the resolved head
250
+ * @returns {VerifiedAccountLog}
251
+ */
252
+ export function verifiedAccountLogOf({ published }) {
253
+ return {
254
+ doc: published.doc,
255
+ log: published.log,
256
+ updateKeys: published.updateKeys,
257
+ nextKeyHashes: published.nextKeyHashes
258
+ };
259
+ }
195
260
  //# sourceMappingURL=verifyLog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"verifyLog.js","sourceRoot":"","sources":["../../src/webvh/verifyLog.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAEhF,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACzE,OAAO,EACL,0BAA0B,EAC1B,gBAAgB,EAGjB,MAA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AAC,EAAE,OAAO,EAAE,CAAC;YACnC,GAAG;SACJ,CAAC,CAAA;IACJ,CAAC;IACD,OAAO;QACL,GAAG,EAAE,QAAQ,CAAC,GAAG;QACjB,GAAG;QACH,UAAU,EAAE,QAAQ,CAAC,IAAI,CAAC,UAAU,IAAI,EAAE;QAC1C,aAAa,EAAE,QAAQ,CAAC,IAAI,CAAC,aAAa,IAAI,EAAE;KACjD,CAAA;AACH,CAAC;AAeD;;;;;;;;;;GAUG;AACH,MAAM,UAAU,oBAAoB,CAAC,EACnC,SAAS,EAGV;IACC,OAAO;QACL,GAAG,EAAE,SAAS,CAAC,GAAG;QAClB,GAAG,EAAE,SAAS,CAAC,GAAG;QAClB,UAAU,EAAE,SAAS,CAAC,UAAU;QAChC,aAAa,EAAE,SAAS,CAAC,aAAa;KACvC,CAAA;AACH,CAAC"}
@@ -10,11 +10,11 @@
10
10
  * a `gen-` collection in the auxiliary annex Space -- is served by the
11
11
  * same implementation without touching the account-log paths.
12
12
  *
13
- * Collections here are addressed as plaintext: `id` holds published documents
14
- * (world-readable by policy), an annex generation's collection holds only
15
- * its `did.jsonl` (capability-gated, but never encrypted -- the server
16
- * resolves it out of its own storage), and `key-map` holds plain JSON, so
17
- * none of them goes through the encryption codec.
13
+ * Collections here are addressed through {@link plaintextCollection}: `id`
14
+ * holds published documents (world-readable by policy), an annex generation's
15
+ * collection holds only its `did.jsonl` (capability-gated, but never
16
+ * encrypted -- the server resolves it out of its own storage), and `key-map`
17
+ * holds plain JSON, so none of them goes through the encryption codec.
18
18
  *
19
19
  * Bodies are written as raw bytes under the content type the caller states --
20
20
  * load-bearing, since the log is JSON Lines (`text/jsonl`), not JSON, and the
@@ -22,9 +22,9 @@
22
22
  *
23
23
  * Reads carry the resource's ETag and writes forward the ceremonies'
24
24
  * conditional-write preconditions, so a did:webvh ceremony's `did.jsonl`
25
- * publish is a compare-and-swap. A backend that does not advertise
26
- * `conditional-writes` serves no ETag, and the publish degrades to an
27
- * unconditional write.
25
+ * publish and the pair of `keys.json` writes are compare-and-swaps. A backend
26
+ * that does not advertise `conditional-writes` serves no ETag, and the writes
27
+ * degrade to unconditional.
28
28
  */
29
29
  import type { IZcap } from '@interop/data-integrity-core';
30
30
  import type { WasClient } from '@interop/was-client';
@@ -1 +1 @@
1
- {"version":3,"file":"wasIdStore.d.ts","sourceRoot":"","sources":["../../src/webvh/wasIdStore.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAMpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEjD;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,IAAI,CACtC,YAAY,EACZ,kBAAkB,GAAG,eAAe,GAAG,eAAe,CACvD,CAAA;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,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,qBAAqB,CA+CxB;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,EAC9B,GAAG,EACH,OAAO,EACR,EAAE;IACD,GAAG,EAAE,SAAS,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;CAChB,GAAG,YAAY,CAaf"}
1
+ {"version":3,"file":"wasIdStore.d.ts","sourceRoot":"","sources":["../../src/webvh/wasIdStore.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAOpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEjD;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,IAAI,CACtC,YAAY,EACZ,kBAAkB,GAAG,eAAe,GAAG,eAAe,CACvD,CAAA;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,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,qBAAqB,CAiDxB;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,EAC9B,GAAG,EACH,OAAO,EACR,EAAE;IACD,GAAG,EAAE,SAAS,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;CAChB,GAAG,YAAY,CAsCf"}
@@ -1,4 +1,5 @@
1
1
  import { DID_KEYS_RESOURCE, ID_COLLECTION, KEY_MAP_COLLECTION } from '../space/collections.js';
2
+ import { plaintextCollection } from '../space/plaintextCollection.js';
2
3
  /**
3
4
  * Builds the parameterized log-resource store over one collection of one
4
5
  * Space: the shared implementation behind {@link wasWebvhIdStore} (the
@@ -18,10 +19,7 @@ import { DID_KEYS_RESOURCE, ID_COLLECTION, KEY_MAP_COLLECTION } from '../space/c
18
19
  * @returns {WebvhLogResourceStore}
19
20
  */
20
21
  export function wasWebvhLogStore({ was, spaceId, collectionId, capability }) {
21
- const resource = (resourceId) => was
22
- .space(spaceId, capability !== undefined ? { capability } : {})
23
- .collection(collectionId, { encryption: 'plaintext' })
24
- .resource(resourceId);
22
+ const resource = (resourceId) => plaintextCollection({ was, spaceId, collectionId, capability }).resource(resourceId);
25
23
  return {
26
24
  getIdResourceRaw: async ({ resourceId }) => {
27
25
  const read = await resource(resourceId).getWithEtag();
@@ -46,8 +44,11 @@ export function wasWebvhLogStore({ was, spaceId, collectionId, capability }) {
46
44
  putIdResource: async ({ resourceId, content, contentType = 'application/json', ifMatch, ifNoneMatch }) => {
47
45
  const serialized = typeof content === 'string' ? content : JSON.stringify(content);
48
46
  // was-client's own PreconditionFailedError propagates as-is: its `name`
49
- // is exactly what the seam contract names.
50
- await resource(resourceId).put(new TextEncoder().encode(serialized), {
47
+ // is exactly what the seam contract names. The PUT's own response
48
+ // carries the stored resource's new validator, so it is handed back
49
+ // rather than dropped: a ceremony that publishes can then build its
50
+ // next entry on the head it just wrote.
51
+ return resource(resourceId).put(new TextEncoder().encode(serialized), {
51
52
  contentType,
52
53
  ifMatch,
53
54
  ifNoneMatch
@@ -68,15 +69,39 @@ export function wasWebvhLogStore({ was, spaceId, collectionId, capability }) {
68
69
  export function wasWebvhIdStore({ was, spaceId }) {
69
70
  return {
70
71
  ...wasWebvhLogStore({ was, spaceId, collectionId: ID_COLLECTION.id }),
71
- putKeyMap: async ({ content }) => {
72
- await was
73
- .space(spaceId)
74
- .collection(KEY_MAP_COLLECTION.id, { encryption: 'plaintext' })
72
+ getKeyMapRaw: async () => {
73
+ const read = await plaintextCollection({
74
+ was,
75
+ spaceId,
76
+ collectionId: KEY_MAP_COLLECTION.id
77
+ })
75
78
  .resource(DID_KEYS_RESOURCE)
76
- .put(new TextEncoder().encode(JSON.stringify(content)), {
77
- contentType: 'application/json'
78
- });
79
- }
79
+ .getWithEtag();
80
+ return read === null
81
+ ? undefined
82
+ : {
83
+ content: read.data,
84
+ ...(read.etag !== undefined && { etag: read.etag })
85
+ };
86
+ },
87
+ // The caller states the precondition per write, since the two writes of
88
+ // one signup carry different ones: create-if-absent for the KMS stage's
89
+ // own write, and an If-Match on that write's ETag for the genesis'
90
+ // rewrite. A precondition fixed here would refuse the rewrite on every
91
+ // signup and strand a map with no `webvh` block. The PUT's own response
92
+ // carries the stored resource's new validator, so it is handed back
93
+ // rather than dropped.
94
+ putKeyMap: async ({ content, ifMatch, ifNoneMatch }) => plaintextCollection({
95
+ was,
96
+ spaceId,
97
+ collectionId: KEY_MAP_COLLECTION.id
98
+ })
99
+ .resource(DID_KEYS_RESOURCE)
100
+ .put(new TextEncoder().encode(JSON.stringify(content)), {
101
+ contentType: 'application/json',
102
+ ifMatch,
103
+ ifNoneMatch
104
+ })
80
105
  };
81
106
  }
82
107
  //# sourceMappingURL=wasIdStore.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"wasIdStore.js","sourceRoot":"","sources":["../../src/webvh/wasIdStore.ts"],"names":[],"mappings":"AA8BA,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,kBAAkB,EACnB,MAAM,yBAAyB,CAAA;AAahC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,gBAAgB,CAAC,EAC/B,GAAG,EACH,OAAO,EACP,YAAY,EACZ,UAAU,EAMX;IACC,MAAM,QAAQ,GAAG,CAAC,UAAkB,EAAE,EAAE,CACtC,GAAG;SACA,KAAK,CAAC,OAAO,EAAE,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC9D,UAAU,CAAC,YAAY,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,CAAC;SACrD,QAAQ,CAAC,UAAU,CAAC,CAAA;IAEzB,OAAO;QACL,gBAAgB,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;YACzC,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,UAAU,CAAC,CAAC,WAAW,EAAE,CAAA;YACrD,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;gBAClB,OAAO,SAAS,CAAA;YAClB,CAAC;YACD,wEAAwE;YACxE,uEAAuE;YACvE,6DAA6D;YAC7D,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,IAAI,CAAA;YAC3B,MAAM,IAAI,GACR,IAAI,YAAY,IAAI;gBAClB,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H,OAAO;gBACP,YAAY,EAAE,kBAAkB,CAAC,EAAE;aACpC,CAAC;iBACC,QAAQ,CAAC,iBAAiB,CAAC;iBAC3B,WAAW,EAAE,CAAA;YAChB,OAAO,IAAI,KAAK,IAAI;gBAClB,CAAC,CAAC,SAAS;gBACX,CAAC,CAAC;oBACE,OAAO,EAAE,IAAI,CAAC,IAAI;oBAClB,GAAG,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;iBACpD,CAAA;QACP,CAAC;QACD,wEAAwE;QACxE,wEAAwE;QACxE,mEAAmE;QACnE,uEAAuE;QACvE,wEAAwE;QACxE,oEAAoE;QACpE,uBAAuB;QACvB,SAAS,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE,EAAE,CACrD,mBAAmB,CAAC;YAClB,GAAG;YACH,OAAO;YACP,YAAY,EAAE,kBAAkB,CAAC,EAAE;SACpC,CAAC;aACC,QAAQ,CAAC,iBAAiB,CAAC;aAC3B,GAAG,CAAC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,EAAE;YACtD,WAAW,EAAE,kBAAkB;YAC/B,OAAO;YACP,WAAW;SACZ,CAAC;KACP,CAAA;AACH,CAAC"}
@@ -1,4 +1,17 @@
1
- import { ZcapClient } from '@interop/ezcap';
1
+ /*!
2
+ * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
+ */
4
+ /**
5
+ * ZCap signing under the account's did:webvh identity. After controller
6
+ * promotion the data Space's controller is the did:webvh DID, whose document
7
+ * carries a verification method per enrolled client -- so invocations and
8
+ * delegations must be signed with a keyId of the form
9
+ * `<did:webvh>#<publicKeyMultibase>` (this client's Ed25519 key, published
10
+ * under `capabilityInvocation` / `capabilityDelegation`). The key material
11
+ * is unchanged -- the client's own Ed25519 pair -- only the keyId names the
12
+ * verification method in the did:webvh document instead of the did:key one.
13
+ */
14
+ import type { ZcapClient } from '@interop/ezcap';
2
15
  import type { ISigner } from '@interop/data-integrity-core';
3
16
  /**
4
17
  * The minimal shape of a signing key agent this module operates on -- what
@@ -1 +1 @@
1
- {"version":3,"file":"zcap.d.ts","sourceRoot":"","sources":["../../src/webvh/zcap.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAA;AAE3D;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,OAAO,CAAA;IACxB,sBAAsB,EAAE,MAAM;QAC5B,IAAI,EAAE,MAAM,CAAA;QACZ,UAAU,EAAE,MAAM,CAAA;QAClB,kBAAkB,EAAE,MAAM,CAAA;QAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAA;KAC7B,CAAA;CACF;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CAAC,EACxC,QAAQ,EACT,EAAE;IACD,QAAQ,EAAE,gBAAgB,CAAA;CAC3B,GAAG,MAAM,CAMT;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,GAAG,EACJ,EAAE;IACD,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,GAAG,EAAE,MAAM,CAAA;CACZ;;;oBAGmB;QAAE,IAAI,EAAE,UAAU,CAAA;KAAE,KAAK,OAAO,CAAC,UAAU,CAAC;EAO/D;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,GAAG,EACJ,EAAE;IACD,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,GAAG,EAAE,MAAM,CAAA;CACZ,GAAG,UAAU,CAOb;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,EA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H,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,GAAG,EACJ,EAAE;IACD,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,GAAG,EAAE,MAAM,CAAA;CACZ,GAAG,UAAU,CAEb;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACT,EAAE;IACD,QAAQ,EAAE,gBAAgB,CAAA;CAC3B,GAAG,UAAU,CAEb;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,GAAG,EACJ,EAAE;IACD,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,GAAG,EAAE,MAAM,CAAA;CACZ,GAAG,gBAAgB,CAQnB;AAID,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA"}
@@ -1,18 +1,4 @@
1
- /*!
2
- * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
- */
4
- /**
5
- * ZCap signing under the account's did:webvh identity. After controller
6
- * promotion the data Space's controller is the did:webvh DID, whose document
7
- * carries a verification method per enrolled client -- so invocations and
8
- * delegations must be signed with a keyId of the form
9
- * `<did:webvh>#<publicKeyMultibase>` (this client's Ed25519 key, published
10
- * under `capabilityInvocation` / `capabilityDelegation`). The key material
11
- * is unchanged -- the client's own Ed25519 pair -- only the keyId names the
12
- * verification method in the did:webvh document instead of the did:key one.
13
- */
14
- import { EddsaJcs2022 } from '@interop/ed25519-signature/eddsa-jcs-2022';
15
- import { ZcapClient } from '@interop/ezcap';
1
+ import { zcapClientForSigner } from '../identity/agents.js';
16
2
  /**
17
3
  * The client's Ed25519 public key multibase (`z6Mk...`), read out of its
18
4
  * did:key id (`did:key:<publicKeyMultibase>`).
@@ -58,12 +44,7 @@ export function webvhSigner({ keyAgent, did }) {
58
44
  * @returns {ZcapClient}
59
45
  */
60
46
  export function webvhZcapClient({ keyAgent, did }) {
61
- const signer = webvhSigner({ keyAgent, did });
62
- return new ZcapClient({
63
- SuiteClass: EddsaJcs2022,
64
- invocationSigner: signer,
65
- delegationSigner: signer
66
- });
47
+ return zcapClientForSigner({ signer: webvhSigner({ keyAgent, did }) });
67
48
  }
68
49
  /**
69
50
  * A ZcapClient signing with the client's plain did:key identity -- the
@@ -76,12 +57,7 @@ export function webvhZcapClient({ keyAgent, did }) {
76
57
  * @returns {ZcapClient}
77
58
  */
78
59
  export function didKeyZcapClient({ keyAgent }) {
79
- const signer = keyAgent.getSigner();
80
- return new ZcapClient({
81
- SuiteClass: EddsaJcs2022,
82
- invocationSigner: signer,
83
- delegationSigner: signer
84
- });
60
+ return zcapClientForSigner({ signer: keyAgent.getSigner() });
85
61
  }
86
62
  /**
87
63
  * A CapabilityAgent-shaped wrapper presenting the client's key under the
@@ -1 +1 @@
1
- {"version":3,"file":"zcap.js","sourceRoot":"","sources":["../../src/webvh/zcap.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;GASG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAA;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAsB3C;;;;;;;GAOG;AACH,MAAM,UAAU,yBAAyB,CAAC,EACxC,QAAQ,EAGT;IACC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,kBAAkB,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IACnE,IAAI,MAAM,KAAK,KAAK,IAAI,MAAM,KAAK,KAAK,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAChE,MAAM,IAAI,KAAK,CAAC,4BAA4B,QAAQ,CAAC,EAAE,IAAI,CAAC,CAAA;IAC9D,CAAC;IACD,OAAO,kBAAkB,CAAA;AAC3B,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,WAAW,CAAC,EAC1B,QAAQ,EACR,GAAG,EAIJ;IACC,MAAM,IAAI,GAAG,QAAQ,CAAC,SAAS,EAG9B,CAAA;IACD,OAAO;QACL,EA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AAE,CAAC,CAAA;AAC9D,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,oBAAoB,CAAC,EACnC,QAAQ,EACR,GAAG,EAIJ;IACC,MAAM,MAAM,GAAG,WAAW,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAA;IAC7C,OAAO;QACL,EAAE,EAAE,GAAG;QACP,MAAM,EAAE,QAAQ,CAAC,MAAM;QACvB,SAAS,EAAE,GAAG,EAAE,CAAC,MAAM;QACvB,sBAAsB,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,sBAAsB,EAAE;KAChE,CAAA;AACH,CAAC;AAED,+EAA+E;AAC/E,kEAAkE;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@interop/wallet-core",
3
3
  "description": "Shared wallet-domain logic (WAS sync engine core and wallet Space layout contracts) for Interop wallet apps.",
4
- "version": "0.62.0",
4
+ "version": "0.65.0",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "build": "pnpm run clear && tsc",
@@ -31,7 +31,7 @@
31
31
  "@interop/storage-core": "^0.9.1",
32
32
  "@interop/vc": "^11.0.7",
33
33
  "@interop/vh-resource-log": "^0.4.1",
34
- "@interop/was-client": "^0.46.1",
34
+ "@interop/was-client": "^0.47.0",
35
35
  "@interop/webkms-client": "^14.7.4",
36
36
  "@interop/x25519-key-agreement-key": "^5.2.2",
37
37
  "@noble/ciphers": "^2.3.0",
@@ -1,97 +0,0 @@
1
- /*!
2
- * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
- */
4
- /**
5
- * The ONE reference-resolving reader for a did:webvh document's `keyAgreement`
6
- * relation, and the document shape it reads.
7
- *
8
- * The relation may carry either form the DID Core data model allows -- a string
9
- * reference into `verificationMethod`, or an embedded method -- so every
10
- * consumer that asks "which key-agreement methods does this document publish"
11
- * must resolve references first. That resolution lives here once, and the
12
- * consumers are plain filters over its result: the client listing and the
13
- * revocation removal keep only the methods carrying a client's controller
14
- * marker, while the user key roster's recipient resolver deliberately keeps
15
- * unmarked methods too.
16
- *
17
- * Deliberately dependency-light -- it imports nothing at all -- so the `keys`
18
- * layer can share the reader without pulling the ceremony or signing graph.
19
- */
20
- /**
21
- * A locally verified did:webvh document, read for the `keyAgreement` methods it
22
- * publishes and the controller each one carries. Structural on purpose: a
23
- * resolved `DIDDoc` satisfies it, and so does any narrower document shape a
24
- * wallet already holds.
25
- */
26
- export interface KeyAgreementDocument {
27
- verificationMethod?: Array<{
28
- id?: string;
29
- type?: string;
30
- controller?: string;
31
- publicKeyMultibase?: string;
32
- publicKeyCommitment?: string;
33
- }>;
34
- keyAgreement?: Array<string | {
35
- id?: string;
36
- type?: string;
37
- controller?: string;
38
- publicKeyMultibase?: string;
39
- publicKeyCommitment?: string;
40
- }>;
41
- }
42
- /**
43
- * The materialized shape {@link resolvedKeyAgreementMethods} returns: a
44
- * `keyAgreement` verification method carrying either the key itself
45
- * (`publicKeyMultibase`) or, for a low-entropy-derived standing unlock
46
- * credential, its hash commitment (`publicKeyCommitment`). The `type` rides
47
- * along so a consumer can tell the two published flavors apart (`Multikey` vs
48
- * `MultikeyCommitment`) instead of inferring the flavor from which property
49
- * happens to be present.
50
- */
51
- export interface ResolvedKeyAgreementMethod {
52
- id?: string;
53
- type?: string;
54
- controller?: string;
55
- publicKeyMultibase?: string;
56
- publicKeyCommitment?: string;
57
- }
58
- /**
59
- * The `keyAgreement` verification methods a document publishes, materialized:
60
- * string references resolved against `verificationMethod` (a reference nothing
61
- * backs is dropped), embedded methods taken verbatim. Document order is
62
- * preserved, and nothing is filtered -- deciding which of these methods belongs
63
- * to whom is each caller's own rule.
64
- *
65
- * @param options {object}
66
- * @param options.doc {KeyAgreementDocument} a locally verified document
67
- * @returns {ResolvedKeyAgreementMethod[]}
68
- */
69
- export declare function resolvedKeyAgreementMethods({ doc }: {
70
- doc: KeyAgreementDocument;
71
- }): ResolvedKeyAgreementMethod[];
72
- /**
73
- * The CREDENTIAL-CLASS `keyAgreement` methods a document publishes: those the
74
- * account DID itself controls. The rule is structural, and it is the exact
75
- * complement of the client marker: an enrolled client's key-agreement method
76
- * carries `controller: did:key:<its signing multibase>`
77
- * (`clientKeyAgreementController`), while a standing unlock credential's
78
- * carries the account DID. Both published flavors match -- a passphrase's
79
- * `MultikeyCommitment` and the verbatim `Multikey` a passkey or a recovery
80
- * code publishes -- because the class is decided by the controller alone.
81
- *
82
- * Nothing here tells one credential from another. A recovery code's entry is
83
- * indistinguishable from a passkey's by construction (both are unmarked and
84
- * verbatim), so a caller retiring this class retires every credential the
85
- * account stands on, which is what the transient and remembered recovery
86
- * continuations want.
87
- *
88
- * @param options {object}
89
- * @param options.doc {KeyAgreementDocument} a locally verified document
90
- * @param options.did {string} the account DID the document resolves to
91
- * @returns {ResolvedKeyAgreementMethod[]} in document order
92
- */
93
- export declare function credentialKeyAgreementMethods({ doc, did }: {
94
- doc: KeyAgreementDocument;
95
- did: string;
96
- }): ResolvedKeyAgreementMethod[];
97
- //# sourceMappingURL=keyAgreement.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"keyAgreement.d.ts","sourceRoot":"","sources":["../../src/webvh/keyAgreement.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;GAeG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC,kBAAkB,CAAC,EAAE,KAAK,CAAC;QACzB,EAAE,CAAC,EAAE,MAAM,CAAA;QACX,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,UAAU,CAAC,EAAE,MAAM,CAAA;QACnB,kBAAkB,CAAC,EAAE,MAAM,CAAA;QAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAA;KAC7B,CAAC,CAAA;IACF,YAAY,CAAC,EAAE,KAAK,CAChB,MAAM,GACN;QACE,EAAE,CAAC,EAAE,MAAM,CAAA;QACX,IAAI,CAAC,EAAE,MAAM,CAAA;QAC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