@interop/wallet-core 0.52.1 → 0.53.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 (114) hide show
  1. package/dist/clientAnnex/forgetLast.d.ts +18 -10
  2. package/dist/clientAnnex/forgetLast.d.ts.map +1 -1
  3. package/dist/clientAnnex/forgetLast.js +29 -9
  4. package/dist/clientAnnex/forgetLast.js.map +1 -1
  5. package/dist/clientAnnex/index.d.ts +1 -1
  6. package/dist/clientAnnex/index.d.ts.map +1 -1
  7. package/dist/clientAnnex/index.js +1 -1
  8. package/dist/clientAnnex/index.js.map +1 -1
  9. package/dist/clientAnnex/ladderAnchored.d.ts +110 -3
  10. package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -1
  11. package/dist/clientAnnex/ladderAnchored.js +151 -9
  12. package/dist/clientAnnex/ladderAnchored.js.map +1 -1
  13. package/dist/clientAnnex/recoveryLadderAnchored.d.ts +11 -0
  14. package/dist/clientAnnex/recoveryLadderAnchored.d.ts.map +1 -1
  15. package/dist/clientAnnex/recoveryLadderAnchored.js +45 -5
  16. package/dist/clientAnnex/recoveryLadderAnchored.js.map +1 -1
  17. package/dist/clientAnnex/selfEnroll.d.ts +61 -2
  18. package/dist/clientAnnex/selfEnroll.d.ts.map +1 -1
  19. package/dist/clientAnnex/selfEnroll.js +72 -8
  20. package/dist/clientAnnex/selfEnroll.js.map +1 -1
  21. package/dist/clients/rosterPolicy.d.ts.map +1 -1
  22. package/dist/clients/rosterPolicy.js +10 -7
  23. package/dist/clients/rosterPolicy.js.map +1 -1
  24. package/dist/descriptors/logSource.d.ts +5 -2
  25. package/dist/descriptors/logSource.d.ts.map +1 -1
  26. package/dist/descriptors/logSource.js +5 -2
  27. package/dist/descriptors/logSource.js.map +1 -1
  28. package/dist/index.d.ts +7 -0
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +6 -0
  31. package/dist/index.js.map +1 -1
  32. package/dist/keys/clientKeyRecord.d.ts +68 -1
  33. package/dist/keys/clientKeyRecord.d.ts.map +1 -1
  34. package/dist/keys/clientKeyRecord.js +155 -20
  35. package/dist/keys/clientKeyRecord.js.map +1 -1
  36. package/dist/keys/index.d.ts +2 -2
  37. package/dist/keys/index.d.ts.map +1 -1
  38. package/dist/keys/index.js +1 -1
  39. package/dist/keys/index.js.map +1 -1
  40. package/dist/keys/rosterLogStore.d.ts.map +1 -1
  41. package/dist/keys/rosterLogStore.js +15 -0
  42. package/dist/keys/rosterLogStore.js.map +1 -1
  43. package/dist/log.d.ts +49 -0
  44. package/dist/log.d.ts.map +1 -0
  45. package/dist/log.js +53 -0
  46. package/dist/log.js.map +1 -0
  47. package/dist/recovery/recoveryDelegation.d.ts +6 -2
  48. package/dist/recovery/recoveryDelegation.d.ts.map +1 -1
  49. package/dist/recovery/recoveryDelegation.js +31 -5
  50. package/dist/recovery/recoveryDelegation.js.map +1 -1
  51. package/dist/recovery/recoveryWebvh.d.ts +63 -4
  52. package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
  53. package/dist/recovery/recoveryWebvh.js +109 -14
  54. package/dist/recovery/recoveryWebvh.js.map +1 -1
  55. package/dist/request/capabilityRequest.d.ts +9 -1
  56. package/dist/request/capabilityRequest.d.ts.map +1 -1
  57. package/dist/request/capabilityRequest.js +13 -2
  58. package/dist/request/capabilityRequest.js.map +1 -1
  59. package/dist/request/classify.d.ts +37 -1
  60. package/dist/request/classify.d.ts.map +1 -1
  61. package/dist/request/classify.js +61 -2
  62. package/dist/request/classify.js.map +1 -1
  63. package/dist/request/ephemeralExchange.d.ts +0 -18
  64. package/dist/request/ephemeralExchange.d.ts.map +1 -1
  65. package/dist/request/ephemeralExchange.js +3 -2
  66. package/dist/request/ephemeralExchange.js.map +1 -1
  67. package/dist/request/interactionUrl.d.ts.map +1 -1
  68. package/dist/request/interactionUrl.js +4 -2
  69. package/dist/request/interactionUrl.js.map +1 -1
  70. package/dist/request/parse.d.ts +0 -10
  71. package/dist/request/parse.d.ts.map +1 -1
  72. package/dist/request/parse.js +15 -1
  73. package/dist/request/parse.js.map +1 -1
  74. package/dist/request/processRequest.d.ts.map +1 -1
  75. package/dist/request/processRequest.js +2 -1
  76. package/dist/request/processRequest.js.map +1 -1
  77. package/dist/request/types.d.ts +23 -2
  78. package/dist/request/types.d.ts.map +1 -1
  79. package/dist/resourceLog/controller.d.ts.map +1 -1
  80. package/dist/resourceLog/controller.js +3 -2
  81. package/dist/resourceLog/controller.js.map +1 -1
  82. package/dist/resourceLog/license.d.ts +17 -3
  83. package/dist/resourceLog/license.d.ts.map +1 -1
  84. package/dist/resourceLog/license.js +24 -2
  85. package/dist/resourceLog/license.js.map +1 -1
  86. package/dist/space/activity.d.ts +48 -1
  87. package/dist/space/activity.d.ts.map +1 -1
  88. package/dist/space/activity.js +52 -4
  89. package/dist/space/activity.js.map +1 -1
  90. package/dist/space/index.d.ts +1 -1
  91. package/dist/space/index.d.ts.map +1 -1
  92. package/dist/space/index.js +1 -1
  93. package/dist/space/index.js.map +1 -1
  94. package/dist/sync/pull.d.ts +0 -22
  95. package/dist/sync/pull.d.ts.map +1 -1
  96. package/dist/sync/pull.js +30 -2
  97. package/dist/sync/pull.js.map +1 -1
  98. package/dist/unlock/index.d.ts +1 -1
  99. package/dist/unlock/index.d.ts.map +1 -1
  100. package/dist/unlock/index.js +1 -1
  101. package/dist/unlock/index.js.map +1 -1
  102. package/dist/unlock/unlockRecord.d.ts +37 -0
  103. package/dist/unlock/unlockRecord.d.ts.map +1 -1
  104. package/dist/unlock/unlockRecord.js +53 -0
  105. package/dist/unlock/unlockRecord.js.map +1 -1
  106. package/dist/webvh/didWebvh.d.ts +30 -0
  107. package/dist/webvh/didWebvh.d.ts.map +1 -1
  108. package/dist/webvh/didWebvh.js +35 -6
  109. package/dist/webvh/didWebvh.js.map +1 -1
  110. package/dist/webvh/index.d.ts +1 -1
  111. package/dist/webvh/index.d.ts.map +1 -1
  112. package/dist/webvh/index.js +1 -1
  113. package/dist/webvh/index.js.map +1 -1
  114. package/package.json +7 -5
