@interop/wallet-core 0.49.0 → 0.50.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 (160) hide show
  1. package/README.md +5 -2
  2. package/dist/clientAnnex/credentialAnchoredGenesis.d.ts +118 -0
  3. package/dist/clientAnnex/credentialAnchoredGenesis.d.ts.map +1 -0
  4. package/dist/clientAnnex/credentialAnchoredGenesis.js +174 -0
  5. package/dist/clientAnnex/credentialAnchoredGenesis.js.map +1 -0
  6. package/dist/clientAnnex/forget.d.ts +138 -0
  7. package/dist/clientAnnex/forget.d.ts.map +1 -0
  8. package/dist/clientAnnex/forget.js +133 -0
  9. package/dist/clientAnnex/forget.js.map +1 -0
  10. package/dist/clientAnnex/forgetLast.d.ts +267 -0
  11. package/dist/clientAnnex/forgetLast.d.ts.map +1 -0
  12. package/dist/clientAnnex/forgetLast.js +374 -0
  13. package/dist/clientAnnex/forgetLast.js.map +1 -0
  14. package/dist/{webvh/companionGc.d.ts → clientAnnex/gc.d.ts} +50 -16
  15. package/dist/clientAnnex/gc.d.ts.map +1 -0
  16. package/dist/{webvh/companionGc.js → clientAnnex/gc.js} +103 -71
  17. package/dist/clientAnnex/gc.js.map +1 -0
  18. package/dist/clientAnnex/index.d.ts +60 -0
  19. package/dist/clientAnnex/index.d.ts.map +1 -0
  20. package/dist/clientAnnex/index.js +60 -0
  21. package/dist/clientAnnex/index.js.map +1 -0
  22. package/dist/{unlock → clientAnnex}/ladder.d.ts +89 -15
  23. package/dist/clientAnnex/ladder.d.ts.map +1 -0
  24. package/dist/clientAnnex/ladder.js +474 -0
  25. package/dist/clientAnnex/ladder.js.map +1 -0
  26. package/dist/clientAnnex/ladderAnchored.d.ts +276 -0
  27. package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -0
  28. package/dist/clientAnnex/ladderAnchored.js +631 -0
  29. package/dist/clientAnnex/ladderAnchored.js.map +1 -0
  30. package/dist/{webvh/companion.d.ts → clientAnnex/log.d.ts} +333 -119
  31. package/dist/clientAnnex/log.d.ts.map +1 -0
  32. package/dist/{webvh/companion.js → clientAnnex/log.js} +583 -199
  33. package/dist/clientAnnex/log.js.map +1 -0
  34. package/dist/clientAnnex/recoveryLadderAnchored.d.ts +103 -0
  35. package/dist/clientAnnex/recoveryLadderAnchored.d.ts.map +1 -0
  36. package/dist/clientAnnex/recoveryLadderAnchored.js +263 -0
  37. package/dist/clientAnnex/recoveryLadderAnchored.js.map +1 -0
  38. package/dist/{unlock → clientAnnex}/selfEnroll.d.ts +1 -1
  39. package/dist/clientAnnex/selfEnroll.d.ts.map +1 -0
  40. package/dist/{unlock → clientAnnex}/selfEnroll.js +1 -1
  41. package/dist/clientAnnex/selfEnroll.js.map +1 -0
  42. package/dist/clientAnnex/zcap.d.ts +49 -0
  43. package/dist/clientAnnex/zcap.d.ts.map +1 -0
  44. package/dist/clientAnnex/zcap.js +101 -0
  45. package/dist/clientAnnex/zcap.js.map +1 -0
  46. package/dist/clients/index.d.ts +9 -6
  47. package/dist/clients/index.d.ts.map +1 -1
  48. package/dist/clients/index.js +8 -5
  49. package/dist/clients/index.js.map +1 -1
  50. package/dist/clients/listing.d.ts +32 -0
  51. package/dist/clients/listing.d.ts.map +1 -1
  52. package/dist/clients/listing.js +47 -1
  53. package/dist/clients/listing.js.map +1 -1
  54. package/dist/clients/revocation.d.ts +33 -1
  55. package/dist/clients/revocation.d.ts.map +1 -1
  56. package/dist/clients/revocation.js +16 -4
  57. package/dist/clients/revocation.js.map +1 -1
  58. package/dist/enrollment/index.d.ts +6 -4
  59. package/dist/enrollment/index.d.ts.map +1 -1
  60. package/dist/enrollment/index.js +6 -4
  61. package/dist/enrollment/index.js.map +1 -1
  62. package/dist/enrollment/onboardingInvite.d.ts +5 -88
  63. package/dist/enrollment/onboardingInvite.d.ts.map +1 -1
  64. package/dist/enrollment/onboardingInvite.js +5 -168
  65. package/dist/enrollment/onboardingInvite.js.map +1 -1
  66. package/dist/genesis/index.d.ts +5 -0
  67. package/dist/genesis/index.d.ts.map +1 -1
  68. package/dist/genesis/index.js +5 -0
  69. package/dist/genesis/index.js.map +1 -1
  70. package/dist/keys/index.d.ts +1 -1
  71. package/dist/keys/index.d.ts.map +1 -1
  72. package/dist/keys/index.js +1 -1
  73. package/dist/keys/index.js.map +1 -1
  74. package/dist/keys/spaceEpochs.d.ts +7 -2
  75. package/dist/keys/spaceEpochs.d.ts.map +1 -1
  76. package/dist/keys/spaceEpochs.js +8 -2
  77. package/dist/keys/spaceEpochs.js.map +1 -1
  78. package/dist/keys/userKeyRoster.d.ts +39 -0
  79. package/dist/keys/userKeyRoster.d.ts.map +1 -1
  80. package/dist/keys/userKeyRoster.js +43 -1
  81. package/dist/keys/userKeyRoster.js.map +1 -1
  82. package/dist/recovery/index.d.ts +5 -3
  83. package/dist/recovery/index.d.ts.map +1 -1
  84. package/dist/recovery/index.js +4 -2
  85. package/dist/recovery/index.js.map +1 -1
  86. package/dist/recovery/recoveryDelegation.d.ts +35 -12
  87. package/dist/recovery/recoveryDelegation.d.ts.map +1 -1
  88. package/dist/recovery/recoveryDelegation.js +84 -86
  89. package/dist/recovery/recoveryDelegation.js.map +1 -1
  90. package/dist/recovery/recoveryWebvh.d.ts +32 -1
  91. package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
  92. package/dist/recovery/recoveryWebvh.js +2 -2
  93. package/dist/recovery/recoveryWebvh.js.map +1 -1
  94. package/dist/request/capabilityRequest.d.ts +33 -0
  95. package/dist/request/capabilityRequest.d.ts.map +1 -0
  96. package/dist/request/capabilityRequest.js +35 -0
  97. package/dist/request/capabilityRequest.js.map +1 -0
  98. package/dist/request/ephemeralExchange.d.ts +118 -0
  99. package/dist/request/ephemeralExchange.d.ts.map +1 -0
  100. package/dist/request/ephemeralExchange.js +224 -0
  101. package/dist/request/ephemeralExchange.js.map +1 -0
  102. package/dist/request/index.d.ts +6 -0
  103. package/dist/request/index.d.ts.map +1 -1
  104. package/dist/request/index.js +6 -0
  105. package/dist/request/index.js.map +1 -1
  106. package/dist/space/activity.d.ts +2 -2
  107. package/dist/space/activity.js +3 -3
  108. package/dist/space/activity.js.map +1 -1
  109. package/dist/unlock/index.d.ts +11 -23
  110. package/dist/unlock/index.d.ts.map +1 -1
  111. package/dist/unlock/index.js +10 -21
  112. package/dist/unlock/index.js.map +1 -1
  113. package/dist/unlock/retire.d.ts +47 -3
  114. package/dist/unlock/retire.d.ts.map +1 -1
  115. package/dist/unlock/retire.js +21 -5
  116. package/dist/unlock/retire.js.map +1 -1
  117. package/dist/unlock/standingWebvh.d.ts +37 -82
  118. package/dist/unlock/standingWebvh.d.ts.map +1 -1
  119. package/dist/unlock/standingWebvh.js +64 -247
  120. package/dist/unlock/standingWebvh.js.map +1 -1
  121. package/dist/unlock/unlockRecord.d.ts +13 -6
  122. package/dist/unlock/unlockRecord.d.ts.map +1 -1
  123. package/dist/unlock/unlockRecord.js +14 -8
  124. package/dist/unlock/unlockRecord.js.map +1 -1
  125. package/dist/webvh/delegatedLogStore.d.ts +5 -5
  126. package/dist/webvh/delegatedLogStore.js +1 -1
  127. package/dist/webvh/didWebvh.d.ts +19 -9
  128. package/dist/webvh/didWebvh.d.ts.map +1 -1
  129. package/dist/webvh/didWebvh.js +16 -16
  130. package/dist/webvh/didWebvh.js.map +1 -1
  131. package/dist/webvh/index.d.ts +9 -25
  132. package/dist/webvh/index.d.ts.map +1 -1
  133. package/dist/webvh/index.js +9 -23
  134. package/dist/webvh/index.js.map +1 -1
  135. package/dist/webvh/revokeClient.d.ts +77 -5
  136. package/dist/webvh/revokeClient.d.ts.map +1 -1
  137. package/dist/webvh/revokeClient.js +154 -61
  138. package/dist/webvh/revokeClient.js.map +1 -1
  139. package/dist/webvh/standingZcap.d.ts +11 -1
  140. package/dist/webvh/standingZcap.d.ts.map +1 -1
  141. package/dist/webvh/standingZcap.js +13 -14
  142. package/dist/webvh/standingZcap.js.map +1 -1
  143. package/dist/webvh/wasIdStore.d.ts +13 -7
  144. package/dist/webvh/wasIdStore.d.ts.map +1 -1
  145. package/dist/webvh/wasIdStore.js +8 -4
  146. package/dist/webvh/wasIdStore.js.map +1 -1
  147. package/dist/webvh/zcap.d.ts +0 -24
  148. package/dist/webvh/zcap.d.ts.map +1 -1
  149. package/dist/webvh/zcap.js +0 -42
  150. package/dist/webvh/zcap.js.map +1 -1
  151. package/package.json +40 -34
  152. package/dist/unlock/ladder.d.ts.map +0 -1
  153. package/dist/unlock/ladder.js +0 -258
  154. package/dist/unlock/ladder.js.map +0 -1
  155. package/dist/unlock/selfEnroll.d.ts.map +0 -1
  156. package/dist/unlock/selfEnroll.js.map +0 -1
  157. package/dist/webvh/companion.d.ts.map +0 -1
  158. package/dist/webvh/companion.js.map +0 -1
  159. package/dist/webvh/companionGc.d.ts.map +0 -1
  160. package/dist/webvh/companionGc.js.map +0 -1
