@interop/wallet-core 0.62.0 → 0.65.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/README.md +41 -16
- package/dist/clientAnnex/credentialAnchoredGenesis.d.ts +46 -26
- package/dist/clientAnnex/credentialAnchoredGenesis.d.ts.map +1 -1
- package/dist/clientAnnex/credentialAnchoredGenesis.js +91 -39
- package/dist/clientAnnex/credentialAnchoredGenesis.js.map +1 -1
- package/dist/clientAnnex/establish.d.ts +55 -34
- package/dist/clientAnnex/establish.d.ts.map +1 -1
- package/dist/clientAnnex/establish.js +102 -56
- package/dist/clientAnnex/establish.js.map +1 -1
- package/dist/clientAnnex/forget.d.ts +16 -2
- package/dist/clientAnnex/forget.d.ts.map +1 -1
- package/dist/clientAnnex/forget.js +11 -9
- package/dist/clientAnnex/forget.js.map +1 -1
- package/dist/clientAnnex/forgetLast.d.ts +62 -18
- package/dist/clientAnnex/forgetLast.d.ts.map +1 -1
- package/dist/clientAnnex/forgetLast.js +92 -26
- package/dist/clientAnnex/forgetLast.js.map +1 -1
- package/dist/clientAnnex/gc.d.ts +3 -2
- package/dist/clientAnnex/gc.d.ts.map +1 -1
- package/dist/clientAnnex/gc.js +7 -7
- package/dist/clientAnnex/gc.js.map +1 -1
- package/dist/clientAnnex/heal.d.ts +38 -5
- package/dist/clientAnnex/heal.d.ts.map +1 -1
- package/dist/clientAnnex/heal.js +346 -236
- package/dist/clientAnnex/heal.js.map +1 -1
- package/dist/clientAnnex/index.d.ts +21 -5
- package/dist/clientAnnex/index.d.ts.map +1 -1
- package/dist/clientAnnex/index.js +24 -5
- package/dist/clientAnnex/index.js.map +1 -1
- package/dist/clientAnnex/ladder.d.ts +58 -0
- package/dist/clientAnnex/ladder.d.ts.map +1 -1
- package/dist/clientAnnex/ladder.js +222 -33
- package/dist/clientAnnex/ladder.js.map +1 -1
- package/dist/clientAnnex/ladderAnchored.d.ts +148 -22
- package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -1
- package/dist/clientAnnex/ladderAnchored.js +391 -346
- package/dist/clientAnnex/ladderAnchored.js.map +1 -1
- package/dist/clientAnnex/log.d.ts +162 -43
- package/dist/clientAnnex/log.d.ts.map +1 -1
- package/dist/clientAnnex/log.js +423 -192
- package/dist/clientAnnex/log.js.map +1 -1
- package/dist/clientAnnex/mend.d.ts +12 -6
- package/dist/clientAnnex/mend.d.ts.map +1 -1
- package/dist/clientAnnex/mend.js +26 -12
- package/dist/clientAnnex/mend.js.map +1 -1
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts +6 -4
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts.map +1 -1
- package/dist/clientAnnex/recoveryLadderAnchored.js +56 -35
- package/dist/clientAnnex/recoveryLadderAnchored.js.map +1 -1
- package/dist/clientAnnex/spaceCapability.d.ts +123 -0
- package/dist/clientAnnex/spaceCapability.d.ts.map +1 -0
- package/dist/clientAnnex/spaceCapability.js +152 -0
- package/dist/clientAnnex/spaceCapability.js.map +1 -0
- package/dist/clientAnnex/stages.d.ts +63 -0
- package/dist/clientAnnex/stages.d.ts.map +1 -0
- package/dist/clientAnnex/stages.js +64 -0
- package/dist/clientAnnex/stages.js.map +1 -0
- package/dist/clientAnnex/zcap.d.ts +1 -1
- package/dist/clientAnnex/zcap.d.ts.map +1 -1
- package/dist/clientAnnex/zcap.js +42 -35
- package/dist/clientAnnex/zcap.js.map +1 -1
- package/dist/clients/policy.d.ts +15 -1
- package/dist/clients/policy.d.ts.map +1 -1
- package/dist/clients/policy.js +12 -6
- package/dist/clients/policy.js.map +1 -1
- package/dist/clients/revocation.d.ts +18 -10
- package/dist/clients/revocation.d.ts.map +1 -1
- package/dist/clients/revocation.js +13 -5
- package/dist/clients/revocation.js.map +1 -1
- package/dist/clients/rosterPolicy.d.ts +10 -2
- package/dist/clients/rosterPolicy.d.ts.map +1 -1
- package/dist/clients/rosterPolicy.js +41 -24
- package/dist/clients/rosterPolicy.js.map +1 -1
- package/dist/descriptors/acquire.d.ts.map +1 -1
- package/dist/descriptors/acquire.js +6 -23
- package/dist/descriptors/acquire.js.map +1 -1
- package/dist/descriptors/cipher.d.ts.map +1 -1
- package/dist/descriptors/cipher.js +5 -0
- package/dist/descriptors/cipher.js.map +1 -1
- package/dist/descriptors/errors.d.ts +43 -0
- package/dist/descriptors/errors.d.ts.map +1 -0
- package/dist/descriptors/errors.js +45 -0
- package/dist/descriptors/errors.js.map +1 -0
- package/dist/descriptors/index.d.ts +5 -0
- package/dist/descriptors/index.d.ts.map +1 -1
- package/dist/descriptors/index.js +5 -0
- package/dist/descriptors/index.js.map +1 -1
- package/dist/enrollment/enrollment.d.ts +37 -10
- package/dist/enrollment/enrollment.d.ts.map +1 -1
- package/dist/enrollment/enrollment.js +52 -15
- package/dist/enrollment/enrollment.js.map +1 -1
- package/dist/genesis/accountGenesis.d.ts +42 -11
- package/dist/genesis/accountGenesis.d.ts.map +1 -1
- package/dist/genesis/accountGenesis.js +80 -22
- package/dist/genesis/accountGenesis.js.map +1 -1
- package/dist/genesis/index.d.ts +3 -1
- package/dist/genesis/index.d.ts.map +1 -1
- package/dist/genesis/index.js +3 -1
- package/dist/genesis/index.js.map +1 -1
- package/dist/identity/agents.d.ts +17 -1
- package/dist/identity/agents.d.ts.map +1 -1
- package/dist/identity/agents.js +23 -7
- package/dist/identity/agents.js.map +1 -1
- package/dist/identity/index.d.ts +3 -1
- package/dist/identity/index.d.ts.map +1 -1
- package/dist/identity/index.js +3 -1
- package/dist/identity/index.js.map +1 -1
- package/dist/index.d.ts +6 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/keyring/index.d.ts +2 -1
- package/dist/keyring/index.d.ts.map +1 -1
- package/dist/keyring/index.js +2 -1
- package/dist/keyring/index.js.map +1 -1
- package/dist/keyring/record.d.ts.map +1 -1
- package/dist/keyring/record.js +3 -6
- package/dist/keyring/record.js.map +1 -1
- package/dist/keyring/unlockSpace.d.ts +14 -5
- package/dist/keyring/unlockSpace.d.ts.map +1 -1
- package/dist/keyring/unlockSpace.js +31 -36
- package/dist/keyring/unlockSpace.js.map +1 -1
- package/dist/keys/index.d.ts +10 -6
- package/dist/keys/index.d.ts.map +1 -1
- package/dist/keys/index.js +9 -5
- package/dist/keys/index.js.map +1 -1
- package/dist/keys/rosterLogStore.d.ts +12 -11
- package/dist/keys/rosterLogStore.d.ts.map +1 -1
- package/dist/keys/rosterLogStore.js +15 -13
- package/dist/keys/rosterLogStore.js.map +1 -1
- package/dist/keys/rosterStore.d.ts +3 -6
- package/dist/keys/rosterStore.d.ts.map +1 -1
- package/dist/keys/rosterStore.js +10 -9
- package/dist/keys/rosterStore.js.map +1 -1
- package/dist/keys/spaceEpochs.d.ts.map +1 -1
- package/dist/keys/spaceEpochs.js +2 -3
- package/dist/keys/spaceEpochs.js.map +1 -1
- package/dist/keys/userKeyRoster.d.ts +57 -7
- package/dist/keys/userKeyRoster.d.ts.map +1 -1
- package/dist/keys/userKeyRoster.js +222 -17
- package/dist/keys/userKeyRoster.js.map +1 -1
- package/dist/keys/userKeyRosterCascade.d.ts +7 -6
- package/dist/keys/userKeyRosterCascade.d.ts.map +1 -1
- package/dist/keys/userKeyRosterCascade.js +7 -6
- package/dist/keys/userKeyRosterCascade.js.map +1 -1
- package/dist/keys/wasLabelsStore.d.ts +9 -2
- package/dist/keys/wasLabelsStore.d.ts.map +1 -1
- package/dist/keys/wasLabelsStore.js +14 -6
- package/dist/keys/wasLabelsStore.js.map +1 -1
- package/dist/log.d.ts +7 -2
- package/dist/log.d.ts.map +1 -1
- package/dist/log.js +6 -1
- package/dist/log.js.map +1 -1
- package/dist/recovery/index.d.ts +12 -8
- package/dist/recovery/index.d.ts.map +1 -1
- package/dist/recovery/index.js +11 -7
- package/dist/recovery/index.js.map +1 -1
- package/dist/recovery/recoveryCode.d.ts +27 -7
- package/dist/recovery/recoveryCode.d.ts.map +1 -1
- package/dist/recovery/recoveryCode.js +18 -6
- package/dist/recovery/recoveryCode.js.map +1 -1
- package/dist/recovery/recoveryDelegation.d.ts.map +1 -1
- package/dist/recovery/recoveryDelegation.js +21 -34
- package/dist/recovery/recoveryDelegation.js.map +1 -1
- package/dist/recovery/recoveryWebvh.d.ts +75 -63
- package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
- package/dist/recovery/recoveryWebvh.js +127 -116
- package/dist/recovery/recoveryWebvh.js.map +1 -1
- package/dist/request/classify.d.ts +32 -8
- package/dist/request/classify.d.ts.map +1 -1
- package/dist/request/classify.js +39 -14
- package/dist/request/classify.js.map +1 -1
- package/dist/request/ephemeralExchange.d.ts +1 -6
- package/dist/request/ephemeralExchange.d.ts.map +1 -1
- package/dist/request/ephemeralExchange.js.map +1 -1
- package/dist/request/onboarding.d.ts.map +1 -1
- package/dist/request/onboarding.js +2 -2
- package/dist/request/onboarding.js.map +1 -1
- package/dist/request/parse.d.ts.map +1 -1
- package/dist/request/parse.js +2 -3
- package/dist/request/parse.js.map +1 -1
- package/dist/resourceLog/controller.d.ts +34 -12
- package/dist/resourceLog/controller.d.ts.map +1 -1
- package/dist/resourceLog/controller.js +79 -86
- package/dist/resourceLog/controller.js.map +1 -1
- package/dist/resourceLog/document.d.ts +182 -0
- package/dist/resourceLog/document.d.ts.map +1 -0
- package/dist/resourceLog/document.js +159 -0
- package/dist/resourceLog/document.js.map +1 -0
- package/dist/resourceLog/errors.d.ts +47 -8
- package/dist/resourceLog/errors.d.ts.map +1 -1
- package/dist/resourceLog/errors.js +54 -8
- package/dist/resourceLog/errors.js.map +1 -1
- package/dist/resourceLog/index.d.ts +7 -3
- package/dist/resourceLog/index.d.ts.map +1 -1
- package/dist/resourceLog/index.js +7 -3
- package/dist/resourceLog/index.js.map +1 -1
- package/dist/resourceLog/ladderRungs.d.ts +35 -0
- package/dist/resourceLog/ladderRungs.d.ts.map +1 -0
- package/dist/resourceLog/ladderRungs.js +352 -0
- package/dist/resourceLog/ladderRungs.js.map +1 -0
- package/dist/resourceLog/license.d.ts +42 -17
- package/dist/resourceLog/license.d.ts.map +1 -1
- package/dist/resourceLog/license.js +38 -24
- package/dist/resourceLog/license.js.map +1 -1
- package/dist/space/activity.d.ts +15 -15
- package/dist/space/activity.d.ts.map +1 -1
- package/dist/space/activity.js +15 -15
- package/dist/space/activity.js.map +1 -1
- package/dist/space/collections.d.ts +11 -0
- package/dist/space/collections.d.ts.map +1 -1
- package/dist/space/collections.js +13 -0
- package/dist/space/collections.js.map +1 -1
- package/dist/space/deleteSpace.d.ts +28 -0
- package/dist/space/deleteSpace.d.ts.map +1 -0
- package/dist/space/deleteSpace.js +44 -0
- package/dist/space/deleteSpace.js.map +1 -0
- package/dist/space/errors.d.ts.map +1 -1
- package/dist/space/errors.js +0 -1
- package/dist/space/errors.js.map +1 -1
- package/dist/space/index.d.ts +6 -0
- package/dist/space/index.d.ts.map +1 -1
- package/dist/space/index.js +6 -0
- package/dist/space/index.js.map +1 -1
- package/dist/space/plaintextCollection.d.ts +43 -0
- package/dist/space/plaintextCollection.d.ts.map +1 -0
- package/dist/space/plaintextCollection.js +17 -0
- package/dist/space/plaintextCollection.js.map +1 -0
- package/dist/stages.d.ts +23 -0
- package/dist/stages.d.ts.map +1 -0
- package/dist/stages.js +23 -0
- package/dist/stages.js.map +1 -0
- package/dist/sync/index.d.ts +7 -0
- package/dist/sync/index.d.ts.map +1 -1
- package/dist/sync/index.js +7 -0
- package/dist/sync/index.js.map +1 -1
- package/dist/sync/push.js +4 -4
- package/dist/sync/push.js.map +1 -1
- package/dist/sync/remint.js +2 -2
- package/dist/sync/remint.js.map +1 -1
- package/dist/sync/types.d.ts +41 -1
- package/dist/sync/types.d.ts.map +1 -1
- package/dist/sync/types.js +47 -1
- package/dist/sync/types.js.map +1 -1
- package/dist/unlock/index.d.ts +5 -1
- package/dist/unlock/index.d.ts.map +1 -1
- package/dist/unlock/index.js +5 -1
- package/dist/unlock/index.js.map +1 -1
- package/dist/unlock/retire.d.ts +35 -7
- package/dist/unlock/retire.d.ts.map +1 -1
- package/dist/unlock/retire.js +52 -14
- package/dist/unlock/retire.js.map +1 -1
- package/dist/unlock/standingClient.d.ts.map +1 -1
- package/dist/unlock/standingClient.js +5 -1
- package/dist/unlock/standingClient.js.map +1 -1
- package/dist/unlock/standingWebvh.d.ts +217 -35
- package/dist/unlock/standingWebvh.d.ts.map +1 -1
- package/dist/unlock/standingWebvh.js +469 -210
- package/dist/unlock/standingWebvh.js.map +1 -1
- package/dist/webvh/accountEntry.d.ts +146 -0
- package/dist/webvh/accountEntry.d.ts.map +1 -0
- package/dist/webvh/accountEntry.js +239 -0
- package/dist/webvh/accountEntry.js.map +1 -0
- package/dist/webvh/didWeb.d.ts +12 -7
- package/dist/webvh/didWeb.d.ts.map +1 -1
- package/dist/webvh/didWeb.js +2 -2
- package/dist/webvh/didWeb.js.map +1 -1
- package/dist/webvh/didWebProjection.d.ts +164 -0
- package/dist/webvh/didWebProjection.d.ts.map +1 -0
- package/dist/webvh/didWebProjection.js +230 -0
- package/dist/webvh/didWebProjection.js.map +1 -0
- package/dist/webvh/didWebvh.d.ts +275 -136
- package/dist/webvh/didWebvh.d.ts.map +1 -1
- package/dist/webvh/didWebvh.js +307 -340
- package/dist/webvh/didWebvh.js.map +1 -1
- package/dist/webvh/enrollClient.d.ts +65 -0
- package/dist/webvh/enrollClient.d.ts.map +1 -0
- package/dist/webvh/enrollClient.js +172 -0
- package/dist/webvh/enrollClient.js.map +1 -0
- package/dist/webvh/index.d.ts +37 -12
- package/dist/webvh/index.d.ts.map +1 -1
- package/dist/webvh/index.js +33 -10
- package/dist/webvh/index.js.map +1 -1
- package/dist/webvh/listClients.d.ts +1 -35
- package/dist/webvh/listClients.d.ts.map +1 -1
- package/dist/webvh/listClients.js +2 -30
- package/dist/webvh/listClients.js.map +1 -1
- package/dist/webvh/revokeClient.d.ts +41 -11
- package/dist/webvh/revokeClient.d.ts.map +1 -1
- package/dist/webvh/revokeClient.js +99 -48
- package/dist/webvh/revokeClient.js.map +1 -1
- package/dist/webvh/standingZcap.d.ts +61 -14
- package/dist/webvh/standingZcap.d.ts.map +1 -1
- package/dist/webvh/standingZcap.js +91 -0
- package/dist/webvh/standingZcap.js.map +1 -1
- package/dist/webvh/verifyLog.d.ts +59 -5
- package/dist/webvh/verifyLog.d.ts.map +1 -1
- package/dist/webvh/verifyLog.js +76 -11
- package/dist/webvh/verifyLog.js.map +1 -1
- package/dist/webvh/wasIdStore.d.ts +8 -8
- package/dist/webvh/wasIdStore.d.ts.map +1 -1
- package/dist/webvh/wasIdStore.js +39 -14
- package/dist/webvh/wasIdStore.js.map +1 -1
- package/dist/webvh/zcap.d.ts +14 -1
- package/dist/webvh/zcap.d.ts.map +1 -1
- package/dist/webvh/zcap.js +3 -27
- package/dist/webvh/zcap.js.map +1 -1
- package/package.json +2 -2
- package/dist/webvh/keyAgreement.d.ts +0 -97
- package/dist/webvh/keyAgreement.d.ts.map +0 -1
- package/dist/webvh/keyAgreement.js +0 -71
- package/dist/webvh/keyAgreement.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { addRecipient, initRecipients, ownerRecipient, removeRecipient, replaceRecipient, unwrapEpochSecret } from '@interop/was-client/edv';
|
|
2
2
|
import { vmFragmentOf } from '@interop/vh-resource-log';
|
|
3
|
-
import { commitmentMatcher, MULTIKEY_COMMITMENT_VM_TYPE } from '../webvh/didWebvh.js';
|
|
4
|
-
import { resolvedKeyAgreementMethods } from '../
|
|
3
|
+
import { clientKeyAgreementController, commitmentMatcher, MULTIKEY_COMMITMENT_VM_TYPE } from '../webvh/didWebvh.js';
|
|
4
|
+
import { resolvedKeyAgreementMethods } from '../resourceLog/document.js';
|
|
5
5
|
import { clientSigningKeyMultibase } from '../webvh/zcap.js';
|
|
6
6
|
/**
|
|
7
7
|
* Thrown when a served roster fails its client-side consistency checks: a
|
|
@@ -256,6 +256,83 @@ export async function rotateUserKeyRoster({ store, document, retireRecipientId }
|
|
|
256
256
|
pull: async () => { }
|
|
257
257
|
});
|
|
258
258
|
}
|
|
259
|
+
/**
|
|
260
|
+
* The error name a lost descriptor compare-and-swap surfaces as --
|
|
261
|
+
* was-client's `PreconditionFailedError`, and whatever an alternative store
|
|
262
|
+
* implementation throws under that name (the `EncryptionDescriptorStore` port
|
|
263
|
+
* documents the class).
|
|
264
|
+
*/
|
|
265
|
+
const PRECONDITION_FAILED_ERROR_NAME = 'PreconditionFailedError';
|
|
266
|
+
/**
|
|
267
|
+
* How many times the batched escrow re-reads and re-applies after losing the
|
|
268
|
+
* compare-and-swap. Matches was-client's own recipient-operation budget: a
|
|
269
|
+
* lost race means nothing was appended, so the license shot the append would
|
|
270
|
+
* spend is still standing.
|
|
271
|
+
*/
|
|
272
|
+
const ESCROW_CAS_ATTEMPTS = 3;
|
|
273
|
+
/**
|
|
274
|
+
* Escrows several recipients into every epoch in ONE descriptor write.
|
|
275
|
+
*
|
|
276
|
+
* was-client's `addRecipient` takes one recipient and does its own read,
|
|
277
|
+
* mutate and compare-and-swap, so a loop over it costs one write per
|
|
278
|
+
* recipient. On a log-governed store a write IS a log append, and a
|
|
279
|
+
* ladder-signed append is one-shot per licensed version, so the second
|
|
280
|
+
* recipient's append would be refused after the caller's pivot. The escrow
|
|
281
|
+
* crypto stays was-client's: `addRecipient` runs against a buffering store
|
|
282
|
+
* whose reads serve the staged descriptor and whose writes stay in memory,
|
|
283
|
+
* and the staged result is written back through the real store once, under
|
|
284
|
+
* the compare-and-swap token of the read the whole batch was built on.
|
|
285
|
+
*
|
|
286
|
+
* @param options {object}
|
|
287
|
+
* @param options.store {EncryptionDescriptorStore} the roster's descriptor
|
|
288
|
+
* store
|
|
289
|
+
* @param options.recipients {RecipientPublicKey[]} the incoming readers'
|
|
290
|
+
* public key-agreement keys; at least one
|
|
291
|
+
* @param options.ownerKeyAgreementKey {IKeyAgreementKey} a key-agreement
|
|
292
|
+
* key holding a wrap in every epoch, unwrapping each one for the escrow
|
|
293
|
+
* @returns {Promise<CollectionEncryption>} the roster as this write leaves
|
|
294
|
+
* it
|
|
295
|
+
*/
|
|
296
|
+
async function escrowRosterRecipients({ store, recipients, ownerKeyAgreementKey }) {
|
|
297
|
+
let lastError;
|
|
298
|
+
for (let attempt = 0; attempt < ESCROW_CAS_ATTEMPTS; attempt++) {
|
|
299
|
+
const read = await store.read();
|
|
300
|
+
if (read === null) {
|
|
301
|
+
throw new UserKeyRosterIntegrityError('The user key roster does not exist; there is nothing to escrow into.');
|
|
302
|
+
}
|
|
303
|
+
let staged = read.descriptor;
|
|
304
|
+
const buffer = {
|
|
305
|
+
read: async () => ({ descriptor: staged }),
|
|
306
|
+
replace: async (next) => {
|
|
307
|
+
staged = next;
|
|
308
|
+
}
|
|
309
|
+
};
|
|
310
|
+
for (const recipient of recipients) {
|
|
311
|
+
staged = await addRecipient({
|
|
312
|
+
store: buffer,
|
|
313
|
+
recipient,
|
|
314
|
+
owner: { keyAgreementKey: ownerKeyAgreementKey }
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
try {
|
|
318
|
+
await store.replace(staged, {
|
|
319
|
+
...(read.etag !== undefined ? { ifMatch: read.etag } : {})
|
|
320
|
+
});
|
|
321
|
+
return staged;
|
|
322
|
+
}
|
|
323
|
+
catch (err) {
|
|
324
|
+
if (err?.name === PRECONDITION_FAILED_ERROR_NAME) {
|
|
325
|
+
// A concurrent writer landed first: nothing of this batch was
|
|
326
|
+
// written, so re-read and re-apply.
|
|
327
|
+
lastError = err;
|
|
328
|
+
continue;
|
|
329
|
+
}
|
|
330
|
+
throw err;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
throw new Error('The user key roster escrow lost the compare-and-swap race after ' +
|
|
334
|
+
`${ESCROW_CAS_ATTEMPTS} attempts. Retry the convergence.`, { cause: lastError });
|
|
335
|
+
}
|
|
259
336
|
/**
|
|
260
337
|
* Rotates the roster off one or more recipients while escrowing incoming ones,
|
|
261
338
|
* in ONE descriptor write -- the transient-recovery continuation's mandatory
|
|
@@ -336,6 +413,53 @@ export function rosterRecipientsToRetire({ descriptor, keepRecipientIds }) {
|
|
|
336
413
|
.filter(kid => !keep.has(kid)))
|
|
337
414
|
];
|
|
338
415
|
}
|
|
416
|
+
/**
|
|
417
|
+
* The enrolled clients the account document keys, as roster recipients. A
|
|
418
|
+
* client's `keyAgreement` twin carries the controller marker
|
|
419
|
+
* `did:key:<its signing multibase>` (`clientKeyAgreementController` is the one
|
|
420
|
+
* write-side builder), so the marker names the signing half and the method
|
|
421
|
+
* carries the key-agreement half -- together, exactly the pair
|
|
422
|
+
* {@link rosterRecipientKid} takes. That is what makes the escrow direction of
|
|
423
|
+
* the convergence possible from the document alone.
|
|
424
|
+
*
|
|
425
|
+
* A standing unlock credential is deliberately not here, and not because it is
|
|
426
|
+
* unwanted. Its roster kid names its standing client's SIGNING key, which the
|
|
427
|
+
* document never publishes: the document carries the credential's
|
|
428
|
+
* key-agreement key (or a commitment to it) and nothing else, so no reader can
|
|
429
|
+
* rebuild the kid its own roster reads look for. A credential's missing wrap
|
|
430
|
+
* is therefore mended by the ceremony that holds the credential, never here.
|
|
431
|
+
*
|
|
432
|
+
* @param options {object}
|
|
433
|
+
* @param options.document {KeyAgreementDocument} the locally verified
|
|
434
|
+
* did:webvh document
|
|
435
|
+
* @returns {RecipientPublicKey[]} in document order
|
|
436
|
+
*/
|
|
437
|
+
export function enrolledClientRosterRecipients({ document }) {
|
|
438
|
+
const recipients = [];
|
|
439
|
+
for (const method of resolvedKeyAgreementMethods({ doc: document })) {
|
|
440
|
+
const controller = method.controller;
|
|
441
|
+
const keyAgreementKeyMultibase = method.publicKeyMultibase;
|
|
442
|
+
if (method.type === MULTIKEY_COMMITMENT_VM_TYPE ||
|
|
443
|
+
typeof controller !== 'string' ||
|
|
444
|
+
typeof keyAgreementKeyMultibase !== 'string') {
|
|
445
|
+
continue;
|
|
446
|
+
}
|
|
447
|
+
// The marker is read by rebuilding it: whatever the third segment holds is
|
|
448
|
+
// a candidate signing multibase, and the marker matches only when the one
|
|
449
|
+
// write-side builder produces the controller verbatim.
|
|
450
|
+
const [, , signingKeyMultibase] = controller.split(':');
|
|
451
|
+
if (signingKeyMultibase === undefined ||
|
|
452
|
+
signingKeyMultibase === '' ||
|
|
453
|
+
clientKeyAgreementController({ signingKeyMultibase }) !== controller) {
|
|
454
|
+
continue;
|
|
455
|
+
}
|
|
456
|
+
recipients.push({
|
|
457
|
+
id: rosterRecipientKid({ signingKeyMultibase, keyAgreementKeyMultibase }),
|
|
458
|
+
publicKeyMultibase: keyAgreementKeyMultibase
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
return recipients;
|
|
462
|
+
}
|
|
339
463
|
/**
|
|
340
464
|
* Converges the roster onto the account document: the standing detector for a
|
|
341
465
|
* revocation cascade torn between its two halves. The cascade edits the
|
|
@@ -348,9 +472,30 @@ export function rosterRecipientsToRetire({ descriptor, keepRecipientIds }) {
|
|
|
348
472
|
* document-backed resolver cannot answer for is exactly a recipient the
|
|
349
473
|
* document no longer keys, so a healthy account reads the descriptor and
|
|
350
474
|
* writes nothing. When any such recipient is found the roster is rotated away
|
|
351
|
-
* from ALL of them at once
|
|
352
|
-
*
|
|
353
|
-
*
|
|
475
|
+
* from ALL of them at once, because the resolver drops every unbacked entry
|
|
476
|
+
* from the fresh epoch, not just the one named as retiring.
|
|
477
|
+
*
|
|
478
|
+
* The convergence runs in TWO directions, in one append. The retire direction
|
|
479
|
+
* is above. The escrow direction is its mirror: an enrolled client the
|
|
480
|
+
* document keys that holds no wrap in the current epoch is escrowed into every
|
|
481
|
+
* epoch ({@link enrolledClientRosterRecipients} names the candidates). That is
|
|
482
|
+
* the mender for a ceremony torn between the entry that published a client and
|
|
483
|
+
* the append that was to wrap the user key to it -- the one-request window a
|
|
484
|
+
* ladder-signed enrollment approval leaves, where the ladder's append is
|
|
485
|
+
* licensed only as the tail of its own entry and cannot precede it. A standing
|
|
486
|
+
* unlock credential is not a candidate: its roster kid names a signing key the
|
|
487
|
+
* document does not publish (see the helper), so its missing wrap is mended by
|
|
488
|
+
* the ceremony holding the credential.
|
|
489
|
+
*
|
|
490
|
+
* Either direction, and both together, cost exactly ONE descriptor write. A
|
|
491
|
+
* convergence needing both rides `replaceRecipient`; a pure escrow rides
|
|
492
|
+
* {@link escrowRosterRecipients}, which stages every missing recipient's
|
|
493
|
+
* wraps through was-client's `addRecipient` and writes once, so the user key
|
|
494
|
+
* is not rotated for a missing wrap and a ladder-signed convergence never
|
|
495
|
+
* needs a second append it has no license for. A healthy roster writes
|
|
496
|
+
* nothing at all. The escrow direction needs a key that unwraps every epoch,
|
|
497
|
+
* so it runs only for a caller that supplies `ownerKeyAgreementKey`; without
|
|
498
|
+
* one the retire direction runs alone.
|
|
354
499
|
*
|
|
355
500
|
* Rotating onto nobody is refused: a current epoch in which NO recipient is
|
|
356
501
|
* backed by the document is a mismatched pair (a stale document, the wrong
|
|
@@ -370,16 +515,24 @@ export function rosterRecipientsToRetire({ descriptor, keepRecipientIds }) {
|
|
|
370
515
|
* @param [options.descriptor] {CollectionEncryption} a descriptor the caller
|
|
371
516
|
* has just read (a login-time roster read), to save a re-read; omitted, the
|
|
372
517
|
* roster is read fresh
|
|
518
|
+
* @param [options.ownerKeyAgreementKey] {IKeyAgreementKey} a key-agreement
|
|
519
|
+
* key holding a wrap in every epoch, unwrapping each one for the escrow
|
|
520
|
+
* direction; omitted, only the retire direction runs
|
|
373
521
|
* @returns {Promise<object>} whether the roster rotated on this call, the
|
|
374
|
-
* stale recipient kids found, and the roster descriptor
|
|
375
|
-
* (`null` when the account has no roster yet)
|
|
522
|
+
* stale recipient kids found, the kids escrowed, and the roster descriptor
|
|
523
|
+
* as it now stands (`null` when the account has no roster yet)
|
|
376
524
|
*/
|
|
377
|
-
export async function convergeUserKeyRosterToDocument({ store, document, descriptor }) {
|
|
525
|
+
export async function convergeUserKeyRosterToDocument({ store, document, descriptor, ownerKeyAgreementKey }) {
|
|
378
526
|
let roster = descriptor;
|
|
379
527
|
if (!roster) {
|
|
380
528
|
const read = await store.read();
|
|
381
529
|
if (read === null) {
|
|
382
|
-
return {
|
|
530
|
+
return {
|
|
531
|
+
rotated: false,
|
|
532
|
+
staleRecipientIds: [],
|
|
533
|
+
escrowedRecipientIds: [],
|
|
534
|
+
descriptor: null
|
|
535
|
+
};
|
|
383
536
|
}
|
|
384
537
|
roster = read.descriptor;
|
|
385
538
|
}
|
|
@@ -391,8 +544,10 @@ export async function convergeUserKeyRosterToDocument({ store, document, descrip
|
|
|
391
544
|
const resolveRecipientKey = userKeyRosterRecipientResolver({ document });
|
|
392
545
|
const staleRecipientIds = [];
|
|
393
546
|
let backed = 0;
|
|
547
|
+
const wrappedKids = new Set();
|
|
394
548
|
for (const entry of currentEpoch.recipients) {
|
|
395
549
|
const kid = entry.header.kid;
|
|
550
|
+
wrappedKids.add(kid);
|
|
396
551
|
if ((await resolveRecipientKey(kid)) === null) {
|
|
397
552
|
staleRecipientIds.push(kid);
|
|
398
553
|
}
|
|
@@ -400,21 +555,71 @@ export async function convergeUserKeyRosterToDocument({ store, document, descrip
|
|
|
400
555
|
backed++;
|
|
401
556
|
}
|
|
402
557
|
}
|
|
403
|
-
|
|
404
|
-
|
|
558
|
+
const escrow = ownerKeyAgreementKey
|
|
559
|
+
? {
|
|
560
|
+
ownerKeyAgreementKey,
|
|
561
|
+
recipients: enrolledClientRosterRecipients({ document }).filter(recipient => !wrappedKids.has(recipient.id))
|
|
562
|
+
}
|
|
563
|
+
: undefined;
|
|
564
|
+
const escrowedRecipientIds = (escrow?.recipients ?? []).map(recipient => recipient.id);
|
|
565
|
+
if (staleRecipientIds.length === 0 && escrowedRecipientIds.length === 0) {
|
|
566
|
+
return {
|
|
567
|
+
rotated: false,
|
|
568
|
+
staleRecipientIds,
|
|
569
|
+
escrowedRecipientIds,
|
|
570
|
+
descriptor: roster
|
|
571
|
+
};
|
|
405
572
|
}
|
|
406
|
-
if (backed === 0) {
|
|
573
|
+
if (staleRecipientIds.length > 0 && backed === 0) {
|
|
407
574
|
throw new UserKeyRosterIntegrityError('No user key roster recipient is keyed by the account document; refusing ' +
|
|
408
575
|
'to rotate the roster onto no one.');
|
|
409
576
|
}
|
|
410
|
-
//
|
|
411
|
-
//
|
|
412
|
-
|
|
577
|
+
// A pure removal is `removeRecipient`'s shape and a pure escrow is
|
|
578
|
+
// `addRecipient`'s; was-client refuses `replaceRecipient` for either, and
|
|
579
|
+
// that is also where the append counts differ. One direction at a time:
|
|
580
|
+
if (escrow === undefined || escrow.recipients.length === 0) {
|
|
581
|
+
const rotated = await rotateUserKeyRoster({
|
|
582
|
+
store,
|
|
583
|
+
document,
|
|
584
|
+
retireRecipientId: staleRecipientIds[0]
|
|
585
|
+
});
|
|
586
|
+
return {
|
|
587
|
+
rotated: true,
|
|
588
|
+
staleRecipientIds,
|
|
589
|
+
escrowedRecipientIds,
|
|
590
|
+
descriptor: rotated
|
|
591
|
+
};
|
|
592
|
+
}
|
|
593
|
+
// One append for every incoming recipient together, and no fresh epoch, so
|
|
594
|
+
// a ladder-signed convergence spends exactly one licensed append whatever
|
|
595
|
+
// the tear left missing.
|
|
596
|
+
if (staleRecipientIds.length === 0) {
|
|
597
|
+
return {
|
|
598
|
+
rotated: false,
|
|
599
|
+
staleRecipientIds,
|
|
600
|
+
escrowedRecipientIds,
|
|
601
|
+
descriptor: await escrowRosterRecipients({
|
|
602
|
+
store,
|
|
603
|
+
recipients: escrow.recipients,
|
|
604
|
+
ownerKeyAgreementKey: escrow.ownerKeyAgreementKey
|
|
605
|
+
})
|
|
606
|
+
};
|
|
607
|
+
}
|
|
608
|
+
const converged = await replaceUserKeyRosterRecipients({
|
|
413
609
|
store,
|
|
414
610
|
document,
|
|
415
|
-
|
|
611
|
+
retireRecipientIds: staleRecipientIds,
|
|
612
|
+
recipients: escrow.recipients,
|
|
613
|
+
ownerKeyAgreementKey: escrow.ownerKeyAgreementKey
|
|
416
614
|
});
|
|
417
|
-
return {
|
|
615
|
+
return {
|
|
616
|
+
// An escrow-only convergence writes wraps without minting an epoch, so
|
|
617
|
+
// the fresh epoch id is what says whether the user key rotated.
|
|
618
|
+
rotated: converged.currentEpoch !== roster.currentEpoch,
|
|
619
|
+
staleRecipientIds,
|
|
620
|
+
escrowedRecipientIds,
|
|
621
|
+
descriptor: converged
|
|
622
|
+
};
|
|
418
623
|
}
|
|
419
624
|
export async function readUserKeyRoster({ store, descriptor: knownDescriptor, userKey, clientKeyAgreementKey, pinnedEpochId }) {
|
|
420
625
|
let descriptor = knownDescriptor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userKeyRoster.js","sourceRoot":"","sources":["../../src/keys/userKeyRoster.ts"],"names":[],"mappings":"AAmDA,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EAGlB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,YAAY,EAA0B,MAAM,0BAA0B,CAAA;AAC/E,OAAO,EACL,iBAAiB,EACjB,2BAA2B,EAC5B,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAA;AAEtE,OAAO,EACL,yBAAyB,EAE1B,MAAM,kBAAkB,CAAA;AAGzB;;;;;GAKG;AACH,MAAM,OAAO,2BAA4B,SAAQ,KAAK;IACpD,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,IAAI,CAAC,IAAI,GAAG,6BAA6B,CAAA;IAC3C,CAAC;CACF;AAED;;;;;GAKG;AACH,MAAM,OAAO,4BAA6B,SAAQ,KAAK;IACrD,aAAa,CAAQ;IACrB,YAAY,EAAE,aAAa,EAA6B;QACtD,KAAK,CACH,4EAA4E;YAC1E,mCAAmC,CACtC,CAAA;QACD,IAAI,CAAC,IAAI,GAAG,8BAA8B,CAAA;QAC1C,IAAI,CAAC,aAAa,GAAG,aAAa,CAAA;IACpC,CAAC;CACF;AAED;;;;;GAKG;AACH,MAAM,OAAO,wBAAyB,SAAQ,KAAK;IACjD,YA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C,GAAG,KAAK,qBAAqB,CAAC,EAAE,CAC/D,CAAA;QACD,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,MAAM,IAAI,wBAAwB,CAChC,oEAAoE,CACrE,CAAA;QACH,CAAC;QACD,MAAM,MAAM,GAAG,MAAM,iBAAiB,CAAC;YACrC,KAAK;YACL,eAAe,EAAE,qBAAqB;SACvC,CAAC,CAAA;QACF,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,wBAAwB,CAChC,uDAAuD,CACxD,CAAA;QACH,CAAC;QACD,cAAc,GAAG,EAAE,EAAE,EAAE,UAAU,CAAC,YAAa,EAAE,MAAM,EAAE,CAAA;QACzD,OAAO,GAAG,IAAI,CAAA;IAChB,CAAC;IAED,OAAO;QACL,UAAU;QACV,OAAO,EAAE,cAAc;QACvB,OAAO;QACP,aAAa,EAAE,UAAU,CAAC,YAAa;KACxC,CAAA;AACH,CAAC"}
|
|
@@ -11,10 +11,11 @@
|
|
|
11
11
|
* from the document the edit itself just resolved to (no re-fetch of the
|
|
12
12
|
* log the ceremony just extended). On a log-governed roster store this
|
|
13
13
|
* function itself guarantees post-edit anchoring: the controller view built
|
|
14
|
-
* from the edit's own post-edit log is set as the store's
|
|
15
|
-
* (`
|
|
16
|
-
* and the seal backstop anchor at or past the edit
|
|
17
|
-
* injected controller resolution still serves a
|
|
14
|
+
* from the edit's own post-edit log is set as the store's minimum controller
|
|
15
|
+
* version (`setMinimumControllerVersion`) before anything roster-side
|
|
16
|
+
* runs, so the rotation and the seal backstop anchor at or past the edit
|
|
17
|
+
* even where the app's injected controller resolution still serves a
|
|
18
|
+
* cached pre-edit view. The
|
|
18
19
|
* roster delivers, never sources, so the stage names no recipient at all:
|
|
19
20
|
* it converges the roster onto that document (the login sweep's own path),
|
|
20
21
|
* retiring every current-epoch recipient the document no longer keys in one
|
|
@@ -90,8 +91,8 @@ export interface RosterCascadeResult {
|
|
|
90
91
|
* `key-map/user-key.jsonl` roster store
|
|
91
92
|
* @param options.did {string} the account's did:webvh
|
|
92
93
|
* @param options.doc {DIDDoc} the document as the ceremony's edit left it
|
|
93
|
-
* @param options.log {DIDLog} the post-edit log, which the
|
|
94
|
-
* is built from
|
|
94
|
+
* @param options.log {DIDLog} the post-edit log, which the minimum
|
|
95
|
+
* controller version is built from
|
|
95
96
|
* @param [options.userKey] {UserKey} this client's cached user key
|
|
96
97
|
* @param options.clientKeyAgreementKey {IKeyAgreementKey} this client's own
|
|
97
98
|
* (identity) key-agreement key -- its roster entry
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userKeyRosterCascade.d.ts","sourceRoot":"","sources":["../../src/keys/userKeyRosterCascade.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"userKeyRosterCascade.d.ts","sourceRoot":"","sources":["../../src/keys/userKeyRosterCascade.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AACpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAC/D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAA;AAExE,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,qBAAqB,CAAA;AAM5B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAE3C;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAA;IACrC,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,kBAAkB;IACjC,aAAa,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAA;IACnD,QAAQ,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,yBAAyB,CAAA;IAC7D,WAAW,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;CACzD;AAED;;;;;;GAMG;AACH,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAA;IAChB,UAAU,CAAC,EAAE,gBAAgB,CAAA;IAC7B,WAAW,EAAE,oBAAoB,CAAA;IACjC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,gBAAgB,CAAC,EAAE,oBAAoB,CAAA;CACxC;AAqBD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,gCAAgC,CAAC,EACrD,WAAW,EACX,GAAG,EACH,GAAG,EACH,GAAG,EACH,OAAO,EACP,qBAAqB,EACrB,aAAa,EACb,gBAAgB,EAChB,WAAW,EACZ,EAAE;IACD,WAAW,EAAE,yBAAyB,CAAA;IACtC,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,qBAAqB,EAAE,gBAAgB,CAAA;IACvC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE;QAC3B,OAAO,EAAE,OAAO,CAAA;QAChB,aAAa,EAAE,MAAM,CAAA;QACrB,UAAU,EAAE,oBAAoB,CAAA;KACjC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACnB,WAAW,EAAE,kBAAkB,CAAA;CAChC,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAsF/B"}
|
|
@@ -26,8 +26,8 @@ async function collectionIdsOf({ collections }) {
|
|
|
26
26
|
* `key-map/user-key.jsonl` roster store
|
|
27
27
|
* @param options.did {string} the account's did:webvh
|
|
28
28
|
* @param options.doc {DIDDoc} the document as the ceremony's edit left it
|
|
29
|
-
* @param options.log {DIDLog} the post-edit log, which the
|
|
30
|
-
* is built from
|
|
29
|
+
* @param options.log {DIDLog} the post-edit log, which the minimum
|
|
30
|
+
* controller version is built from
|
|
31
31
|
* @param [options.userKey] {UserKey} this client's cached user key
|
|
32
32
|
* @param options.clientKeyAgreementKey {IKeyAgreementKey} this client's own
|
|
33
33
|
* (identity) key-agreement key -- its roster entry
|
|
@@ -45,10 +45,10 @@ export async function rotateRosterToDocumentAndCascade({ rosterStore, did, doc,
|
|
|
45
45
|
// includes the edit the ceremony just published, or the rotation anchors
|
|
46
46
|
// pre-edit and the log stays unsealed with the seal blind to the removal.
|
|
47
47
|
// Rather than leaving that to the injected store's own controller wiring,
|
|
48
|
-
// the view built from the edit's post-edit log is set as the store's
|
|
49
|
-
// a fresher resolved view still wins.
|
|
48
|
+
// the view built from the edit's post-edit log is set as the store's minimum
|
|
49
|
+
// controller version; a fresher resolved view still wins.
|
|
50
50
|
if (isSealableDescriptorStore(rosterStore)) {
|
|
51
|
-
rosterStore.
|
|
51
|
+
rosterStore.setMinimumControllerVersion({
|
|
52
52
|
controller: webvhResourceLogController({ did, log })
|
|
53
53
|
});
|
|
54
54
|
}
|
|
@@ -64,7 +64,8 @@ export async function rotateRosterToDocumentAndCascade({ rosterStore, did, doc,
|
|
|
64
64
|
// run left behind, in one rotation.
|
|
65
65
|
const converged = await convergeUserKeyRosterToDocument({
|
|
66
66
|
store: rosterStore,
|
|
67
|
-
document: doc
|
|
67
|
+
document: doc,
|
|
68
|
+
ownerKeyAgreementKey: clientKeyAgreementKey
|
|
68
69
|
});
|
|
69
70
|
if (converged.descriptor === null) {
|
|
70
71
|
return { rotated: false, collections: { outcomes: {}, failed: [] } };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userKeyRosterCascade.js","sourceRoot":"","sources":["../../src/keys/userKeyRosterCascade.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,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,MAAM,2BAA2B,CAAC;QAChD,aAAa,EAAE,MAAM,eAAe,CAAC,EAAE,WAAW,EAAE,CAAC;QACrD,QAAQ,EAAE,WAAW,CAAC,QAAQ;QAC9B,GAAG,CAAC,WAAW,CAAC,WAAW;YACzB,CAAC,CAAC,EAAE,WAAW,EAAE,WAAW,CAAC,WAAW,EAAE;YAC1C,CAAC,CAAC,EAAE,CAAC;QACP,gBAAgB,EAAE,IAAI,CAAC,UAAU;QACjC,qBAAqB;QACrB,OAAO,EAAE,IAAI,CAAC,OAAO;KACtB,CAAC,CAAA;IAEF,OAAO;QACL,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACrC,WAAW,EAAE,OAAO;QACpB,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,gBAAgB,EAAE,IAAI,CAAC,UAAU;KAClC,CAAA;AACH,CAAC"}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* collection the wrap-set roster lives in. Every wallet app on the account
|
|
9
9
|
* shares this one implementation, so they share one record.
|
|
10
10
|
*/
|
|
11
|
+
import type { IZcap } from '@interop/data-integrity-core';
|
|
11
12
|
import type { WasClient } from '@interop/was-client';
|
|
12
13
|
import type { ClientLabelsStore } from './clientLabels.js';
|
|
13
14
|
/**
|
|
@@ -15,12 +16,18 @@ import type { ClientLabelsStore } from './clientLabels.js';
|
|
|
15
16
|
*
|
|
16
17
|
* @param options {object}
|
|
17
18
|
* @param options.was {WasClient} the account's storage client, signing as an
|
|
18
|
-
* enrolled client
|
|
19
|
+
* enrolled client or, under a delegated capability, as the annex
|
|
20
|
+
* verification method
|
|
19
21
|
* @param options.spaceId {string} the data Space id
|
|
22
|
+
* @param [options.capability] {IZcap} an invocation capability the read and
|
|
23
|
+
* the write both ride (a delegated Space-subtree zcap -- a transient
|
|
24
|
+
* session's generation delegation); absent, both invoke the root capability
|
|
25
|
+
* as before
|
|
20
26
|
* @returns {ClientLabelsStore}
|
|
21
27
|
*/
|
|
22
|
-
export declare function wasClientLabelsStore({ was, spaceId }: {
|
|
28
|
+
export declare function wasClientLabelsStore({ was, spaceId, capability }: {
|
|
23
29
|
was: WasClient;
|
|
24
30
|
spaceId: string;
|
|
31
|
+
capability?: IZcap;
|
|
25
32
|
}): ClientLabelsStore;
|
|
26
33
|
//# sourceMappingURL=wasLabelsStore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wasLabelsStore.d.ts","sourceRoot":"","sources":["../../src/keys/wasLabelsStore.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"wasLabelsStore.d.ts","sourceRoot":"","sources":["../../src/keys/wasLabelsStore.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAMpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAE1D;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,GAAG,EACH,OAAO,EACP,UAAU,EACX,EAAE;IACD,GAAG,EAAE,SAAS,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,KAAK,CAAA;CACnB,GAAG,iBAAiB,CAiBpB"}
|
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
import { CLIENT_LABELS_RESOURCE, KEY_MAP_COLLECTION } from '../space/collections.js';
|
|
2
|
+
import { plaintextCollection } from '../space/plaintextCollection.js';
|
|
2
3
|
/**
|
|
3
4
|
* Builds the labels store over `key-map/client-labels.json` in a data Space.
|
|
4
5
|
*
|
|
5
6
|
* @param options {object}
|
|
6
7
|
* @param options.was {WasClient} the account's storage client, signing as an
|
|
7
|
-
* enrolled client
|
|
8
|
+
* enrolled client or, under a delegated capability, as the annex
|
|
9
|
+
* verification method
|
|
8
10
|
* @param options.spaceId {string} the data Space id
|
|
11
|
+
* @param [options.capability] {IZcap} an invocation capability the read and
|
|
12
|
+
* the write both ride (a delegated Space-subtree zcap -- a transient
|
|
13
|
+
* session's generation delegation); absent, both invoke the root capability
|
|
14
|
+
* as before
|
|
9
15
|
* @returns {ClientLabelsStore}
|
|
10
16
|
*/
|
|
11
|
-
export function wasClientLabelsStore({ was, spaceId }) {
|
|
12
|
-
const resource =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
.
|
|
17
|
+
export function wasClientLabelsStore({ was, spaceId, capability }) {
|
|
18
|
+
const resource = plaintextCollection({
|
|
19
|
+
was,
|
|
20
|
+
spaceId,
|
|
21
|
+
collectionId: KEY_MAP_COLLECTION.id,
|
|
22
|
+
capability
|
|
23
|
+
}).resource(CLIENT_LABELS_RESOURCE);
|
|
16
24
|
return {
|
|
17
25
|
async get() {
|
|
18
26
|
const result = await resource.get();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wasLabelsStore.js","sourceRoot":"","sources":["../../src/keys/wasLabelsStore.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"wasLabelsStore.js","sourceRoot":"","sources":["../../src/keys/wasLabelsStore.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EACnB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAA;AAGrE;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,oBAAoB,CAAC,EACnC,GAAG,EACH,OAAO,EACP,UAAU,EAKX;IACC,MAAM,QAAQ,GAAG,mBAAmB,CAAC;QACnC,GAAG;QACH,OAAO;QACP,YAAY,EAAE,kBAAkB,CAAC,EAAE;QACnC,UAAU;KACX,CAAC,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAAA;IACnC,OAAO;QACL,KAAK,CAAC,GAAG;YACP,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,GAAG,EAAE,CAAA;YACnC,OAAO,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAA;QAC7C,CAAC;QACD,KAAK,CAAC,GAAG,CAAC,EAAE,OAAO,EAAuB;YACxC,MAAM,IAAI,GAAG,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAA;YAC9D,MAAM,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,WAAW,EAAE,kBAAkB,EAAE,CAAC,CAAA;QAC/D,CAAC;KACF,CAAA;AACH,CAAC"}
|
package/dist/log.d.ts
CHANGED
|
@@ -46,10 +46,15 @@ export type StageNotifier = (stage: string) => void;
|
|
|
46
46
|
* one is swallowed with a warn: telemetry must never tear a ceremony, which
|
|
47
47
|
* would leave exactly the half-run state the notifier exists to observe.
|
|
48
48
|
*
|
|
49
|
+
* The optional type parameter narrows what the RETURNED notifier accepts. A
|
|
50
|
+
* ceremony passes its own stage-name union (its exported stage tuple's
|
|
51
|
+
* element type), so a mistyped `stage('...')` call fails the type check
|
|
52
|
+
* instead of emitting a name no consumer displays.
|
|
53
|
+
*
|
|
49
54
|
* @param [onStage] {StageNotifier}
|
|
50
|
-
* @returns {
|
|
55
|
+
* @returns {(stage: Stage) => void}
|
|
51
56
|
*/
|
|
52
|
-
export declare function stageNotifier(onStage?: StageNotifier):
|
|
57
|
+
export declare function stageNotifier<Stage extends string = string>(onStage?: StageNotifier): (stage: Stage) => void;
|
|
53
58
|
/**
|
|
54
59
|
* Installs `next` as the logger every call site in this package logs
|
|
55
60
|
* through, and returns the PREVIOUS logger -- so a test (or an app
|
package/dist/log.d.ts.map
CHANGED
|
@@ -1 +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,MAAM,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;AAEnD
|
|
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,MAAM,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;AAEnD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,EACzD,OAAO,CAAC,EAAE,aAAa,GACtB,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAWxB;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
CHANGED
|
@@ -25,8 +25,13 @@
|
|
|
25
25
|
* one is swallowed with a warn: telemetry must never tear a ceremony, which
|
|
26
26
|
* would leave exactly the half-run state the notifier exists to observe.
|
|
27
27
|
*
|
|
28
|
+
* The optional type parameter narrows what the RETURNED notifier accepts. A
|
|
29
|
+
* ceremony passes its own stage-name union (its exported stage tuple's
|
|
30
|
+
* element type), so a mistyped `stage('...')` call fails the type check
|
|
31
|
+
* instead of emitting a name no consumer displays.
|
|
32
|
+
*
|
|
28
33
|
* @param [onStage] {StageNotifier}
|
|
29
|
-
* @returns {
|
|
34
|
+
* @returns {(stage: Stage) => void}
|
|
30
35
|
*/
|
|
31
36
|
export function stageNotifier(onStage) {
|
|
32
37
|
if (onStage === undefined) {
|
package/dist/log.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.js","sourceRoot":"","sources":["../src/log.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;GAiBG;AAyBH
|
|
1
|
+
{"version":3,"file":"log.js","sourceRoot":"","sources":["../src/log.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;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,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;CAC7E,CAAA;AAED,IAAI,MAAM,GAAW,eAAe,CAAA;AAEpC;;;;;;;GAOG;AACH,MAAM,UAAU,SAAS,CAAC,IAAY;IACpC,MAAM,QAAQ,GAAG,MAAM,CAAA;IACvB,MAAM,GAAG,IAAI,CAAA;IACb,OAAO,QAAQ,CAAA;AACjB,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,GAAG,GAAW;IACzB,KAAK,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC;IAC7C,IAAI,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC;IAC3C,IAAI,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,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"}
|
package/dist/recovery/index.d.ts
CHANGED
|
@@ -3,20 +3,24 @@
|
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* The `@interop/wallet-core/recovery` subpath: recovery codes on the roster
|
|
6
|
-
* identity model -- a code as a
|
|
6
|
+
* identity model -- a code as a standing unlock credential that retires on
|
|
7
|
+
* spend.
|
|
7
8
|
*
|
|
8
9
|
* - `generateRecoveryCode` / `formatRecoveryCode` / `normalizeRecoveryCode` /
|
|
9
10
|
* `decodeRecoveryCode` / `RECOVERY_KDF` -- the format layer and the code's
|
|
10
11
|
* own unlock-derivation parameter set (its salt distinct from every other
|
|
11
12
|
* unlock method's).
|
|
12
|
-
* - `recoveryClientFromCode` -- the deterministic client key set:
|
|
13
|
-
*
|
|
14
|
-
*
|
|
13
|
+
* - `recoveryClientFromCode` -- the deterministic client key set: unlock
|
|
14
|
+
* identity, client seed (signing + key-agreement pair), binding MAC key,
|
|
15
|
+
* and the update-key ladder seed, whose rung 0 is the did:webvh update key
|
|
16
|
+
* whose hash stands pre-committed and whose VM signs the code's own bridge.
|
|
15
17
|
* - The record codec lives in `@interop/wallet-core/unlock` now
|
|
16
18
|
* (`wrapUnlockRecord` / `unwrapUnlockRecord`, re-exported here): a
|
|
17
|
-
* recovery record is an unlock record with no ladder member
|
|
18
|
-
*
|
|
19
|
-
*
|
|
19
|
+
* recovery record is an unlock record with no ladder member (the code's
|
|
20
|
+
* ladder seed derives from the code bytes rather than riding the record) --
|
|
21
|
+
* the account pointer plus the pre-minted PUT-on-`did.jsonl` bridge
|
|
22
|
+
* delegation (never a seed, never a user key wrap), signed under the
|
|
23
|
+
* mixed-signer policy
|
|
20
24
|
* (the code's unlock key at issuance, an enrolled client's account key on
|
|
21
25
|
* a re-mint), with the account core authenticated by a MAC under a
|
|
22
26
|
* code-derived key, so a storage host can never redirect recovery at
|
|
@@ -44,5 +48,5 @@ export type { SignedUnlockRecord, UnlockRecordContents, UnlockRecordProofState }
|
|
|
44
48
|
export { delegateLogWrite, delegationProofKeyId, RECOVERY_DELEGATION_TTL_MS, remintRecoveryDelegations, ZCAP_RENEWAL_WINDOW_MS, zcapExpiring } from './recoveryDelegation.js';
|
|
45
49
|
export type { RecordRemintOutcome, RecoveryDelegationEntry } from './recoveryDelegation.js';
|
|
46
50
|
export { publishRecoveryKey, recoverWebvhClient, RecoveryKeyNotCommittedError, recoveryVmId, removeRecoveryKey } from './recoveryWebvh.js';
|
|
47
|
-
export type { RecoveryLogStore, RecoveryPublicKeys } from './recoveryWebvh.js';
|
|
51
|
+
export type { RecoveryLogStore, RecoveryPublicKeys, ReplacementRecoveryPublicKeys } from './recoveryWebvh.js';
|
|
48
52
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/recovery/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/recovery/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,YAAY,EACZ,wBAAwB,EACxB,sBAAsB,EACvB,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAEvD,OAAO,EACL,oBAAoB,EACpB,6BAA6B,EAC7B,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,2BAA2B,CAAA;AAClC,YAAY,EACV,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,2BAA2B,CAAA;AAElC,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,0BAA0B,EAC1B,yBAAyB,EACzB,sBAAsB,EACtB,YAAY,EACb,MAAM,yBAAyB,CAAA;AAChC,YAAY,EACV,mBAAmB,EACnB,uBAAuB,EACxB,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,4BAA4B,EAC5B,YAAY,EACZ,iBAAiB,EAClB,MAAM,oBAAoB,CAAA;AAC3B,YAAY,EACV,gBAAgB,EAChB,kBAAkB,EAClB,6BAA6B,EAC9B,MAAM,oBAAoB,CAAA"}
|