@interop/wallet-core 0.66.0 → 0.68.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 (257) hide show
  1. package/README.md +12 -8
  2. package/dist/clientAnnex/credentialAnchoredGenesis.d.ts +6 -10
  3. package/dist/clientAnnex/credentialAnchoredGenesis.d.ts.map +1 -1
  4. package/dist/clientAnnex/credentialAnchoredGenesis.js +34 -56
  5. package/dist/clientAnnex/credentialAnchoredGenesis.js.map +1 -1
  6. package/dist/clientAnnex/establish.d.ts +46 -29
  7. package/dist/clientAnnex/establish.d.ts.map +1 -1
  8. package/dist/clientAnnex/establish.js +111 -86
  9. package/dist/clientAnnex/establish.js.map +1 -1
  10. package/dist/clientAnnex/forget.d.ts +7 -16
  11. package/dist/clientAnnex/forget.d.ts.map +1 -1
  12. package/dist/clientAnnex/forget.js +13 -24
  13. package/dist/clientAnnex/forget.js.map +1 -1
  14. package/dist/clientAnnex/forgetLast.d.ts +33 -129
  15. package/dist/clientAnnex/forgetLast.d.ts.map +1 -1
  16. package/dist/clientAnnex/forgetLast.js +43 -182
  17. package/dist/clientAnnex/forgetLast.js.map +1 -1
  18. package/dist/clientAnnex/gc.d.ts +26 -12
  19. package/dist/clientAnnex/gc.d.ts.map +1 -1
  20. package/dist/clientAnnex/gc.js +60 -57
  21. package/dist/clientAnnex/gc.js.map +1 -1
  22. package/dist/clientAnnex/heal.d.ts +75 -18
  23. package/dist/clientAnnex/heal.d.ts.map +1 -1
  24. package/dist/clientAnnex/heal.js +79 -147
  25. package/dist/clientAnnex/heal.js.map +1 -1
  26. package/dist/clientAnnex/index.d.ts +8 -8
  27. package/dist/clientAnnex/index.d.ts.map +1 -1
  28. package/dist/clientAnnex/index.js +5 -5
  29. package/dist/clientAnnex/index.js.map +1 -1
  30. package/dist/clientAnnex/ladder.d.ts +51 -4
  31. package/dist/clientAnnex/ladder.d.ts.map +1 -1
  32. package/dist/clientAnnex/ladder.js +283 -47
  33. package/dist/clientAnnex/ladder.js.map +1 -1
  34. package/dist/clientAnnex/ladderAnchored.d.ts +62 -73
  35. package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -1
  36. package/dist/clientAnnex/ladderAnchored.js +103 -117
  37. package/dist/clientAnnex/ladderAnchored.js.map +1 -1
  38. package/dist/clientAnnex/log.d.ts +123 -125
  39. package/dist/clientAnnex/log.d.ts.map +1 -1
  40. package/dist/clientAnnex/log.js +174 -233
  41. package/dist/clientAnnex/log.js.map +1 -1
  42. package/dist/clientAnnex/mend.d.ts +0 -4
  43. package/dist/clientAnnex/mend.d.ts.map +1 -1
  44. package/dist/clientAnnex/mend.js +50 -51
  45. package/dist/clientAnnex/mend.js.map +1 -1
  46. package/dist/clientAnnex/recoveryLadderAnchored.d.ts +25 -13
  47. package/dist/clientAnnex/recoveryLadderAnchored.d.ts.map +1 -1
  48. package/dist/clientAnnex/recoveryLadderAnchored.js +80 -303
  49. package/dist/clientAnnex/recoveryLadderAnchored.js.map +1 -1
  50. package/dist/clientAnnex/rosterDeliveredEpochs.d.ts +13 -5
  51. package/dist/clientAnnex/rosterDeliveredEpochs.d.ts.map +1 -1
  52. package/dist/clientAnnex/rosterDeliveredEpochs.js +18 -9
  53. package/dist/clientAnnex/rosterDeliveredEpochs.js.map +1 -1
  54. package/dist/clientAnnex/selfEnroll.d.ts +6 -10
  55. package/dist/clientAnnex/selfEnroll.d.ts.map +1 -1
  56. package/dist/clientAnnex/selfEnroll.js +13 -18
  57. package/dist/clientAnnex/selfEnroll.js.map +1 -1
  58. package/dist/clientAnnex/zcap.d.ts +19 -0
  59. package/dist/clientAnnex/zcap.d.ts.map +1 -1
  60. package/dist/clientAnnex/zcap.js +80 -12
  61. package/dist/clientAnnex/zcap.js.map +1 -1
  62. package/dist/clients/index.d.ts +3 -2
  63. package/dist/clients/index.d.ts.map +1 -1
  64. package/dist/clients/index.js +3 -2
  65. package/dist/clients/index.js.map +1 -1
  66. package/dist/clients/listing.d.ts.map +1 -1
  67. package/dist/clients/listing.js +33 -15
  68. package/dist/clients/listing.js.map +1 -1
  69. package/dist/clients/policy.d.ts +18 -0
  70. package/dist/clients/policy.d.ts.map +1 -1
  71. package/dist/clients/policy.js +22 -8
  72. package/dist/clients/policy.js.map +1 -1
  73. package/dist/clients/revocation.d.ts +18 -30
  74. package/dist/clients/revocation.d.ts.map +1 -1
  75. package/dist/clients/revocation.js +12 -27
  76. package/dist/clients/revocation.js.map +1 -1
  77. package/dist/clients/rosterPolicy.d.ts +6 -1
  78. package/dist/clients/rosterPolicy.d.ts.map +1 -1
  79. package/dist/clients/rosterPolicy.js +27 -30
  80. package/dist/clients/rosterPolicy.js.map +1 -1
  81. package/dist/descriptors/errors.d.ts +6 -5
  82. package/dist/descriptors/errors.d.ts.map +1 -1
  83. package/dist/descriptors/errors.js +6 -5
  84. package/dist/descriptors/errors.js.map +1 -1
  85. package/dist/descriptors/index.d.ts +7 -3
  86. package/dist/descriptors/index.d.ts.map +1 -1
  87. package/dist/descriptors/index.js +7 -3
  88. package/dist/descriptors/index.js.map +1 -1
  89. package/dist/descriptors/logSource.d.ts +28 -6
  90. package/dist/descriptors/logSource.d.ts.map +1 -1
  91. package/dist/descriptors/logSource.js +33 -7
  92. package/dist/descriptors/logSource.js.map +1 -1
  93. package/dist/enrollment/enrollment.d.ts.map +1 -1
  94. package/dist/enrollment/enrollment.js +3 -7
  95. package/dist/enrollment/enrollment.js.map +1 -1
  96. package/dist/genesis/accountGenesis.d.ts +11 -16
  97. package/dist/genesis/accountGenesis.d.ts.map +1 -1
  98. package/dist/genesis/accountGenesis.js +43 -47
  99. package/dist/genesis/accountGenesis.js.map +1 -1
  100. package/dist/genesis/kmsAuthentication.d.ts +50 -0
  101. package/dist/genesis/kmsAuthentication.d.ts.map +1 -0
  102. package/dist/genesis/kmsAuthentication.js +49 -0
  103. package/dist/genesis/kmsAuthentication.js.map +1 -0
  104. package/dist/keyring/kdf.d.ts +16 -20
  105. package/dist/keyring/kdf.d.ts.map +1 -1
  106. package/dist/keyring/kdf.js +2 -2
  107. package/dist/keyring/kdf.js.map +1 -1
  108. package/dist/keyring/unlockSpace.d.ts +8 -30
  109. package/dist/keyring/unlockSpace.d.ts.map +1 -1
  110. package/dist/keyring/unlockSpace.js +8 -31
  111. package/dist/keyring/unlockSpace.js.map +1 -1
  112. package/dist/keys/clientKeyRecord.d.ts +2 -1
  113. package/dist/keys/clientKeyRecord.d.ts.map +1 -1
  114. package/dist/keys/clientKeyRecord.js +28 -11
  115. package/dist/keys/clientKeyRecord.js.map +1 -1
  116. package/dist/keys/index.d.ts +6 -2
  117. package/dist/keys/index.d.ts.map +1 -1
  118. package/dist/keys/index.js +5 -1
  119. package/dist/keys/index.js.map +1 -1
  120. package/dist/keys/rosterLogStore.d.ts.map +1 -1
  121. package/dist/keys/rosterLogStore.js +14 -5
  122. package/dist/keys/rosterLogStore.js.map +1 -1
  123. package/dist/keys/spaceEpochs.d.ts +92 -3
  124. package/dist/keys/spaceEpochs.d.ts.map +1 -1
  125. package/dist/keys/spaceEpochs.js +110 -4
  126. package/dist/keys/spaceEpochs.js.map +1 -1
  127. package/dist/keys/userKeyRoster.d.ts +30 -3
  128. package/dist/keys/userKeyRoster.d.ts.map +1 -1
  129. package/dist/keys/userKeyRoster.js +90 -15
  130. package/dist/keys/userKeyRoster.js.map +1 -1
  131. package/dist/keys/userKeyRosterCascade.d.ts.map +1 -1
  132. package/dist/keys/userKeyRosterCascade.js +5 -1
  133. package/dist/keys/userKeyRosterCascade.js.map +1 -1
  134. package/dist/recovery/continuation.d.ts +250 -0
  135. package/dist/recovery/continuation.d.ts.map +1 -0
  136. package/dist/recovery/continuation.js +467 -0
  137. package/dist/recovery/continuation.js.map +1 -0
  138. package/dist/recovery/index.d.ts +12 -8
  139. package/dist/recovery/index.d.ts.map +1 -1
  140. package/dist/recovery/index.js +11 -7
  141. package/dist/recovery/index.js.map +1 -1
  142. package/dist/recovery/recoveryDelegation.d.ts +23 -126
  143. package/dist/recovery/recoveryDelegation.d.ts.map +1 -1
  144. package/dist/recovery/recoveryDelegation.js +1 -266
  145. package/dist/recovery/recoveryDelegation.js.map +1 -1
  146. package/dist/recovery/recoveryWebvh.d.ts +52 -107
  147. package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
  148. package/dist/recovery/recoveryWebvh.js +54 -403
  149. package/dist/recovery/recoveryWebvh.js.map +1 -1
  150. package/dist/request/classify.d.ts +3 -14
  151. package/dist/request/classify.d.ts.map +1 -1
  152. package/dist/request/classify.js +19 -40
  153. package/dist/request/classify.js.map +1 -1
  154. package/dist/request/index.d.ts +1 -0
  155. package/dist/request/index.d.ts.map +1 -1
  156. package/dist/request/index.js +1 -0
  157. package/dist/request/index.js.map +1 -1
  158. package/dist/request/onboarding.d.ts.map +1 -1
  159. package/dist/request/onboarding.js +19 -27
  160. package/dist/request/onboarding.js.map +1 -1
  161. package/dist/request/parse.d.ts +5 -3
  162. package/dist/request/parse.d.ts.map +1 -1
  163. package/dist/request/parse.js +7 -6
  164. package/dist/request/parse.js.map +1 -1
  165. package/dist/request/processRequest.d.ts.map +1 -1
  166. package/dist/request/processRequest.js +2 -1
  167. package/dist/request/processRequest.js.map +1 -1
  168. package/dist/request/queryPredicates.d.ts +98 -0
  169. package/dist/request/queryPredicates.d.ts.map +1 -0
  170. package/dist/request/queryPredicates.js +107 -0
  171. package/dist/request/queryPredicates.js.map +1 -0
  172. package/dist/resourceLog/document.d.ts +39 -0
  173. package/dist/resourceLog/document.d.ts.map +1 -1
  174. package/dist/resourceLog/document.js +41 -0
  175. package/dist/resourceLog/document.js.map +1 -1
  176. package/dist/resourceLog/index.d.ts +2 -2
  177. package/dist/resourceLog/index.js +2 -2
  178. package/dist/resourceLog/ladderRungs.d.ts.map +1 -1
  179. package/dist/resourceLog/ladderRungs.js +3 -2
  180. package/dist/resourceLog/ladderRungs.js.map +1 -1
  181. package/dist/sync/contactsConflict.d.ts.map +1 -1
  182. package/dist/sync/contactsConflict.js +8 -2
  183. package/dist/sync/contactsConflict.js.map +1 -1
  184. package/dist/sync/engine.d.ts +38 -23
  185. package/dist/sync/engine.d.ts.map +1 -1
  186. package/dist/sync/engine.js +36 -5
  187. package/dist/sync/engine.js.map +1 -1
  188. package/dist/sync/index.d.ts +9 -12
  189. package/dist/sync/index.d.ts.map +1 -1
  190. package/dist/sync/index.js +8 -11
  191. package/dist/sync/index.js.map +1 -1
  192. package/dist/sync/push.d.ts.map +1 -1
  193. package/dist/sync/push.js +1 -2
  194. package/dist/sync/push.js.map +1 -1
  195. package/dist/sync/remint.d.ts +0 -31
  196. package/dist/sync/remint.d.ts.map +1 -1
  197. package/dist/sync/remint.js +32 -1
  198. package/dist/sync/remint.js.map +1 -1
  199. package/dist/sync/types.d.ts +4 -41
  200. package/dist/sync/types.d.ts.map +1 -1
  201. package/dist/sync/types.js +4 -47
  202. package/dist/sync/types.js.map +1 -1
  203. package/dist/unlock/index.d.ts +1 -1
  204. package/dist/unlock/index.d.ts.map +1 -1
  205. package/dist/unlock/index.js +1 -1
  206. package/dist/unlock/index.js.map +1 -1
  207. package/dist/unlock/retire.d.ts +16 -64
  208. package/dist/unlock/retire.d.ts.map +1 -1
  209. package/dist/unlock/retire.js +7 -86
  210. package/dist/unlock/retire.js.map +1 -1
  211. package/dist/unlock/standingWebvh.d.ts +27 -61
  212. package/dist/unlock/standingWebvh.d.ts.map +1 -1
  213. package/dist/unlock/standingWebvh.js +40 -92
  214. package/dist/unlock/standingWebvh.js.map +1 -1
  215. package/dist/unlock/unlockRecord.d.ts.map +1 -1
  216. package/dist/unlock/unlockRecord.js +69 -44
  217. package/dist/unlock/unlockRecord.js.map +1 -1
  218. package/dist/webvh/accountEntry.d.ts +68 -19
  219. package/dist/webvh/accountEntry.d.ts.map +1 -1
  220. package/dist/webvh/accountEntry.js +117 -37
  221. package/dist/webvh/accountEntry.js.map +1 -1
  222. package/dist/webvh/delegatedLogStore.d.ts +24 -13
  223. package/dist/webvh/delegatedLogStore.d.ts.map +1 -1
  224. package/dist/webvh/delegatedLogStore.js +40 -11
  225. package/dist/webvh/delegatedLogStore.js.map +1 -1
  226. package/dist/webvh/didWebvh.d.ts +91 -86
  227. package/dist/webvh/didWebvh.d.ts.map +1 -1
  228. package/dist/webvh/didWebvh.js +117 -142
  229. package/dist/webvh/didWebvh.js.map +1 -1
  230. package/dist/webvh/enrollClient.d.ts +2 -8
  231. package/dist/webvh/enrollClient.d.ts.map +1 -1
  232. package/dist/webvh/enrollClient.js +22 -31
  233. package/dist/webvh/enrollClient.js.map +1 -1
  234. package/dist/webvh/index.d.ts +12 -8
  235. package/dist/webvh/index.d.ts.map +1 -1
  236. package/dist/webvh/index.js +10 -7
  237. package/dist/webvh/index.js.map +1 -1
  238. package/dist/webvh/listClients.d.ts.map +1 -1
  239. package/dist/webvh/listClients.js +102 -65
  240. package/dist/webvh/listClients.js.map +1 -1
  241. package/dist/webvh/mergeMethods.d.ts +84 -0
  242. package/dist/webvh/mergeMethods.d.ts.map +1 -0
  243. package/dist/webvh/mergeMethods.js +46 -0
  244. package/dist/webvh/mergeMethods.js.map +1 -0
  245. package/dist/webvh/revokeClient.d.ts +15 -11
  246. package/dist/webvh/revokeClient.d.ts.map +1 -1
  247. package/dist/webvh/revokeClient.js +130 -57
  248. package/dist/webvh/revokeClient.js.map +1 -1
  249. package/dist/webvh/verifyLog.d.ts +45 -4
  250. package/dist/webvh/verifyLog.d.ts.map +1 -1
  251. package/dist/webvh/verifyLog.js +62 -21
  252. package/dist/webvh/verifyLog.js.map +1 -1
  253. package/dist/webvh/wasIdStore.d.ts +16 -3
  254. package/dist/webvh/wasIdStore.d.ts.map +1 -1
  255. package/dist/webvh/wasIdStore.js +18 -3
  256. package/dist/webvh/wasIdStore.js.map +1 -1
  257. package/package.json +11 -11