@@ -2,10 +2,9 @@
2
2
  * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
3
  */
4
4
  /**
5
- * The did:webvh half of the standing unlock-credential lifecycle: the split
6
- * posture every unlock method holds under the standing model, and the
7
- * self-enrolling continuation a fresh browser runs with nothing but the
8
- * credential in hand.
5
+ * The did:webvh POSTURE half of the standing unlock-credential lifecycle: the
6
+ * split posture every unlock method holds under the standing model, as one
7
+ * merged add/remove document edit.
9
8
  *
10
9
  * At bind time the document gains the credential's `keyAgreement` entry --
11
10
  * the key verbatim for a high-entropy credential (a passkey PRF output, a
@@ -20,35 +19,19 @@
20
19
  * see them. {@link publishUnlockKey} / {@link removeUnlockKey} are one merged
21
20
  * add/remove pair, shared verbatim by the recovery-code wrappers.
22
21
  *
23
- * Self-enrollment ({@link selfEnrollWebvhClient}) is the recovery
24
- * continuation generalized to a non-spending credential: two entries through
25
- * the record's delegated `did.jsonl` bridge --
26
- *
27
- * 1. **Reveal + commit**: ladder rung `i` joins `updateKeys` (its hash stands
28
- * committed, which is what makes the entry verify) and `nextKeyHashes`
29
- * extends with the new ordinary client's update- and staged-key hashes
30
- * plus `hash(rung i + 1)` -- the credential's next standing commitment.
31
- * 2. **Add + retire the rung**: signed by the new client's update key
32
- * (revealed from the commit), this entry publishes the new client's
33
- * verification methods and update key and drops the spent rung and its
34
- * hash. The credential's own posture -- its `keyAgreement` entry and the
35
- * freshly committed `hash(rung i + 1)` -- stands untouched, ready for the
36
- * next self-enrollment. Nothing is spent, and no replacement exists.
37
- * When the account was CLIENT-LESS ({@link createClientlessAccountLog}),
38
- * the same atomic entry removes the ladder VM from the document and its
39
- * relations -- the transitional key exists only while no durable client
40
- * does, and folding the removal in leaves no window with neither.
41
- *
42
- * Which rung is current is recovered from the log itself
43
- * (`attributeLadderRung`, fail-closed); a lost compare-and-swap race re-runs,
44
- * re-attributes, and climbs to the winner's committed rung -- the
45
- * retry-up-the-ladder resolution. Every stage is idempotent and resumable
46
- * from durable state alone, on the recovery continuation's pattern.
22
+ * The ceremonies that EXERCISE a credential's ladder against the account log
23
+ * -- the ladder-anchored genesis, the self-enrolling continuation, the
24
+ * one-entry forget -- live in `clientAnnex/ladderAnchored.ts`. What stays
25
+ * here is the verify-side half every wallet needs regardless of posture.
47
26
  */
