@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,5 +1,4 @@
1
1
  import type { DIDDoc, DIDLog, Signer, VerificationMethod } from '@interop/did-method-webvh';
2
- import type { KeystoreAgent } from '@interop/webkms-client';
3
2
  import { type ResourceLogHeadPin, type ResourceLogPinStore } from '@interop/vh-resource-log';
4
3
  import type { DidWebKeyMap } from './didWeb.js';
5
4
  /**
@@ -40,6 +39,14 @@ export interface WebvhIdStore {
40
39
  * `'PreconditionFailedError'` (was-client's class; any implementation may
41
40
  * throw its own error carrying that name), which this module maps to
42
41
  * {@link WebvhLogConflictError}.
42
+ *
43
+ * The returned `etag` is the new validator of the resource just written --
44
+ * the `ifMatch` token for the next entry built on it, so a ceremony that
45
+ * publishes can hand a compare-and-swap-capable head to the stage after it
46
+ * rather than re-reading the log it just wrote. It is absent against a
47
+ * backend that does not version resources, and an implementation that
48
+ * resolves `void` is accepted verbatim (the head it produced then carries
49
+ * no ETag and the next publish degrades to an unconditional write).
43
50
  */
44
51
  putIdResource(options: {
45
52
  resourceId: string;
@@ -47,13 +54,40 @@ export interface WebvhIdStore {
47
54
  contentType?: string;
48
55
  ifMatch?: string;
49
56
  ifNoneMatch?: boolean;
50
- }): Promise<void>;
57
+ }): Promise<{
58
+ etag?: string;
59
+ } | void>;
51
60
  /**
52
- * Writes (upserts) `keys.json` in the private `key-map` collection.
61
+ * The parsed `keys.json` body together with its ETag validator, or
62
+ * `undefined` when the map is not written yet. Optional: a store that does
63
+ * not offer it keeps the pre-convergence behavior -- the genesis' rewrite
64
+ * has no served map to re-read, so a lost precondition propagates, and the
65
+ * adopt branch backfills no `webvh` block.
66
+ */
67
+ getKeyMapRaw?(): Promise<{
68
+ content: unknown;
69
+ etag?: string;
70
+ } | undefined>;
71
+ /**
72
+ * Writes `keys.json` in the private `key-map` collection, under the write
73
+ * precondition the caller states: `ifNoneMatch` for the KMS stage's
74
+ * create-if-absent write, `ifMatch` for the genesis' rewrite of the map
75
+ * that write produced. Neither stated, the write is unconditional.
76
+ *
77
+ * The returned `etag` is the new validator of the resource just written --
78
+ * the `ifMatch` token for the rewrite built on it, so the stage that
79
+ * records the KMS binding hands a compare-and-swap-capable map to the
80
+ * stage that adds the account DID. It is absent against a backend that
81
+ * does not version resources, and an implementation that resolves `void`
82
+ * is accepted verbatim (the rewrite then degrades to unconditional).
53
83
  */
54
84
  putKeyMap(options: {
55
85
  content: object;
56
- }): Promise<void>;
86
+ ifMatch?: string;
87
+ ifNoneMatch?: boolean;
88
+ }): Promise<{
89
+ etag?: string;
90
+ } | void>;
57
91
  }
58
92
  /**
59
93
  * The Multikey verification-method type the did:webvh data model uses for both
@@ -264,9 +298,9 @@ export declare function assertCanonicalClientKeys({ signingKeyMultibase, keyAgre
264
298
  * The method is listed under `assertionMethod` and `capabilityDelegation`
265
299
  * ONLY -- no `authentication`, no `capabilityInvocation`, no `keyAgreement`
266
300
  * twin, and no marker property. Recognition is by that relation asymmetry
267
- * (`ladderVmIds` in the listings module): a `capabilityDelegation` member
268
- * absent from `capabilityInvocation` is the ladder VM, which also keeps it
269
- * structurally out of every client listing.
301
+ * (`ladderVmIds`, in the shared account-document readers): a
302
+ * `capabilityDelegation` member absent from `capabilityInvocation` is the
303
+ * ladder VM, which also keeps it structurally out of every client listing.
270
304
  *
271
305
  * Because the key is derived, a reinstall republishes the SAME key under the
272
306
  * SAME id, and a still-unexpired delegation it signed resumes verifying the
@@ -294,13 +328,25 @@ export interface DidWebvhBlock {
294
328
  did?: string;
295
329
  }
296
330
  /**
297
- * `keys.json` v2: the did:web key map plus the optional `webvh` block. The
298
- * did:web parse/guard tolerates and preserves the block, so a round-trip
299
- * through the did:web provisioning never strips it.
331
+ * `keys.json` v2: the KMS binding map plus the optional `webvh` block. The
332
+ * parse/guard tolerates and preserves the block, so a round-trip through the
333
+ * KMS-authentication stage never strips it.
300
334
  */