package/dist/log.d.ts ADDED
@@ -0,0 +1,49 @@
1
+ /*!
2
+ * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
+ */
4
+ /**
5
+ * The logging seam: the library port of the sibling logging package
6
+ * (decision 0004 in its repo). This module
7
+ * deliberately declares its own `Logger` type rather than importing it
8
+ * (even as a type-only import) from that package, so the published
9
+ * artifact -- the emitted `dist/log.d.ts` included -- carries no reference
10
+ * to its specifier; the mutual-assignability check against the package's
11
+ * own `Logger` type lives in `test/node/log.test.ts` instead. Call sites
12
+ * elsewhere in `src/` still take it as a type-only import where useful
13
+ * (enforced by the eslint `no-restricted-imports` rule); this one file is
14
+ * the stated exception.
15
+ *
16
+ * A consumer that never calls {@link setLogger} keeps a console fallback:
17
+ * same channel and level as a bare `console.*` call, but with a
18
+ * `'[wallet-core]'` prefix and the call's `data` passed as a single
19
+ * trailing argument (present only when supplied). An app wires a real
20
+ * logger once at bootstrap, e.g. `setLogger(createLogger('wc'))`.
21
+ */
22
+ /**
23
+ * The structural logging port every call site in this package logs
24
+ * through. Frozen at four two-arg methods (decision 0004 in the sibling
25
+ * logging package's repo): a static message plus optional structured
26
+ * context, with `data.err` reserved for an Error-ish value.
27
+ */
28
+ export interface Logger {
29
+ debug(msg: string, data?: Record<string, unknown>): void;
30
+ info(msg: string, data?: Record<string, unknown>): void;
31
+ warn(msg: string, data?: Record<string, unknown>): void;
32
+ error(msg: string, data?: Record<string, unknown>): void;
33
+ }
34
+ /**
35
+ * Installs `next` as the logger every call site in this package logs
36
+ * through, and returns the PREVIOUS logger -- so a test (or an app
37
+ * reconfiguring at runtime) can restore it.
38
+ *
39
+ * @param next {Logger}
40
+ * @returns {Logger} the logger that was installed before this call.
41
+ */
42
+ export declare function setLogger(next: Logger): Logger;
43
+ /**
44
+ * The package-wide logger. Each method forwards to whichever logger is
45
+ * currently installed, so call sites bound at import time still observe a
46
+ * later {@link setLogger}.
47
+ */
48
+ export declare const log: Logger;
49
+ //# sourceMappingURL=log.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../src/log.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,MAAM;IACrB,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;IACxD,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;IACvD,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;IACvD,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;CACzD;AAeD;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAI9C;AAED;;;;GAIG;AACH,eAAO,MAAM,GAAG,EAAE,MAKjB,CAAA"}
package/dist/log.js ADDED
@@ -0,0 +1,53 @@
1
+ /*!
2
+ * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
+ */
4
+ /**
5
+ * The logging seam: the library port of the sibling logging package
6
+ * (decision 0004 in its repo). This module
7
+ * deliberately declares its own `Logger` type rather than importing it
8
+ * (even as a type-only import) from that package, so the published
9
+ * artifact -- the emitted `dist/log.d.ts` included -- carries no reference
10
+ * to its specifier; the mutual-assignability check against the package's
11
+ * own `Logger` type lives in `test/node/log.test.ts` instead. Call sites
12
+ * elsewhere in `src/` still take it as a type-only import where useful
13
+ * (enforced by the eslint `no-restricted-imports` rule); this one file is
14
+ * the stated exception.
15
+ *
16
+ * A consumer that never calls {@link setLogger} keeps a console fallback:
17
+ * same channel and level as a bare `console.*` call, but with a
18
+ * `'[wallet-core]'` prefix and the call's `data` passed as a single
19
+ * trailing argument (present only when supplied). An app wires a real
20
+ * logger once at bootstrap, e.g. `setLogger(createLogger('wc'))`.
21
+ */
22
+ const consoleFallback = {
23
+ debug: (msg, data) => console.debug('[wallet-core]', msg, ...(data === undefined ? [] : [data])),
24
+ info: (msg, data) => console.info('[wallet-core]', msg, ...(data === undefined ? [] : [data])),
25
+ warn: (msg, data) => console.warn('[wallet-core]', msg, ...(data === undefined ? [] : [data])),
26
+ error: (msg, data) => console.error('[wallet-core]', msg, ...(data === undefined ? [] : [data]))
27
+ };
28
+ let logger = consoleFallback;
29
+ /**
30
+ * Installs `next` as the logger every call site in this package logs
31
+ * through, and returns the PREVIOUS logger -- so a test (or an app
32
+ * reconfiguring at runtime) can restore it.
33
+ *
34
+ * @param next {Logger}
35
+ * @returns {Logger} the logger that was installed before this call.
36
+ */
37
+ export function setLogger(next) {
38
+ const previous = logger;
39
+ logger = next;
40
+ return previous;
41
+ }
42
+ /**
43
+ * The package-wide logger. Each method forwards to whichever logger is
44
+ * currently installed, so call sites bound at import time still observe a
45
+ * later {@link setLogger}.
46
+ */
47
+ export const log = {
48
+ debug: (msg, data) => logger.debug(msg, data),
49
+ info: (msg, data) => logger.info(msg, data),
50
+ warn: (msg, data) => logger.warn(msg, data),
51
+ error: (msg, data) => logger.error(msg, data)
52
+ };
53
+ //# sourceMappingURL=log.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log.js","sourceRoot":"","sources":["../src/log.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;GAiBG;AAeH,MAAM,eAAe,GAAW;IAC9B,KAAK,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CACnB,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE,GAAG,EAAE,GAAG,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE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IAAI,CAAC,GAAG,EAAE,IAAI,CAAC;IAC3C,KAAK,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC;CAC9C,CAAA"}
@@ -74,14 +74,18 @@ export interface RecoveryDelegationEntry {
74
74
  * flags a recorded sibling the pass could not rebuild because the document
75
75
  * points at no generation, which stays flagged for the health check),