48
27
  import { deriveNextKeyHash, updateDID } from '@interop/did-method-webvh';
49
- import { assertCarryOverCommitments, BYOE_CONTEXT_URL, createClientlessWebvhLog, didWebvhControllerTemplate, genesisNextKeyHashes, markedVerificationMethodPair, MULTIKEY_COMMITMENT_VM_TYPE, MULTIKEY_VM_TYPE, publishUpdatedLog, putLogResource, readPublishedLog, relationIds, updateKeyMultibase, updateKeySigner, withLogConflictRetry } from '../webvh/didWebvh.js';
50
- import { ladderVmIds } from '../webvh/listClients.js';
51
- import { attributeLadderRung, ladderRung, ladderVmKeyMultibase } from './ladder.js';
28
+ import { assertCarryOverCommitments, BYOE_CONTEXT_URL, MULTIKEY_COMMITMENT_VM_TYPE, MULTIKEY_VM_TYPE, publishUpdatedLog, readPublishedLog, relationIds, updateKeyMultibase, updateKeySigner, withLogConflictRetry } from '../webvh/didWebvh.js';
29
+ // The one deliberate base-side dependency on the annex subpath, pinned as an
30
+ // exception in the lint rule: `removeUnlockKey` resolves the retired
31
+ // credential's CURRENT ladder footprint from the log itself (the shared
32
+ // attribution helpers in `clientAnnex/ladder.ts`), never touching the annex
33
+ // log machinery.
34
+ import { attributeLadderPosture } from '../clientAnnex/ladder.js';
52
35
  /**
53
36
  * The verification-method id a credential's key-agreement entry publishes
54
37
  * under: `<did>#<multibase>` for a verbatim key (indistinguishable by id from
@@ -99,58 +82,6 @@ export function unlockKeyVerificationMethod({ did, keyAgreement }) {
99
82
  publicKeyCommitment: keyAgreement.commitment
100
83
  };
101
84
  }
102
- /**
103
- * CLIENT-LESS GENESIS: assembles the one-entry did:webvh log of an account
104
- * with zero enrolled durable clients, anchored on the minting credential's
105
- * ladder alone. Everything derives from the ladder seed: rung 0 is the sole
106
- * `updateKeys` member and signs the entry, `nextKeyHashes` commits rung 0's
107
- * own carry-over hash plus rung 1 (the staged rung) -- the carry-over hash is
108
- * what the first durable self-enrollment's reveal-and-commit entry,
109
- * re-stating `updateKeys` containing rung 0, requires --
110
- * and the ladder VM (the stable sibling) is published under `assertionMethod`
111
- * and `capabilityDelegation` only. The credential's `keyAgreement` posture
112
- * entry is FOLDED INTO GENESIS -- no enrolled client exists to run the
113
- * separate bind entry ({@link publishUnlockKey}) -- so the genesis
114
- * `keyAgreement` array holds only the credential's entry.
115
- *
116
- * The client-less window this opens is closed by the credential's first
117
- * durable self-enrollment ({@link selfEnrollWebvhClient}), whose add entry
118
- * atomically publishes the client, retires rung 0, and removes the ladder VM.
119
- *
120
- * The caller owns publication (conditional, create-only) and the pointer
121
- * write that follows; this assembles and signs the log only.
122
- *
123
- * @param options {object}
124
- * @param options.wasServerUrl {string}
125
- * @param options.spaceId {string}
126
- * @param options.ladderSeed {Uint8Array} the credential's ladder seed
127
- * @param options.keyAgreement {UnlockKeyAgreementPublication} the
128
- * credential's key-agreement publication (commitment or verbatim)
129
- * @returns {Promise<{ log: DIDLog, webDoc: object, did: string }>}
130
- */
131
- export async function createClientlessAccountLog({ wasServerUrl, spaceId, ladderSeed, keyAgreement }) {
132
- const rung0 = await ladderRung({ ladderSeed, index: 0 });
133
- const rung1 = await ladderRung({ ladderSeed, index: 1 });
134
- const controllerTemplate = didWebvhControllerTemplate({
135
- wasServerUrl,
136
- spaceId
137
- });
138
- return createClientlessWebvhLog({
139
- wasServerUrl,
140
- spaceId,
141
- ladderVmKeyMultibase: await ladderVmKeyMultibase({ ladderSeed }),
142
- credentialKeyAgreementMethod: unlockKeyVerificationMethod({
143
- did: controllerTemplate,
144
- keyAgreement
145
- }),
146
- updateKeyPublicKeyMultibase: rung0.keyMultibase,
147
- nextKeyHashes: await genesisNextKeyHashes({
148
- activeKeyMultibase: rung0.keyMultibase,
149
- stagedKeyMultibase: rung1.keyMultibase
150
- }),
151
- signer: await updateKeySigner({ seed: rung0.seed })
152
- });
153
- }
154
85
  /**
155
86
  * Reads and resolves the published log through the narrow store seam.
156
87
  *
@@ -160,7 +91,7 @@ export async function createClientlessAccountLog({ wasServerUrl, spaceId, ladder
160
91
  * to, where the caller holds one
161
92
  * @returns {Promise<PublishedWebvhLog>}
162
93
  */