301
335
  export type DidWebKeyMapV2 = DidWebKeyMap & {
302
336
  webvh?: DidWebvhBlock;
303
337
  };
338
+ /**
339
+ * What the KMS-authentication stage hands the genesis: the key map to fold
340
+ * into the genesis entry, and the `keys.json` ETag the stage's own write
341
+ * produced, which the genesis' rewrite carries as its `ifMatch`. The ETag is
342
+ * absent when the stage wrote nothing (it adopted a served map) or when the
343
+ * backend versions no resources, and the rewrite then degrades to an
344
+ * unconditional write.
345
+ */
346
+ export interface KmsAuthenticationBinding {
347
+ keys: DidWebKeyMapV2;
348
+ etag?: string;
349
+ }
304
350
  /**
305
351
  * The `did:webvh:{SCID}:<host>:space:<spaceId>:<collectionId>` controller
306
352
  * template, with the literal `{SCID}` placeholder the library replaces at
@@ -357,6 +403,25 @@ export declare function updateKeyMultibase({ seed }: {
357
403
  export declare function updateKeySigner({ seed }: {
358
404
  seed: Uint8Array;
359
405
  }): Promise<Signer>;
406
+ /**
407
+ * What a create path hands back: the log, its `did:web` projection, and the
408
+ * resolved state `createDID` already returned. The three resolved members are
409
+ * what let a caller that publishes this log assemble a
410
+ * {@link PublishedWebvhLog} for the head it just wrote -- pairing them with
411
+ * the publish's own ETag -- rather than resolving the log a second time.
412
+ */
413
+ export interface CreatedWebvhLog {
414
+ log: DIDLog;
415
+ webDoc: object;
416
+ did: string;
417
+ /**
418
+ * The resolved document, detached from the genesis entry's own `state`, so
419
+ * it aliases exactly as a read-side head's document does.
420
+ */
421
+ doc: DIDDoc;
422
+ updateKeys: string[];
423
+ nextKeyHashes: string[];
424
+ }
360
425
  /**
361
426
  * Builds a genesis entry's `nextKeyHashes`: the active update key's own
362
427
  * carry-over hash beside the staged key's (the carry-over convention in the
@@ -410,7 +475,7 @@ export declare function genesisNextKeyHashes({ activeKeyMultibase, stagedKeyMult
410
475
  * @param options.updateKeyPublicKeyMultibase {string} ladder rung 0's key
411
476
  * @param options.nextKeyHashes {string[]} [hash(rung 0), hash(rung 1)]
412
477
  * @param options.signer {Signer} ladder rung 0's signer
413
- * @returns {Promise<{ log: DIDLog; webDoc: object; did: string }>}
478
+ * @returns {Promise<CreatedWebvhLog>}
414
479
  */
