@interop/wallet-core 0.30.1 → 0.32.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 (41) hide show
  1. package/dist/clients/listing.d.ts +9 -2
  2. package/dist/clients/listing.d.ts.map +1 -1
  3. package/dist/clients/listing.js +16 -4
  4. package/dist/clients/listing.js.map +1 -1
  5. package/dist/clients/revocation.d.ts +5 -1
  6. package/dist/clients/revocation.d.ts.map +1 -1
  7. package/dist/clients/revocation.js +6 -2
  8. package/dist/clients/revocation.js.map +1 -1
  9. package/dist/clients/rosterPolicy.d.ts +6 -1
  10. package/dist/clients/rosterPolicy.d.ts.map +1 -1
  11. package/dist/clients/rosterPolicy.js +8 -2
  12. package/dist/clients/rosterPolicy.js.map +1 -1
  13. package/dist/enrollment/enrollment.d.ts +7 -1
  14. package/dist/enrollment/enrollment.d.ts.map +1 -1
  15. package/dist/enrollment/enrollment.js +7 -2
  16. package/dist/enrollment/enrollment.js.map +1 -1
  17. package/dist/recovery/recoveryWebvh.d.ts +22 -5
  18. package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
  19. package/dist/recovery/recoveryWebvh.js +84 -32
  20. package/dist/recovery/recoveryWebvh.js.map +1 -1
  21. package/dist/webvh/didWebvh.d.ts +145 -10
  22. package/dist/webvh/didWebvh.d.ts.map +1 -1
  23. package/dist/webvh/didWebvh.js +205 -43
  24. package/dist/webvh/didWebvh.js.map +1 -1
  25. package/dist/webvh/index.d.ts +4 -1
  26. package/dist/webvh/index.d.ts.map +1 -1
  27. package/dist/webvh/index.js +4 -1
  28. package/dist/webvh/index.js.map +1 -1
  29. package/dist/webvh/revokeClient.d.ts +9 -1
  30. package/dist/webvh/revokeClient.d.ts.map +1 -1
  31. package/dist/webvh/revokeClient.js +23 -7
  32. package/dist/webvh/revokeClient.js.map +1 -1
  33. package/dist/webvh/verifyLog.d.ts +18 -1
  34. package/dist/webvh/verifyLog.d.ts.map +1 -1
  35. package/dist/webvh/verifyLog.js +95 -1
  36. package/dist/webvh/verifyLog.js.map +1 -1
  37. package/dist/webvh/wasIdStore.d.ts +6 -0
  38. package/dist/webvh/wasIdStore.d.ts.map +1 -1
  39. package/dist/webvh/wasIdStore.js +20 -4
  40. package/dist/webvh/wasIdStore.js.map +1 -1
  41. package/package.json +1 -1
@@ -37,6 +37,15 @@
37
37
  * lost seed is lost update authority, so every publish is preceded by a
38
38
  * caller-durable write.
39
39
  *
40
+ * Every ceremony publishes `did.jsonl` CONDITIONALLY: the read that produced
41
+ * the state an entry was built on carries the log's ETag, and the publish
42
+ * passes it back as the write's precondition (a create passes
43
+ * create-if-absent), so two clients extending the log concurrently can never
44
+ * silently erase each other -- the loser gets a {@link WebvhLogConflictError}
45
+ * and re-runs from the top, rebasing its entry on the winner's head
46
+ * ({@link withLogConflictRetry}). Against a backend that serves no ETags the
47
+ * precondition is absent and the publish degrades to an unconditional write.
48
+ *
40
49
  * The Space-side I/O runs through the narrow {@link WebvhIdStore} seam, which
41
50
  * each wallet app satisfies with its own remote-store class.
42
51
  *
@@ -238,6 +247,79 @@ async function createWebvhLog({ wasServerUrl, spaceId, didWebKeys, clientKeys, u
238
247
  }
239
248
  return { log: result.log, webDoc: result.webDoc, did: result.did };
240
249
  }
