@interop/wallet-core 0.71.0 → 0.72.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 (135) hide show
  1. package/README.md +14 -3
  2. package/dist/clientAnnex/forget.d.ts.map +1 -1
  3. package/dist/clientAnnex/forget.js +4 -3
  4. package/dist/clientAnnex/forget.js.map +1 -1
  5. package/dist/clientAnnex/forgetLast.d.ts +55 -35
  6. package/dist/clientAnnex/forgetLast.d.ts.map +1 -1
  7. package/dist/clientAnnex/forgetLast.js +87 -35
  8. package/dist/clientAnnex/forgetLast.js.map +1 -1
  9. package/dist/clientAnnex/gc.d.ts +48 -19
  10. package/dist/clientAnnex/gc.d.ts.map +1 -1
  11. package/dist/clientAnnex/gc.js +82 -31
  12. package/dist/clientAnnex/gc.js.map +1 -1
  13. package/dist/clientAnnex/grantRevocation.d.ts +137 -0
  14. package/dist/clientAnnex/grantRevocation.d.ts.map +1 -0
  15. package/dist/clientAnnex/grantRevocation.js +135 -0
  16. package/dist/clientAnnex/grantRevocation.js.map +1 -0
  17. package/dist/clientAnnex/index.d.ts +4 -2
  18. package/dist/clientAnnex/index.d.ts.map +1 -1
  19. package/dist/clientAnnex/index.js +2 -1
  20. package/dist/clientAnnex/index.js.map +1 -1
  21. package/dist/clientAnnex/ladderAnchored.d.ts +0 -22
  22. package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -1
  23. package/dist/clientAnnex/ladderAnchored.js +8 -34
  24. package/dist/clientAnnex/ladderAnchored.js.map +1 -1
  25. package/dist/clientAnnex/log.d.ts +65 -13
  26. package/dist/clientAnnex/log.d.ts.map +1 -1
  27. package/dist/clientAnnex/log.js +160 -67
  28. package/dist/clientAnnex/log.js.map +1 -1
  29. package/dist/clientAnnex/mend.js +51 -24
  30. package/dist/clientAnnex/mend.js.map +1 -1
  31. package/dist/clients/grantState.d.ts +6 -3
  32. package/dist/clients/grantState.d.ts.map +1 -1
  33. package/dist/clients/grantState.js +6 -3
  34. package/dist/clients/grantState.js.map +1 -1
  35. package/dist/clients/policy.d.ts.map +1 -1
  36. package/dist/clients/policy.js +3 -0
  37. package/dist/clients/policy.js.map +1 -1
  38. package/dist/keyring/fetch.d.ts +6 -2
  39. package/dist/keyring/fetch.d.ts.map +1 -1
  40. package/dist/keyring/fetch.js +7 -3
  41. package/dist/keyring/fetch.js.map +1 -1
  42. package/dist/keyring/index.d.ts +7 -5
  43. package/dist/keyring/index.d.ts.map +1 -1
  44. package/dist/keyring/index.js +7 -5
  45. package/dist/keyring/index.js.map +1 -1
  46. package/dist/keyring/kdf.d.ts +1 -1
  47. package/dist/keyring/kdf.d.ts.map +1 -1
  48. package/dist/keyring/kdf.js +1 -1
  49. package/dist/keyring/kdf.js.map +1 -1
  50. package/dist/keyring/unlockSpace.d.ts +45 -68
  51. package/dist/keyring/unlockSpace.d.ts.map +1 -1
  52. package/dist/keyring/unlockSpace.js +66 -88
  53. package/dist/keyring/unlockSpace.js.map +1 -1
  54. package/dist/menders/derive.d.ts +85 -0
  55. package/dist/menders/derive.d.ts.map +1 -0
  56. package/dist/menders/derive.js +138 -0
  57. package/dist/menders/derive.js.map +1 -0
  58. package/dist/menders/ids.d.ts +20 -0
  59. package/dist/menders/ids.d.ts.map +1 -0
  60. package/dist/menders/ids.js +85 -0
  61. package/dist/menders/ids.js.map +1 -0
  62. package/dist/menders/index.d.ts +42 -0
  63. package/dist/menders/index.d.ts.map +1 -0
  64. package/dist/menders/index.js +37 -0
  65. package/dist/menders/index.js.map +1 -0
  66. package/dist/menders/registry.d.ts +84 -0
  67. package/dist/menders/registry.d.ts.map +1 -0
  68. package/dist/menders/registry.js +62 -0
  69. package/dist/menders/registry.js.map +1 -0
  70. package/dist/menders/runner.d.ts +143 -0
  71. package/dist/menders/runner.d.ts.map +1 -0
  72. package/dist/menders/runner.js +222 -0
  73. package/dist/menders/runner.js.map +1 -0
  74. package/dist/menders/types.d.ts +146 -0
  75. package/dist/menders/types.d.ts.map +1 -0
  76. package/dist/menders/types.js +2 -0
  77. package/dist/menders/types.js.map +1 -0
  78. package/dist/menders/vocabulary.d.ts +88 -0
  79. package/dist/menders/vocabulary.d.ts.map +1 -0
  80. package/dist/menders/vocabulary.js +83 -0
  81. package/dist/menders/vocabulary.js.map +1 -0
  82. package/dist/recovery/index.d.ts +1 -1
  83. package/dist/recovery/index.js +1 -1
  84. package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
  85. package/dist/recovery/recoveryWebvh.js +11 -17
  86. package/dist/recovery/recoveryWebvh.js.map +1 -1
  87. package/dist/resourceLog/document.d.ts.map +1 -1
  88. package/dist/resourceLog/document.js +30 -6
  89. package/dist/resourceLog/document.js.map +1 -1
  90. package/dist/space/activity.d.ts +70 -0
  91. package/dist/space/activity.d.ts.map +1 -1
  92. package/dist/space/activity.js +82 -0
  93. package/dist/space/activity.js.map +1 -1
  94. package/dist/space/deleteSpace.d.ts.map +1 -1
  95. package/dist/space/deleteSpace.js +6 -5
  96. package/dist/space/deleteSpace.js.map +1 -1
  97. package/dist/space/index.d.ts +1 -1
  98. package/dist/space/index.d.ts.map +1 -1
  99. package/dist/space/index.js +1 -1
  100. package/dist/space/index.js.map +1 -1
  101. package/dist/testing.d.ts +78 -0
  102. package/dist/testing.d.ts.map +1 -0
  103. package/dist/testing.js +89 -0
  104. package/dist/testing.js.map +1 -0
  105. package/dist/unlock/index.d.ts +2 -2
  106. package/dist/unlock/index.d.ts.map +1 -1
  107. package/dist/unlock/index.js +1 -1
  108. package/dist/unlock/retire.d.ts +20 -5
  109. package/dist/unlock/retire.d.ts.map +1 -1
  110. package/dist/unlock/retire.js.map +1 -1
  111. package/dist/unlock/standingWebvh.d.ts +22 -2
  112. package/dist/unlock/standingWebvh.d.ts.map +1 -1
  113. package/dist/unlock/standingWebvh.js +22 -2
  114. package/dist/unlock/standingWebvh.js.map +1 -1
  115. package/dist/webvh/didWebvh.d.ts +33 -0
  116. package/dist/webvh/didWebvh.d.ts.map +1 -1
  117. package/dist/webvh/didWebvh.js +50 -11
  118. package/dist/webvh/didWebvh.js.map +1 -1
  119. package/dist/webvh/enrollClient.d.ts.map +1 -1
  120. package/dist/webvh/enrollClient.js +4 -16
  121. package/dist/webvh/enrollClient.js.map +1 -1
  122. package/dist/webvh/index.d.ts +13 -3
  123. package/dist/webvh/index.d.ts.map +1 -1
  124. package/dist/webvh/index.js +13 -3
  125. package/dist/webvh/index.js.map +1 -1
  126. package/dist/webvh/listClients.d.ts +47 -0
  127. package/dist/webvh/listClients.d.ts.map +1 -1
  128. package/dist/webvh/listClients.js +40 -1
  129. package/dist/webvh/listClients.js.map +1 -1
  130. package/dist/webvh/standingZcap.d.ts +66 -0
  131. package/dist/webvh/standingZcap.d.ts.map +1 -1
  132. package/dist/webvh/standingZcap.js +96 -0
  133. package/dist/webvh/standingZcap.js.map +1 -1
  134. package/dist/webvh/zcap.d.ts +1 -1
  135. package/package.json +18 -6