415
480
  export declare function createLadderAnchoredWebvhLog({ wasServerUrl, spaceId, didWebKeys, ladderVmKeyMultibase, credentialKeyAgreementMethod, updateKeyPublicKeyMultibase, nextKeyHashes, signer }: {
416
481
  wasServerUrl: string;
@@ -421,11 +486,7 @@ export declare function createLadderAnchoredWebvhLog({ wasServerUrl, spaceId, di
421
486
  updateKeyPublicKeyMultibase: string;
422
487
  nextKeyHashes: string[];
423
488
  signer: Signer;
424
- }): Promise<{
425
- log: DIDLog;
426
- webDoc: object;
427
- did: string;
428
- }>;
489
+ }): Promise<CreatedWebvhLog>;
429
490
  /**
430
491
  * Thrown when a conditional publish of `did.jsonl` lost a race to a concurrent
431
492
  * ceremony: the log moved on between the read this ceremony built its entry on
@@ -466,14 +527,59 @@ export declare function withLogConflictRetry<T>(run: () => Promise<T>): Promise<
466
527
  * @param options.log {DIDLog}
467
528
  * @param [options.ifMatch] {string} publish only if the log is unchanged
468
529
  * @param [options.ifNoneMatch] {boolean} publish only if the log is absent
469
- * @returns {Promise<void>}
530
+ * @returns {Promise<{ etag?: string }>} the new validator of the log just
531
+ * written, for a stage building its entry on this head; absent against a
532
+ * backend that serves no ETags
470
533
  */
471
534
  export declare function putLogResource({ store, log, ifMatch, ifNoneMatch }: {
472
535
  store: Pick<WebvhIdStore, 'putIdResource'>;
473
536
  log: DIDLog;
474
537
  ifMatch?: string;
475
538
  ifNoneMatch?: boolean;
476
- }): Promise<void>;
539
+ }): Promise<{
540
+ etag?: string;
541
+ }>;
542
+ /**
543
+ * THE POSTAMBLE: publishes `did.jsonl` -- the log only, never `did.json` (a
544
+ * caller writing through a bridge delegation is authorized for nothing else)
545
+ * -- and advances the caller's chain-head pin to what it just published, so a
546
+ * host rolling the log back straight afterwards is refused on the next read.
547
+ *
548
+ * So an entry published here leaves the `did:web` projection standing at
549
+ * whatever it said before: a ceremony whose entry REMOVES inventory (a
550
+ * removal, a retirement) must republish the projection itself before the
551
+ * entry lands, and a projection left behind by one that did not is mended by
552
+ * `ensureDidWebProjection` at the next visit holding a writer for the `id`
553
+ * collection (a controller-invoking client, or a transient visit under its
554
+ * generation delegation).
555
+ * The publish is conditional on the read the entry was built on; a lost race
556
+ * surfaces as a {@link WebvhLogConflictError} (the mapping lives in
557
+ * {@link putLogResource}).
558
+ *
559
+ * The two halves are one function on purpose. Separating them is what leaves
560
+ * a pin standing behind an entry this client itself published, the gap that
561
+ * already forced `BuiltOnHeadNotReachedError` into existence as a
562
+ * compensating class.
563
+ *
564
+ * @param options {object}
565
+ * @param options.store {object} anything with the seam's `putIdResource`
566
+ * @param options.log {DIDLog} the log this entry produced
567
+ * @param [options.ifMatch] {string} publish only if `did.jsonl` is unchanged
568
+ * @param [options.pinStore] {ResourceLogPinStore} the caller's chain-head
569
+ * pins; the pin advances only when a `logId` names its slot
570
+ * @param [options.logId] {string} the log's pin slot
571
+ * @returns {Promise<{ etag?: string }>} the new validator of the log this
572
+ * entry just published, for a stage building on the post-entry head
573
+ */
574
+ export declare function publishEntryPinned({ store, log, ifMatch, pinStore, logId }: {
575
+ store: Pick<WebvhIdStore, 'putIdResource'>;
576
+ log: DIDLog;
577
+ ifMatch?: string;
578
+ pinStore?: ResourceLogPinStore;
579
+ logId?: string;
580
+ }): Promise<{
581
+ etag?: string;
582
+ }>;
477
583
  /**
478
584
  * Publishes an already-created log: PUT `did.jsonl` (`text/jsonl`) then PUT
479
585
  * `did.json` from `webDoc` (`application/did+json`, adopting the webvh
@@ -490,8 +596,11 @@ export declare function putLogResource({ store, log, ifMatch, ifNoneMatch }: {
490
596
  * after the log's compare-and-swap was WON, so it is already serialized behind
491
597
  * that win; the log is the source of truth and the projection a derived cache;
492
598
  * and {@link concludeWithPublishedLog} re-derives and republishes the
493
- * projection from the resolved log on every ceremony's no-op path, healing any
494
- * lag a race or a torn publish leaves behind.
599
+ * projection from the resolved log on the no-op path of every ceremony that
600
+ * reaches this function, so a torn publish on one of those paths is healed by
601
+ * the next run of the same ceremony. That reach is the controller-invoking
602
+ * paths alone; `ensureDidWebProjection` is what mends a projection a
603
+ * ladder-signed entry ({@link publishEntryPinned}) left behind.
495
604
  *
496
605
  * @param options {object}
497
606
  * @param options.idStore {WebvhIdStore}
@@ -499,7 +608,9 @@ export declare function putLogResource({ store, log, ifMatch, ifNoneMatch }: {
499
608
  * @param options.webDoc {object}
500
609
  * @param [options.ifMatch] {string} publish only if `did.jsonl` is unchanged
501
610
  * @param [options.ifNoneMatch] {boolean} publish only if `did.jsonl` is absent
502
- * @returns {Promise<void>}
611
+ * @returns {Promise<{ etag?: string }>} the LOG's new validator, never the
612
+ * projection's: the projection is a derived cache, and only the log's ETag
613
+ * is a precondition anything is built on
503
614
  */