250
+ /**
251
+ * Thrown when a conditional publish of `did.jsonl` lost a race to a concurrent
252
+ * ceremony: the log moved on between the read this ceremony built its entry on
253
+ * and the PUT that would have appended it. The `cause` is the store's
254
+ * precondition error. A ceremony that meets one either re-runs (rebasing its
255
+ * entry on the new head -- what {@link withLogConflictRetry} does) or refuses,
256
+ * but it never overwrites the winner's entry.
257
+ */
258
+ export class WebvhLogConflictError extends Error {
259
+ constructor(message = 'did:webvh: the published did.jsonl changed under this ceremony ' +
260
+ '(a concurrent ceremony extended the log); the entry was not appended.', options) {
261
+ super(message, options);
262
+ this.name = 'WebvhLogConflictError';
263
+ }
264
+ }
265
+ /**
266
+ * Re-runs `run` when it fails with a {@link WebvhLogConflictError}, up to three
267
+ * total attempts, then rethrows. The retry IS the rebase: every ceremony in
268
+ * this module re-reads the published head and rebuilds its entry on it, and
269
+ * every one of them detects its own completion from durable state alone, so a
270
+ * naive re-run after a lost race appends on top of the winner instead of over
271
+ * it. A ceremony whose preconditions no longer hold after the re-read (the
272
+ * retrying client was itself revoked, the staged key it was about to reveal is
273
+ * no longer committed) surfaces its own typed refusal instead of looping.
274
+ *
275
+ * @param run {Function} the ceremony body, re-invokable from the top
276
+ * @returns {Promise<*>} whatever the ceremony returns
277
+ */
278
+ export async function withLogConflictRetry(run) {
279
+ const attempts = 3;
280
+ for (let attempt = 1;; attempt++) {
281
+ try {
282
+ return await run();
283
+ }
284
+ catch (err) {
285
+ if (!(err instanceof WebvhLogConflictError) || attempt >= attempts) {
286
+ throw err;
287
+ }
288
+ }
289
+ }
290
+ }
291
+ /**
292
+ * PUTs the serialized log to `did.jsonl`, forwarding the conditional-write
293
+ * preconditions and mapping a failed one to {@link WebvhLogConflictError}. The
294
+ * single place that mapping exists: the store seam is app-implemented, so the
295
+ * precondition error is matched on `err.name` rather than by `instanceof`,
296
+ * keeping the check implementation-agnostic. With neither precondition the PUT
297
+ * is unconditional -- the degradation on a backend that serves no ETags.
298
+ *
299
+ * @param options {object}
300
+ * @param options.store {object} anything with the seam's `putIdResource`
301
+ * @param options.log {DIDLog}
302
+ * @param [options.ifMatch] {string} publish only if the log is unchanged
303
+ * @param [options.ifNoneMatch] {boolean} publish only if the log is absent
304
+ * @returns {Promise<void>}
305
+ */
306
+ export async function putLogResource({ store, log, ifMatch, ifNoneMatch }) {
307
+ try {
308
+ await store.putIdResource({
309
+ resourceId: DID_LOG_RESOURCE,
310
+ content: logToJsonlString(log),
311
+ contentType: 'text/jsonl',
312
+ ifMatch,
313
+ ifNoneMatch
314
+ });
315
+ }
316
+ catch (err) {
317
+ if (err?.name === 'PreconditionFailedError') {
318
+ throw new WebvhLogConflictError(undefined, { cause: err });
319
+ }
320
+ throw err;
321
+ }
322
+ }
241
323
  /**
242
324
  * Publishes an already-created log: PUT `did.jsonl` (`text/jsonl`) then PUT
243
325
  * `did.json` from `webDoc` (`application/did+json`, adopting the webvh
@@ -246,24 +328,59 @@ async function createWebvhLog({ wasServerUrl, spaceId, didWebKeys, clientKeys, u
246
328
  * the publish tail no longer sets per-resource policies. The shared publish
247
329
  * tail of the create and rotate paths.
248
330
  *
331
+ * The log PUT carries the caller's precondition (`ifMatch`, the ETag of the
332
+ * read the entry was built on, or `ifNoneMatch` for a create), so a ceremony
333
+ * that lost a race to a concurrent one fails with
334
+ * {@link WebvhLogConflictError} instead of silently erasing the winner's entry.
335
+ * The `did.json` projection PUT stays unconditional by design: it runs only
336
+ * after the log's compare-and-swap was WON, so it is already serialized behind
337
+ * that win; the log is the source of truth and the projection a derived cache;
338
+ * and {@link concludeWithPublishedLog} re-derives and republishes the
339
+ * projection from the resolved log on every ceremony's no-op path, healing any
340
+ * lag a race or a torn publish leaves behind.
341
+ *
249
342
  * @param options {object}
250
343
  * @param options.idStore {WebvhIdStore}
251
344
  * @param options.log {DIDLog}
252
345
  * @param options.webDoc {object}
346
+ * @param [options.ifMatch] {string} publish only if `did.jsonl` is unchanged
347
+ * @param [options.ifNoneMatch] {boolean} publish only if `did.jsonl` is absent
253
348
  * @returns {Promise<void>}
254
349
  */