76
76
  * `incomplete-entry` (an entry predating the re-mint fields, skipped until
77
- * the credential is re-bound), or `failed` (the record could not be read,
77
+ * the credential is re-bound), `pending-entry` (the entry's recorded
78
+ * unlock-key members do not match the credential the record at its unlock
79
+ * Space is sealed to -- a passphrase change torn before its retirement; the
80
+ * next passphrase login's repair finishes it, and re-minting here would
81
+ * re-arm the retired credential into the new one's record), or `failed` (the record could not be read,
78
82
  * re-sealed, or re-PUT -- `error` carries the cause). A skipped or failed
79
83
  * entry is named here so no caller can lose it silently.
80
84
  */
81
85
  export interface RecordRemintOutcome {
82
86
  label: string;
83
87
  unlockSpaceId: string;
84
- outcome: 'current' | 'reminted' | 'incomplete-entry' | 'failed';
88
+ outcome: 'current' | 'reminted' | 'incomplete-entry' | 'pending-entry' | 'failed';
85
89
  siblingCarriedVerbatim?: boolean;
86
90
  error?: unknown;
87
91
  }
@@ -1 +1 @@
1
- {"version":3,"file":"recoveryDelegation.d.ts","sourceRoot":"","sources":["../../src/recovery/recoveryDelegation.ts"],"names":[],"mappings":"AA8CA,OAAO,KAAK,EAAoB,KAAK,EAAE,MAAM,8BAA8B,CAAA;AAC3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAKhD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AAKnE,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAExE,OAAO,EACL,oBAAoB,EAGrB,MAAM,0BAA0B,CAAA;AAEjC;;;;;;;;;;;;;GAaG;A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,SAAS,uBAAuB,EACrC,EACA,GAAG,EACH,OAAO,EACP,OAAO,EACP,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,oBAAoB,EACpB,WAAW,EACX,8BAA8B,EAC9B,qBAA0B,EAC1B,GAAgB,EACjB,EAAE;IACD,GAAG,EAAE,oBAAoB,CAAA;IACzB,OAAO,EAAE,KAAK,EAAE,CAAA;IAChB,OAAO,EAAE,cAAc,CAAA;IACvB,gBAAgB,EAAE,MAAM,CAAA;IACxB,UAAU,EAAE,UAAU,CAAA;IACtB,YAAY,EAAE,YAAY,CAAA;IAC1B,oBAAoB,EAAE,CAAC,OAAO,EAAE;QAAE,UAAU,EAAE,KAAK,CAAA;KAAE,KAAK,UAAU,CAAA;IACpE,WAAW,EAAE,CAAC,OAAO,EAAE;QAAE,KAAK,EAAE,KAAK,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACzD,8BAA8B,CAAC,EAAE,CAAC,OAAO,EAAE;QACzC,UAAU,EAAE,MAAM,CAAA;KACnB,KAAK,OAAO,CAAC,KAAK,GAAG,SAAS,CAAC,CAAA;IAChC,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAA;IAChC,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,GAAG,OAAO,CAAC;IACV,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,mBAAmB,EAAE,CAAA;CAChC,CAAC,CAuMD"}
@@ -45,11 +45,12 @@
45
45
  */