504
615
  export declare function publishWebvhLog({ idStore, log, webDoc, ifMatch, ifNoneMatch }: {
505
616
  idStore: WebvhIdStore;
@@ -507,7 +618,9 @@ export declare function publishWebvhLog({ idStore, log, webDoc, ifMatch, ifNoneM
507
618
  webDoc: object;
508
619
  ifMatch?: string;
509
620
  ifNoneMatch?: boolean;
510
- }): Promise<void>;
621
+ }): Promise<{
622
+ etag?: string;
623
+ }>;
511
624
  /**
512
625
  * The shared guard-and-publish tail of every ceremony that extends the log
513
626
  * through `updateDID`: the parallel `webDoc` must be there (it is, whenever
@@ -521,7 +634,7 @@ export declare function publishWebvhLog({ idStore, log, webDoc, ifMatch, ifNoneM
521
634
  * @param [options.updated.webDoc] {object}
522
635
  * @param [options.ifMatch] {string} the ETag of the read this entry was built
523
636
  * on
524
- * @returns {Promise<void>}
637
+ * @returns {Promise<{ etag?: string }>} the log's new validator
525
638
  */
526
639
  export declare function publishUpdatedLog({ idStore, updated, ifMatch }: {
527
640
  idStore: WebvhIdStore;
@@ -530,23 +643,64 @@ export declare function publishUpdatedLog({ idStore, updated, ifMatch }: {
530
643
  webDoc?: object;
531
644
  };
532
645
  ifMatch?: string;
533
- }): Promise<void>;
646
+ }): Promise<{
647
+ etag?: string;
648
+ }>;
534
649
  /**
535
- * Writes `keys.json` v2: the did:web relationship map plus the `webvh` block,
536
- * preserving the three did:web relationships. Exported for the ladder-anchored
537
- * ensure, whose create path records the account DID the same way the
538
- * enrolled-client one does.
650
+ * Writes `keys.json` v2: the KMS binding plus the `webvh` block. Exported for
651
+ * the ladder-anchored ensure, whose create path records the account DID the
652
+ * same way the enrolled-client one does.
653
+ *
654
+ * The body is CONSTRUCTED from the two members the map carries rather than
655
+ * spread from the caller's, so a legacy `keyAgreement` binding a stored map
656
+ * still holds is dropped by this rewrite.
657
+ *
658
+ * This is the genesis' rewrite of the map the KMS stage created one stage
659
+ * earlier, so it carries that write's ETag as its `ifMatch`. A caller holding
660
+ * no ETag (a backend that versions nothing) writes unconditionally.
661
+ *
662
+ * A lost precondition CONVERGES rather than propagating, since the genesis
663
+ * entry has already published by the time this runs and a bookkeeping resource
664
+ * must not fail a ceremony standing behind it: the served map is re-read, a
665
+ * map already naming this DID under this binding is left alone, and anything
666
+ * else is rewritten once under the served ETag. A second lost precondition
667
+ * propagates. Without the store's optional read there is nothing to converge
668
+ * on, and the first failure propagates.
539
669
  *
540
670
  * @param options {object}
541
671
  * @param options.idStore {WebvhIdStore}
542
- * @param options.didWebKeys {DidWebKeyMap}
672
+ * @param options.didWebKeys {DidWebKeyMap} the binding to record, which on
673
+ * the create path is the one this run published in the genesis entry
543
674
  * @param options.webvh {DidWebvhBlock}
675
+ * @param [options.ifMatch] {string} the ETag the KMS stage's own write
676
+ * returned
544
677
  * @returns {Promise<void>}
545
678
  */