@@ -0,0 +1,46 @@
1
+ import { relationIds } from '../resourceLog/document.js';
2
+ /**
3
+ * Merges verification methods into a published document across the five
4
+ * relations. `verificationMethod` keeps every existing method the predicate
5
+ * does not retire and that no added method replaces by id, then the added
6
+ * methods in order; each relation keeps its existing references (retired ones
7
+ * dropped) and then the ids `relations` names for it, deduped.
8
+ *
9
+ * The retirement predicate runs over the existing document only, and the
10
+ * added ids join afterwards: a method this entry publishes may already stand
11
+ * in a relation (a reinstalled ladder VM, say), and filtering the union would
12
+ * strike the very method being published.
13
+ *
14
+ * @param options {object}
15
+ * @param options.doc {object} the published document the entry extends
16
+ * @param options.methods {VerificationMethod[]} the methods to publish, in
17
+ * the order they land in `verificationMethod`
18
+ * @param options.relations {RelationMembership} the ids each relation gains
19
+ * @param [options.retire] {(id: string) => boolean} which existing method
20
+ * ids and relation references leave the document in the same entry
21
+ * @returns {object} the merged `verificationMethods` and the five relations,
22
+ * as the account-entry seam takes them
23
+ */
24
+ export function mergeVerificationMethods({ doc, methods, relations, retire = () => false }) {
25
+ const retired = (id) => id !== undefined && retire(id);
26
+ const existingMethods = doc.verificationMethod ?? [];
27
+ const verificationMethods = [
28
+ ...existingMethods.filter(method => !retired(method.id) && !methods.some(added => added.id === method.id)),
29
+ ...methods
30
+ ];
31
+ const withReferences = (relation, ids) => [
32
+ ...new Set([
33
+ ...relationIds(relation).filter(id => !retired(id)),
34
+ ...(ids ?? [])
35
+ ])
36
+ ];
37
+ return {
38
+ verificationMethods,
39
+ authentication: withReferences(doc.authentication, relations.authentication),
40
+ assertionMethod: withReferences(doc.assertionMethod, relations.assertionMethod),
41
+ keyAgreement: withReferences(doc.keyAgreement, relations.keyAgreement),
42
+ capabilityInvocation: withReferences(doc.capabilityInvocation, relations.capabilityInvocation),
43
+ capabilityDelegation: withReferences(doc.capabilityDelegation, relations.capabilityDelegation)
44
+ };
45
+ }
46
+ //# sourceMappingURL=mergeMethods.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mergeMethods.js","sourceRoot":"","sources":["../../src/webvh/mergeMethods.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAexD;;;;;;;;;;;;;;;;;;;;;GAqBG;AAC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AAS,CAAC,oBAAoB,CAC/B;KACF,CAAA;AACH,CAAC"}
@@ -1,5 +1,4 @@
1
1
  import type { DIDDoc, DIDLog, VerificationMethod } from '@interop/did-method-webvh';