163
- async function readLogOrThrow({ store, expectedDid }) {
94
+ export async function readLogOrThrow({ store, expectedDid }) {
164
95
  // readPublishedLog only calls getIdResourceRaw, so the narrow seam is safe.
165
96
  const published = await readPublishedLog({
166
97
  idStore: store,
@@ -171,22 +102,6 @@ async function readLogOrThrow({ store, expectedDid }) {
171
102
  }
172
103
  return published;
173
104
  }
174
- /**
175
- * Publishes `did.jsonl` through the narrow seam -- the log only, never
176
- * `did.json` (the bridge delegation covers nothing else; the enrolled session
177
- * republishes the projection once it is the controller). Conditional on the
178
- * read the entry was built on; a lost race surfaces as a
179
- * `WebvhLogConflictError` (the mapping lives in `putLogResource`).
180
- *
181
- * @param options {object}
182
- * @param options.store {UnlockLogStore}
183
- * @param options.log {DIDLog}
184
- * @param [options.ifMatch] {string} publish only if `did.jsonl` is unchanged
185
- * @returns {Promise<void>}
186
- */
187
- async function publishLogOnly({ store, log, ifMatch }) {
188
- await putLogResource({ store, log, ifMatch });
189
- }
190
105
  /**
191
106
  * BIND (run by an enrolled client, root authority): publishes a standing
192
107
  * credential's split posture into the document -- one entry adding the
@@ -217,13 +132,29 @@ export async function publishUnlockKey(options) {
217
132
  }
218
133
  /**
219
134
  * REMOVAL (run by an enrolled client, root authority): removes a standing
220
- * credential's posture from the document -- its `keyAgreement` entry and its
221
- * committed update-key hash -- in one entry. Idempotent. The roster-side half
222
- * (rotating the user key epoch off the credential's wrap) is the caller's,
223
- * and runs after this so the resolver's document no longer backs the removed
224
- * entry.
135
+ * credential's posture from the document -- its `keyAgreement` entry and
136
+ * everything of its ladder that still stands -- in one entry. Idempotent. The
137
+ * roster-side half (rotating the user key epoch off the credential's wrap) is
138
+ * the caller's, and runs after this so the resolver's document no longer
139
+ * backs the removed entry.
140
+ *
141
+ * The recorded `unlockKeys.updateKeyMultibase` is treated as an ANCHOR, not
142
+ * as truth: a credential that has self-enrolled since its bind advanced its
143
+ * standing commitment past the recorded rung, so the removal resolves the
144
+ * ladder's current footprint from the log itself
145
+ * ({@link attributeLadderPosture}) and strikes all of it -- every committed
146
+ * hash the ladder accounts for AND, for a torn self-enrollment, the revealed
147
+ * rung key still sitting in `updateKeys` (plus the never-claimed hashes its
148
+ * reveal entry committed). Trusting the recorded multibase alone would leave
149
+ * the live rung commitment standing: a latent re-seizure credential via the
150
+ * reveal mechanism. A supplied `ladderSeed` strengthens the attribution (every
151
+ * rung known a priori, independent of the anchor's staleness); without it the
152
+ * log walk alone resolves the footprint. For a single-key credential (a
153
+ * recovery code, a never-self-enrolled bind) the resolution degenerates to
154
+ * exactly the recorded key's hash, as before.
225
155
  *
226
- * @param options {object} see {@link publishUnlockKey}
156
+ * @param options {object} see {@link publishUnlockKey}, plus
157
+ * `[ladderSeed]` -- the retired credential's ladder seed, when in hand
227
158
  * @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog }>} see
228
159
  * {@link publishUnlockKey}
229
160
  */
@@ -239,7 +170,7 @@ export async function removeUnlockKey(options) {
239
170
  * @param options {object} see {@link publishUnlockKey}, plus `polarity`
240
171
  * @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog }>}
241
172
  */
242
- async function setUnlockKeyPostureOnce({ idStore, updateKeys, unlockKeys, expectedDid, verb, polarity }) {
173
+ async function setUnlockKeyPostureOnce({ idStore, updateKeys, unlockKeys, ladderSeed, expectedDid, verb, polarity }) {
243
174
  const published = await readLogOrThrow({
244
175
  store: idStore,
245
176
  ...(expectedDid !== undefined ? { expectedDid } : {})
@@ -248,10 +179,26 @@ async function setUnlockKeyPostureOnce({ idStore, updateKeys, unlockKeys, expect
248
179
  const keyHash = await deriveNextKeyHash(unlockKeys.updateKeyMultibase);
249
180
  const vmId = unlockKeyVmId({ did, keyAgreement: unlockKeys.keyAgreement });
250
181
  const vmPresent = (doc.verificationMethod ?? []).some(method => method.id === vmId);
182
+ // The remove polarity strikes the ladder's CURRENT footprint, resolved from
183
+ // the log with the recorded key as anchor -- never just the recorded key's
184
+ // hash, which a self-enrollment since the bind leaves stale (see
185
+ // {@link removeUnlockKey}). The credential's own verification-method id
186
+ // goes along: it is what tells the walk a climb from a spend, so the
187
+ // removal never annexes the commitment a spend handed to its replacement.
188
+ const posture = polarity === 'remove'
189
+ ? await attributeLadderPosture({
190
+ log: published.log,
191
+ anchorKeyMultibase: unlockKeys.updateKeyMultibase,
192
+ credentialVmId: vmId,
193
+ ...(ladderSeed ? { ladderSeed } : {})
194
+ })
195
+ : { revealedKeys: [], committedHashes: [] };
196
+ const removedHashes = new Set(posture.committedHashes);
197
+ const removedKeys = new Set(posture.revealedKeys);
251
198
  const hashCommitted = published.nextKeyHashes.includes(keyHash);
252
199
  const settled = polarity === 'publish'
253
200
  ? vmPresent && hashCommitted
254
- : !vmPresent && !hashCommitted;
201
+ : !vmPresent && removedHashes.size === 0 && removedKeys.size === 0;
255
202
  if (settled) {
256
203
  return { did, doc, log: published.log };
257
204
  }
@@ -266,7 +213,14 @@ async function setUnlockKeyPostureOnce({ idStore, updateKeys, unlockKeys, expect
266
213
  const signer = await updateKeySigner({ seed: updateKeys.updateSeed });
267
214
  const nextKeyHashes = polarity === 'publish'
268
215
  ? [...new Set([...published.nextKeyHashes, keyHash])]
269
- : published.nextKeyHashes.filter(hash => hash !== keyHash);
216
+ : published.nextKeyHashes.filter(hash => !removedHashes.has(hash));
217
+ // A torn self-enrollment leaves a revealed rung in `updateKeys`; the remove
218
+ // polarity strikes it in the same entry as its hash, keeping the carry-over
219
+ // invariant self-consistent. On the publish polarity and the ordinary
220
+ // committed-only removal this is the published set unchanged.
221
+ const statedUpdateKeys = polarity === 'publish'
222
+ ? published.updateKeys
223
+ : published.updateKeys.filter(key => !removedKeys.has(key));
270
224
  const verificationMethods = polarity === 'publish'
271
225
  ? [
272
226
  ...existingMethods.filter(method => method.id !== vmId),
@@ -287,7 +241,7 @@ async function setUnlockKeyPostureOnce({ idStore, updateKeys, unlockKeys, expect
287
241
  // posture publish appends it to the carried-forward context. The append
288
242
  // is deduplicated, so a document already carrying it is unchanged.
289
243
  additionalContext: [BYOE_CONTEXT_URL],
290
- updateKeys: published.updateKeys,
244
+ updateKeys: statedUpdateKeys,
291
245
  nextKeyHashes,
292
246
  verificationMethods,
293
247
  authentication: relationIds(doc.authentication),
@@ -299,141 +253,4 @@ async function setUnlockKeyPostureOnce({ idStore, updateKeys, unlockKeys, expect
299
253
  await publishUpdatedLog({ idStore, updated, ifMatch: published.etag });
300
254
  return { did: updated.did, doc: updated.doc, log: updated.log };
301
255
  }
302
- /**
303
- * SELF-ENROLLMENT (run by the credential-derived client through the delegated
304
- * `did.jsonl` PUT): writes the standing continuation described in the module
305
- * doc -- the reveal-and-commit entry signed by the attributed ladder rung,
306
- * then the add entry signed by the new ordinary client's update key, which
307
- * also retires the spent rung. Resumable from durable state alone: a
308
- * completed continuation is detected by the new client's update key already
309
- * being authorized (no-op), a torn one by the attribution finding the rung
310
- * already revealed. Both entries publish conditionally on the read they were
311
- * built on, and a race lost to a concurrent ceremony re-runs from the top --
312
- * re-attributing, which is exactly the retry-up-the-ladder resolution.
313
- *
314
- * @param options {object}
315
- * @param options.store {UnlockLogStore} public log read + delegated PUT
316
- * @param options.ladderSeed {Uint8Array} the credential's ladder seed, from
317
- * its unlock record
318
- * @param options.newClientKeys {WebvhEnrollmentKeys} the new ordinary
319
- * client's public halves
320
- * @param options.newClientUpdateSeeds {ClientWebvhUpdateKeys} the new
321
- * client's update-key seeds (minted by the self-enrolling flow, which
322
- * therefore holds them and can sign the add entry)
323
- * @param [options.expectedDid] {string} the account DID the log must resolve
324
- * to, from the credential-authenticated pointer
325
- * @returns {Promise<{ did: string, webDoc?: object }>} the account DID and,
326
- * when the add entry ran here, the final `did.json` projection for the
327
- * enrolled session to republish
328
- */
329
- export async function selfEnrollWebvhClient(options) {
330
- return withLogConflictRetry(() => selfEnrollWebvhClientOnce(options));
331
- }
332
- /**
333
- * One attempt of {@link selfEnrollWebvhClient}, re-invoked by the conflict
334
- * retry.
335
- *
336
- * @param options {object} see {@link selfEnrollWebvhClient}
337
- * @returns {Promise<{ did: string, webDoc?: object }>}
338
- */
339
- async function selfEnrollWebvhClientOnce({ store, ladderSeed, newClientKeys, newClientUpdateSeeds, expectedDid }) {
340
- let published = await readLogOrThrow({
341
- store,
342
- ...(expectedDid !== undefined ? { expectedDid } : {})
343
- });
344
- // Already complete (a torn earlier run finished the add entry): the new
345
- // client's update key is authorized, which only the add entry writes.
346
- if (published.updateKeys.includes(newClientKeys.updateKeyMultibase)) {
347
- return { did: published.did };
348
- }
349
- // Which rung is current, recovered from the log itself. Fails closed with
350
- // `LadderAttributionError` for a revoked (or never-bound) credential and
351
- // for any ambiguous history.
352
- const { rung, state } = await attributeLadderRung({ ladderSeed, published });
353
- const nextRung = await ladderRung({ ladderSeed, index: rung.index + 1 });
354
- const rungHash = await deriveNextKeyHash(rung.keyMultibase);
355
- const newUpdateHash = await deriveNextKeyHash(newClientKeys.updateKeyMultibase);
356
- const newStagedHash = await deriveNextKeyHash(newClientKeys.stagedUpdateKeyMultibase);
357
- const nextRungHash = await deriveNextKeyHash(nextRung.keyMultibase);
358
- // The reveal-and-commit entry, skipped when a torn earlier run already
359
- // published it (the rung revealed AND every needed hash committed).
360
- const revealed = state === 'revealed';
361
- const committed = [newUpdateHash, newStagedHash, nextRungHash].every(hash => published.nextKeyHashes.includes(hash));
362
- if (!revealed || !committed) {
363
- await assertCarryOverCommitments({ published });
364
- const signer = await updateKeySigner({ seed: rung.seed });
365
- const updated = await updateDID({
366
- log: published.log,
367
- signer,
368
- alsoKnownAsWeb: true,
369
- updateKeys: [...new Set([...published.updateKeys, rung.keyMultibase])],
370
- // The spent rung's own hash is kept through this entry (so a resumed
371
- // commit can re-state the revealed key); the add entry drops it, while
372
- // the next rung's hash stays as the credential's standing commitment.
373
- nextKeyHashes: [
374
- ...new Set([
375
- ...published.nextKeyHashes,
376
- rungHash,
377
- newUpdateHash,
378
- newStagedHash,
379
- nextRungHash
380
- ])
381
- ]
382
- });
383
- await publishLogOnly({ store, log: updated.log, ifMatch: published.etag });
384
- // The same account the reveal entry just extended.
385
- published = await readLogOrThrow({ store, expectedDid: published.did });
386
- }
387
- // The add entry: the new client's verification methods and update key in;
388
- // the spent rung's key and hash out. The credential's keyAgreement entry
389
- // and the next rung's committed hash stand untouched. Signed by the new
390
- // client's update key, whose hash the commit entry just committed.
391
- const { did, doc } = published;
392
- const vmId = (publicKeyMultibase) => `${did}#${publicKeyMultibase}`;
393
- // When this is the FIRST durable enrollment of a client-less account, the
394
- // same atomic entry ends the client-less window: every ladder VM (the
395
- // relation-asymmetry recognition) leaves the document and its relations
396
- // here, so no window exists where the account has neither a durable client
397
- // nor the ladder VM. On an account with enrolled clients the recognition
398
- // finds none and the filters are no-ops.
399
- const ladderVms = ladderVmIds({ doc });
400
- const addedMethods = markedVerificationMethodPair({
401
- controller: did,
402
- signingKeyMultibase: newClientKeys.signingKeyMultibase,
403
- keyAgreementKeyMultibase: newClientKeys.keyAgreementKeyMultibase
404
- });
405
- const existingMethods = (doc.verificationMethod ?? []);
406
- const verificationMethods = [
407
- ...existingMethods.filter(method => !addedMethods.some(added => added.id === method.id) &&
408
- (method.id === undefined || !ladderVms.includes(method.id))),
409
- ...addedMethods
410
- ];
411
- const withReference = (relation, id) => [...new Set([...relationIds(relation), id])].filter(referencedId => !ladderVms.includes(referencedId));
412
- const signingVmId = vmId(newClientKeys.signingKeyMultibase);
413
- const signer = await updateKeySigner({
414
- seed: newClientUpdateSeeds.updateSeed
415
- });
416
- const updated = await updateDID({
417
- log: published.log,
418
- signer,
419
- alsoKnownAsWeb: true,
420
- updateKeys: [
421
- ...new Set([
422
- ...published.updateKeys.filter(key => key !== rung.keyMultibase),
423
- newClientKeys.updateKeyMultibase
424
- ])
425
- ],
426
- nextKeyHashes: published.nextKeyHashes.filter(hash => hash !== rungHash),
427
- verificationMethods,
428
- authentication: withReference(doc.authentication, signingVmId),
429
- assertionMethod: withReference(doc.assertionMethod, signingVmId),
430
- keyAgreement: withReference(doc.keyAgreement, vmId(newClientKeys.keyAgreementKeyMultibase)),
431
- capabilityInvocation: withReference(doc.capabilityInvocation, signingVmId),
432
- capabilityDelegation: withReference(doc.capabilityDelegation, signingVmId)
433
- });
434
- // Conditional on the read this entry was built on: the re-read above when
435
- // the commit entry ran here, the first read when it was skipped.
436
- await publishLogOnly({ store, log: updated.log, ifMatch: published.etag });
437
- return { did: updated.did, webDoc: updated.webDoc };
438
- }
439
256
  //# sourceMappingURL=standingWebvh.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"standingWebvh.js","sourceRoot":"","sources":["../../src/unlock/standingWebvh.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAMxE,OAAO,EACL,0BAA0B,EA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BAAiB,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,IAAI,EAAE,CAAC,CAAA;IACtE,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,CAAA;AACjE,CAAC"}
@@ -1,6 +1,13 @@
1
1
  import type { IKeyAgreementKey, IKeyResolver, IZcap } from '@interop/data-integrity-core';
2
2
  import type { CollectionEncryption } from '@interop/was-client';
3
3
  import type { AccountPointer, RecordSigner, SignedRecord } from '../keyring/record.js';
4
+ /**
5
+ * The byte length of a ladder seed: 32 random bytes, minted at bind time and
6
+ * carried only inside the unlock record's sealed ladder member. Declared
7
+ * here because the record format owns its member sizes; the ladder module's
8
+ * derivations import it from this codec.
9
+ */
10
+ export declare const LADDER_SEED_BYTES = 32;
4
11
  /**
5
12
  * An unlock record's account binding is absent, malformed, or does not verify
6
13
  * under the credential's binding MAC key. Its own class, distinct from a
@@ -27,8 +34,8 @@ export interface SealedRecordMember {
27
34
  * The unwrapped contents of an unlock record: the credential-authenticated
28
35
  * account core (controller + pointer, plus the ladder seed where the
29
36
  * credential is a standing method), the bridge delegation, the optional
30
- * companion-Space delegation (`delegatedClients` -- a standing credential's
31
- * pre-minted GET+PUT over the auxiliary companion Space's items subtree),
37
+ * annex Space delegation (`delegatedClients` -- a standing credential's
38
+ * pre-minted GET+PUT over the auxiliary annex Space's items subtree),
32
39
  * the optional bind email, and the bind timestamp. `pointer` is required --
33
40
  * the record exists only on WAS deployments.
34
41
  */
@@ -114,7 +121,7 @@ export declare function unlockRecordBinding({ record }: {
114
121
  * @param options.pointer {AccountPointer} the account pointer
115
122
  * @param options.delegation {IZcap} the PUT-on-`did.jsonl` delegation to
116
123
  * the credential-derived signing DID
117
- * @param [options.delegatedClients] {IZcap} the companion-Space delegation
124
+ * @param [options.delegatedClients] {IZcap} the annex Space delegation
118
125
  * (GET+PUT over the auxiliary Space's items subtree), for a standing
119
126
  * credential (a recovery code carries none)
120
127
  * @param [options.ladderSeed] {Uint8Array} the update-key ladder seed, for
@@ -187,7 +194,7 @@ export declare function unwrapUnlockRecord({ record, keyAgreementKey, keyResolve
187
194
  /**
188
195
  * Re-mints an unlock record's pre-minted delegations: the revocation-cascade
189
196
  * path that replaces a rotted or expiring bridge (and, where the record
190
- * carries one, its companion-Space sibling) while touching nothing else. The
197
+ * carries one, its annex Space sibling) while touching nothing else. The
191
198
  * shell, the ladder member, and the binding are carried VERBATIM (the re-mint
192
199
  * cannot decrypt any of them and does not need to -- each is self-contained
193
200
  * and the binding covers the core), the fresh delegations are sealed to the
@@ -199,7 +206,7 @@ export declare function unwrapUnlockRecord({ record, keyAgreementKey, keyResolve
199
206
  * same renewal window), so a re-mint pass reseals both atomically; a
200
207
  * `delegatedClients` member the caller supplies no fresh delegation for is
201
208
  * carried verbatim, sealed as it stands (self-contained, like the ladder) --
202
- * the fallback for a pass that cannot rebuild the companion target, never
209
+ * the fallback for a pass that cannot rebuild the annex target, never
203
210
  * the intended steady state.
204
211
  *
205
212
  * A record with no binding cannot be re-minted ({@link UnlockBindingError});
@@ -210,7 +217,7 @@ export declare function unwrapUnlockRecord({ record, keyAgreementKey, keyResolve
210
217
  * @param options.delegation {IZcap} the freshly minted `did.jsonl`
211
218
  * delegation
212
219
  * @param [options.delegatedClients] {IZcap} the freshly minted
213
- * companion-Space delegation; when absent, an existing `delegatedClients`
220
+ * annex Space delegation; when absent, an existing `delegatedClients`
214
221
  * member travels verbatim
215
222
  * @param options.keyAgreementKey {IKeyAgreementKey} the credential's unlock
216
223
  * KAK, public half only
@@ -1 +1 @@
1
- {"version":3,"file":"unlockRecord.d.ts","sourceRoot":"","sources":["../../src/unlock/unlockRecord.ts"],"names":[],"mappings":"AA8DA,OAAO,KAAK,EACV,gBAAgB,EAChB,YAAY,EACZ,KAAK,EACN,MAAM,8BAA8B,CAAA;AACrC,OAAO,KAAK,EA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B,CAAC,EACvC,MAAM,EACN,eAAe,EACf,WAAW,EACX,oBAAoB,EACpB,aAAa,EACd,EAAE;IACD,MAAM,EAAE,OAAO,CAAA;IACf,eAAe,EAAE,gBAAgB,CAAA;IACjC,WAAW,EAAE,YAAY,CAAA;IACzB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,aAAa,EAAE,UAAU,CAAA;CAC1B,GAAG,OAAO,CAAC;IACV,QAAQ,EAAE,oBAAoB,CAAA;IAC9B,UAAU,EAAE,sBAAsB,CAAA;CACnC,CAAC,CAmKD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAsB,6BAA6B,CAAC,EAClD,MAAM,EACN,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,MAAM,EACP,EAAE;IACD,MAAM,EAAE,OAAO,CAAA;IACf,UAAU,EAAE,KAAK,CAAA;IACjB,gBAAgB,CAAC,EAAE,KAAK,CAAA;IACxB,eAAe,EAAE,gBAAgB,CAAA;IACjC,MAAM,EAAE,YAAY,CAAA;CACrB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAsC9B"}
@@ -19,12 +19,12 @@
19
19
  * cascade re-seals a fresh one to the credential's unlock KAK public half
20
20
  * ({@link remintUnlockRecordDelegations}).
21
21
  * - `delegatedClients` (standing credentials only): the pre-minted GET+PUT
22
- * delegation over the auxiliary companion Space's items subtree, sealed as
22
+ * delegation over the auxiliary client-annex Space's items subtree, sealed as
23
23
  * its own self-contained member -- what lets a transient login reach the
24
- * companion (delegated-clients) log with nothing but the credential. It
24
+ * annex (delegated-clients) log with nothing but the credential. It
25
25
  * rots on exactly the bridge's axis (same signer, same current-key-set
26
26
  * rule), so the re-mint reseals both members in one pass. Absent on a
27
- * recovery code, which needs no companion authority; parsed with `ladder`'s
27
+ * recovery code, which needs no annex authority; parsed with `ladder`'s
28
28
  * tolerant handling, not `bridge`'s hard refusal. The `binding` MAC does
29
29
  * not cover it (the v2 context label stays): like the bridge it mirrors,
30
30
  * it sits under the frame proof only, and a host-swapped member is bounded
@@ -61,7 +61,13 @@ import { equalBytes } from '@noble/ciphers/utils.js';
61
61
  import { hmac } from '@noble/hashes/hmac.js';
62
62
  import { sha256 } from '@noble/hashes/sha2.js';
63
63
  import { KEYRING_RECORD_VERSION, mintRecordEncryption, parseRecordCreatedAt, parseRecordFrame, parseRecordPointer, recordCipher, recordCreatedAtStamp, recordProofKeyMultibase, recordSealCipher, signRecordFrame, verifyRecordProof } from '../keyring/record.js';
64
- import { LADDER_SEED_BYTES } from './ladder.js';
64
+ /**
65
+ * The byte length of a ladder seed: 32 random bytes, minted at bind time and
66
+ * carried only inside the unlock record's sealed ladder member. Declared
67
+ * here because the record format owns its member sizes; the ladder module's
68
+ * derivations import it from this codec.
69
+ */
70
+ export const LADDER_SEED_BYTES = 32;
65
71
  /**
66
72
  * The context label mixed into the binding MAC input, versioning the tag
67
73
  * construction. Permanent -- changing it orphans every bound credential.
@@ -211,7 +217,7 @@ async function openMember({ member, keyAgreementKey, keyResolver }) {
211
217
  * @param options.pointer {AccountPointer} the account pointer
212
218
  * @param options.delegation {IZcap} the PUT-on-`did.jsonl` delegation to
213
219
  * the credential-derived signing DID
214
- * @param [options.delegatedClients] {IZcap} the companion-Space delegation
220
+ * @param [options.delegatedClients] {IZcap} the annex Space delegation
215
221
  * (GET+PUT over the auxiliary Space's items subtree), for a standing
216
222
  * credential (a recovery code carries none)
217
223
  * @param [options.ladderSeed] {Uint8Array} the update-key ladder seed, for
@@ -445,7 +451,7 @@ export async function unwrapUnlockRecord({ record, keyAgreementKey, keyResolver,
445
451
  /**
446
452
  * Re-mints an unlock record's pre-minted delegations: the revocation-cascade
447
453
  * path that replaces a rotted or expiring bridge (and, where the record
448
- * carries one, its companion-Space sibling) while touching nothing else. The
454
+ * carries one, its annex Space sibling) while touching nothing else. The
449
455
  * shell, the ladder member, and the binding are carried VERBATIM (the re-mint
450
456
  * cannot decrypt any of them and does not need to -- each is self-contained
451
457
  * and the binding covers the core), the fresh delegations are sealed to the
@@ -457,7 +463,7 @@ export async function unwrapUnlockRecord({ record, keyAgreementKey, keyResolver,
457
463
  * same renewal window), so a re-mint pass reseals both atomically; a
458
464
  * `delegatedClients` member the caller supplies no fresh delegation for is
459
465
  * carried verbatim, sealed as it stands (self-contained, like the ladder) --
460
- * the fallback for a pass that cannot rebuild the companion target, never
466
+ * the fallback for a pass that cannot rebuild the annex target, never
461
467
  * the intended steady state.
462
468
  *
463
469
  * A record with no binding cannot be re-minted ({@link UnlockBindingError});
@@ -468,7 +474,7 @@ export async function unwrapUnlockRecord({ record, keyAgreementKey, keyResolver,
468
474
  * @param options.delegation {IZcap} the freshly minted `did.jsonl`
469
475
  * delegation
470
476
  * @param [options.delegatedClients] {IZcap} the freshly minted
471
- * companion-Space delegation; when absent, an existing `delegatedClients`
477
+ * annex Space delegation; when absent, an existing `delegatedClients`
472
478
  * member travels verbatim
473
479
  * @param options.keyAgreementKey {IKeyAgreementKey} the credential's unlock
474
480
  * KAK, public half only
@@ -1 +1 @@
1
- {"version":3,"file":"unlockRecord.js","sourceRoot":"","sources":["../../src/unlock/unlockRecord.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAO9C,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,EACZ,oBAAoB,EACpB,uBAAuB,EACvB,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EAClB,MAAM,sBAAsB,CAAA;AAM7B,OAAO,EAAE,iBAAiB,EAAE,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