@interop/wallet-core 0.61.0 → 0.62.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.
- package/dist/clientAnnex/forgetLast.d.ts +66 -19
- package/dist/clientAnnex/forgetLast.d.ts.map +1 -1
- package/dist/clientAnnex/forgetLast.js +120 -38
- package/dist/clientAnnex/forgetLast.js.map +1 -1
- package/dist/clientAnnex/heal.d.ts +64 -29
- package/dist/clientAnnex/heal.d.ts.map +1 -1
- package/dist/clientAnnex/heal.js +287 -50
- package/dist/clientAnnex/heal.js.map +1 -1
- package/dist/clientAnnex/index.d.ts +2 -2
- package/dist/clientAnnex/index.d.ts.map +1 -1
- package/dist/clientAnnex/index.js +2 -2
- package/dist/clientAnnex/index.js.map +1 -1
- package/dist/clientAnnex/ladder.d.ts +246 -18
- package/dist/clientAnnex/ladder.d.ts.map +1 -1
- package/dist/clientAnnex/ladder.js +742 -53
- package/dist/clientAnnex/ladder.js.map +1 -1
- package/dist/clientAnnex/ladderAnchored.d.ts +113 -6
- package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -1
- package/dist/clientAnnex/ladderAnchored.js +208 -27
- package/dist/clientAnnex/ladderAnchored.js.map +1 -1
- package/dist/clientAnnex/log.d.ts +37 -1
- package/dist/clientAnnex/log.d.ts.map +1 -1
- package/dist/clientAnnex/log.js +34 -10
- package/dist/clientAnnex/log.js.map +1 -1
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts +32 -7
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts.map +1 -1
- package/dist/clientAnnex/recoveryLadderAnchored.js +124 -23
- package/dist/clientAnnex/recoveryLadderAnchored.js.map +1 -1
- package/dist/clientAnnex/zcap.js +2 -2
- package/dist/clientAnnex/zcap.js.map +1 -1
- package/dist/identity/agents.js +2 -2
- package/dist/identity/agents.js.map +1 -1
- package/dist/keys/index.d.ts +1 -1
- package/dist/keys/index.d.ts.map +1 -1
- package/dist/keys/index.js +1 -1
- package/dist/keys/index.js.map +1 -1
- package/dist/keys/userKeyRoster.d.ts +32 -2
- package/dist/keys/userKeyRoster.d.ts.map +1 -1
- package/dist/keys/userKeyRoster.js +40 -2
- package/dist/keys/userKeyRoster.js.map +1 -1
- package/dist/recovery/recoveryDelegation.d.ts +4 -1
- package/dist/recovery/recoveryDelegation.d.ts.map +1 -1
- package/dist/recovery/recoveryDelegation.js +4 -2
- package/dist/recovery/recoveryDelegation.js.map +1 -1
- package/dist/recovery/recoveryWebvh.d.ts +42 -2
- package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
- package/dist/recovery/recoveryWebvh.js +160 -18
- package/dist/recovery/recoveryWebvh.js.map +1 -1
- package/dist/unlock/index.d.ts +2 -2
- package/dist/unlock/index.d.ts.map +1 -1
- package/dist/unlock/index.js +1 -1
- package/dist/unlock/index.js.map +1 -1
- package/dist/unlock/retire.d.ts +62 -9
- package/dist/unlock/retire.d.ts.map +1 -1
- package/dist/unlock/retire.js +59 -5
- package/dist/unlock/retire.js.map +1 -1
- package/dist/unlock/standingWebvh.d.ts +131 -21
- package/dist/unlock/standingWebvh.d.ts.map +1 -1
- package/dist/unlock/standingWebvh.js +239 -54
- package/dist/unlock/standingWebvh.js.map +1 -1
- package/dist/webvh/didWebvh.d.ts +3 -2
- package/dist/webvh/didWebvh.d.ts.map +1 -1
- package/dist/webvh/didWebvh.js +7 -5
- package/dist/webvh/didWebvh.js.map +1 -1
- package/dist/webvh/index.d.ts +2 -2
- package/dist/webvh/index.d.ts.map +1 -1
- package/dist/webvh/index.js +1 -1
- package/dist/webvh/index.js.map +1 -1
- package/dist/webvh/keyAgreement.d.ts +25 -0
- package/dist/webvh/keyAgreement.d.ts.map +1 -1
- package/dist/webvh/keyAgreement.js +24 -0
- package/dist/webvh/keyAgreement.js.map +1 -1
- package/dist/webvh/listClients.d.ts +7 -5
- package/dist/webvh/listClients.d.ts.map +1 -1
- package/dist/webvh/listClients.js +7 -5
- package/dist/webvh/listClients.js.map +1 -1
- package/dist/webvh/revokeClient.d.ts +48 -0
- package/dist/webvh/revokeClient.d.ts.map +1 -1
- package/dist/webvh/revokeClient.js +85 -1
- package/dist/webvh/revokeClient.js.map +1 -1
- package/dist/webvh/zcap.js +3 -3
- package/dist/webvh/zcap.js.map +1 -1
- package/package.json +5 -5
|
@@ -12,11 +12,15 @@
|
|
|
12
12
|
* key (a passphrase), so the world-readable document carries a check on the
|
|
13
13
|
* key without carrying the key -- and `nextKeyHashes` gains the hash of the
|
|
14
14
|
* credential's current update key (a ladder rung, or a code's single derived
|
|
15
|
-
* key).
|
|
15
|
+
* key). A credential that carries a ladder gains its LADDER VM in the same
|
|
16
|
+
* entry, under `assertionMethod` and `capabilityDelegation`: the VM's life is
|
|
17
|
+
* the credential's, installed when it becomes standing and struck when it
|
|
18
|
+
* retires, and enrollment never touches it.
|
|
16
19
|
* Decryption standing, authority latent: the credential's update key joins
|
|
17
|
-
* `updateKeys` nowhere, and
|
|
18
|
-
* listings (keyed on `capabilityInvocation`) and revocation
|
|
19
|
-
* see
|
|
20
|
+
* `updateKeys` nowhere, and the key-agreement entry is deliberately unmarked,
|
|
21
|
+
* so client listings (keyed on `capabilityInvocation`) and revocation
|
|
22
|
+
* removals never see it; the VM's relation asymmetry keeps it out of the same
|
|
23
|
+
* listings. {@link publishUnlockKey} / {@link removeUnlockKey} are one merged
|
|
20
24
|
* add/remove pair, shared verbatim by the recovery-code wrappers.
|
|
21
25
|
*
|
|
22
26
|
* The ceremonies that EXERCISE a credential's ladder against the account log
|
|
@@ -25,15 +29,39 @@
|
|
|
25
29
|
* here is the verify-side half every wallet needs regardless of account configuration.
|
|
26
30
|
*/
|
|
27
31
|
import { deriveNextKeyHash, updateDID } from '@interop/did-method-webvh';
|
|
28
|
-
import { assertCarryOverCommitments, MULTIKEY_COMMITMENT_VM_TYPE, MULTIKEY_VM_TYPE, publishUpdatedLog, readPublishedLog, relationIds, updateKeyMultibase, updateKeySigner, withLogConflictRetry } from '../webvh/didWebvh.js';
|
|
32
|
+
import { assertCarryOverCommitments, MULTIKEY_COMMITMENT_VM_TYPE, MULTIKEY_VM_TYPE, ladderVerificationMethod, publishUpdatedLog, readPublishedLog, relationIds, updateKeyMultibase, updateKeySigner, withLogConflictRetry } from '../webvh/didWebvh.js';
|
|
29
33
|
import { ladderVmIds } from '../webvh/listClients.js';
|
|
30
34
|
// The one deliberate base-side dependency on the annex subpath, pinned as an
|
|
31
|
-
// exception in the lint rule:
|
|
32
|
-
//
|
|
33
|
-
//
|
|
34
|
-
//
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
// exception in the lint rule: this module resolves a credential's CURRENT
|
|
36
|
+
// ladder inventory from the log itself (the shared attribution helpers in
|
|
37
|
+
// `clientAnnex/ladder.ts`), never touching the annex log machinery, and
|
|
38
|
+
// derives the credential's ladder VM from its seed at the install.
|
|
39
|
+
import { attributeLadderInventory, LadderAttributionError, ladderVmKeyMultibase } from '../clientAnnex/ladder.js';
|
|
40
|
+
/**
|
|
41
|
+
* The ladder inventory the removal edit resolved from the log diverges from
|
|
42
|
+
* what the caller was told one read earlier. A ceremony that names its
|
|
43
|
+
* expected ladder VM ids (the retirement's stage 0, which hands the same list
|
|
44
|
+
* to the dependent-record re-mint pass) gets this refusal BEFORE the edit is
|
|
45
|
+
* published, so a concurrent ceremony -- or a host serving different log
|
|
46
|
+
* versions to the two reads -- cannot make the strike diverge from what the
|
|
47
|
+
* re-mint pass acted on. Nothing is written. Matched on `name` (the error
|
|
48
|
+
* crosses app-injected seams that may resolve to another copy of this
|
|
49
|
+
* package).
|
|
50
|
+
*/
|
|
51
|
+
export class LadderInventoryDriftError extends Error {
|
|
52
|
+
expected;
|
|
53
|
+
attributed;
|
|
54
|
+
constructor({ expected, attributed }) {
|
|
55
|
+
super('did:webvh: the published log attributes a different ladder VM set to ' +
|
|
56
|
+
'this credential than the caller resolved a moment earlier ' +
|
|
57
|
+
`(expected ${expected.join(', ') || '(none)'}; attributed ` +
|
|
58
|
+
`${attributed.join(', ') || '(none)'}); the inventory edit was not ` +
|
|
59
|
+
'published. Re-run the retirement on a fresh read.');
|
|
60
|
+
this.name = 'LadderInventoryDriftError';
|
|
61
|
+
this.expected = expected;
|
|
62
|
+
this.attributed = attributed;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
37
65
|
/**
|
|
38
66
|
* The verification-method id a credential's key-agreement entry publishes
|
|
39
67
|
* under: `<did>#<multibase>` for a verbatim key (indistinguishable by id from
|
|
@@ -51,6 +79,38 @@ export function unlockKeyVmId({ did, keyAgreement }) {
|
|
|
51
79
|
: keyAgreement.commitment;
|
|
52
80
|
return `${did}#${fragment}`;
|
|
53
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* What of a standing credential's ladder currently stands in the published
|
|
84
|
+
* log, resolved with the recorded update key as ANCHOR and the credential's
|
|
85
|
+
* own key-agreement id as the attribution's second arm. The removal edit uses
|
|
86
|
+
* it to know what to strike; the retirement ceremony uses it one stage
|
|
87
|
+
* earlier, to name the ladder VM it is about to strike to the pass that
|
|
88
|
+
* re-mints whatever that VM signed for other credentials.
|
|
89
|
+
*
|
|
90
|
+
* It lives here rather than in the ceremony because this module is the one
|
|
91
|
+
* base-side holder of the annex attribution helpers (the pinned lint
|
|
92
|
+
* exception).
|
|
93
|
+
*
|
|
94
|
+
* @param options {object}
|
|
95
|
+
* @param options.log {DIDLog} a resolved, caller-verified log
|
|
96
|
+
* @param options.did {string} the account DID the log resolves to
|
|
97
|
+
* @param options.unlockKeys {StandingUnlockKeys} the credential's recorded
|
|
98
|
+
* public inventory
|
|
99
|
+
* @param [options.ladderSeed] {Uint8Array} the credential's ladder seed,
|
|
100
|
+
* when the ceremony holds it
|
|
101
|
+
* @returns {Promise<LadderStandingInventory>}
|
|
102
|
+
*/
|
|
103
|
+
export async function attributeUnlockLadderInventory({ log, did, unlockKeys, ladderSeed }) {
|
|
104
|
+
return attributeLadderInventory({
|
|
105
|
+
log,
|
|
106
|
+
anchorKeyMultibase: unlockKeys.updateKeyMultibase,
|
|
107
|
+
credentialVmId: unlockKeyVmId({
|
|
108
|
+
did,
|
|
109
|
+
keyAgreement: unlockKeys.keyAgreement
|
|
110
|
+
}),
|
|
111
|
+
...(ladderSeed ? { ladderSeed } : {})
|
|
112
|
+
});
|
|
113
|
+
}
|
|
54
114
|
/**
|
|
55
115
|
* The credential's `keyAgreement` verification method: an ordinary unmarked
|
|
56
116
|
* entry carrying either the key verbatim (a `Multikey` with
|
|
@@ -115,12 +175,25 @@ export async function readLogOrThrow({ store, expectedDid, pinStore, logId }) {
|
|
|
115
175
|
/**
|
|
116
176
|
* BIND (run by an enrolled client, root authority): publishes a standing
|
|
117
177
|
* credential's split configuration into the document -- one entry adding the
|
|
118
|
-
* credential's `keyAgreement` entry (verbatim or commitment)
|
|
119
|
-
*
|
|
120
|
-
* `
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
178
|
+
* credential's `keyAgreement` entry (verbatim or commitment), committing its
|
|
179
|
+
* current update key's hash in `nextKeyHashes`, and installing its LADDER VM
|
|
180
|
+
* under `assertionMethod` and `capabilityDelegation`, and under no other
|
|
181
|
+
* relation -- the asymmetry that recognizes it. The update key joins `updateKeys` nowhere.
|
|
182
|
+
* One entry for the whole inventory: a separate install would open a window
|
|
183
|
+
* in which the credential stands without the key it signs with.
|
|
184
|
+
*
|
|
185
|
+
* The ladder seed is the CALLER's to mint and to have already written
|
|
186
|
+
* durably. This function never mints one, so a torn bind's re-run tests
|
|
187
|
+
* idempotence against the SAME seed, finds the completed stage and publishes
|
|
188
|
+
* nothing -- where a mint-when-absent would publish a second VM that no
|
|
189
|
+
* anchored attribution could later strike. A credential with no ladder at all
|
|
190
|
+
* (a recovery code, whose inventory is one key-agreement method and one
|
|
191
|
+
* update key) passes `null` and gets no VM.
|
|
192
|
+
*
|
|
193
|
+
* Idempotent: an inventory already published is a no-op, so re-running a torn
|
|
194
|
+
* bind converges. The entry publishes conditionally on the log this call
|
|
195
|
+
* read; a race lost to a concurrent ceremony re-runs and rebases on the new
|
|
196
|
+
* head.
|
|
124
197
|
*
|
|
125
198
|
* @param options {object}
|
|
126
199
|
* @param options.idStore {WebvhIdStore}
|
|
@@ -128,6 +201,9 @@ export async function readLogOrThrow({ store, expectedDid, pinStore, logId }) {
|
|
|
128
201
|
* did:webvh update-key seeds
|
|
129
202
|
* @param options.unlockKeys {StandingUnlockKeys} the credential's public
|
|
130
203
|
* inventory
|
|
204
|
+
* @param options.ladderSeed {Uint8Array | null} the credential's ladder
|
|
205
|
+
* seed, whose VM this entry installs; `null` for a credential that carries
|
|
206
|
+
* no ladder
|
|
131
207
|
* @param [options.expectedDid] {string} the account DID the log must resolve
|
|
132
208
|
* to, from the caller's stored account pointer
|
|
133
209
|
* @param [options.pinStore] {ResourceLogPinStore} the caller's chain-head
|
|
@@ -163,25 +239,53 @@ export async function publishUnlockKey(options) {
|
|
|
163
239
|
* rung key still sitting in `updateKeys` (plus the never-claimed hashes its
|
|
164
240
|
* reveal entry committed). Trusting the recorded multibase alone would leave
|
|
165
241
|
* the live rung commitment standing: a latent re-seizure credential via the
|
|
166
|
-
* reveal mechanism.
|
|
167
|
-
*
|
|
168
|
-
*
|
|
242
|
+
* reveal mechanism. The seedless walk recovers the rungs BEHIND the anchor
|
|
243
|
+
* too, reading the log's positional rules backwards, so an anchor advanced by
|
|
244
|
+
* a self-enrollment resolves the same inventory a bind-time anchor does
|
|
245
|
+
* wherever each rung's hash was committed by an entry that also revealed the
|
|
246
|
+
* previous rung, or by a handover. One reachable shape falls outside that: a
|
|
247
|
+
* ladder VM the last-client transition reinstalled, whose acting rung a later
|
|
248
|
+
* self-enrollment then spends. That reveal-and-commit entry authorizes no key,
|
|
249
|
+
* so the backward walk cannot name the rung that signed it, and the VM stays
|
|
250
|
+
* standing as `unclaimed` (WC-158). A supplied `ladderSeed` is then a shortcut
|
|
251
|
+
* and a cross-check rather than a requirement (every rung known outright, no
|
|
252
|
+
* backward walk). For a
|
|
253
|
+
* single-key credential (a
|
|
169
254
|
* recovery code, a never-self-enrolled bind) the resolution degenerates to
|
|
170
255
|
* exactly the recorded key's hash, as before.
|
|
171
256
|
*
|
|
172
|
-
* The
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
*
|
|
257
|
+
* The credential's LADDER VM goes in the same entry, so a retired credential
|
|
258
|
+
* no longer signs governed-log appends or account delegations. This is the
|
|
259
|
+
* sole remover, and it needs no seed to do it: the VM is attributed from the
|
|
260
|
+
* log on any of three arms ({@link attributeLadderInventory}). The SIGNER
|
|
261
|
+
* arm claims a VM whose publishing entry a ladder rung signed. The
|
|
262
|
+
* CO-INTRODUCTION arm claims one whose publishing entry also introduced this
|
|
263
|
+
* credential's own `keyAgreement` member, which is what reaches a bind entry
|
|
264
|
+
* an enrolled client signed; it fires only when that entry introduced exactly
|
|
265
|
+
* one credential-class key-agreement member and exactly one ladder VM. The
|
|
266
|
+
* COMMITMENT arm claims one whose publishing entry committed a hash this
|
|
267
|
+
* ladder knows a priori and introduced no other credential's member, which is
|
|
268
|
+
* what reaches a reinstall for a credential whose member already stands. A VM
|
|
269
|
+
* no arm claims is left standing rather than struck -- on an account
|
|
270
|
+
* with several standing credentials, striking an unattributed key would take
|
|
271
|
+
* out a survivor's. With the seed in hand the derived id is struck too, and
|
|
272
|
+
* an attribution naming any OTHER VM refuses with
|
|
273
|
+
* {@link LadderAttributionError} rather than acting on a ladder the seed and
|
|
274
|
+
* the recorded anchor disagree about.
|
|
180
275
|
*
|
|
181
|
-
* @param options {object} see {@link publishUnlockKey}, plus
|
|
182
|
-
*
|
|
183
|
-
*
|
|
184
|
-
*
|
|
276
|
+
* @param options {object} see {@link publishUnlockKey}, plus:
|
|
277
|
+
* @param [options.ladderSeed] {Uint8Array} the retired credential's ladder
|
|
278
|
+
* seed, when in hand
|
|
279
|
+
* @param [options.expectedLadderVmIds] {string[]} the ladder VM ids the
|
|
280
|
+
* caller already resolved for this credential, from its own read of the
|
|
281
|
+
* log. Supplied, this edit's own attribution must match them as a set --
|
|
282
|
+
* after the seed cross-check above -- or the edit refuses with
|
|
283
|
+
* {@link LadderInventoryDriftError} before writing anything. That is what
|
|
284
|
+
* ties the retirement's stage-0 read (whose list the dependent-record
|
|
285
|
+
* re-mint pass acted on) to this one, which is otherwise independent
|
|
286
|
+
* @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog, ladderVm:
|
|
287
|
+
* LadderVmRemovalReport }>} see {@link publishUnlockKey}, plus the ladder
|
|
288
|
+
* VM report: what this entry struck, and what stands unclaimed after it
|
|
185
289
|
*/
|
|
186
290
|
export async function removeUnlockKey(options) {
|
|
187
291
|
return withLogConflictRetry(() => setUnlockKeyInventoryOnce({ ...options, polarity: 'remove' }));
|
|
@@ -195,7 +299,7 @@ export async function removeUnlockKey(options) {
|
|
|
195
299
|
* @param options {object} see {@link publishUnlockKey}, plus `polarity`
|
|
196
300
|
* @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog }>}
|
|
197
301
|
*/
|
|
198
|
-
async function setUnlockKeyInventoryOnce({ idStore, updateKeys, unlockKeys, ladderSeed, expectedDid, pinStore, logId, verb, polarity }) {
|
|
302
|
+
async function setUnlockKeyInventoryOnce({ idStore, updateKeys, unlockKeys, ladderSeed, expectedLadderVmIds, expectedDid, pinStore, logId, verb, polarity }) {
|
|
199
303
|
const published = await readLogOrThrow({
|
|
200
304
|
store: idStore,
|
|
201
305
|
...(expectedDid !== undefined ? { expectedDid } : {}),
|
|
@@ -213,35 +317,91 @@ async function setUnlockKeyInventoryOnce({ idStore, updateKeys, unlockKeys, ladd
|
|
|
213
317
|
// goes along: it is what tells the walk a climb from a spend, so the
|
|
214
318
|
// removal never annexes the commitment a spend handed to its replacement.
|
|
215
319
|
const inventory = polarity === 'remove'
|
|
216
|
-
? await
|
|
320
|
+
? await attributeUnlockLadderInventory({
|
|
217
321
|
log: published.log,
|
|
218
|
-
|
|
219
|
-
|
|
322
|
+
did,
|
|
323
|
+
unlockKeys,
|
|
220
324
|
...(ladderSeed ? { ladderSeed } : {})
|
|
221
325
|
})
|
|
222
|
-
: { revealedKeys: [], committedHashes: [] };
|
|
326
|
+
: { revealedKeys: [], committedHashes: [], ladderVmIds: [] };
|
|
223
327
|
const removedHashes = new Set(inventory.committedHashes);
|
|
224
328
|
const removedKeys = new Set(inventory.revealedKeys);
|
|
225
|
-
// The credential's ladder VM
|
|
226
|
-
//
|
|
227
|
-
//
|
|
228
|
-
// seed
|
|
229
|
-
//
|
|
230
|
-
//
|
|
231
|
-
const
|
|
232
|
-
?
|
|
329
|
+
// The credential's ladder VM: installed by the publish polarity in this
|
|
330
|
+
// same entry, struck by the remove polarity in this same entry. The
|
|
331
|
+
// derived id is what the install publishes; the removal takes it from the
|
|
332
|
+
// seed when the ceremony holds one and from the log's attribution
|
|
333
|
+
// otherwise, so a seedless retirement still ends the credential's
|
|
334
|
+
// delegation authority.
|
|
335
|
+
const ladderVmKey = ladderSeed
|
|
336
|
+
? await ladderVmKeyMultibase({ ladderSeed })
|
|
233
337
|
: undefined;
|
|
234
|
-
const
|
|
235
|
-
const
|
|
338
|
+
const ladderVmId = ladderVmKey === undefined ? undefined : `${did}#${ladderVmKey}`;
|
|
339
|
+
const standingLadderVmIds = ladderVmIds({ doc });
|
|
340
|
+
const struckLadderVmIds = new Set();
|
|
341
|
+
if (polarity === 'remove') {
|
|
342
|
+
if (ladderVmId !== undefined) {
|
|
343
|
+
const foreign = inventory.ladderVmIds.filter(id => id !== ladderVmId);
|
|
344
|
+
if (foreign.length > 0) {
|
|
345
|
+
throw new LadderAttributionError("The published log attributes a ladder VM this credential's seed " +
|
|
346
|
+
'does not derive; refusing to strike on an ambiguous ' +
|
|
347
|
+
'attribution.');
|
|
348
|
+
}
|
|
349
|
+
if (standingLadderVmIds.includes(ladderVmId)) {
|
|
350
|
+
struckLadderVmIds.add(ladderVmId);
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
for (const id of inventory.ladderVmIds) {
|
|
354
|
+
struckLadderVmIds.add(id);
|
|
355
|
+
}
|
|
356
|
+
// The drift check, before any write: this edit's own attribution against
|
|
357
|
+
// the list the caller resolved a read earlier. A concurrent ceremony, or
|
|
358
|
+
// a host serving two different log versions to the two reads, would
|
|
359
|
+
// otherwise let the strike diverge from what the caller's dependent-record
|
|
360
|
+
// pass already acted on.
|
|
361
|
+
if (expectedLadderVmIds !== undefined) {
|
|
362
|
+
const attributed = new Set(inventory.ladderVmIds);
|
|
363
|
+
const expected = new Set(expectedLadderVmIds);
|
|
364
|
+
const sameSet = attributed.size === expected.size &&
|
|
365
|
+
[...expected].every(id => attributed.has(id));
|
|
366
|
+
if (!sameSet) {
|
|
367
|
+
throw new LadderInventoryDriftError({
|
|
368
|
+
expected: [...expected],
|
|
369
|
+
attributed: [...attributed]
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
const ladderVmPresent = polarity === 'publish'
|
|
375
|
+
? ladderVmId !== undefined && standingLadderVmIds.includes(ladderVmId)
|
|
376
|
+
: struckLadderVmIds.size > 0;
|
|
377
|
+
const struckIds = new Set([vmId, ...struckLadderVmIds]);
|
|
236
378
|
const hashCommitted = published.nextKeyHashes.includes(keyHash);
|
|
237
379
|
const settled = polarity === 'publish'
|
|
238
|
-
? vmPresent &&
|
|
380
|
+
? vmPresent &&
|
|
381
|
+
hashCommitted &&
|
|
382
|
+
(ladderVmId === undefined || ladderVmPresent)
|
|
239
383
|
: !vmPresent &&
|
|
240
384
|
!ladderVmPresent &&
|
|
241
385
|
removedHashes.size === 0 &&
|
|
242
386
|
removedKeys.size === 0;
|
|
387
|
+
const ladderVmReport = (resultDoc, struck) => {
|
|
388
|
+
const claimed = new Set([
|
|
389
|
+
...struck,
|
|
390
|
+
...inventory.ladderVmIds,
|
|
391
|
+
...(ladderVmId !== undefined ? [ladderVmId] : [])
|
|
392
|
+
]);
|
|
393
|
+
return {
|
|
394
|
+
struck: [...struck],
|
|
395
|
+
unclaimed: ladderVmIds({ doc: resultDoc }).filter(id => !claimed.has(id))
|
|
396
|
+
};
|
|
397
|
+
};
|
|
243
398
|
if (settled) {
|
|
244
|
-
return {
|
|
399
|
+
return {
|
|
400
|
+
did,
|
|
401
|
+
doc,
|
|
402
|
+
log: published.log,
|
|
403
|
+
ladderVm: ladderVmReport(doc, struckLadderVmIds)
|
|
404
|
+
};
|
|
245
405
|
}
|
|
246
406
|
const activeKey = await updateKeyMultibase({ seed: updateKeys.updateSeed });
|
|
247
407
|
if (!published.updateKeys.includes(activeKey)) {
|
|
@@ -264,11 +424,19 @@ async function setUnlockKeyInventoryOnce({ idStore, updateKeys, unlockKeys, ladd
|
|
|
264
424
|
: published.updateKeys.filter(key => !removedKeys.has(key));
|
|
265
425
|
const verificationMethods = polarity === 'publish'
|
|
266
426
|
? [
|
|
267
|
-
...existingMethods.filter(method => method.id !== vmId),
|
|
427
|
+
...existingMethods.filter(method => method.id !== vmId && method.id !== ladderVmId),
|
|
268
428
|
unlockKeyVerificationMethod({
|
|
269
429
|
did,
|
|
270
430
|
keyAgreement: unlockKeys.keyAgreement
|
|
271
|
-
})
|
|
431
|
+
}),
|
|
432
|
+
...(ladderVmKey !== undefined
|
|
433
|
+
? [
|
|
434
|
+
ladderVerificationMethod({
|
|
435
|
+
controller: did,
|
|
436
|
+
publicKeyMultibase: ladderVmKey
|
|
437
|
+
})
|
|
438
|
+
]
|
|
439
|
+
: [])
|
|
272
440
|
]
|
|
273
441
|
: existingMethods.filter(method => method.id === undefined || !struckIds.has(method.id));
|
|
274
442
|
// On the remove polarity every relation drops the struck ids: the
|
|
@@ -281,6 +449,18 @@ async function setUnlockKeyInventoryOnce({ idStore, updateKeys, unlockKeys, ladd
|
|
|
281
449
|
const keyAgreement = polarity === 'publish'
|
|
282
450
|
? [...new Set([...relationIds(doc.keyAgreement), vmId])]
|
|
283
451
|
: relation(doc.keyAgreement);
|
|
452
|
+
// The ladder VM's two relations, and only those: the asymmetry is what
|
|
453
|
+
// recognizes it (`ladderVmIds`) and what keeps it out of every client
|
|
454
|
+
// listing.
|
|
455
|
+
const withLadderVm = (ids) => ladderVmId === undefined
|
|
456
|
+
? relationIds(ids)
|
|
457
|
+
: [...new Set([...relationIds(ids), ladderVmId])];
|
|
458
|
+
const assertionMethod = polarity === 'publish'
|
|
459
|
+
? withLadderVm(doc.assertionMethod)
|
|
460
|
+
: relation(doc.assertionMethod);
|
|
461
|
+
const capabilityDelegation = polarity === 'publish'
|
|
462
|
+
? withLadderVm(doc.capabilityDelegation)
|
|
463
|
+
: relation(doc.capabilityDelegation);
|
|
284
464
|
const updated = await updateDID({
|
|
285
465
|
log: published.log,
|
|
286
466
|
signer,
|
|
@@ -291,12 +471,17 @@ async function setUnlockKeyInventoryOnce({ idStore, updateKeys, unlockKeys, ladd
|
|
|
291
471
|
nextKeyHashes,
|
|
292
472
|
verificationMethods,
|
|
293
473
|
authentication: relation(doc.authentication),
|
|
294
|
-
assertionMethod
|
|
474
|
+
assertionMethod,
|
|
295
475
|
keyAgreement,
|
|
296
476
|
capabilityInvocation: relation(doc.capabilityInvocation),
|
|
297
|
-
capabilityDelegation
|
|
477
|
+
capabilityDelegation
|
|
298
478
|
});
|
|
299
479
|
await publishUpdatedLog({ idStore, updated, ifMatch: published.etag });
|
|
300
|
-
return {
|
|
480
|
+
return {
|
|
481
|
+
did: updated.did,
|
|
482
|
+
doc: updated.doc,
|
|
483
|
+
log: updated.log,
|
|
484
|
+
ladderVm: ladderVmReport(updated.doc, struckLadderVmIds)
|
|
485
|
+
};
|
|
301
486
|
}
|
|
302
487
|
//# sourceMappingURL=standingWebvh.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standingWebvh.js","sourceRoot":"","sources":["../../src/unlock/standingWebvh.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"standingWebvh.js","sourceRoot":"","sources":["../../src/unlock/standingWebvh.ts"],"names":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AAC;QACxD,oBAAoB;KACrB,CAAC,CAAA;IACF,MAAM,iBAAiB,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,IAAI,EAAE,CAAC,CAAA;IACtE,OAAO;QACL,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,QAAQ,EAAE,cAAc,CAAC,OAAO,CAAC,GAAG,EAAE,iBAAiB,CAAC;KACzD,CAAA;AACH,CAAC"}
|
package/dist/webvh/didWebvh.d.ts
CHANGED
|
@@ -251,8 +251,9 @@ export declare function assertCanonicalClientKeys({ signingKeyMultibase, keyAgre
|
|
|
251
251
|
/**
|
|
252
252
|
* The one builder of the ladder VM's published verification method -- the
|
|
253
253
|
* STABLE SIBLING key a standing credential derives from its ladder seed
|
|
254
|
-
* (`@interop/wallet-core/unlock`, `ladderVmKeyMultibase`), published
|
|
255
|
-
*
|
|
254
|
+
* (`@interop/wallet-core/unlock`, `ladderVmKeyMultibase`), published for as
|
|
255
|
+
* long as that credential stands and co-resident with whatever clients the
|
|
256
|
+
* account has enrolled. The shape is forced, not
|
|
256
257
|
* preferred: @interop/zcap's `isController` flat-compares the delegating VM's
|
|
257
258
|
* `controller` string against the parent capability's controller (which the
|
|
258
259
|
* server synthesizes as the account did:webvh), and only an
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"didWebvh.d.ts","sourceRoot":"","sources":["../../src/webvh/didWebvh.ts"],"names":[],"mappings":"AA4EA,OAAO,KAAK,EACV,MAAM,EACN,MAAM,EACN,MAAM,EACN,kBAAkB,EACnB,MAAM,2BAA2B,CAAA;AAUlC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAU3D,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACzB,MAAM,0BAA0B,CAAA;AAEjC,OAAO,KAAK,EAAa,YAA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;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE;IAC/C,OAAO,EAAE,YAAY,CAAA;IACrB,UAAU,EAAE,qBAAqB,CAAA;IACjC,SAAS,EAAE,mBAAmB,CAAA;CAC/B,GAAG,OAAO,CAAC;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CAE3B;AAqJD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAsB,iBAAiB,CAAC,EACtC,aAAa,EACb,OAAO,EACP,WAAW,EACX,QAAQ,EACR,KAAK,EACN,EAAE;IACD,aAAa,EAAE,aAAa,CAAA;IAC5B,OAAO,EAAE,YAAY,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,mBAAmB,CAAA;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,OAAO,CAAC,cAAc,CAAC,CA6F1B"}
|
package/dist/webvh/didWebvh.js
CHANGED
|
@@ -326,8 +326,9 @@ export function assertCanonicalClientKeys({ signingKeyMultibase, keyAgreementKey
|
|
|
326
326
|
/**
|
|
327
327
|
* The one builder of the ladder VM's published verification method -- the
|
|
328
328
|
* STABLE SIBLING key a standing credential derives from its ladder seed
|
|
329
|
-
* (`@interop/wallet-core/unlock`, `ladderVmKeyMultibase`), published
|
|
330
|
-
*
|
|
329
|
+
* (`@interop/wallet-core/unlock`, `ladderVmKeyMultibase`), published for as
|
|
330
|
+
* long as that credential stands and co-resident with whatever clients the
|
|
331
|
+
* account has enrolled. The shape is forced, not
|
|
331
332
|
* preferred: @interop/zcap's `isController` flat-compares the delegating VM's
|
|
332
333
|
* `controller` string against the parent capability's controller (which the
|
|
333
334
|
* server synthesizes as the account did:webvh), and only an
|
|
@@ -543,9 +544,10 @@ function assembleWebvhVerificationMethods({ controllerTemplate, didWebKeys, clie
|
|
|
543
544
|
};
|
|
544
545
|
}
|
|
545
546
|
if (ladderVm) {
|
|
546
|
-
throw new Error('did:webvh: a genesis document lists a founding client or a
|
|
547
|
-
'
|
|
548
|
-
'
|
|
547
|
+
throw new Error('did:webvh: a genesis document lists either a founding client or a ' +
|
|
548
|
+
'ladder VM, and this one supplies both. The constraint is ' +
|
|
549
|
+
'genesis-only: a later entry may publish clients and ladder VMs ' +
|
|
550
|
+
'side by side.');
|
|
549
551
|
}
|
|
550
552
|
const { signingKeyMultibase, keyAgreementKeyMultibase } = clientKeys;
|
|
551
553
|
const method = (publicKeyMultibase) => ({
|