2
- import type { ResourceLogPinStore } from '@interop/vh-resource-log';
3
2
  import type { AccountLogSigner } from './accountEntry.js';
4
3
  import type { PublishedWebvhLog, WebvhIdStore } from './didWebvh.js';
5
4
  /**
@@ -86,12 +85,22 @@ export declare function clientRemovalTarget({ published, client }: {
86
85
  * these to `updateDID` beside its own signer -- an enrolled client's update
87
86
  * key for a revocation, a revealed ladder rung for a forget.
88
87
  *
88
+ * The latent commitments excluded from that attribution are derived here
89
+ * from the log (`standingCredentialLatentHashes`), so no caller has to know
90
+ * the account's standing credentials to remove a client correctly; a caller's
91
+ * own list is excluded beside them as a cross-check and vouches for what the
92
+ * walk could not read (a credential an earlier recovery's add-and-retire
93
+ * entry introduced has no anchor, and a registry still names its hash). The
94
+ * derived set never overrides the decision-0007 position, so a walk that
95
+ * over-claimed cannot leave the client's own staged hash standing.
96
+ *
89
97
  * @param options {object}
90
98
  * @param options.published {PublishedWebvhLog}
91
99
  * @param options.target {ClientRemovalTarget}
92
100
  * @param [options.knownLatentHashes] {string[]} standing latent commitments
93
- * the caller vouches for (the recovery registry's update-key hashes),
94
- * excluded from the staged-hash attribution
101
+ * the caller vouches for beyond the derived set (a recovery registry's
102
+ * update-key hashes, a ladder's own rung hashes), excluded from the
103
+ * staged-hash attribution alongside it
95
104
  * @returns {Promise<object>} the `updateDID` field bundle
96
105
  */