@@ -102,11 +102,13 @@ export function generationQuiet({ log, now = Date.now() }) {
102
102
  * See the module header for the stage order and its load-bearing constraints.
103
103
  *
104
104
  * Convergence: every stage detects completion from durable state. A re-run
105
- * after a tear re-POSTs the revocation blind (400 already-revoked reads as
106
- * success), re-writes the digest (the deterministic payload id collapses the
107
- * second row at read time), and re-runs the idempotent delete; a swap torn
108
- * before its re-point leaves an unpointed fresh generation the same fan-out
109
- * collects.
105
+ * after a tear re-POSTs the revocation blind (a genuine `AlreadyRevokedError`
106
+ * reads as success; a delegation expired beyond the clock-skew margin is
107
+ * skipped locally before any POST, and a refusal inside the skew band or of
108
+ * a chain whose signer has left the document is read as that), re-writes
109
+ * the digest (the deterministic payload id collapses the second row at read
110
+ * time), and re-runs the idempotent delete; a swap torn before its re-point
111
+ * leaves an unpointed fresh generation the same fan-out collects.
110
112
  *
111
113
  * @param options {object}
112
114
  * @param options.was {WasClient} the storage client, signing as an
@@ -174,7 +176,7 @@ export async function runClientAnnexGc({ was, wasServerUrl, accountSpaceId, acco
174
176
  // read as quiet.
175
177
  return old === undefined ? 'failed' : 'deferred-live';
176
178
  }
177
- currentDid = (await replaceClientAnnexGeneration({
179
+ const swapped = await replaceClientAnnexGeneration({
178
180
  was,
179
181
  wasServerUrl,
180
182
  accountSpaceId,
@@ -184,8 +186,14 @@ export async function runClientAnnexGc({ was, wasServerUrl, accountSpaceId, acco
184
186
  zcapClient,
185
187
  ladderSeed,
186
188
  clientAnnexSpaceId: spaceId,
187
- oldGeneration: old
188
- })).clientAnnexDid;
189
+ oldGeneration: old,
190
+ now
191
+ });
192
+ // A `refused` revoke is not reported here: the swap
193
+ // completed, the old generation is now unpointed, and the
194
+ // fan-out below re-attempts its revocation in this same pass,
195
+ // reporting the failure under its id if it fails again.
196
+ currentDid = swapped.clientAnnexDid;
189
197
  return 'replaced';
190
198
  }
191
199
  catch (err) {
@@ -221,7 +229,9 @@ export async function runClientAnnexGc({ was, wasServerUrl, accountSpaceId, acco
221
229
  generationId,
222
230
  pinStore,
223
231
  recordDigest,
224
- onCollected
232
+ onCollected,
233
+ now,
234
+ accountDoc: account.doc
225
235
  });
226
236
  collected.push(generationId);
227
237
  }
@@ -270,10 +280,12 @@ async function readClientAnnexGeneration({ was, spaceId, generationId, pinStore,
270
280
  * off-cadence swap whose pointed log does not exist), the revoke stage is
271
281
  * skipped and the old generation's delegation dies with the re-point on a
272
282
  * conforming server
283
+ * @param options.now {number} epoch milliseconds, read against the old
284
+ * delegation's own `expires`
273
285
  * @returns {Promise<ClientAnnexGenerationSwap>} the fresh annex DID and
274
286
  * what the revoke stage did
275
287
  */
276
- async function replaceClientAnnexGeneration({ was, wasServerUrl, accountSpaceId, account, idStore, signer, zcapClient, ladderSeed, clientAnnexSpaceId, oldGeneration }) {
288
+ async function replaceClientAnnexGeneration({ was, wasServerUrl, accountSpaceId, account, idStore, signer, zcapClient, ladderSeed, clientAnnexSpaceId, oldGeneration, now }) {
277
289
  const pinStore = idStore.pin.store;
278
290
  // 1. Mint + genesis: a fresh generation in the existing auxiliary Space
279
291
  // (the typed-Space ensure no-ops on it; the controller argument is only
@@ -312,10 +324,12 @@ async function replaceClientAnnexGeneration({ was, wasServerUrl, accountSpaceId,
312
324
  zcapClient,
313
325
  wasServerUrl,
314
326
  spaceId: accountSpaceId,
315
- clientAnnexDid
327
+ clientAnnexDid,
328
+ now
316
329
  }),
317
330
  expectedDid: minted.did,
318
- ...(minted.etag !== undefined ? { published: minted } : {})
331
+ ...(minted.etag !== undefined ? { published: minted } : {}),
332
+ now
319
333
  });
320
334
  // 3. Revoke the old generation's delegation, before the re-point (the
321
335
  // revocation POST verifies against the currently resolved document, so it
@@ -324,27 +338,48 @@ async function replaceClientAnnexGeneration({ was, wasServerUrl, accountSpaceId,
324
338
  const oldDelegation = oldGeneration === undefined
325
339
  ? undefined
326
340
  : embeddedGenerationDelegation({ doc: oldGeneration.doc });
327
- let revoke = 'revoked';
341
+ let revoke;
342
+ let revokeError;
328
343
  if (oldDelegation !== undefined) {
329
- await revokeTreatingAlreadyRevokedAsSuccess({
330
- revoke: zcap => was.revoke(zcap),
331
- delegation: oldDelegation
332
- });
344
+ try {
345
+ const outcome = await revokeTreatingAlreadyRevokedAsSuccess({
346
+ revoke: zcap => was.revoke(zcap),
347
+ delegation: oldDelegation,
348
+ now,
349
+ accountDoc: account.doc
350
+ });
351
+ revoke =
352
+ outcome === 'revoked' || outcome === 'already-revoked'
353
+ ? 'revoked'
354
+ : outcome;
355
+ }
356
+ catch (err) {
357
+ // Reported, not thrown: the fresh generation already stands, and a
358
+ // swap that halts here re-mints an orphan at every due login while
359
+ // the old generation is never superseded. The collect fan-out owns
360
+ // the retry, keeping the old generation's bytes while it fails.
361
+ revoke = 'refused';
362
+ revokeError = err;
363
+ }
333
364
  }
334
365
  else {
335
366
  revoke = oldGeneration === undefined ? 'log-absent' : 'no-delegation';
336
367
  }
337
368
  // 4. Re-point the account document at the fresh generation. On a
338
369
  // conforming server the pointer equality itself kills the old
339
- // generation's delegations; the explicit revoke above covered the
340
- // fail-open case.
370
+ // generation's ladder-signed delegations; the explicit revoke above
371
+ // covered the fail-open case and the enrolled-client-signed ones.
341
372
  await setDelegatedClientsPointer({
342
373
  idStore,
343
374
  signer,
344
375
  clientAnnexDid: minted.did,
345
376
  expectedDid: account.did
346
377
  });
347
- return { clientAnnexDid: minted.did, revoke };
378
+ return {
379
+ clientAnnexDid: minted.did,
380
+ revoke,
381
+ ...(revoke === 'refused' ? { revokeError } : {})
382
+ };
348
383
  }
349
384
  /**
350
385
  * AN OFF-CADENCE GENERATION SWAP: replaces the pointed annex generation
@@ -365,16 +400,21 @@ async function replaceClientAnnexGeneration({ was, wasServerUrl, accountSpaceId,
365
400
  * the revoke is skipped and reported as `log-absent`, and pointer equality
366
401
  * retires the old delegation on a conforming server; a served log that fails
367
402
  * verification or falls behind this client's pin throws, since a swap over a
368
- * log this client cannot trust would skip a revoke it may owe.
403
+ * log this client cannot trust would skip a revoke it may owe. This is the
404
+ * arm credential retirement calls, and the standing delegation there is
405
+ * often signed by a ladder VM a PRIOR retirement already struck: the server
406
+ * refuses that chain, and the revoke stage reads the refusal against the
407
+ * caller's `account.doc` and reports `signer-gone`.
369
408
  *
370
409
  * @param options {object} see {@link runClientAnnexGc} for the shared
371
410
  * members ({ was, wasServerUrl, accountSpaceId, account, idStore,
372
411
  * updateKeys, zcapClient }); `ladderSeed` here is the SURVIVING
373
412
  * credential's seed the fresh generation is minted from
413
+ * @param [options.now] {number} epoch milliseconds, for tests
374
414
  * @returns {Promise<ClientAnnexGenerationSwap>} the fresh annex DID and
375
415
  * what the revoke stage did
376
416
  */
377
- export async function swapClientAnnexGeneration({ was, wasServerUrl, accountSpaceId, account, idStore, signer, zcapClient, ladderSeed }) {
417
+ export async function swapClientAnnexGeneration({ was, wasServerUrl, accountSpaceId, account, idStore, signer, zcapClient, ladderSeed, now = Date.now() }) {
378
418
  const pointedDid = delegatedClientsPointer({ doc: account.doc });
379
419
  if (pointedDid === undefined) {
380
420
  throw new Error('clientAnnex: the account document carries no delegated-clients ' +
@@ -398,17 +438,21 @@ export async function swapClientAnnexGeneration({ was, wasServerUrl, accountSpac
398
438
  zcapClient,
399
439
  ladderSeed,
400
440
  clientAnnexSpaceId: spaceId,
401
- ...(oldGeneration !== undefined ? { oldGeneration } : {})
441
+ ...(oldGeneration !== undefined ? { oldGeneration } : {}),
442
+ now
402
443
  });
403
444
  }
404
445
  /**
405
446
  * Collects one non-pointed generation: revoke its embedded delegation
406
- * (blind; the server's 400 already-revoked answer reads as success), write
407
- * the digest from its verified log, delete the collection, then the
408
- * caller's local cleanup. A generation whose `did.jsonl` does not exist
409
- * held no visits and is deleted without a digest row; one whose log exists
410
- * but fails verification is kept and reported (deleting it would destroy
411
- * the evidence of tampering).
447
+ * (blind; a genuine `AlreadyRevokedError` reads as success, a delegation
448
+ * expired beyond the clock-skew margin skips the POST, and a refusal the
449
+ * helper cannot read as expiry or signer death throws, keeping the
450
+ * generation and its delegation bytes for the next pass), write the
451
+ * digest from its verified log, delete the collection, then the caller's
452
+ * local cleanup. A generation whose `did.jsonl` does not exist held no
453
+ * visits and is deleted without a digest row; one whose log exists but fails
454
+ * verification is kept and reported (deleting it would destroy the evidence
455
+ * of tampering).
412
456
  *
413
457
  * @param options {object}
414
458
  * @param options.was {WasClient}
@@ -418,9 +462,14 @@ export async function swapClientAnnexGeneration({ was, wasServerUrl, accountSpac
418
462
  * pin store
419
463
  * @param options.recordDigest {Function} see {@link runClientAnnexGc}
420
464
  * @param [options.onCollected] {Function} see {@link runClientAnnexGc}
465
+ * @param options.now {number} epoch milliseconds, read against the
466
+ * embedded delegation's own `expires`
467
+ * @param options.accountDoc {PublishedKeyDocument} the locally VERIFIED
468
+ * account document, read against the embedded delegation's proof key when
469
+ * the server refuses the revocation
421
470
  * @returns {Promise<void>}
422
471
  */
423
- async function collectOneGeneration({ was, spaceId, generationId, pinStore, recordDigest, onCollected }) {
472
+ async function collectOneGeneration({ was, spaceId, generationId, pinStore, recordDigest, onCollected, now, accountDoc }) {
424
473
  // No expectedDid: an orphan was possibly never pointed from this client.
425
474
  // The read runs under the store's own chain-head pin; the slot it
426
475
  // establishes is the caller's to drop (`onCollected`) with the generation.
@@ -437,7 +486,9 @@ async function collectOneGeneration({ was, spaceId, generationId, pinStore, reco
437
486
  if (oldDelegation !== undefined) {
438
487
  await revokeTreatingAlreadyRevokedAsSuccess({
439
488
  revoke: zcap => was.revoke(zcap),
440
- delegation: oldDelegation
489
+ delegation: oldDelegation,
490
+ now,
491
+ accountDoc
441
492
  });
442
493
  }
443
494
  // The digest, strictly before the delete: the delete destroys the
@@ -1 +1 @@
1
- {"version":3,"file":"gc.js","sourceRoot":"","sources":["../../src/clientAnnex/gc.ts"],"names":[],"mappings":"AAwDA,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,4BAA4B,EAC5B,iCAAiC,EACjC,oBAAoB,EACpB,mCAAmC,EACnC,wBAAwB,EACxB,0BAA0B,EAC1B,qCAAqC,EACrC,0BAA0B,EAC3B,MAAM,UAAU,CAAA;AAQjB;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAA;AAE/D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAA;AAE5D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAA;AAEvD;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,oCAAoC,CAAC,EACnD,GAAG,EAGJ;IACC,IAAI,aAAiC,CAAA;IACrC,IAAI,QAA4B,CAAA;IAChC,KAAK,MAAM,KAAK,IAAI,GAAG,EAAE,CAAC;QACxB,MAAM,OAAO,GAAG,uBAAuB,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,CAAA;QAC7D,IAAI,OAAO,KAAK,SAAS,IAA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AAC;IAED,2EAA2E;IAC3E,MAAM,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,MAAM,EAAE,CAAA;IAC1D,MAAM,WAAW,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,CAAA;AACvC,CAAC"}
@@ -0,0 +1,137 @@
1
+ /*!
2
+ * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
+ */
4
+ /**
5
+ * Revoking a recorded app or agent grant, and reading the server's answer
6
+ * against the verified account document: the connected-apps counterpart of
7
+ * {@link revokeTreatingAlreadyRevokedAsSuccess}, with the same policy. The
8
+ * one local skip is a grant expired beyond the revocation clock-skew margin.
9
+ * Everything else is POSTed, since a revocation the server accepts is the
10
+ * only proof the grant is off the account, and a plain refusal is then
11
+ * classified on what the client can check.
12
+ *
13
+ * What the client can check differs by how the grant was delegated. A grant
14
+ * delegated straight under the Space root is signed by an enrolled client's
15
+ * key, and dies with that client's document entry (the current-key-set
16
+ * rule): the same reading `deriveGrantSignerState` (`/clients`) marks a
17
+ * listing row with, over this one grant. A grant a transient session minted
18
+ * is signed by a client-annex per-visit key the account document never
19
+ * lists, and chains under the generation delegation embedded as the last
20
+ * link of its `proof.capabilityChain`; it dies when that delegation's signer
21
+ * leaves the document, or when the account document's delegated-clients
22
+ * pointer moves to another generation.
23
+ */
24
+ import type { IDelegatedZcap, IZcap } from '@interop/data-integrity-core';
25
+ import { type PublishedKeyDocument } from '../webvh/index.js';
26
+ /**
27
+ * What a recorded grant is read against, off the session's verified account
28
+ * document: the account DID an enrolled client's promoted verification-method
29
+ * id is under, the enrolled clients' signing-key multibases (the two as
30
+ * `deriveGrantSignerState` takes them), the verified document itself (what an
31
+ * embedded generation delegation's proof key is checked against), and the
32
+ * annex DID the document's delegated-clients pointer currently names, absent
33
+ * when it names none. The first two settle the orphaned reading; the last two
34
+ * settle whether an annex-signed grant's generation delegation still stands.
35
+ */
36
+ export interface AccountSignerCheck {
37
+ accountDid: string;
38
+ currentSigningKeys: Set<string>;
39
+ doc: PublishedKeyDocument;
40
+ clientAnnexDid?: string;
41
+ }
42
+ /**
43
+ * How a server refusal of a grant's revocation is read, when the client can
44
+ * read it: `expired` (`now` is inside the skew band around the grant's own
45
+ * `expires`, or past it, {@link delegationAtExpiry}), `orphaned` (a grant
46
+ * delegated straight under the Space root whose signer has left the verified
47
+ * document), `signer-gone` (a grant chained under an embedded parent
48
+ * delegation whose own proof key has checkably left the verified document
49
+ * under `capabilityDelegation`, {@link delegationSignerGone}, which catches
50
+ * a generation delegation replaced within its generation as well as one
51
+ * struck with its signer), or `generation-swapped` (a parent that is provably
52
+ * a generation delegation, its `controller` parsing as an annex DID, naming
53
+ * a generation other than the one the account document currently points
54
+ * at).
55
+ */
56
+ export type GrantRevocationRefusal = 'expired' | 'orphaned' | 'signer-gone' | 'generation-swapped';
57
+ /**
58
+ * What {@link revokeRecordedGrant} did: `revoked` (the POST landed),
59
+ * `already-revoked` (the server's genuine `AlreadyRevokedError`), `expired`
60
+ * with no POST sent (the grant is past its `expires` by more than the skew
61
+ * margin), or one of the {@link GrantRevocationRefusal} readings of a plain
62
+ * refusal.
63
+ */
64
+ export type GrantRevocationOutcome = 'revoked' | 'already-revoked' | GrantRevocationRefusal;
65
+ /**
66
+ * Reads a plain server refusal of a recorded grant's revocation against the
67
+ * verified account document, and says why the chain no longer verifies when
68
+ * the client can tell. Without a `signerCheck` only the expiry reading
69
+ * applies. Every uncheckable case reads as undefined, so the refusal is
70
+ * rethrown rather than counted: a parent whose proof key is absent or
71
+ * fragment-less, a parent of some other shape, a document that currently
72
+ * points at no generation, and a legacy grant that recorded no signer.
73
+ *
74
+ * The chain reading walks `proof.capabilityChain`, where the delegation
75
+ * suite writes it: a grant a transient session minted embeds its parent, the
76
+ * generation delegation, as the chain's last link; a grant delegated under
77
+ * the Space root carries only the root's id string there.
78
+ *
79
+ * @param options {object}
80
+ * @param options.zcap {IZcap} the recorded full capability
81
+ * @param [options.signerCheck] {AccountSignerCheck}
82
+ * @param options.now {number} epoch milliseconds
83
+ * @returns {GrantRevocationRefusal | undefined} undefined when the client
84
+ * cannot say why the server refused
85
+ */
86
+ export declare function classifyGrantRevocationRefusal({ zcap, signerCheck, now }: {
87
+ zcap: IZcap;
88
+ signerCheck?: AccountSignerCheck;
89
+ now: number;
90
+ }): GrantRevocationRefusal | undefined;
91
+ /**
92
+ * Submits the revocation of one recorded grant and classifies the server's
93
+ * answer, the policy {@link revokeTreatingAlreadyRevokedAsSuccess} states
94
+ * for a generation delegation. The one local skip is a grant whose own
95
+ * `expires` is past by more than the revocation clock-skew margin
96
+ * ({@link delegationExpired}). Everything else is POSTed, whatever the
97
+ * caller's document says about the signer: the document a login read is a
98
+ * snapshot. was-client's `AlreadyRevokedError` is success. A plain
99
+ * `ValidationError` is read through {@link classifyGrantRevocationRefusal},
100
+ * and rethrown when the client cannot say why. Every other failure is
101
+ * rethrown. Errors are matched on `err.name`, since error classes do not
102
+ * survive crossing package copies.
103
+ *
104
+ * @param options {object}
105
+ * @param options.revoke {Function} `(zcap) => Promise<void>` -- POSTs the
106
+ * revocation (`was.revoke`)
107
+ * @param options.zcap {IZcap} the recorded full capability
108
+ * @param [options.signerCheck] {AccountSignerCheck} read against the grant
109
+ * when the server refuses the POST
110
+ * @param options.now {number} epoch milliseconds
111
+ * @returns {Promise<GrantRevocationOutcome>}
112
+ */
113
+ export declare function revokeRecordedGrant({ revoke, zcap, signerCheck, now }: {
114
+ revoke: (zcap: IDelegatedZcap) => Promise<void>;
115
+ zcap: IZcap;
116
+ signerCheck?: AccountSignerCheck;
117
+ now: number;
118
+ }): Promise<GrantRevocationOutcome>;
119
+ /**
120
+ * The parent capability a delegation embeds as the last link of its
121
+ * `proof.capabilityChain`, when the chain embeds one (an object rather than
122
+ * an id string). A delegated zcap carries exactly one `capabilityDelegation`
123
+ * proof, but the wire shape allows an array; the first proof is read.
124
+ *
125
+ * @param zcap {IZcap}
126
+ * @returns {IZcap | undefined}
127
+ */
128
+ export declare function embeddedParentCapability(zcap: IZcap): IZcap | undefined;
129
+ /**
130
+ * Whether a DID string is a client annex did:webvh, by the same parse
131
+ * {@link clientAnnexDidParts} applies.
132
+ *
133
+ * @param did {string}
134
+ * @returns {boolean}
135
+ */
136
+ export declare function isClientAnnexDid(did: string): boolean;
137
+ //# sourceMappingURL=grantRevocation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grantRevocation.d.ts","sourceRoot":"","sources":["../../src/clientAnnex/grantRevocation.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA;AAEzE,OAAO,EAKL,KAAK,oBAAoB,EAC1B,MAAM,mBAAmB,CAAA;AAG1B;;;;;;;;;GASG;AACH,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,MAAM,CAAA;IAClB,kBAAkB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC/B,GAAG,EAAE,oBAAoB,CAAA;IACzB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,sBAAsB,GAChC,SAAS,GAAG,UAAU,GAAG,aAAa,GAAG,oBAAoB,CAAA;AAE/D;;;;;;GAMG;AACH,MAAM,MAAM,sBAAsB,GAChC,SAAS,GAAG,iBAAiB,GAAG,sBAAsB,CAAA;AAExD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,8BAA8B,CAAC,EAC7C,IAAI,EACJ,WAAW,EACX,GAAG,EACJ,EAAE;IACD,IAAI,EAAE,KAAK,CAAA;IACX,WAAW,CAAC,EAAE,kBAAkB,CAAA;IAChC,GAAG,EAAE,MAAM,CAAA;CACZ,GAAG,sBAAsB,GAAG,SAAS,CA6BrC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,mBAAmB,CAAC,EACxC,MAAM,EACN,IAAI,EACJ,WAAW,EACX,GAAG,EACJ,EAAE;IACD,MAAM,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC/C,IAAI,EAAE,KAAK,CAAA;IACX,WAAW,CAAC,EAAE,kBAAkB,CAAA;IAChC,GAAG,EAAE,MAAM,CAAA;CACZ,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAoBlC;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,KAAK,GAAG,KAAK,GAAG,SAAS,CAYvE;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAOrD"}
@@ -0,0 +1,135 @@
1
+ import { deriveGrantSignerState } from '../clients/grantState.js';
2
+ import { delegationAtExpiry, delegationExpired, delegationProofKeyId, delegationSignerGone } from '../webvh/index.js';
3
+ import { clientAnnexDidParts } from './log.js';
4
+ /**
5
+ * Reads a plain server refusal of a recorded grant's revocation against the
6
+ * verified account document, and says why the chain no longer verifies when
7
+ * the client can tell. Without a `signerCheck` only the expiry reading
8
+ * applies. Every uncheckable case reads as undefined, so the refusal is
9
+ * rethrown rather than counted: a parent whose proof key is absent or
10
+ * fragment-less, a parent of some other shape, a document that currently
11
+ * points at no generation, and a legacy grant that recorded no signer.
12
+ *
13
+ * The chain reading walks `proof.capabilityChain`, where the delegation
14
+ * suite writes it: a grant a transient session minted embeds its parent, the
15
+ * generation delegation, as the chain's last link; a grant delegated under
16
+ * the Space root carries only the root's id string there.
17
+ *
18
+ * @param options {object}
19
+ * @param options.zcap {IZcap} the recorded full capability
20
+ * @param [options.signerCheck] {AccountSignerCheck}
21
+ * @param options.now {number} epoch milliseconds
22
+ * @returns {GrantRevocationRefusal | undefined} undefined when the client
23
+ * cannot say why the server refused
24
+ */
25
+ export function classifyGrantRevocationRefusal({ zcap, signerCheck, now }) {
26
+ if (delegationAtExpiry({ zcap, now })) {
27
+ return 'expired';
28
+ }
29
+ if (!signerCheck) {
30
+ return undefined;
31
+ }
32
+ const parent = embeddedParentCapability(zcap);
33
+ if (parent === undefined) {
34
+ const state = deriveGrantSignerState({
35
+ signerKeyIds: [delegationProofKeyId(zcap)],
36
+ accountDid: signerCheck.accountDid,
37
+ currentSigningKeys: signerCheck.currentSigningKeys
38
+ });
39
+ return state === 'orphaned' ? 'orphaned' : undefined;
40
+ }
41
+ if (delegationSignerGone({ zcap: parent, doc: signerCheck.doc })) {
42
+ return 'signer-gone';
43
+ }
44
+ const { controller } = parent;
45
+ if (signerCheck.clientAnnexDid !== undefined &&
46
+ typeof controller === 'string' &&
47
+ isClientAnnexDid(controller) &&
48
+ controller !== signerCheck.clientAnnexDid) {
49
+ return 'generation-swapped';
50
+ }
51
+ return undefined;
52
+ }
53
+ /**
54
+ * Submits the revocation of one recorded grant and classifies the server's
55
+ * answer, the policy {@link revokeTreatingAlreadyRevokedAsSuccess} states
56
+ * for a generation delegation. The one local skip is a grant whose own
57
+ * `expires` is past by more than the revocation clock-skew margin
58
+ * ({@link delegationExpired}). Everything else is POSTed, whatever the
59
+ * caller's document says about the signer: the document a login read is a
60
+ * snapshot. was-client's `AlreadyRevokedError` is success. A plain
61
+ * `ValidationError` is read through {@link classifyGrantRevocationRefusal},
62
+ * and rethrown when the client cannot say why. Every other failure is
63
+ * rethrown. Errors are matched on `err.name`, since error classes do not
64
+ * survive crossing package copies.
65
+ *
66
+ * @param options {object}
67
+ * @param options.revoke {Function} `(zcap) => Promise<void>` -- POSTs the
68
+ * revocation (`was.revoke`)
69
+ * @param options.zcap {IZcap} the recorded full capability
70
+ * @param [options.signerCheck] {AccountSignerCheck} read against the grant
71
+ * when the server refuses the POST
72
+ * @param options.now {number} epoch milliseconds
73
+ * @returns {Promise<GrantRevocationOutcome>}
74
+ */
75
+ export async function revokeRecordedGrant({ revoke, zcap, signerCheck, now }) {
76
+ if (delegationExpired({ zcap, now })) {
77
+ return 'expired';
78
+ }
79
+ try {
80
+ await revoke(zcap);
81
+ }
82
+ catch (err) {
83
+ const name = err?.name;
84
+ if (name === 'AlreadyRevokedError') {
85
+ return 'already-revoked';
86
+ }
87
+ if (name === 'ValidationError') {
88
+ const refusal = classifyGrantRevocationRefusal({ zcap, signerCheck, now });
89
+ if (refusal !== undefined) {
90
+ return refusal;
91
+ }
92
+ }
93
+ throw err;
94
+ }
95
+ return 'revoked';
96
+ }
97
+ /**
98
+ * The parent capability a delegation embeds as the last link of its
99
+ * `proof.capabilityChain`, when the chain embeds one (an object rather than
100
+ * an id string). A delegated zcap carries exactly one `capabilityDelegation`
101
+ * proof, but the wire shape allows an array; the first proof is read.
102
+ *
103
+ * @param zcap {IZcap}
104
+ * @returns {IZcap | undefined}
105
+ */
106
+ export function embeddedParentCapability(zcap) {
107
+ const { proof } = zcap;
108
+ const single = Array.isArray(proof) ? proof[0] : proof;
109
+ if (!single || typeof single !== 'object') {
110
+ return undefined;
111
+ }
112
+ const chain = single.capabilityChain;
113
+ if (!Array.isArray(chain) || chain.length === 0) {
114
+ return undefined;
115
+ }
116
+ const last = chain[chain.length - 1];
117
+ return last !== null && typeof last === 'object' ? last : undefined;
118
+ }
119
+ /**
120
+ * Whether a DID string is a client annex did:webvh, by the same parse
121
+ * {@link clientAnnexDidParts} applies.
122
+ *
123
+ * @param did {string}
124
+ * @returns {boolean}
125
+ */
126
+ export function isClientAnnexDid(did) {
127
+ try {
128
+ clientAnnexDidParts({ did });
129
+ return true;
130
+ }
131
+ catch {
132
+ return false;
133
+ }
134
+ }
135
+ //# sourceMappingURL=grantRevocation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grantRevocation.js","sourceRoot":"","sources":["../../src/clientAnnex/grantRevocation.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EAErB,MAAM,mBAAmB,CAAA;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AM,IAAI,GAAY,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;IAC7C,OAAO,IAAI,KAAK,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAE,IAAc,CAAC,CAAC,CAAC,SAAS,CAAA;AAChF,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAW;IAC1C,IAAI,CAAC;QACH,mBAAmB,CAAC,EAAE,GAAG,EAAE,CAAC,CAAA;QAC5B,OAAO,IAAI,CAAA;IACb,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAA;IACd,CAAC;AACH,CAAC"}
@@ -49,7 +49,9 @@
49
49
  export { attributeLadderInventory, attributeLadderRung, clientAnnexRung, clientAnnexRungSeed, generateLadderSeed, LADDER_MAX_SCAN, LadderAttributionError, ladderRung, ladderRungSeed, ladderVmKeyMultibase, ladderVmSeed } from './ladder.js';
50
50
  export type { LadderRung, LadderRungState, LadderStandingInventory } from './ladder.js';
51
51
  export { assertGenerationId, clampGrantExpires, CLIENT_ANNEX_SPACE_TYPE, clientAnnexDidParts, clientAnnexLogStore, ClientAnnexRungUncommittedError, commitClientAnnexRung, createClientAnnexLog, DELEGATED_CLIENTS_DELEGATION_ACTIONS, DELEGATED_CLIENTS_DELEGATION_TTL_MS, DELEGATED_CLIENTS_SERVICE_TYPE, delegatedClientsDelegationMinter, delegatedClientsDelegationSpaceId, delegatedClientsPointer, delegatedClientsServiceEntry, delegatedClientsSpaceHistory, embeddedGenerationDelegation, enrollClientAnnexTransientClient, enrollTransientClient, ensureClientAnnexSpace, ensureGenerationDelegationCurrent, GENERATION_DELEGATION_ACTIONS, GENERATION_DELEGATION_SERVICE_TYPE, GENERATION_DELEGATION_TTL_MS, GENERATION_ID_PREFIX, generationDelegationHistory, generationDelegationServiceEntry, mintClientAnnexGeneration, mintCredentialClientAnnexGeneration, mintDelegatedClientsDelegation, mintGenerationDelegation, mintGenerationId, mintPointedClientAnnexGeneration, readClientAnnexLogOrAbsent, retireClientAnnexRung, revokeTreatingAlreadyRevokedAsSuccess, servicesPointedAtClientAnnex, setDelegatedClientsPointer, setDelegatedClientsPointerOnce } from './log.js';
52
- export type { ClientAnnexWriteStore, PointerEntryOutcome } from './log.js';
52
+ export type { ClientAnnexWriteStore, PointerEntryOutcome, RevokeGenerationDelegationOutcome } from './log.js';
53
+ export { classifyGrantRevocationRefusal, embeddedParentCapability, isClientAnnexDid, revokeRecordedGrant } from './grantRevocation.js';
54
+ export type { AccountSignerCheck, GrantRevocationOutcome, GrantRevocationRefusal } from './grantRevocation.js';
53
55
  export { clientAnnexGcDue, delegatedClientsPointerEstablishedAt, GENERATION_GC_PERIOD_MS, GENERATION_QUIET_BOUND_MS, GENERATION_QUIET_GRACE_MS, generationQuiet, runClientAnnexGc, swapClientAnnexGeneration } from './gc.js';
54
56
  export type { ClientAnnexGcReport, ClientAnnexGcSwapOutcome, ClientAnnexGenerationSwap } from './gc.js';
55
57
  export { ladderVmAgent, ladderVmSigners, ladderVmZcapClient } from './zcap.js';
@@ -66,7 +68,7 @@ export { ensureRosterDeliveredEpochs } from './rosterDeliveredEpochs.js';
66
68
  export type { RosterDeliveredEpochsResult } from './rosterDeliveredEpochs.js';
67
69
  export { mendCredentialAnchoredAccount } from './mend.js';
68
70
  export type { CredentialAnchoredAccountCore, CredentialAnchoredMendReport, CredentialAnchoredRegistryContext } from './mend.js';
69
- export { BuiltOnHeadNotReachedError, createLadderAnchoredAccountLog, ensureLadderAnchoredDidWebvh, forgetWebvhClient, installLadderVmWebvh, isSoleEnrolledClient, ladderSignedAccountEntry, LastEnrolledClientForgetError, revealLadderRungWebvh, selfEnrollWebvhClient, strikeLadderVmWebvh } from './ladderAnchored.js';
71
+ export { BuiltOnHeadNotReachedError, createLadderAnchoredAccountLog, ensureLadderAnchoredDidWebvh, forgetWebvhClient, installLadderVmWebvh, ladderSignedAccountEntry, LastEnrolledClientForgetError, revealLadderRungWebvh, selfEnrollWebvhClient, strikeLadderVmWebvh } from './ladderAnchored.js';
70
72
  export type { LadderSignedEntry, LadderSignedEntryOutcome } from './ladderAnchored.js';
71
73
  export { signAccountEntry } from '../webvh/accountEntry.js';
72
74
  export type { AccountEntryFields, AccountEntryOutcome, AccountLogSigner, AccountLogStore } from '../webvh/accountEntry.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/clientAnnex/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,UAAU,EACV,cAAc,EACd,oBAAoB,EACpB,YAAY,EACb,MAAM,aAAa,CAAA;AACpB,YAAY,EACV,UAAU,EACV,eAAe,EACf,uBAAuB,EACxB,MAAM,aAAa,CAAA;AAEpB,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,EACvB,mBAAmB,EACnB,mBAAmB,EACnB,+BAA+B,EAC/B,qBAAqB,EACrB,oBAAoB,EACpB,oCAAoC,EACpC,mCAAmC,EACnC,8BAA8B,EAC9B,gCAAgC,EAChC,iCAAiC,EACjC,uBAAuB,EACvB,4BAA4B,EAC5B,4BAA4B,EAC5B,4BAA4B,EAC5B,gCAAgC,EAChC,qBAAqB,EACrB,sBAAsB,EACtB,iCAAiC,EACjC,6BAA6B,EAC7B,kCAAkC,EAClC,4BAA4B,EAC5B,oBAAoB,EACpB,2BAA2B,EAC3B,gCAAgC,EAChC,yBAAyB,EACzB,mCAAmC,EACnC,8BAA8B,EAC9B,wBAAwB,EACxB,gBAAgB,EAChB,gCAAgC,EAChC,0BAA0B,EAC1B,qBAAqB,EACrB,qCAAqC,EACrC,4BAA4B,EAC5B,0BAA0B,EAC1B,8BAA8B,EAC/B,MAAM,UAAU,CA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BAA6B,EAC7B,4BAA4B,EAC5B,iCAAiC,EAClC,MAAM,WAAW,CAAA;AAElB,OAAO,EACL,0BAA0B,EAC1B,8BAA8B,EAC9B,4BAA4B,EAC5B,iBAAiB,EACjB,oBAAoB,EACpB,wBAAwB,EACxB,6BAA6B,EAC7B,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EACV,iBAAiB,EACjB,wBAAwB,EACzB,MAAM,qBAAqB,CAAA;AAK5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC3D,YAAY,EACV,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EAChB,MAAM,0BAA0B,CAAA;AAEjC,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AAEtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAClD,YAAY,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AAE7D,OAAO,EACL,wBAAwB,EACxB,qBAAqB,EACtB,MAAM,iBAAiB,CAAA;AACxB,YAAY,EACV,8BAA8B,EAC9B,8BAA8B,EAC/B,MAAM,iBAAiB,CAAA;AAExB,OAAO,EACL,sCAAsC,EACtC,mCAAmC,EACpC,MAAM,gCAAgC,CAAA;AAEvC,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAA;AAOxE,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,EACzB,MAAM,sBAAsB,CAAA;AAO7B,YAAY,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAM7D,YAAY,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAA"}
@@ -48,6 +48,7 @@
48
48
  */
49
49
  export { attributeLadderInventory, attributeLadderRung, clientAnnexRung, clientAnnexRungSeed, generateLadderSeed, LADDER_MAX_SCAN, LadderAttributionError, ladderRung, ladderRungSeed, ladderVmKeyMultibase, ladderVmSeed } from './ladder.js';
50
50
  export { assertGenerationId, clampGrantExpires, CLIENT_ANNEX_SPACE_TYPE, clientAnnexDidParts, clientAnnexLogStore, ClientAnnexRungUncommittedError, commitClientAnnexRung, createClientAnnexLog, DELEGATED_CLIENTS_DELEGATION_ACTIONS, DELEGATED_CLIENTS_DELEGATION_TTL_MS, DELEGATED_CLIENTS_SERVICE_TYPE, delegatedClientsDelegationMinter, delegatedClientsDelegationSpaceId, delegatedClientsPointer, delegatedClientsServiceEntry, delegatedClientsSpaceHistory, embeddedGenerationDelegation, enrollClientAnnexTransientClient, enrollTransientClient, ensureClientAnnexSpace, ensureGenerationDelegationCurrent, GENERATION_DELEGATION_ACTIONS, GENERATION_DELEGATION_SERVICE_TYPE, GENERATION_DELEGATION_TTL_MS, GENERATION_ID_PREFIX, generationDelegationHistory, generationDelegationServiceEntry, mintClientAnnexGeneration, mintCredentialClientAnnexGeneration, mintDelegatedClientsDelegation, mintGenerationDelegation, mintGenerationId, mintPointedClientAnnexGeneration, readClientAnnexLogOrAbsent, retireClientAnnexRung, revokeTreatingAlreadyRevokedAsSuccess, servicesPointedAtClientAnnex, setDelegatedClientsPointer, setDelegatedClientsPointerOnce } from './log.js';
51
+ export { classifyGrantRevocationRefusal, embeddedParentCapability, isClientAnnexDid, revokeRecordedGrant } from './grantRevocation.js';
51
52
  export { clientAnnexGcDue, delegatedClientsPointerEstablishedAt, GENERATION_GC_PERIOD_MS, GENERATION_QUIET_BOUND_MS, GENERATION_QUIET_GRACE_MS, generationQuiet, runClientAnnexGc, swapClientAnnexGeneration } from './gc.js';
52
53
  export { ladderVmAgent, ladderVmSigners, ladderVmZcapClient } from './zcap.js';
53
54
  export { DELETION_ZCAP_TTL_MS, ExpiredParentCapabilityError, mintSpaceRootVerbCapability, mintSpaceVerbCapability } from './spaceCapability.js';
@@ -63,7 +64,7 @@ export { credentialAnchoredStandingFields, ensurePointedClientAnnexGeneration, e
63
64
  export { CONTROLLER_PROMOTION_STAGE, CREDENTIAL_ANCHORED_ESTABLISHMENT_STAGE_ALIASES, CREDENTIAL_ANCHORED_ESTABLISHMENT_STAGES, CREDENTIAL_ANCHORED_GENESIS_STAGES, KMS_AUTHENTICATION_STAGE } from './stages.js';
64
65
  export { ensureRosterDeliveredEpochs } from './rosterDeliveredEpochs.js';
65
66
  export { mendCredentialAnchoredAccount } from './mend.js';
66
- export { BuiltOnHeadNotReachedError, createLadderAnchoredAccountLog, ensureLadderAnchoredDidWebvh, forgetWebvhClient, installLadderVmWebvh, isSoleEnrolledClient, ladderSignedAccountEntry, LastEnrolledClientForgetError, revealLadderRungWebvh, selfEnrollWebvhClient, strikeLadderVmWebvh } from './ladderAnchored.js';
67
+ export { BuiltOnHeadNotReachedError, createLadderAnchoredAccountLog, ensureLadderAnchoredDidWebvh, forgetWebvhClient, installLadderVmWebvh, ladderSignedAccountEntry, LastEnrolledClientForgetError, revealLadderRungWebvh, selfEnrollWebvhClient, strikeLadderVmWebvh } from './ladderAnchored.js';
67
68
  // The account-entry seam, re-exported here beside the ladder ceremonies that
68
69
  // spend it: a caller binding the ladder branch of an account-management
69
70
  // ceremony reaches for both from this subpath.
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/clientAnnex/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,UAAU,EACV,cAAc,EACd,oBAAoB,EACpB,YAAY,EACb,MAAM,aAAa,CAAA;AAOpB,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,EACvB,mBAAmB,EACnB,mBAAmB,EACnB,+BAA+B,EAC/B,qBAAqB,EACrB,oBAAoB,EACpB,oCAAoC,EACpC,mCAAmC,EACnC,8BAA8B,EAC9B,gCAAgC,EAChC,iCAAiC,E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