546
- export declare function writeKeysJson({ idStore, didWebKeys, webvh }: {
679
+ export declare function writeKeysJson({ idStore, didWebKeys, webvh, ifMatch }: {
547
680
  idStore: WebvhIdStore;
548
681
  didWebKeys: DidWebKeyMap;
549
682
  webvh: DidWebvhBlock;
683
+ ifMatch?: string;
684
+ }): Promise<void>;
685
+ /**
686
+ * Records the account DID into a `keys.json` carrying a KMS binding and no (or
687
+ * a stale) `webvh` block -- the state a run torn between its genesis entry and
688
+ * its rewrite leaves behind. It is the adoption path's half of that rewrite,
689
+ * and the binding comes from the SERVED map: the run that published the log
690
+ * recorded it, while this run's own map may name a key that log never
691
+ * published.
692
+ *
693
+ * A no-op when the store offers no read, when the served map carries no
694
+ * binding, and when it already names this DID.
695
+ *
696
+ * @param options {object}
697
+ * @param options.idStore {WebvhIdStore}
698
+ * @param options.did {string} the DID the adopted log resolves to
699
+ * @returns {Promise<void>}
700
+ */
701
+ export declare function backfillKeyMapWebvhBlock({ idStore, did }: {
702
+ idStore: WebvhIdStore;
703
+ did: string;
550
704
  }): Promise<void>;
551
705
  /**
552
706
  * The verified state of the published log: the log itself, the resolved DID
@@ -593,7 +747,9 @@ export interface PublishedWebvhLog {
593
747
  * refused as a `rollback` instead of read as `undefined`.
594
748
  *
595
749
  * @param options {object}
596
- * @param options.idStore {WebvhIdStore}
750
+ * @param options.idStore {Pick<WebvhIdStore, 'getIdResourceRaw'>} the read
751
+ * half of the seam alone, so a caller holding a narrower store (a bridge
752
+ * delegation's read + PUT pair) passes it directly
597
753
  * @param [options.expectedDid] {string} the DID the log must resolve to
598
754
  * @param [options.pinStore] {ResourceLogPinStore} this client's chain-head
599
755
  * pins for the account log
@@ -602,11 +758,65 @@ export interface PublishedWebvhLog {
602
758
  * @returns {Promise<PublishedWebvhLog | undefined>}
603
759
  */
604
760
  export declare function readPublishedLog({ idStore, expectedDid, pinStore, logId }: {
605
- idStore: WebvhIdStore;
761
+ idStore: Pick<WebvhIdStore, 'getIdResourceRaw'>;
606
762
  expectedDid?: string;
607
763
  pinStore?: ResourceLogPinStore;
608
764
  logId?: string;
609
765
  }): Promise<PublishedWebvhLog | undefined>;
766
+ /**
767
+ * The substituted-account refusal on its own: a resolved head that is not the
768
+ * DID the caller expected is refused rather than built on. Stated once so a
769
+ * fresh read and a caller-threaded head refuse identically.
770
+ *
771
+ * A ceremony that takes an already-read head from its caller (the transient
772
+ * visit's one-read composition, where the readiness stage hands its verified
773
+ * head to the enrollment) runs this explicitly: the read that would otherwise
774
+ * have run it never happened, and a head resolving to another DID must not
775
+ * become the entry's basis just because it arrived by parameter.
776
+ *
777
+ * @param options {object}
778
+ * @param options.published {PublishedWebvhLog} the resolved head
779
+ * @param [options.expectedDid] {string} the DID it must resolve to; absent,
780
+ * the head is accepted (the caller discovering the DID from the log itself)
781
+ * @returns {PublishedWebvhLog} the head verbatim
782
+ */
783
+ export declare function assertPublishedLogDid({ published, expectedDid }: {
784
+ published: PublishedWebvhLog;
785
+ expectedDid?: string;
786
+ }): PublishedWebvhLog;
787
+ /**
788
+ * {@link readPublishedLog} for the ceremonies whose premise is a log that
789
+ * already exists: an absent `did.jsonl` is a refusal rather than a state to
790
+ * branch on, so the caller gets a `PublishedWebvhLog` or an error. The
791
+ * `missingMessage` is the caller's own phrasing of what there is nothing to do
792
+ * against ("nothing to enroll into", "nothing to recover"), since the read
793
+ * itself cannot know which ceremony is standing on it.
794
+ *
795
+ * Every other option, and every check behind them -- the `expectedDid`
796
+ * refusal and the chain-head pin's rollback / fork / identity-switch
797
+ * refusals -- is {@link readPublishedLog}'s verbatim. Each attempt of a
798
+ * conflict-retried ceremony reads for itself, so the continuity check runs on
799
+ * the read the compare-and-swap publish is conditioned on rather than only on
800
+ * an orchestrator's pre-read.
801
+ *
802
+ * @param options {object}
803
+ * @param options.idStore {Pick<WebvhIdStore, 'getIdResourceRaw'>}
804
+ * @param [options.expectedDid] {string} the DID the log must resolve to
805
+ * @param [options.pinStore] {ResourceLogPinStore} this client's chain-head
806
+ * pins for the log being read
807
+ * @param [options.logId] {string} the log's pin-slot key; required whenever
808
+ * a `pinStore` is supplied
809
+ * @param [options.missingMessage] {string} the thrown `Error`'s message when
810
+ * the log is absent
811
+ * @returns {Promise<PublishedWebvhLog>}
812
+ */
813
+ export declare function readPublishedLogOrThrow({ idStore, expectedDid, pinStore, logId, missingMessage }: {
814
+ idStore: Pick<WebvhIdStore, 'getIdResourceRaw'>;
815
+ expectedDid?: string;
816
+ pinStore?: ResourceLogPinStore;
817
+ logId?: string;
818
+ missingMessage?: string;
819
+ }): Promise<PublishedWebvhLog>;
610
820
  /**
611
821
  * The chain-head pin a log establishes: the genesis entry's method and SCID
612
822
  * plus the head entry's `versionId`. Used where this client is the one that
@@ -635,16 +845,22 @@ export declare function servedHead(log: DIDLog): {
635
845
  * already-revoked no-op. All of them used to infer completion from `did.jsonl`
636
846
  * alone, which is a half of the state: {@link publishWebvhLog} writes the log
637
847
  * and its `did:web` projection in two non-atomic PUTs, so a crash between them
638
- * leaves a `did.jsonl` that is complete beside a `did.json` that lags it
639
- * forever (nothing else republishes the projection).
848
+ * leaves a `did.jsonl` that is complete beside a `did.json` that lags it.
640
849
  *
641
850
  * So the projection is re-derived from the resolved log and re-PUT
642
851
  * unconditionally rather than compared first: the write is idempotent and one
643
852
  * request either way, and the resolved log is the source of truth for what the
644
853
  * projection must say. A ceremony that no-ops on the log therefore still heals
645
- * a torn earlier publish. The projection PUT is deliberately unconditional
646
- * here too: healing it is the whole point, and the log it was derived from is
647
- * the state this call just read and resolved.
854
+ * a torn earlier publish OF THAT CEREMONY. The projection PUT is deliberately
855
+ * unconditional here too: healing it is the whole point, and the log it was
856
+ * derived from is the state this call just read and resolved.
857
+ *
858
+ * The reach is what to hold on to: every caller here invokes as the account's
859
+ * controller, so this heals nothing for the ladder-signed entries that publish
860
+ * through {@link publishEntryPinned} and write the log alone. Those are mended
861
+ * by their own ceremony's pre-entry projection PUT and, failing that, by
862
+ * `ensureDidWebProjection` at the next visit that holds an `id`-collection
863
+ * writer.
648
864
  *
649
865
  * @param options {object}
650
866
  * @param options.idStore {WebvhIdStore}
@@ -673,6 +889,24 @@ export declare function effectiveParameters(log: DIDLog): Array<{
673
889
  updateKeys: string[];
674
890
  nextKeyHashes: string[];
675
891
  }>;
892
+ /**
893
+ * The log's current `updateKeys` / `nextKeyHashes` view: the last entry's
894
+ * effective parameters, or the empty pair for a log with no entries.
895
+ *
896
+ * The empty default is a policy choice, not a convenience: it is what makes
897
+ * an unresolvable log attribute as "no rung standing" rather than throw, so
898
+ * it is stated here once rather than at each attribution site.
899
+ *
900
+ * @param published {object}
901
+ * @param published.log {DIDLog}
902
+ * @returns {object}
903
+ */
904
+ export declare function currentLogParameters(published: {
905
+ log: DIDLog;
906
+ }): {
907
+ updateKeys: string[];
908
+ nextKeyHashes: string[];
909
+ };
676
910
  /**
677
911
  * Idempotently provisions and publishes the user's did:webvh DID log. A wallet
678
912
  * that keeps a KMS runs it directly after the did:web provisioning (non-fatal)
@@ -716,8 +950,10 @@ export declare function effectiveParameters(log: DIDLog): Array<{
716
950
  * @param options.wasServerUrl {string}
717
951
  * @param options.spaceId {string}
718
952
  * @param [options.didWebKeys] {DidWebKeyMapV2} the parsed keys.json (with any
719
- * webvh block) returned by the did:web provisioning; absent on a
953
+ * webvh block) returned by the KMS-authentication stage; absent on a
720
954
  * client-keys-only genesis (no KMS anywhere in the path)
955
+ * @param [options.keysJsonEtag] {string} the ETag that stage's own write
956
+ * returned, carried as the `ifMatch` of the rewrite that records the DID
721
957
  * @param options.clientKeys {WebvhClientKeys} this client's published keys
722
958
  * @param options.updateKeys {ClientWebvhUpdateKeys} already persisted
723
959
  * client-local
@@ -733,6 +969,7 @@ export declare function ensureDidWebvh(options: {
733
969
  wasServerUrl: string;
734
970
  spaceId: string;
735
971
  didWebKeys?: DidWebKeyMapV2;
972
+ keysJsonEtag?: string;
736
973
  clientKeys: WebvhClientKeys;
737
974
  updateKeys: ClientWebvhUpdateKeys;
738
975
  expectedDid?: string;
@@ -826,102 +1063,4 @@ export interface WebvhEnrollmentKeys extends WebvhClientKeys {
826
1063
  updateKeyMultibase: string;
827
1064
  stagedUpdateKeyMultibase: string;
828
1065
  }
829
- /**
830
- * The relationship references of a resolved document as verification-method
831
- * ids, tolerating embedded objects beside string references.
832
- *
833
- * @param relation {Array} the relationship array, when present
834
- * @returns {string[]}
835
- */
836
- export declare function relationIds(relation: Array<string | {
837
- id?: string;
838
- }> | undefined): string[];
839
- /**
840
- * Enrolls a second wallet client into the published did:webvh document -- the
841
- * log half of the enrollment ceremony (the user key roster wrap happens first,
842
- * outside this module). Two entries, forced by prerotation (a new update key
843
- * must hash into the PREVIOUS entry's `nextKeyHashes`):
844
- *
845
- * 1. **Commit**: a sparse entry extending `nextKeyHashes` with the new
846
- * client's update-key and staged-key hashes (document and `updateKeys`
847
- * untouched).
848
- * 2. **Add**: an entry adding the new client's verification methods (its
849
- * Ed25519 key under the four signing relationships, its X25519 twin under
850
- * `keyAgreement`) and its update key to `updateKeys`.
851
- *
852
- * Both entries are signed by THIS client's active update key (quorum-of-one:
853
- * any single enrolled client can enroll). The ceremony is resumable from
854
- * durable state alone: a tear after the commit is detected by its hashes
855
- * already standing in `nextKeyHashes` (skip to the add entry), and a
856
- * completed enrollment is detected by the update key already being authorized
857
- * (no-op). Re-running with the same key set converges without forking the
858
- * log.
859
- *
860
- * Each entry publishes conditionally on the read it was built on (the add
861
- * entry on the mid-ceremony re-read), so a concurrent ceremony -- a revocation,
862
- * another enrollment -- can never be erased by this one; a lost race re-runs
863
- * from the top (see {@link withLogConflictRetry}) and rebases on the new head.
864
- *
865
- * @param options {object}
866
- * @param options.idStore {WebvhIdStore}
867
- * @param options.updateKeys {ClientWebvhUpdateKeys} THIS client's seeds
868
- * @param options.newClient {WebvhEnrollmentKeys} the enrollee's public halves
869
- * @returns {Promise<{ did: string }>}
870
- */
871
- export declare function enrollWebvhClient(options: {
872
- idStore: WebvhIdStore;
873
- updateKeys: ClientWebvhUpdateKeys;
874
- newClient: WebvhEnrollmentKeys;
875
- }): Promise<{
876
- did: string;
877
- }>;
878
- /**
879
- * Rebuilds `keys.json` from the published artifacts plus a WebKMS key listing
880
- * -- the recovery path for a lost or rolled-back `keys.json`. List Keys is
881
- * authorized as `read` against the keystore controller, which only the
882
- * root-controlled keystore agent can invoke.
883
- *
884
- * KMS key local ids are server-generated random and appear in no published
885
- * artifact, so the bindings are rediscovered by public key material instead.
886
- * List the keystore once -- each listed description carries `keyUrl`, the
887
- * key's canonical invocation URL (the signable handle its alias-overridden
888
- * `id` erases) -- then match `did.json`'s relationship verification methods
889
- * by `publicKeyMultibase` and rewrite `keys.json` from what matched. The
890
- * `authentication` and `keyAgreement` bindings are required; `assertionMethod`
891
- * lists client keys only, so no KMS binding exists there and none is rebuilt.
892
- * When `did.jsonl` is published, its resolved DID is recorded in the `webvh`
893
- * block; there is nothing else to repair there, since the log's update keys are
894
- * client-held seeds that no keystore listing could recover.
895
- *
896
- * An unmatchable binding is unrepairable and throws: a published artifact
897
- * depends on a key the keystore no longer lists.
898
- *
899
- * The log read takes the same checks every other ceremony read does, and for
900
- * the same reason: what it reads is written straight back into the rebuilt
901
- * `keys.json`, so a substituted log would rewrite the `webvh` block to a wrong
902
- * DID and a truncated one would be adopted as this account's history. A caller
903
- * that still holds the account pointer passes `expectedDid` and its
904
- * `pinStore`; the pure-recovery caller that has lost everything but the
905
- * keystore has no DID to expect and passes neither, which is the one read here
906
- * that legitimately discovers the DID from the log itself.
907
- *
908
- * @param options {object}
909
- * @param options.keystoreAgent {KeystoreAgent}
910
- * @param options.idStore {WebvhIdStore}
911
- * @param [options.expectedDid] {string} the DID the published log must
912
- * resolve to
913
- * @param [options.pinStore] {ResourceLogPinStore} this client's chain-head
914
- * pins for the account log
915
- * @param [options.logId] {string} the account log's pin-slot key, built by
916
- * the caller with `accountLogPinId({ spaceId })`; required whenever a
917
- * `pinStore` is supplied
918
- * @returns {Promise<DidWebKeyMapV2>} the rebuilt, persisted keys.json
919
- */
920
- export declare function repairKeyBindings({ keystoreAgent, idStore, expectedDid, pinStore, logId }: {
921
- keystoreAgent: KeystoreAgent;
922
- idStore: WebvhIdStore;
923
- expectedDid?: string;
924
- pinStore?: ResourceLogPinStore;
925
- logId?: string;
926
- }): Promise<DidWebKeyMapV2>;
927
1066
  //# sourceMappingURL=didWebvh.d.ts.map
@@ -1 +1 @@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