255
- export async function publishWebvhLog({ idStore, log, webDoc }) {
256
- await idStore.putIdResource({
257
- resourceId: DID_LOG_RESOURCE,
258
- content: logToJsonlString(log),
259
- contentType: 'text/jsonl'
260
- });
350
+ export async function publishWebvhLog({ idStore, log, webDoc, ifMatch, ifNoneMatch }) {
351
+ await putLogResource({ store: idStore, log, ifMatch, ifNoneMatch });
261
352
  await idStore.putIdResource({
262
353
  resourceId: DID_DOCUMENT_RESOURCE,
263
354
  content: webDoc,
264
355
  contentType: 'application/did+json'
265
356
  });
266
357
  }
358
+ /**
359
+ * The shared guard-and-publish tail of every ceremony that extends the log
360
+ * through `updateDID`: the parallel `webDoc` must be there (it is, whenever
361
+ * `alsoKnownAsWeb` was passed), then log and projection are published under the
362
+ * caller's compare-and-swap token.
363
+ *
364
+ * @param options {object}
365
+ * @param options.idStore {WebvhIdStore}
366
+ * @param options.updated {object} the `updateDID` result
367
+ * @param options.updated.log {DIDLog}
368
+ * @param [options.updated.webDoc] {object}
369
+ * @param [options.ifMatch] {string} the ETag of the read this entry was built
370
+ * on
371
+ * @returns {Promise<void>}
372
+ */
373
+ export async function publishUpdatedLog({ idStore, updated, ifMatch }) {
374
+ if (!updated.webDoc) {
375
+ throw new Error('did:webvh: updateDID returned no webDoc despite the did:web alsoKnownAs.');
376
+ }
377
+ await publishWebvhLog({
378
+ idStore,
379
+ log: updated.log,
380
+ webDoc: updated.webDoc,
381
+ ifMatch
382
+ });
383
+ }
267
384
  /**
268
385
  * Writes `keys.json` v2: the did:web relationship map plus the `webvh` block,
269
386
  * preserving the three did:web relationships.
@@ -283,28 +400,40 @@ async function writeKeysJson({ idStore, didWebKeys, webvh }) {
283
400
  * the log is not published. A log that exists but fails to resolve throws --
284
401
  * a published-but-broken log is never silently re-created over.
285
402
  *
403
+ * Given an `expectedDid`, a log resolving to any other DID is refused rather
404
+ * than built on: the substituted-account check `verifyAccountLog` runs on the
405
+ * world-readable read, applied here to the ceremony's own read. Callers that
406
+ * hold the account pointer (or an earlier read of the same log, mid-ceremony)
407
+ * pass it; a caller discovering the DID from the log itself cannot.
408
+ *
286
409
  * @param options {object}
287
410
  * @param options.idStore {WebvhIdStore}
411
+ * @param [options.expectedDid] {string} the DID the log must resolve to
288
412
  * @returns {Promise<PublishedWebvhLog | undefined>}
289
413
  */
290
- export async function readPublishedLog({ idStore }) {
291
- const logText = await idStore.getIdResourceRaw({
414
+ export async function readPublishedLog({ idStore, expectedDid }) {
415
+ const read = await idStore.getIdResourceRaw({
292
416
  resourceId: DID_LOG_RESOURCE
293
417
  });
294
- if (logText === undefined) {
418
+ if (read === undefined) {
295
419
  return undefined;
296
420
  }
297
- const log = readLogFromString(logText);
421
+ const log = readLogFromString(read.text);
298
422
  const resolved = await resolveDIDFromLog(log);
299
423
  if (resolved.meta.error || !resolved.did || !resolved.doc) {
300
424
  throw new Error(`did:webvh: existing did.jsonl failed to resolve (${resolved.meta.error}).`);
301
425
  }
426
+ if (expectedDid !== undefined && resolved.did !== expectedDid) {
427
+ throw new Error('did:webvh: the published did.jsonl resolves to a different DID ' +
428
+ `(${resolved.did}) than expected (${expectedDid}).`);
429
+ }
302
430
  return {
303
431
  log,
304
432
  did: resolved.did,
305
433
  doc: resolved.doc,
306
434
  updateKeys: resolved.meta.updateKeys ?? [],
307
- nextKeyHashes: resolved.meta.nextKeyHashes ?? []
435
+ nextKeyHashes: resolved.meta.nextKeyHashes ?? [],
436
+ etag: read.etag
308
437
  };
309
438
  }
310
439
  /**
@@ -320,7 +449,9 @@ export async function readPublishedLog({ idStore }) {
320
449
  * unconditionally rather than compared first: the write is idempotent and one
321
450
  * request either way, and the resolved log is the source of truth for what the
322
451
  * projection must say. A ceremony that no-ops on the log therefore still heals
323
- * a torn earlier publish.
452
+ * a torn earlier publish. The projection PUT is deliberately unconditional
453
+ * here too: healing it is the whole point, and the log it was derived from is
454
+ * the state this call just read and resolved.
324
455
  *
325
456
  * @param options {object}
326
457
  * @param options.idStore {WebvhIdStore}
@@ -421,6 +552,12 @@ function advancedSeeds({ published, multibases, updateKeys }) {
421
552
  * client-held update keys a lost seed is lost update authority, and no KMS
422
553
  * repair path exists by design.
423
554
  *
555
+ * The create publishes `did.jsonl` create-if-absent, so two concurrent signups
556
+ * cannot double-create the log: the loser re-runs (see
557
+ * {@link withLogConflictRetry}) and takes the adoption path against the
558
+ * winner's log -- adopting it when it holds this client's seeds, and raising
559
+ * the lost-seed refusal when it does not.
560
+ *
424
561
  * @param options {object}
425
562
  * @param options.idStore {WebvhIdStore}
426
563
  * @param options.wasServerUrl {string}
@@ -431,7 +568,16 @@ function advancedSeeds({ published, multibases, updateKeys }) {
431
568
  * @param options.updateKeys {ClientWebvhUpdateKeys} already durably persisted
432
569
  * @returns {Promise<{ did: string }>}
433
570
  */
434
- export async function ensureDidWebvh({ idStore, wasServerUrl, spaceId, didWebKeys, clientKeys, updateKeys }) {
571
+ export async function ensureDidWebvh(options) {
572
+ return withLogConflictRetry(() => ensureDidWebvhOnce(options));
573
+ }
574
+ /**
575
+ * One attempt of {@link ensureDidWebvh}, re-invoked by the conflict retry.
576
+ *
577
+ * @param options {object} see {@link ensureDidWebvh}
578
+ * @returns {Promise<{ did: string }>}
579
+ */
580
+ async function ensureDidWebvhOnce({ idStore, wasServerUrl, spaceId, didWebKeys, clientKeys, updateKeys }) {
435
581
  const published = await readPublishedLog({ idStore });
436
582
  const multibases = await updateKeyMultibases({ updateKeys });
437
583
  if (published) {
@@ -481,7 +627,11 @@ export async function ensureDidWebvh({ idStore, wasServerUrl, spaceId, didWebKey
481
627
  await publishWebvhLog({
482
628
  idStore,
483
629
  log: created.log,
484
- webDoc: created.webDoc
630
+ webDoc: created.webDoc,
631
+ // Create-if-absent: a concurrent signup that already published its own
632
+ // log wins, and this run re-reads and adopts (or refuses) instead of
633
+ // erasing it.
634
+ ifNoneMatch: true
485
635
  });
486
636
  await writeKeysJson({
487
637
  idStore,
@@ -511,6 +661,11 @@ export async function ensureDidWebvh({ idStore, wasServerUrl, spaceId, didWebKey
511
661
  * than left to the resolver, so a diverged client fails with a statement of
512
662
  * what diverged instead of persisting rolled seeds and then failing opaquely.
513
663
  *
664
+ * The entry publishes conditionally on the log this ceremony read, so a
665
+ * concurrent ceremony's entry is never erased; a lost race re-runs from the top
666
+ * (see {@link withLogConflictRetry}), which mints and persists a fresh staged
667
+ * seed again -- the documented cost of a torn rotation, one unused staged key.
668
+ *
514
669
  * @param options {object}
515
670
  * @param options.idStore {WebvhIdStore}
516
671
  * @param options.updateKeys {ClientWebvhUpdateKeys} the current seeds
@@ -518,7 +673,17 @@ export async function ensureDidWebvh({ idStore, wasServerUrl, spaceId, didWebKey
518
673
  * that changes the log's authorized update keys
519
674
  * @returns {Promise<{ did: string }>}
520
675
  */
521
- export async function rotateWebvhUpdateKey({ idStore, updateKeys, persistUpdateKeys }) {
676
+ export async function rotateWebvhUpdateKey(options) {
677
+ return withLogConflictRetry(() => rotateWebvhUpdateKeyOnce(options));
678
+ }
679
+ /**
680
+ * One attempt of {@link rotateWebvhUpdateKey}, re-invoked by the conflict
681
+ * retry.
682
+ *
683
+ * @param options {object} see {@link rotateWebvhUpdateKey}
684
+ * @returns {Promise<{ did: string }>}
685
+ */
686
+ async function rotateWebvhUpdateKeyOnce({ idStore, updateKeys, persistUpdateKeys }) {
522
687
  const published = await readPublishedLog({ idStore });
523
688
  if (!published) {
524
689
  throw new Error('did:webvh: did.jsonl is missing; nothing to rotate.');
@@ -594,17 +759,10 @@ export async function rotateWebvhUpdateKey({ idStore, updateKeys, persistUpdateK
594
759
  ])
595
760
  ]
596
761
  });
597
- if (!updated.webDoc) {
598
- throw new Error('did:webvh: updateDID returned no webDoc despite the did:web alsoKnownAs.');
599
- }
600
762
  // Publish the extended log and republish did.json (its did:web projection),
601
763
  // then finalize the local seeds: the staged key is now active, the pending
602
764
  // one is the new staged key.
603
- await publishWebvhLog({
604
- idStore,
605
- log: updated.log,
606
- webDoc: updated.webDoc
607
- });
765
+ await publishUpdatedLog({ idStore, updated, ifMatch: published.etag });
608
766
  await persistUpdateKeys({
609
767
  updateSeed: updateKeys.stagedSeed,
610
768
  stagedSeed: newStagedSeed
@@ -669,13 +827,27 @@ export function relationIds(relation) {
669
827
  * (no-op). Re-running with the same key set converges without forking the
670
828
  * log.
671
829
  *
830
+ * Each entry publishes conditionally on the read it was built on (the add
831
+ * entry on the mid-ceremony re-read), so a concurrent ceremony -- a revocation,
832
+ * another enrollment -- can never be erased by this one; a lost race re-runs
833
+ * from the top (see {@link withLogConflictRetry}) and rebases on the new head.
834
+ *
672
835
  * @param options {object}
673
836
  * @param options.idStore {WebvhIdStore}
674
837
  * @param options.updateKeys {ClientWebvhUpdateKeys} THIS client's seeds
675
838
  * @param options.newClient {WebvhEnrollmentKeys} the enrollee's public halves
676
839
  * @returns {Promise<{ did: string }>}
677
840
  */
678
- export async function enrollWebvhClient({ idStore, updateKeys, newClient }) {
841
+ export async function enrollWebvhClient(options) {
842
+ return withLogConflictRetry(() => enrollWebvhClientOnce(options));
843
+ }
844
+ /**
845
+ * One attempt of {@link enrollWebvhClient}, re-invoked by the conflict retry.
846
+ *
847
+ * @param options {object} see {@link enrollWebvhClient}
848
+ * @returns {Promise<{ did: string }>}
849
+ */
850
+ async function enrollWebvhClientOnce({ idStore, updateKeys, newClient }) {
679
851
  let published = await readPublishedLog({ idStore });
680
852
  if (!published) {
681
853
  throw new Error('did:webvh: did.jsonl is missing; nothing to enroll into.');
@@ -730,17 +902,12 @@ export async function enrollWebvhClient({ idStore, updateKeys, newClient }) {
730
902
  ])
731
903
  ]
732
904
  });
733
- if (!updated.webDoc) {
734
- throw new Error('did:webvh: updateDID returned no webDoc despite the did:web alsoKnownAs.');
735
- }
736
- await publishWebvhLog({
737
- idStore,
738
- log: updated.log,
739
- webDoc: updated.webDoc
740
- });
905
+ await publishUpdatedLog({ idStore, updated, ifMatch: published.etag });
741
906
  // Re-read through the same verifying path the resume case uses, so the
742
- // add entry below always builds on the published, resolved state.
743
- published = await readPublishedLog({ idStore });
907
+ // add entry below always builds on the published, resolved state. It must
908
+ // still be the same account: the DID the first read resolved to is what
909
+ // the entry just published extends.
910
+ published = await readPublishedLog({ idStore, expectedDid: published.did });
744
911
  if (!published) {
745
912
  throw new Error('did:webvh: did.jsonl vanished mid-enrollment.');
746
913
  }
@@ -748,7 +915,7 @@ export async function enrollWebvhClient({ idStore, updateKeys, newClient }) {
748
915
  // The add entry: the new client's two verification methods and its update
749
916
  // key, on top of the full existing document (updateDID replaces the
750
917
  // verification-method set and relationship arrays wholesale).
751
- const { did, doc, log, updateKeys: authorizedKeys, nextKeyHashes } = published;
918
+ const { did, doc, log, updateKeys: authorizedKeys, nextKeyHashes, etag } = published;
752
919
  const vmId = (publicKeyMultibase) => `${did}#${publicKeyMultibase}`;
753
920
  const addedMethods = [
754
921
  newClient.signingKeyMultibase,
@@ -780,14 +947,9 @@ export async function enrollWebvhClient({ idStore, updateKeys, newClient }) {
780
947
  capabilityInvocation: withReference(doc.capabilityInvocation, signingVmId),
781
948
  capabilityDelegation: withReference(doc.capabilityDelegation, signingVmId)
782
949
  });
783
- if (!updated.webDoc) {
784
- throw new Error('did:webvh: updateDID returned no webDoc despite the did:web alsoKnownAs.');
785
- }
786
- await publishWebvhLog({
787
- idStore,
788
- log: updated.log,
789
- webDoc: updated.webDoc
790
- });
950
+ // The etag of the read this entry was built on: the mid-ceremony re-read
951
+ // when the commit entry ran here, the original read when it was skipped.
952
+ await publishUpdatedLog({ idStore, updated, ifMatch: etag });
791
953
  return { did: updated.did };
792
954
  }
793
955
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"didWebvh.js","sourceRoot":"","sources":["../../src/webvh/didWebvh.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,OAAO,EACL,SAAS,EACT,iBAAiB,EACjB,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACrB,SAAS,EACV,MAAM,2BAA2B,CAAA;AAOlC,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAA;AAE1E,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,aAAa,EACd,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAkCzC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CAAA;AAE1C;;GAEG;AACH,MAAM,iBAAiB,GAAG,EAAE,CAAA;AAyC5B;;;;;;;;;;GAUG;AACH,MAAM,UAAU,0BAA0B,CAAC,EACzC,YAAY,EACZ,OAAO,EAIR;IACC,MAAM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AI,CAAC,gBAAgB,CAAC;QACtC,YAAY,EAAE,IAAI,CAAC,cAAc,CAAC;KACnC,CAAA;IAED,yEAAyE;IACzE,sEAAsE;IACtE,MAAM,SAAS,GAAG,MAAM,gBAAgB,CAAC,EAAE,OAAO,EAAE,CAAC,CAAA;IACrD,IAAI,SAAS,EAAE,CAAC;QACd,QAAQ,CAAC,KAAK,GAAG,EAAE,GAAG,EAAE,SAAS,CAAC,GAAG,EAAE,CAAA;IACzC,CAAC;IAED,2CAA2C;IAC3C,MAAM,OAAO,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAA;IAC9C,OAAO,QAAQ,CAAA;AACjB,CAAC"}
@@ -23,6 +23,9 @@
23
23
  * - `wasWebvhIdStore` -- the WAS-backed `WebvhIdStore` the ceremonies write
24
24
  * through.
25
25
  * - `repairKeyBindings` -- the lost-`keys.json` recovery path.
26
+ * - `WebvhLogConflictError` / `withLogConflictRetry` -- the lost-race outcome
27
+ * of a ceremony's conditional `did.jsonl` publish, and the rebase-by-re-run
28
+ * wrapper every ceremony here already applies to itself.
26
29
  * - `webvhZcapClient` / `webvhSigner` / `didKeyZcapClient` -- ZCap signing
27
30
  * under the account's did:webvh verification-method id (and the
28
31
  * pre-promotion did:key form).
@@ -30,7 +33,7 @@
30
33
  * Kept out of the root export: this subpath pulls the did:webvh, ed25519, and
31
34
  * ezcap dependency graph (the same isolation pattern as `./identity`).
32
35
  */
33
- export { didWebvhControllerTemplate, ensureDidWebvh, enrollWebvhClient, mintClientWebvhUpdateKeys, relationIds, repairKeyBindings, rotateWebvhUpdateKey, updateKeyMultibase } from './didWebvh.js';
36
+ export { didWebvhControllerTemplate, ensureDidWebvh, enrollWebvhClient, mintClientWebvhUpdateKeys, relationIds, repairKeyBindings, rotateWebvhUpdateKey, updateKeyMultibase, WebvhLogConflictError, withLogConflictRetry } from './didWebvh.js';
34
37
  export { AccountLogMissingError, verifyAccountLog } from './verifyLog.js';
35
38
  export { wasWebvhIdStore } from './wasIdStore.js';
36
39
  export { attributeClientUpdateKey, delegationKeyInDocument, documentKeyMultibases, keyAgreementTwinMultibase, listEnrolledWebvhClients } from './listClients.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/webvh/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,EACL,0BAA0B,EAC1B,cAAc,EACd,iBAAiB,EACjB,yBAAyB,EACzB,WAAW,EACX,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,qBAAqB,EACrB,yBAAyB,EACzB,wBAAwB,EACzB,MAAM,kBAAkB,CAAA;AACzB,YAAY,EACV,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,iBAAiB,EACjB,8BAA8B,EAC/B,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAC1D,YAAY,EACV,qBAAqB,EACrB,aAAa,EACb,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,YAAY,EACb,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACzC,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE1D,OAAO,EACL,yBAAyB,EACzB,gBAAgB,EAChB,UAAU,EACV,oBAAoB,EACpB,WAAW,EACX,eAAe,EAChB,MAAM,WAAW,CAAA;AAClB,YAAY,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/webvh/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,EACL,0BAA0B,EAC1B,cAAc,EACd,iBAAiB,EACjB,yBAAyB,EACzB,WAAW,EACX,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,qBAAqB,EACrB,yBAAyB,EACzB,wBAAwB,EACzB,MAAM,kBAAkB,CAAA;AACzB,YAAY,EACV,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,iBAAiB,EACjB,8BAA8B,EAC/B,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAC1D,YAAY,EACV,qBAAqB,EACrB,aAAa,EACb,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,YAAY,EACb,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACzC,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE1D,OAAO,EACL,yBAAyB,EACzB,gBAAgB,EAChB,UAAU,EACV,oBAAoB,EACpB,WAAW,EACX,eAAe,EAChB,MAAM,WAAW,CAAA;AAClB,YAAY,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA"}
@@ -23,6 +23,9 @@
23
23
  * - `wasWebvhIdStore` -- the WAS-backed `WebvhIdStore` the ceremonies write
24
24
  * through.
25
25
  * - `repairKeyBindings` -- the lost-`keys.json` recovery path.
26
+ * - `WebvhLogConflictError` / `withLogConflictRetry` -- the lost-race outcome
27
+ * of a ceremony's conditional `did.jsonl` publish, and the rebase-by-re-run
28
+ * wrapper every ceremony here already applies to itself.
26
29
  * - `webvhZcapClient` / `webvhSigner` / `didKeyZcapClient` -- ZCap signing
27
30
  * under the account's did:webvh verification-method id (and the
28
31
  * pre-promotion did:key form).
@@ -30,7 +33,7 @@
30
33
  * Kept out of the root export: this subpath pulls the did:webvh, ed25519, and
31
34
  * ezcap dependency graph (the same isolation pattern as `./identity`).
32
35
  */
33
- export { didWebvhControllerTemplate, ensureDidWebvh, enrollWebvhClient, mintClientWebvhUpdateKeys, relationIds, repairKeyBindings, rotateWebvhUpdateKey, updateKeyMultibase } from './didWebvh.js';
36
+ export { didWebvhControllerTemplate, ensureDidWebvh, enrollWebvhClient, mintClientWebvhUpdateKeys, relationIds, repairKeyBindings, rotateWebvhUpdateKey, updateKeyMultibase, WebvhLogConflictError, withLogConflictRetry } from './didWebvh.js';
34
37
  export { AccountLogMissingError, verifyAccountLog } from './verifyLog.js';
35
38
  export { wasWebvhIdStore } from './wasIdStore.js';
36
39
  export { attributeClientUpdateKey, delegationKeyInDocument, documentKeyMultibases, keyAgreementTwinMultibase, listEnrolledWebvhClients } from './listClients.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/webvh/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,EACL,0BAA0B,EAC1B,cAAc,EACd,iBAAiB,EACjB,yBAAyB,EACzB,WAAW,EACX,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,qBAAqB,EACrB,yBAAyB,EACzB,wBAAwB,EACzB,MAAM,kBAAkB,CAAA;AAKzB,OAAO,EACL,iBAAiB,EACjB,8BAA8B,EAC/B,MAAM,mBAAmB,CAAA;AAW1B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAGzC,OAAO,EACL,yBAAyB,EACzB,gBAAgB,EAChB,UAAU,EACV,oBAAoB,EACpB,WAAW,EACX,eAAe,EAChB,MAAM,WAAW,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/webvh/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,EACL,0BAA0B,EAC1B,cAAc,EACd,iBAAiB,EACjB,yBAAyB,EACzB,WAAW,EACX,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,qBAAqB,EACrB,yBAAyB,EACzB,wBAAwB,EACzB,MAAM,kBAAkB,CAAA;AAKzB,OAAO,EACL,iBAAiB,EACjB,8BAA8B,EAC/B,MAAM,mBAAmB,CAAA;AAW1B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAGzC,OAAO,EACL,yBAAyB,EACzB,gBAAgB,EAChB,UAAU,EACV,oBAAoB,EACpB,WAAW,EACX,eAAe,EAChB,MAAM,WAAW,CAAA"}
@@ -57,6 +57,11 @@ export declare class StagedCommitmentAmbiguousError extends Error {
57
57
  * follows the document edit). Revoking the last remaining client is refused
58
58
  * by the same guard.
59
59
  *
60
+ * The removal entry publishes conditionally on the log this call read, so a
61
+ * concurrent enrollment landing in between is never erased by the revocation
62
+ * (nor the revocation by it): the loser re-runs and rebases its entry on the
63
+ * winner's head (see `withLogConflictRetry`).
64
+ *
60
65
  * @param options {object}
61
66
  * @param options.idStore {WebvhIdStore}
62
67
  * @param options.updateKeys {ClientWebvhUpdateKeys} the REVOKING client's
@@ -66,17 +71,20 @@ export declare class StagedCommitmentAmbiguousError extends Error {
66
71
  * @param [options.knownLatentHashes] {string[]} standing latent commitments
67
72
  * the caller vouches for (the recovery registry's update-key hashes),
68
73
  * excluded from the staged-hash attribution
74
+ * @param [options.expectedDid] {string} the account DID the log must resolve
75
+ * to, from the caller's stored account pointer
69
76
  * @returns {Promise<{ did: string, doc: DIDDoc }>} the account's DID and its
70
77
  * resolved document AFTER the edit -- what the roster rotation that follows
71
78
  * resolves its remaining recipients from, so the caller needs no re-fetch of
72
79
  * the log it just extended. On the idempotent no-op path this is the
73
80
  * already-published document, which states the same thing.
74
81
  */
75
- export declare function revokeWebvhClient({ idStore, updateKeys, revokedClient, knownLatentHashes }: {
82
+ export declare function revokeWebvhClient(options: {
76
83
  idStore: WebvhIdStore;
77
84
  updateKeys: ClientWebvhUpdateKeys;
78
85
  revokedClient: RevokedClientKeys;
79
86
  knownLatentHashes?: string[];
87
+ expectedDid?: string;
80
88
  }): Promise<{
81
89
  did: string;
82
90
  doc: DIDDoc;
@@ -1 +1 @@
1
- {"version":3,"file":"revokeClient.d.ts","sourceRoot":"","sources":["../../src/webvh/revokeClient.ts"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EACV,MAAM,EAGP,MAAM,2BAA2B,CAAA;AAYlC,OAAO,KAAK,EACV,qBAAqB,EAErB,eAAe,EACf,YAAY,EACb,MAAM,eAAe,CAAA;AAEtB;;;;;GAKG;AACH,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IACxD,kBAAkB,EAAE,MAAM,CAAA;CAC3B;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,8BAA+B,SAAQ,KAAK;IACvD,UAAU,EAAE,MAAM,EAAE,CAAA;gBACR,EAAE,UAAU,EAAE,EAAE;QAAE,UA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AC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CAExC"}
@@ -33,7 +33,7 @@
33
33
  * standing commitment.
34
34
  */
35
35
  import { deriveNextKeyHash, updateDID } from '@interop/did-method-webvh';
36
- import { assertCarryOverCommitments, concludeWithPublishedLog, effectiveParameters, publishWebvhLog, readPublishedLog, relationIds, updateKeyMultibase, updateKeySigner } from './didWebvh.js';
36
+ import { assertCarryOverCommitments, concludeWithPublishedLog, effectiveParameters, publishUpdatedLog, readPublishedLog, relationIds, updateKeyMultibase, updateKeySigner, withLogConflictRetry } from './didWebvh.js';
37
37
  import { attributeClientUpdateKey } from './listClients.js';
38
38
  /**
39
39
  * Thrown when the log attribution cannot isolate the revoked client's staged
@@ -212,6 +212,11 @@ async function currentRevokedUpdateKey({ published, revokedClient, vmPresent })
212
212
  * follows the document edit). Revoking the last remaining client is refused
213
213
  * by the same guard.
214
214
  *
215
+ * The removal entry publishes conditionally on the log this call read, so a
216
+ * concurrent enrollment landing in between is never erased by the revocation
217
+ * (nor the revocation by it): the loser re-runs and rebases its entry on the
218
+ * winner's head (see `withLogConflictRetry`).
219
+ *
215
220
  * @param options {object}
216
221
  * @param options.idStore {WebvhIdStore}
217
222
  * @param options.updateKeys {ClientWebvhUpdateKeys} the REVOKING client's
@@ -221,14 +226,28 @@ async function currentRevokedUpdateKey({ published, revokedClient, vmPresent })
221
226
  * @param [options.knownLatentHashes] {string[]} standing latent commitments
222
227
  * the caller vouches for (the recovery registry's update-key hashes),
223
228
  * excluded from the staged-hash attribution
229
+ * @param [options.expectedDid] {string} the account DID the log must resolve
230
+ * to, from the caller's stored account pointer
224
231
  * @returns {Promise<{ did: string, doc: DIDDoc }>} the account's DID and its
225
232
  * resolved document AFTER the edit -- what the roster rotation that follows
226
233
  * resolves its remaining recipients from, so the caller needs no re-fetch of
227
234
  * the log it just extended. On the idempotent no-op path this is the
228
235
  * already-published document, which states the same thing.
229
236
  */
230
- export async function revokeWebvhClient({ idStore, updateKeys, revokedClient, knownLatentHashes = [] }) {
231
- const published = await readPublishedLog({ idStore });
237
+ export async function revokeWebvhClient(options) {
238
+ return withLogConflictRetry(() => revokeWebvhClientOnce(options));
239
+ }
240
+ /**
241
+ * One attempt of {@link revokeWebvhClient}, re-invoked by the conflict retry.
242
+ *
243
+ * @param options {object} see {@link revokeWebvhClient}
244
+ * @returns {Promise<{ did: string, doc: DIDDoc }>}
245
+ */
246
+ async function revokeWebvhClientOnce({ idStore, updateKeys, revokedClient, knownLatentHashes = [], expectedDid }) {
247
+ const published = await readPublishedLog({
248
+ idStore,
249
+ ...(expectedDid !== undefined ? { expectedDid } : {})
250
+ });
232
251
  if (!published) {
233
252
  throw new Error('did:webvh: did.jsonl is missing; nothing to revoke from.');
234
253
  }
@@ -289,10 +308,7 @@ export async function revokeWebvhClient({ idStore, updateKeys, revokedClient, kn
289
308
  capabilityInvocation: relationIds(doc.capabilityInvocation).filter(id => id !== signingVmId),
290
309
  capabilityDelegation: relationIds(doc.capabilityDelegation).filter(id => id !== signingVmId)
291
310
  });
292
- if (!updated.webDoc) {
293
- throw new Error('did:webvh: updateDID returned no webDoc despite the did:web alsoKnownAs.');
294
- }
295
- await publishWebvhLog({ idStore, log: updated.log, webDoc: updated.webDoc });
311
+ await publishUpdatedLog({ idStore, updated, ifMatch: published.etag });
296
312
  return { did: updated.did, doc: updated.doc };
297
313
  }
298
314
  //# sourceMappingURL=revokeClient.js.map