97
106
  export declare function clientRemovalFields({ published, target, knownLatentHashes }: {
@@ -174,12 +183,9 @@ export declare function clientRemovalFields({ published, target, knownLatentHash
174
183
  * the caller vouches for (the recovery registry's update-key hashes),
175
184
  * excluded from the staged-hash attribution
176
185
  * @param [options.expectedDid] {string} the account DID the log must resolve
177
- * to, from the caller's stored account pointer
178
- * @param [options.pinStore] {ResourceLogPinStore} the caller's chain-head
179
- * pins; the read is checked against the pinned head and the pin advances to
180
- * what this entry publishes
181
- * @param [options.logId] {string} the account log's pin slot; required
182
- * whenever a `pinStore` is supplied
186
+ * to, from the caller's stored account pointer. The read is checked against
187
+ * the store's own chain-head pin, which advances to what this entry
188
+ * publishes
183
189
  * @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog }>} the
184
190
  * account's DID, its resolved document AFTER the edit -- what the roster
185
191
  * rotation that follows resolves its remaining recipients from, so the
@@ -196,8 +202,6 @@ export declare function revokeWebvhClient(options: {
196
202
  revokedClient: RevokedClientKeys;
197
203
  knownLatentHashes?: string[];
198
204
  expectedDid?: string;
199
- pinStore?: ResourceLogPinStore;
200
- logId?: string;
201
205
  }): Promise<{
202
206
  did: string;
203
207
  doc: DIDDoc;
@@ -1 +1 @@
1
- {"version":3,"file":"revokeClient.d.ts","sourceRoot":"","sources":["../../src/webvh/revokeClient.ts"],"names":[],"mappings":"AA4CA,OAAO,KAAK,EACV,MAAM,EACN,MAAM,EACN,kBAAkB,EACnB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAGnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAazD,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEpE;;;;;;;;;;GAUG;AACH,MAAM,WAAW,iBAAiB;IAChC,mBAAmB,EAAE,MAAM,CAAA;IAC3B,kBAAkB,EAAE,MAAM,CAAA;CAC3B;AAED;;;;;;;;;;;;;;GAcG;AACH,qBAAa,8BAA+B,SAAQ,KAAK;IACvD,UAAU,EAAE,MAAM,EAAE,CAAA;gBACR,EAAE,UAAU,EAAE,EAAE;QAAE,UAAU,EAAE,MAAM,EAAE,CAAA;KAAE;CAUrD;AAqMD;;;;;;;;;;GAUG;AACH,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAA;IACnB,iBAAiB,EAAE,GAAG,CAAC,MA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;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6EG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE;IAC/C,OAAO,EAAE,YAAY,CAAA;IACrB,MAAM,EAAE,gBAAgB,CAAA;IACxB,eAAe,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,kBAAkB,GAAG,eAAe,CAAC,CAAA;IAC1E,aAAa,EAAE,iBAAiB,CAAA;IAChC,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,GAAG,OAAO,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CAErD;AA0FD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAsB,4BAA4B,CAAC,EACjD,GAAG,EACH,YAAiB,EACjB,iBAAsB,EACvB,EAAE;IACD,GAAG,EAAE,MAAM,CAAA;IACX,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAA;CAC7B,GAAG,OAAO,CAAC;IAAE,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAAC,SAAS,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAiD3E"}
@@ -30,22 +30,32 @@
30
30
  * Two shapes commit more than the staged hash in one entry: a recovery
31
31
  * continuation (the replacement code's latent hash rides beside it) and a
32
32
  * standing credential's reveal-and-commit self-enrollment (the ladder's
33
- * next-rung hash does). The caller first disambiguates by supplying the
34
- * standing recovery-code hashes it knows (`knownLatentHashes`, from its
35
- * recovery registry); when more than one candidate still survives, the
36
- * append-order convention of decision 0007 resolves it positionally -- the
37
- * staged hash is the addition immediately AFTER the revoked client's
38
- * update-key hash in the entry's `nextKeyHashes` append order (the next-rung
39
- * hash is last) -- and only a residue position cannot resolve either refuses
40
- * loudly rather than guessing ({@link StagedCommitmentAmbiguousError}):
41
- * removing a wrong hash would either leave the revoked client re-enrollable
42
- * or brick another party's standing commitment.
33
+ * next-rung hash does). The removal first disambiguates by excluding the
34
+ * latent commitments of every standing credential, derived from the log
35
+ * itself (`standingCredentialLatentHashes`: each credential anchored at its
36
+ * bind entry and its ladder walked); the caller may vouch for more
37
+ * (`knownLatentHashes`, a recovery registry's hashes), which are unioned in
38
+ * and cross-checked against the derivation -- a vouched hash the walk did
39
+ * not claim, or a standing credential the walk could not read, is logged
40
+ * rather than silently read as "no latent hashes". The derived set never
41
+ * removes the candidate the decision-0007 position names, since the seedless
42
+ * walk can over-claim a torn self-enrollment's orphans. When more than
43
+ * one candidate still survives, the append-order convention of decision 0007
44
+ * resolves it positionally -- the staged hash is the addition immediately
45
+ * AFTER the revoked client's update-key hash in the entry's `nextKeyHashes`
46
+ * append order (the next-rung hash is last) -- and only a residue position
47
+ * cannot resolve either refuses loudly rather than guessing
48
+ * ({@link StagedCommitmentAmbiguousError}): removing a wrong hash would either
49
+ * leave the revoked client re-enrollable or brick another party's standing
50
+ * commitment.
43
51
  */
44
52
  import { deriveNextKeyHash } from '@interop/did-method-webvh';
53
+ import { standingCredentialLatentHashes } from '../clientAnnex/ladder.js';
54
+ import { log as logger } from '../log.js';
45
55
  import { relationIds } from '../resourceLog/document.js';
46
- import { signAccountEntry } from './accountEntry.js';
56
+ import { concludeUnchangedAccountEntry, signAccountEntry } from './accountEntry.js';
47
57
  import { preEntryProjectionPublisher } from './didWebProjection.js';
48
- import { concludeWithPublishedLog, effectiveParameters, updateKeyMultibase, withLogConflictRetry } from './didWebvh.js';
58
+ import { effectiveParameters, updateKeyMultibase, withLogConflictRetry } from './didWebvh.js';
49
59
  import { attributeClientUpdateKey, listEnrolledWebvhClients, markedKeyAgreementMultibases } from './listClients.js';
50
60
  /**
51
61
  * Thrown when the log attribution cannot isolate the revoked client's staged
@@ -85,39 +95,56 @@ export class StagedCommitmentAmbiguousError extends Error {
85
95
  * @param options.revokedUpdateKey {string} the revoked client's active
86
96
  * update-key multibase
87
97
  * @param options.knownLatentHashes {string[]} standing latent commitments
88
- * the caller can vouch for (recovery-code update-key hashes)
98
+ * the caller vouches for (recovery-code update-key hashes), always excluded
99
+ * @param [options.derivedLatentHashes] {string[]} standing latent
100
+ * commitments a log walk claimed for the standing credentials. Excluded
101
+ * too, EXCEPT the hash the decision-0007 position names as the client's
102
+ * staged hash: the seedless walk can over-claim a torn self-enrollment's
103
+ * orphan hashes as rungs, and an exclusion that ate the positional answer
104
+ * would leave the client's staged commitment standing as a re-seizure
105
+ * credential, silently
106
+ * @param [options.params] {Array} the log's per-entry effective parameters,
107
+ * when the caller already computed them (a whole-roster walk does it once
108
+ * rather than once per client); derived from `log` otherwise
89
109
  * @returns {Promise<string | undefined>}
90
110
  */
91
- async function attributeStagedHash({ log, revokedUpdateKey, knownLatentHashes }) {
111
+ async function attributeStagedHash({ log, revokedUpdateKey, knownLatentHashes, derivedLatentHashes = [], params = effectiveParameters(log) }) {
92
112
  const revokedHash = await deriveNextKeyHash(revokedUpdateKey);
93
- const params = effectiveParameters(log);
94
113
  // Filtering the entry's own nextKeyHashes preserves its append order, which
95
- // the positional fallback below relies on (decision 0007).
114
+ // the positional rule below relies on (decision 0007).
96
115
  const orderedAdded = (index) => {
97
116
  const previous = new Set(index > 0 ? params[index - 1].nextKeyHashes : []);
98
117
  return params[index].nextKeyHashes.filter(hash => !previous.has(hash));
99
118
  };
100
- const added = (index) => new Set(orderedAdded(index));
101
- const prune = (candidates) => {
119
+ // The decision-0007 position: the staged hash is the addition immediately
120
+ // AFTER the revoked client's update-key hash in the entry's append order
121
+ // (the ladder's next-rung hash is last). Undefined when the update-key hash
122
+ // is not among the entry's additions.
123
+ const positionalSuccessor = (index) => {
124
+ const additions = orderedAdded(index);
125
+ const anchor = additions.indexOf(revokedHash);
126
+ return anchor === -1 ? undefined : additions[anchor + 1];
127
+ };
128
+ const prune = (index) => {
129
+ const candidates = new Set(orderedAdded(index));
102
130
  candidates.delete(revokedHash);
103
131
  for (const hash of knownLatentHashes) {
104
132
  candidates.delete(hash);
105
133
  }
134
+ const successor = positionalSuccessor(index);
135
+ for (const hash of derivedLatentHashes) {
136
+ if (hash !== successor) {
137
+ candidates.delete(hash);
138
+ }
139
+ }
106
140
  return candidates;
107
141
  };
108
- // The decision-0007 positional rule, applied only when the prune leaves more
109
- // than one candidate: the staged hash is the addition immediately AFTER the
110
- // revoked client's update-key hash in the entry's append order (the ladder's
111
- // next-rung hash is last). Resolves undefined -- the ambiguity refusal
112
- // stands -- when the update-key hash is not among the entry's additions, or
113
- // its successor is not a surviving candidate.
142
+ // The positional rule, applied only when the prune leaves more than one
143
+ // candidate. Resolves undefined -- the ambiguity refusal stands -- when the
144
+ // update-key hash is not among the entry's additions, or its successor is
145
+ // not a surviving candidate.
114
146
  const stagedByPosition = (index, candidates) => {
115
- const additions = orderedAdded(index);
116
- const anchor = additions.indexOf(revokedHash);
117
- if (anchor === -1) {
118
- return undefined;
119
- }
120
- const successor = additions[anchor + 1];
147
+ const successor = positionalSuccessor(index);
121
148
  return successor !== undefined && candidates.has(successor)
122
149
  ? successor
123
150
  : undefined;
@@ -140,7 +167,7 @@ async function attributeStagedHash({ log, revokedUpdateKey, knownLatentHashes })
140
167
  // reveals the new active key (genesis likewise commits both of its hashes
141
168
  // in entry one), so the reveal entry's own additions are tried first. An
142
169
  // enrollment add or a recovery add-and-retire adds no hash at the reveal.
143
- const atReveal = prune(added(revealIndex));
170
+ const atReveal = prune(revealIndex);
144
171
  if (atReveal.size === 1) {
145
172
  return [...atReveal][0];
146
173
  }
@@ -166,7 +193,7 @@ async function attributeStagedHash({ log, revokedUpdateKey, knownLatentHashes })
166
193
  if (commitIndex === -1) {
167
194
  return undefined;
168
195
  }
169
- const atCommit = prune(added(commitIndex));
196
+ const atCommit = prune(commitIndex);
170
197
  if (atCommit.size > 1) {
171
198
  const positional = stagedByPosition(commitIndex, atCommit);
172
199
  if (positional !== undefined) {
@@ -289,6 +316,39 @@ export async function clientRemovalTarget({ published, client }) {
289
316
  present: vmPresent || keyPresent || hashPresent
290
317
  };
291
318
  }
319
+ /**
320
+ * The latent commitments a staged-hash attribution excludes: every standing
321
+ * credential's committed rung hashes, derived from the log, beside what the
322
+ * caller vouches for. The two are cross-checked rather than trusted blind. A
323
+ * credential whose walk refused is logged, since its hashes are then covered
324
+ * only by the caller's list or by the positional rule; a vouched hash the
325
+ * walk did not claim is logged too, since it is either such a credential's or
326
+ * a stale registry entry's. Both are routine on some accounts (a ladder-signed
327
+ * enrollment leaves its credential's walk refusing for good, and a credential
328
+ * a recovery's add-and-retire entry introduced has no anchor), so they are
329
+ * informational -- the attribution still refuses on its own when the residue
330
+ * is ambiguous.
331
+ *
332
+ * @param options {object}
333
+ * @param options.log {DIDLog}
334
+ * @param options.vouched {string[]} the caller's `knownLatentHashes`
335
+ * @returns {Promise<{ vouched: string[], derived: string[] }>}
336
+ */
337
+ async function latentHashesToExclude({ log, vouched }) {
338
+ const derived = await standingCredentialLatentHashes({ log });
339
+ const claimed = new Set(derived.hashes);
340
+ if (derived.unclaimedCredentialVmIds.length > 0) {
341
+ logger.info('Client removal: the latent commitments of some standing credentials ' +
342
+ 'could not be read off the log; their rungs are excluded from the ' +
343
+ 'staged-hash attribution only where the caller vouched for them', { credentialVmIds: derived.unclaimedCredentialVmIds });
344
+ }
345
+ const unattributed = vouched.filter(hash => !claimed.has(hash));
346
+ if (unattributed.length > 0) {
347
+ logger.info('Client removal: the caller vouched for latent commitments the log ' +
348
+ 'walk did not claim for any standing credential', { hashes: unattributed });
349
+ }
350
+ return { vouched, derived: derived.hashes };
351
+ }
292
352
  /**
293
353
  * Builds the removal entry's document and parameter fields from a computed
294
354
  * target: the client's verification methods out of the document and all five
@@ -299,12 +359,22 @@ export async function clientRemovalTarget({ published, client }) {
299
359
  * these to `updateDID` beside its own signer -- an enrolled client's update
300
360
  * key for a revocation, a revealed ladder rung for a forget.
301
361
  *
362
+ * The latent commitments excluded from that attribution are derived here
363
+ * from the log (`standingCredentialLatentHashes`), so no caller has to know
364
+ * the account's standing credentials to remove a client correctly; a caller's
365
+ * own list is excluded beside them as a cross-check and vouches for what the
366
+ * walk could not read (a credential an earlier recovery's add-and-retire
367
+ * entry introduced has no anchor, and a registry still names its hash). The
368
+ * derived set never overrides the decision-0007 position, so a walk that
369
+ * over-claimed cannot leave the client's own staged hash standing.
370
+ *
302
371
  * @param options {object}
303
372
  * @param options.published {PublishedWebvhLog}
304
373
  * @param options.target {ClientRemovalTarget}
305
374
  * @param [options.knownLatentHashes] {string[]} standing latent commitments
306
- * the caller vouches for (the recovery registry's update-key hashes),
307
- * excluded from the staged-hash attribution
375
+ * the caller vouches for beyond the derived set (a recovery registry's
376
+ * update-key hashes, a ladder's own rung hashes), excluded from the
377
+ * staged-hash attribution alongside it
308
378
  * @returns {Promise<object>} the `updateDID` field bundle
309
379
  */
310
380
  export async function clientRemovalFields({ published, target, knownLatentHashes = [] }) {
@@ -313,13 +383,19 @@ export async function clientRemovalFields({ published, target, knownLatentHashes
313
383
  // The removed client's staged commitment, recovered from the log while the
314
384
  // log still shows the enrollment (attribution needs the standing entries,
315
385
  // so this runs before the removal entry is built).
316
- const stagedHash = target.keyPresent
317
- ? await attributeStagedHash({
386
+ let stagedHash;
387
+ if (target.keyPresent) {
388
+ const latent = await latentHashesToExclude({
389
+ log: published.log,
390
+ vouched: knownLatentHashes
391
+ });
392
+ stagedHash = await attributeStagedHash({
318
393
  log: published.log,
319
394
  revokedUpdateKey: removedUpdateKey,
320
- knownLatentHashes
321
- })
322
- : undefined;
395
+ knownLatentHashes: latent.vouched,
396
+ derivedLatentHashes: latent.derived
397
+ });
398
+ }
323
399
  const removedHashes = new Set([target.removedHash, stagedHash].filter((hash) => hash !== undefined));
324
400
  const removedVmIds = new Set([signingVmId, ...keyAgreementVmIds]);
325
401
  const existingMethods = (doc.verificationMethod ?? []);
@@ -400,12 +476,9 @@ export async function clientRemovalFields({ published, target, knownLatentHashes
400
476
  * the caller vouches for (the recovery registry's update-key hashes),
401
477
  * excluded from the staged-hash attribution
402
478
  * @param [options.expectedDid] {string} the account DID the log must resolve
403
- * to, from the caller's stored account pointer
404
- * @param [options.pinStore] {ResourceLogPinStore} the caller's chain-head
405
- * pins; the read is checked against the pinned head and the pin advances to
406
- * what this entry publishes
407
- * @param [options.logId] {string} the account log's pin slot; required
408
- * whenever a `pinStore` is supplied
479
+ * to, from the caller's stored account pointer. The read is checked against
480
+ * the store's own chain-head pin, which advances to what this entry
481
+ * publishes
409
482
  * @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog }>} the
410
483
  * account's DID, its resolved document AFTER the edit -- what the roster
411
484
  * rotation that follows resolves its remaining recipients from, so the
@@ -424,14 +497,12 @@ export async function revokeWebvhClient(options) {
424
497
  * @param options {object} see {@link revokeWebvhClient}
425
498
  * @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog }>}
426
499
  */
427
- async function revokeWebvhClientOnce({ idStore, signer, projectionStore, revokedClient, knownLatentHashes = [], expectedDid, pinStore, logId }) {
500
+ async function revokeWebvhClientOnce({ idStore, signer, projectionStore, revokedClient, knownLatentHashes = [], expectedDid }) {
428
501
  let concludedHead;
429
502
  const outcome = await signAccountEntry({
430
503
  idStore,
431
504
  signer,
432
505
  ...(expectedDid !== undefined ? { expectedDid } : {}),
433
- ...(pinStore ? { pinStore } : {}),
434
- ...(logId !== undefined ? { logId } : {}),
435
506
  missingMessage: 'did:webvh: did.jsonl is missing; nothing to revoke from.',
436
507
  verb: 'revoking a client',
437
508
  // The post-removal projection, published while the caller's store can
@@ -466,13 +537,11 @@ async function revokeWebvhClientOnce({ idStore, signer, projectionStore, revoked
466
537
  // left did.json lagging the log. Healable on the client arm, which
467
538
  // invokes as the controller; a lag left by a ladder-signed entry is
468
539
  // mended by `ensureDidWebProjection` instead.
469
- concludedHead =
470
- signer.kind === 'client'
471
- ? {
472
- ...(await concludeWithPublishedLog({ idStore, published })),
473
- log: published.log
474
- }
475
- : { did: published.did, doc: published.doc, log: published.log };
540
+ concludedHead = await concludeUnchangedAccountEntry({
541
+ idStore,
542
+ signer,
543
+ published
544
+ });
476
545
  return undefined;
477
546
  }
478
547
  return clientRemovalFields({
@@ -536,6 +605,9 @@ export async function survivingClientKeyProtection({ log, retiredVmIds = [], kno
536
605
  }
537
606
  const did = log[log.length - 1].state.id;
538
607
  const retired = new Set(retiredVmIds);
608
+ // One walk of the log's parameters for the whole roster: the per-client
609
+ // attribution below reads the same view.
610
+ const params = effectiveParameters(log);
539
611
  for (const client of listEnrolledWebvhClients({ log })) {
540
612
  const retiredHere = client.keyAgreementKeyMultibases.some(multibase => retired.has(`${did}#${multibase}`));
541
613
  if (retiredHere) {
@@ -553,7 +625,8 @@ export async function survivingClientKeyProtection({ log, retiredVmIds = [], kno
553
625
  const staged = await attributeStagedHash({
554
626
  log,
555
627
  revokedUpdateKey: updateKey,
556
- knownLatentHashes
628
+ knownLatentHashes,
629
+ params
557
630
  });
558
631
  if (staged !== undefined) {
559
632
  hashes.add(staged);
@@ -561,7 +634,7 @@ export async function survivingClientKeyProtection({ log, retiredVmIds = [], kno
561
634
  }
562
635
  catch (err) {
563
636
  // Ambiguous: protect every candidate rather than none.
564
- if (err.name !== 'StagedCommitmentAmbiguousError') {
637
+ if (err?.name !== 'StagedCommitmentAmbiguousError') {
565
638
  throw err;
566
639
  }
567
640
  for (const candidate of err
@@ -1 +1 @@
1
- {"version":3,"file":"revokeClient.js","sourceRoot":"","sources":["../../src/webvh/revokeClient.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAO7D,OAAO,EAAE,WAAW,EAAE,MAA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D,IAAI,WAAW,EAAE,CAAC;YAChB,SAAQ;QACV,CAAC;QACD,MAAM,SAAS,GAAG,MAAM,CAAC,kBAAkB,CAAA;QAC3C,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;YAC5B,qEAAqE;YACrE,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAA;YAC1C,SAAQ;QACV,CAAC;QACD,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;QACnB,MAAM,CAAC,GAAG,CAAC,MAAM,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAAA;QAC9C,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,mBAAmB,CAAC;gBACvC,GAAG;gBACH,gBAAgB,EAAE,SAAS;gBAC3B,iBAAiB;gBACjB,MAAM;aACP,CAAC,CAAA;YACF,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;gBACzB,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;YACpB,CAAC;QACH,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,uDAAuD;YACvD,IAAK,GAAoB,EAAE,IAAI,KAAK,gCAAgC,EAAE,CAAC;gBACrE,MAAM,GAAG,CAAA;YACX,CAAC;YACD,KAAK,MAAM,SAAS,IAAK,GAAsC;iBAC5D,UAAU,EAAE,CAAC;gBACd,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;YACvB,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,CAAA;AACpC,CAAC"}
@@ -2,9 +2,25 @@ import type { DIDDoc, DIDLog } from '@interop/did-method-webvh';
2
2
  import type { PublishedWebvhLog } from './didWebvh.js';
3
3
  import { type ResourceLogHeadPin, type ResourceLogPinStore } from '@interop/vh-resource-log';
4
4
  /**
5
- * The pin-slot key for an account's did:webvh log (`id/did.jsonl`) -- what a
6
- * ceremony taking its own read of the log names its pin by, and what
7
- * {@link verifyAccountLog} derives internally.
5
+ * The pin-slot key for the did:webvh log (`did.jsonl`) of one collection --
6
+ * the one derivation every log store shares, so the root-invoked and the
7
+ * delegated store families over the same collection check the same slot.
8
+ * Host-free like every pin-slot key.
9
+ *
10
+ * @param options {object}
11
+ * @param options.spaceId {string} the Space holding the collection
12
+ * @param options.collectionId {string} the collection holding the log (the
13
+ * account's `id` collection, or an annex generation's `gen-` collection)
14
+ * @returns {string}
15
+ */
16
+ export declare function logResourcePinId({ spaceId, collectionId }: {
17
+ spaceId: string;
18
+ collectionId: string;
19
+ }): string;
20
+ /**
21
+ * The pin-slot key for an account's did:webvh log (`id/did.jsonl`) -- what
22
+ * {@link verifyAccountLog}, which fetches by URL and holds no store, derives
23
+ * internally.
8
24
  *
9
25
  * @param options {object}
10
26
  * @param options.spaceId {string} the account's Space id
@@ -13,6 +29,27 @@ import { type ResourceLogHeadPin, type ResourceLogPinStore } from '@interop/vh-r
13
29
  export declare function accountLogPinId({ spaceId }: {
14
30
  spaceId: string;
15
31
  }): string;
32
+ /**
33
+ * The substituted-account refusal on its own: a resolved head that is not the
34
+ * DID the caller expected is refused rather than built on. Stated once so a
35
+ * fresh read and a caller-threaded head refuse identically.
36
+ *
37
+ * A ceremony that takes an already-read head from its caller (the transient
38
+ * visit's one-read composition, where the readiness stage hands its verified
39
+ * head to the enrollment) runs this explicitly: the read that would otherwise
40
+ * have run it never happened, and a head resolving to another DID must not
41
+ * become the entry's basis just because it arrived by parameter.
42
+ *
43
+ * @param options {object}
44
+ * @param options.published {PublishedWebvhLog} the resolved head
45
+ * @param [options.expectedDid] {string} the DID it must resolve to; absent,
46
+ * the head is accepted (the caller discovering the DID from the log itself)
47
+ * @returns {PublishedWebvhLog} the head verbatim
48
+ */
49
+ export declare function assertPublishedLogDid({ published, expectedDid }: {
50
+ published: PublishedWebvhLog;
51
+ expectedDid?: string;
52
+ }): PublishedWebvhLog;
16
53
  /**
17
54
  * Thrown when the account has published no DID log at all (the resource is
18
55
  * absent). Distinguished from every other failure because it is the one
@@ -85,7 +122,11 @@ export declare function checkAndAdvanceAccountLogPin({ pinStore, logId, log }: {
85
122
  * document may treat that reason as a transport hiccup and carry on with what
86
123
  * it has. Every other reason is a security signal. No `pinStore`, no
87
124
  * continuity check -- the pin lives app-side beside the account-pointer pin,
88
- * and a caller that has none keeps one-shot verification.
125
+ * and a caller that has none keeps one-shot verification. This is the one
126
+ * reader that takes the pin store as an argument: it fetches by URL and holds
127
+ * no {@link WebvhIdStore}, whose `pin` member is where every ceremony read
128
+ * and publish finds it. A ceremony that holds a store hands this function
129
+ * that store's pin store.
89
130
  *
90
131
  * @param options {object}
91
132
  * @param options.did {string} the account's did:webvh, as the caller's
@@ -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;AAE/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAEtD,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;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,4BAA4B,CAAC,EACjD,QAAQ,EACR,KAAK,EACL,GAAG,EACJ,EA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