46
46
  import { X25519KeyAgreementKey2020 } from '@interop/x25519-key-agreement-key';
47
47
  import { resourcePath, toUrl } from '@interop/was-client/paths';
48
+ import { log } from '../log.js';
48
49
  import { DID_LOG_RESOURCE, ID_COLLECTION } from '../space/collections.js';
49
50
  import { delegationKeyInDocument } from '../webvh/listClients.js';
50
51
  import { vmFragmentOf } from '@interop/vh-resource-log';
51
52
  import { getUnlockKeyringWithCapability, putUnlockKeyringWithCapability } from '../keyring/unlockSpace.js';
52
- import { remintUnlockRecordDelegations } from '../unlock/unlockRecord.js';
53
+ import { remintUnlockRecordDelegations, unlockRecordSealedTo } from '../unlock/unlockRecord.js';
53
54
  import { delegationProofKeyId, STANDING_ZCAP_TTL_MS, zcapExpiring } from '../webvh/standingZcap.js';
54
55
  /**
55
56
  * The recovery delegation's lifetime: the house standing-zcap value
@@ -233,6 +234,29 @@ export async function remintRecoveryDelegations({ doc, entries, pointer, storage
233
234
  spaceId: entry.unlockSpaceId,
234
235
  capability: entry.manageCapability
235
236
  });
237
+ // The pending-shaped guard: the entry's `unlockSpaceId` and
238
+ // `manageCapability` name one credential while its identity members
239
+ // name another -- the state a passphrase change torn before its
240
+ // retirement leaves. Re-minting here would seal a fresh
241
+ // current-client-signed bridge for the OLD credential into the NEW
242
+ // credential's record, re-arming the half-retired credential and
243
+ // bricking the new one's entry paths. Nothing is written; the next
244
+ // passphrase login's repair is the mender.
245
+ if (!unlockRecordSealedTo({
246
+ record: standing,
247
+ keyAgreementKeyMultibase: entry.unlockKeyAgreementKeyMultibase
248
+ })) {
249
+ log.warn('The unlock record at the Space recorded for this entry is ' +
250
+ 'sealed to another credential (a passphrase change torn before ' +
251
+ 'its retirement landed); its delegations are not re-minted', { label: entry.label });
252
+ skipped += 1;
253
+ outcomes.push({
254
+ label: entry.label,
255
+ unlockSpaceId: entry.unlockSpaceId,
256
+ outcome: 'pending-entry'
257
+ });
258
+ continue;
259
+ }
236
260
  const delegation = await delegateLogWrite({
237
261
  zcapClient,
238
262
  pointer,
@@ -253,9 +277,8 @@ export async function remintRecoveryDelegations({ doc, entries, pointer, storage
253
277
  });
254
278
  if (!delegatedClients) {
255
279
  siblingCarriedVerbatim = true;
256
- console.warn(`The account document names no client-annex generation; the ` +
257
- `delegatedClients delegation for "${entry.label}" is carried ` +
258
- 'verbatim.');
280
+ log.warn('The account document names no client-annex generation; the ' +
281
+ 'delegatedClients delegation for this entry is carried verbatim', { label: entry.label });
259
282
  }
260
283
  }
261
284
  // The credential's unlock KAK, public half only -- exactly enough to
@@ -310,7 +333,10 @@ export async function remintRecoveryDelegations({ doc, entries, pointer, storage
310
333
  });
311
334
  }
312
335
  catch (err) {
313
- console.warn(`Could not re-mint the recovery delegation for "${entry.label}":`, err);
336
+ log.warn('Could not re-mint the recovery delegation', {
337
+ label: entry.label,
338
+ err
339
+ });
314
340
  skipped += 1;
315
341
  outcomes.push({
316
342
  label: entry.label,
@@ -1 +1 @@
1
- {"version":3,"file":"recoveryDelegation.js","sourceRoot":"","sources":["../../src/recovery/recoveryDelegation.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAA;AAG7E,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAEvD,OAAO,EACL,8BAA8B,EAC9B,8BAA8B,EAC/B,MAAM,2BAA2B,CAAA;AAElC,OAAO,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAA;AACzE,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,YAAY,EACb,MAAM,0BAA0B,CAAA;AAEjC;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,oBAAoB,CAAA;AAE9D,6EAA6E;AAC7E,2DAA2D;AAC3D,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAE/E;;;;;;;;;;;GAWG;AACH,SAAS,SAAS,CAAC,EAAE,OAAO,EAA+B;IACzD,OAAO,KAAK,CAAC;QACX,SAAS,EAAE,OAAO,CAAC,IAAI;QACv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AAsB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aAC9D,CAAC,CAAA;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,GAAG,CAAC,IAAI,CAAC,2CAA2C,EAAE;gBACpD,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,GAAG;aACJ,CAAC,CAAA;YACF,OAAO,IAAI,CAAC,CAAA;YACZ,QAAQ,CAAC,IAAI,CAAC;gBACZ,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,aAAa,EAAE,KAAK,CAAC,aAAa;gBAClC,OAAO,EAAE,QAAQ;gBACjB,KAAK,EAAE,GAAG;aACX,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;IACD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAA;AACxC,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import type { DIDDoc, DIDLog } from '@interop/did-method-webvh';
2
2
  import type { ClientWebvhUpdateKeys, PublishedWebvhLog, WebvhEnrollmentKeys, WebvhIdStore } from '../webvh/didWebvh.js';
3
+ import type { ResourceLogPinStore } from '@interop/vh-resource-log';
3
4
  /**
4
5
  * The verification-method id a code's key-agreement key publishes under --
5
6
  * the ordinary `<did>#<multibase>` form, indistinguishable by id from any
@@ -46,11 +47,19 @@ export type RecoveryLogStore = Pick<WebvhIdStore, 'getIdResourceRaw' | 'putIdRes
46
47
  * @param options.store {RecoveryLogStore}
47
48
  * @param [options.expectedDid] {string} the account DID the log must resolve
48
49
  * to, where the caller holds one
50
+ * @param [options.pinStore] {ResourceLogPinStore} the caller's chain-head
51
+ * pins; a served log that is a rollback, a fork, or an identity switch
52
+ * against the pinned head is refused (`ResourceLogContinuityError`)
53
+ * @param [options.logId] {string} the account log's pin slot
54
+ * (`accountLogPinId({ spaceId })`); required whenever a `pinStore` is
55
+ * supplied
49
56
  * @returns {Promise<PublishedWebvhLog>}
50
57
  */
51
- export declare function readLogOrThrow({ store, expectedDid }: {
58
+ export declare function readLogOrThrow({ store, expectedDid, pinStore, logId }: {
52
59
  store: RecoveryLogStore;
53
60
  expectedDid?: string;
61
+ pinStore?: ResourceLogPinStore;
62
+ logId?: string;
54
63
  }): Promise<PublishedWebvhLog>;
55
64
  /**
56
65
  * Publishes `did.jsonl` through the narrow recovery seam -- the log only,
@@ -150,11 +159,52 @@ export declare function removeRecoveryKey({ idStore, updateKeys, recovery, expec
150
159
  * holds them and can sign the add entry)
151
160
  * @param options.replacement {RecoveryPublicKeys} the replacement code's
152
161
  * public halves, committed and published in the same continuation
162
+ * @param options.onCommitted {function}
163
+ * `(committed: { builtOnHead: { scid, versionId } }) => Promise<void>` --
164
+ * the REQUIRED persist-before-publish seam. It runs once per attempt, after
165
+ * the reveal-and-commit entry stands (published here, or standing from a
166
+ * torn earlier run) and BEFORE the add-and-retire entry -- the ceremony's
167
+ * pivot -- is built. The caller durably persists the successor material
168
+ * there (the `pending` codec group of `keys/clientKeyRecord.ts`: ceremony
169
+ * `'recovery-spend'`, the handed-back `builtOnHead`, the spent code's
170
+ * unwrap key, the replacement code's bytes), so the pivot can never retire
171
+ * the spent code while its successors exist only in tab memory, per the
172
+ * post-pivot derivability rule (`decisions/0010`). Unlike the transient
173
+ * continuation's seam it returns nothing into the entry: the durable spend
174
+ * has no annex pointer to move. A throw propagates and the add-and-retire
175
+ * entry is withheld -- the code stays unspent, and a re-run with the same
176
+ * code converges. The seam must be idempotent: the conflict retry invokes
177
+ * it again. The caveat to hold on to: the idempotent COMPLETED branch (the
178
+ * new client's update key already authorized) returns without ever
179
+ * entering the seam. A re-run after a tear here MUST pass the SAME
180
+ * `replacement` halves back in, re-derived from the persisted replacement
181
+ * code's bytes -- the reveal entry already committed that code's update-key
182
+ * hash, and a re-run minting a fresh replacement would leave the first
183
+ * one's commitment standing forever with no `keyAgreement` method behind
184
+ * it: a code the commitment check accepts but that decrypts nothing. With
185
+ * the halves reused, the only residue of a torn or abandoned run is the
186
+ * never-published CLIENT's committed hashes, inert orphans in
187
+ * `nextKeyHashes` exactly as on the self-enrollment seam (keys of a lost
188
+ * random seed; nothing can reveal them)
153
189
  * @param [options.expectedDid] {string} the account DID the log must resolve
154
190
  * to, where the recovering flow already knows it
155
- * @returns {Promise<{ did: string, webDoc?: object }>} the account DID and,
156
- * when the add entry ran here, the final `did.json` projection for the
157
- * recovered session to republish
191
+ * @param [options.pinStore] {ResourceLogPinStore} this caller's chain-head
192
+ * pins; every read both entries are built on is checked against the pinned
193
+ * head (a served prefix is refused before the reveal entry lands, not only
194
+ * by a verify that follows both entries), and the pin advances to each
195
+ * entry as it publishes
196
+ * @param [options.logId] {string} the account log's pin slot
197
+ * (`accountLogPinId({ spaceId })`); required whenever a `pinStore` is
198
+ * supplied
199
+ * @returns {Promise<{ did: string, webDoc?: object, committed: boolean }>}
200
+ * the account DID, the final `did.json` projection when the add-and-retire
201
+ * entry ran here, and `committed` -- whether THIS call published the pivot
202
+ * entry (`false` exactly on the idempotent completed branch, where a torn
203
+ * earlier run had already published it). It is an observability signal, not
204
+ * a success flag: a returning call means the continuation stands either
205
+ * way, so a caller clears its pending state on the RETURN, whatever
206
+ * `committed` says. Its absence from a return value is a build skew, which
207
+ * is why it is stated rather than inferred
158
208
  */
159
209
  export declare function recoverWebvhClient(options: {
160
210
  store: RecoveryLogStore;
@@ -164,9 +214,18 @@ export declare function recoverWebvhClient(options: {
164
214
  newClientKeys: WebvhEnrollmentKeys;
165
215
  newClientUpdateSeeds: ClientWebvhUpdateKeys;
166
216
  replacement: RecoveryPublicKeys;
217
+ onCommitted: (committed: {
218
+ builtOnHead: {
219
+ scid: string;
220
+ versionId: string;
221
+ };
222
+ }) => Promise<void>;
167
223
  expectedDid?: string;
224
+ pinStore?: ResourceLogPinStore;
225
+ logId?: string;
168
226
  }): Promise<{
169
227
  did: string;
170
228
  webDoc?: object;
229
+ committed: boolean;
171
230
  }>;
172
231
  //# sourceMappingURL=recoveryWebvh.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"recoveryWeb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MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,mBAAmB,CAAA;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,OAAO,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAE,CAAC,CAmBhE"}
@@ -34,7 +34,7 @@
34
34
  * with the same key material converges without forking the log.
35
35
  */
36
36
  import { deriveNextKeyHash, updateDID } from '@interop/did-method-webvh';
37
- import { assertCarryOverCommitments, markedVerificationMethodPair, MULTIKEY_VM_TYPE, putLogResource, readPublishedLog, relationIds, updateKeySigner, withLogConflictRetry } from '../webvh/didWebvh.js';
37
+ import { assertCanonicalClientKeys, assertCarryOverCommitments, markedVerificationMethodPair, MULTIKEY_VM_TYPE, pinOfLog, putLogResource, readPublishedLog, relationIds, servedHead, updateKeySigner, withLogConflictRetry } from '../webvh/didWebvh.js';
38
38
  import { publishUnlockKey, removeUnlockKey } from '../unlock/standingWebvh.js';
39
39
  /**
40
40
  * The verification-method id a code's key-agreement key publishes under --
@@ -70,13 +70,21 @@ export class RecoveryKeyNotCommittedError extends Error {
70
70
  * @param options.store {RecoveryLogStore}
71
71
  * @param [options.expectedDid] {string} the account DID the log must resolve
72
72
  * to, where the caller holds one
73
+ * @param [options.pinStore] {ResourceLogPinStore} the caller's chain-head
74
+ * pins; a served log that is a rollback, a fork, or an identity switch
75
+ * against the pinned head is refused (`ResourceLogContinuityError`)
76
+ * @param [options.logId] {string} the account log's pin slot
77
+ * (`accountLogPinId({ spaceId })`); required whenever a `pinStore` is
78
+ * supplied
73
79
  * @returns {Promise<PublishedWebvhLog>}
74
80
  */
75
- export async function readLogOrThrow({ store, expectedDid }) {
81
+ export async function readLogOrThrow({ store, expectedDid, pinStore, logId }) {
76
82
  // readPublishedLog only calls getIdResourceRaw, so the narrow seam is safe.
77
83
  const published = await readPublishedLog({
78
84
  idStore: store,
79
- ...(expectedDid !== undefined ? { expectedDid } : {})
85
+ ...(expectedDid !== undefined ? { expectedDid } : {}),
86
+ ...(pinStore ? { pinStore } : {}),
87
+ ...(logId !== undefined ? { logId } : {})
80
88
  });
81
89
  if (!published) {
82
90
  throw new Error('did:webvh: did.jsonl is missing; nothing to recover.');
@@ -187,30 +195,96 @@ export async function removeRecoveryKey({ idStore, updateKeys, recovery, expecte
187
195
  * holds them and can sign the add entry)
188
196
  * @param options.replacement {RecoveryPublicKeys} the replacement code's
189
197
  * public halves, committed and published in the same continuation
198
+ * @param options.onCommitted {function}
199
+ * `(committed: { builtOnHead: { scid, versionId } }) => Promise<void>` --
200
+ * the REQUIRED persist-before-publish seam. It runs once per attempt, after
201
+ * the reveal-and-commit entry stands (published here, or standing from a
202
+ * torn earlier run) and BEFORE the add-and-retire entry -- the ceremony's
203
+ * pivot -- is built. The caller durably persists the successor material
204
+ * there (the `pending` codec group of `keys/clientKeyRecord.ts`: ceremony
205
+ * `'recovery-spend'`, the handed-back `builtOnHead`, the spent code's
206
+ * unwrap key, the replacement code's bytes), so the pivot can never retire
207
+ * the spent code while its successors exist only in tab memory, per the
208
+ * post-pivot derivability rule (`decisions/0010`). Unlike the transient
209
+ * continuation's seam it returns nothing into the entry: the durable spend
210
+ * has no annex pointer to move. A throw propagates and the add-and-retire
211
+ * entry is withheld -- the code stays unspent, and a re-run with the same
212
+ * code converges. The seam must be idempotent: the conflict retry invokes
213
+ * it again. The caveat to hold on to: the idempotent COMPLETED branch (the
214
+ * new client's update key already authorized) returns without ever
215
+ * entering the seam. A re-run after a tear here MUST pass the SAME
216
+ * `replacement` halves back in, re-derived from the persisted replacement
217
+ * code's bytes -- the reveal entry already committed that code's update-key
218
+ * hash, and a re-run minting a fresh replacement would leave the first
219
+ * one's commitment standing forever with no `keyAgreement` method behind
220
+ * it: a code the commitment check accepts but that decrypts nothing. With
221
+ * the halves reused, the only residue of a torn or abandoned run is the
222
+ * never-published CLIENT's committed hashes, inert orphans in
223
+ * `nextKeyHashes` exactly as on the self-enrollment seam (keys of a lost
224
+ * random seed; nothing can reveal them)
190
225
  * @param [options.expectedDid] {string} the account DID the log must resolve
191
226
  * to, where the recovering flow already knows it
192
- * @returns {Promise<{ did: string, webDoc?: object }>} the account DID and,
193
- * when the add entry ran here, the final `did.json` projection for the
194
- * recovered session to republish
227
+ * @param [options.pinStore] {ResourceLogPinStore} this caller's chain-head
228
+ * pins; every read both entries are built on is checked against the pinned
229
+ * head (a served prefix is refused before the reveal entry lands, not only
230
+ * by a verify that follows both entries), and the pin advances to each
231
+ * entry as it publishes
232
+ * @param [options.logId] {string} the account log's pin slot
233
+ * (`accountLogPinId({ spaceId })`); required whenever a `pinStore` is
234
+ * supplied
235
+ * @returns {Promise<{ did: string, webDoc?: object, committed: boolean }>}
236
+ * the account DID, the final `did.json` projection when the add-and-retire
237
+ * entry ran here, and `committed` -- whether THIS call published the pivot
238
+ * entry (`false` exactly on the idempotent completed branch, where a torn
239
+ * earlier run had already published it). It is an observability signal, not
240
+ * a success flag: a returning call means the continuation stands either
241
+ * way, so a caller clears its pending state on the RETURN, whatever
242
+ * `committed` says. Its absence from a return value is a build skew, which
243
+ * is why it is stated rather than inferred
195
244
  */
196
245
  export async function recoverWebvhClient(options) {
246
+ // The seam is what makes the successor material durable before the pivot
247
+ // entry retires the spent code; a call omitting it would silently keep the
248
+ // window in which the document names successors nothing can re-derive.
249
+ // Refused before any read, so nothing is published.
250
+ if (typeof options.onCommitted !== 'function') {
251
+ throw new TypeError('recoverWebvhClient requires onCommitted: the successor material must ' +
252
+ 'be persisted before the add-and-retire entry retires the spent code.');
253
+ }
254
+ // A non-canonical pair could only ever throw at the add-and-retire build,
255
+ // AFTER the reveal entry published and the seam persisted; refused here, it
256
+ // costs nothing durable.
257
+ assertCanonicalClientKeys({
258
+ signingKeyMultibase: options.newClientKeys.signingKeyMultibase,
259
+ keyAgreementKeyMultibase: options.newClientKeys.keyAgreementKeyMultibase
260
+ });
197
261
  return withLogConflictRetry(() => recoverWebvhClientOnce(options));
198
262
  }
199
263
  /**
200
264
  * One attempt of {@link recoverWebvhClient}, re-invoked by the conflict retry.
201
265
  *
202
266
  * @param options {object} see {@link recoverWebvhClient}
203
- * @returns {Promise<{ did: string, webDoc?: object }>}
267
+ * @returns {Promise<{ did: string, webDoc?: object, committed: boolean }>}
204
268
  */
205
- async function recoverWebvhClientOnce({ store, recovery, newClientKeys, newClientUpdateSeeds, replacement, expectedDid }) {
269
+ async function recoverWebvhClientOnce({ store, recovery, newClientKeys, newClientUpdateSeeds, replacement, onCommitted, expectedDid, pinStore, logId }) {
270
+ // Each attempt's own read is what the CAS publish is built on, so the
271
+ // continuity check runs here -- and again on a conflict-retry re-run -- not
272
+ // only on the verify that follows both entries.
273
+ const pinned = {
274
+ ...(pinStore ? { pinStore } : {}),
275
+ ...(logId !== undefined ? { logId } : {})
276
+ };
206
277
  let published = await readLogOrThrow({
207
278
  store,
208
- ...(expectedDid !== undefined ? { expectedDid } : {})
279
+ ...(expectedDid !== undefined ? { expectedDid } : {}),
280
+ ...pinned
209
281
  });
210
282
  // Already complete (a torn earlier run finished the add entry): the new
211
- // client's update key is authorized, which only the add entry writes.
283
+ // client's update key is authorized, which only the add entry writes. The
284
+ // seam is deliberately NOT entered here -- nothing is about to be
285
+ // published, so there is no pivot to persist ahead of.
212
286
  if (published.updateKeys.includes(newClientKeys.updateKeyMultibase)) {
213
- return { did: published.did };
287
+ return { did: published.did, committed: false };
214
288
  }
215
289
  const recoveryHash = await deriveNextKeyHash(recovery.updateKeyMultibase);
216
290
  const newUpdateHash = await deriveNextKeyHash(newClientKeys.updateKeyMultibase);
@@ -251,9 +325,25 @@ async function recoverWebvhClientOnce({ store, recovery, newClientKeys, newClien
251
325
  log: updated.log,
252
326
  ifMatch: published.etag
253
327
  });
254
- // The same account the reveal entry just extended.
255
- published = await readLogOrThrow({ store, expectedDid: published.did });
328
+ // Advance the pin to what the reveal entry just published, so the re-read
329
+ // below (and any read after a tear here) refuses a host that rolls the
330
+ // log back behind it.
331
+ if (pinStore && logId !== undefined) {
332
+ await pinStore.write({ logId, pin: pinOfLog(updated.log) });
333
+ }
334
+ // The same account the reveal entry just extended, under the same pin.
335
+ published = await readLogOrThrow({
336
+ store,
337
+ expectedDid: published.did,
338
+ ...pinned
339
+ });
256
340
  }
341
+ // The persist-before-publish seam: the successor material becomes durable
342
+ // HERE, on the head the add-and-retire entry is about to be built on,
343
+ // before that entry -- the ceremony's pivot -- retires the spent code.
344
+ // Reached on both paths into the add entry: the reveal entry just published
345
+ // above, or a torn earlier run's reveal entry standing already.
346
+ await onCommitted({ builtOnHead: servedHead(published.log) });
257
347
  // The add-and-retire entry: the new client's verification methods and
258
348
  // update key in; the spent code's VM, update key, and hash out; the
259
349
  // replacement code's VM in. Signed by the new client's update key, whose
@@ -327,6 +417,11 @@ async function recoverWebvhClientOnce({ store, recovery, newClientKeys, newClien
327
417
  // Conditional on the read this entry was built on: the re-read above when
328
418
  // the commit entry ran here, the first read when it was skipped.
329
419
  await publishLogOnly({ store, log: updated.log, ifMatch: published.etag });
330
- return { did: updated.did, webDoc: updated.webDoc };
420
+ // Advance the pin to what this entry just published, so a host rolling the
421
+ // log back straight afterwards is refused on the next read.
422
+ if (pinStore && logId !== undefined) {
423
+ await pinStore.write({ logId, pin: pinOfLog(updated.log) });
424
+ }
425
+ return { did: updated.did, webDoc: updated.webDoc, committed: true };
331
426
  }
332
427
  //# sourceMappingURL=recoveryWebvh.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"recoveryWebvh.js","sourceRoot":"","sources":["../../src/recovery/recoveryWebvh.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAMxE,OAAO,EACL,0BAA0B,EAC1B,4BAA4B,EAC5B,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,eAAe,EACf,o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AAC,EAAE,KAAK,EAAE,GAAG,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;IAC7D,CAAC;IACD,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,CAAA;AACtE,CAAC"}
@@ -24,10 +24,18 @@ import type { ICapabilityQueryDetail, IVPRDetails } from './types.js';
24
24
  * @param options.capabilityQueries {ICapabilityQueryDetail[]}
25
25
  * @param [options.challenge] {string} a requester-chosen nonce the wallet
26
26
  * echoes in its response presentation
27
+ * @param [options.agent] {{ name: string }} the requester's self-declared
28
+ * display name, carried as the VPR's root `agent` member; shown at consent
29
+ * as what the agent calls itself, never as verified identity. Validated by
30
+ * `normalizeAgentName` (trimmed, 1 to 64 characters, no control
31
+ * characters), so a name the wallet would refuse fails here first.
27
32
  * @returns {IVPRDetails}
28
33
  */
29
- export declare function composeCapabilityRequest({ capabilityQueries, challenge }: {
34
+ export declare function composeCapabilityRequest({ capabilityQueries, challenge, agent }: {
30
35
  capabilityQueries: ICapabilityQueryDetail[];
31
36
  challenge?: string;
37
+ agent?: {
38
+ name: string;
39
+ };
32
40
  }): IVPRDetails;
33
41
  //# sourceMappingURL=capabilityRequest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"capabilityRequest.d.ts","sourceRoot":"","sources":["../../src/request/capabilityRequest.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EACV,sBAAsB,EACtB,WAAW,EAGZ,MAAM,YAAY,CAAA;AAEnB;;;;;;;;;;;;GAYG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,iBAAiB,EACjB,SAAS,EACV,EAAE;IACD,iBAAiB,EAAE,sBAAsB,EAAE,CAAA;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,GAAG,WAAW,CAsBd"}
1
+ {"version":3,"file":"capabilityRequest.d.ts","sourceRoot":"","sources":["../../src/request/capabilityRequest.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EACV,sBAAsB,EACtB,WAAW,EAGZ,MAAM,YAAY,CAAA;AAGnB;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,iBAAiB,EACjB,SAAS,EACT,KAAK,EACN,EAAE;IACD,iBAAiB,EAAE,sBAAsB,EAAE,CAAA;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CACzB,GAAG,WAAW,CA2Bd"}