@interop/wallet-core 0.65.0 → 0.67.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 +12 -8
- package/dist/clientAnnex/credentialAnchoredGenesis.d.ts +5 -4
- package/dist/clientAnnex/credentialAnchoredGenesis.d.ts.map +1 -1
- package/dist/clientAnnex/credentialAnchoredGenesis.js +32 -50
- package/dist/clientAnnex/credentialAnchoredGenesis.js.map +1 -1
- package/dist/clientAnnex/establish.d.ts +112 -21
- package/dist/clientAnnex/establish.d.ts.map +1 -1
- package/dist/clientAnnex/establish.js +248 -180
- package/dist/clientAnnex/establish.js.map +1 -1
- package/dist/clientAnnex/forget.d.ts +2 -6
- package/dist/clientAnnex/forget.d.ts.map +1 -1
- package/dist/clientAnnex/forget.js +31 -61
- package/dist/clientAnnex/forget.js.map +1 -1
- package/dist/clientAnnex/forgetLast.d.ts +48 -132
- package/dist/clientAnnex/forgetLast.d.ts.map +1 -1
- package/dist/clientAnnex/forgetLast.js +88 -221
- package/dist/clientAnnex/forgetLast.js.map +1 -1
- package/dist/clientAnnex/gc.d.ts.map +1 -1
- package/dist/clientAnnex/gc.js +9 -0
- package/dist/clientAnnex/gc.js.map +1 -1
- package/dist/clientAnnex/heal.d.ts +97 -13
- package/dist/clientAnnex/heal.d.ts.map +1 -1
- package/dist/clientAnnex/heal.js +108 -174
- package/dist/clientAnnex/heal.js.map +1 -1
- package/dist/clientAnnex/index.d.ts +8 -8
- package/dist/clientAnnex/index.d.ts.map +1 -1
- package/dist/clientAnnex/index.js +6 -6
- package/dist/clientAnnex/index.js.map +1 -1
- package/dist/clientAnnex/ladder.d.ts +51 -4
- package/dist/clientAnnex/ladder.d.ts.map +1 -1
- package/dist/clientAnnex/ladder.js +310 -55
- package/dist/clientAnnex/ladder.js.map +1 -1
- package/dist/clientAnnex/ladderAnchored.d.ts +37 -3
- package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -1
- package/dist/clientAnnex/ladderAnchored.js +69 -34
- package/dist/clientAnnex/ladderAnchored.js.map +1 -1
- package/dist/clientAnnex/log.d.ts +148 -72
- package/dist/clientAnnex/log.d.ts.map +1 -1
- package/dist/clientAnnex/log.js +211 -137
- package/dist/clientAnnex/log.js.map +1 -1
- package/dist/clientAnnex/mend.d.ts.map +1 -1
- package/dist/clientAnnex/mend.js +63 -81
- package/dist/clientAnnex/mend.js.map +1 -1
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts +20 -1
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts.map +1 -1
- package/dist/clientAnnex/recoveryLadderAnchored.js +77 -294
- package/dist/clientAnnex/recoveryLadderAnchored.js.map +1 -1
- package/dist/clientAnnex/rosterDeliveredEpochs.d.ts +13 -5
- package/dist/clientAnnex/rosterDeliveredEpochs.d.ts.map +1 -1
- package/dist/clientAnnex/rosterDeliveredEpochs.js +18 -9
- package/dist/clientAnnex/rosterDeliveredEpochs.js.map +1 -1
- package/dist/clientAnnex/selfEnroll.js +1 -1
- package/dist/clientAnnex/selfEnroll.js.map +1 -1
- package/dist/clientAnnex/zcap.d.ts +19 -0
- package/dist/clientAnnex/zcap.d.ts.map +1 -1
- package/dist/clientAnnex/zcap.js +80 -12
- package/dist/clientAnnex/zcap.js.map +1 -1
- package/dist/clients/index.d.ts +3 -2
- package/dist/clients/index.d.ts.map +1 -1
- package/dist/clients/index.js +3 -2
- package/dist/clients/index.js.map +1 -1
- package/dist/clients/listing.d.ts.map +1 -1
- package/dist/clients/listing.js +33 -15
- package/dist/clients/listing.js.map +1 -1
- package/dist/clients/policy.d.ts +18 -0
- package/dist/clients/policy.d.ts.map +1 -1
- package/dist/clients/policy.js +22 -8
- package/dist/clients/policy.js.map +1 -1
- package/dist/clients/revocation.d.ts +18 -30
- package/dist/clients/revocation.d.ts.map +1 -1
- package/dist/clients/revocation.js +12 -27
- package/dist/clients/revocation.js.map +1 -1
- package/dist/clients/rosterPolicy.d.ts +6 -1
- package/dist/clients/rosterPolicy.d.ts.map +1 -1
- package/dist/clients/rosterPolicy.js +27 -30
- package/dist/clients/rosterPolicy.js.map +1 -1
- package/dist/descriptors/errors.d.ts +6 -5
- package/dist/descriptors/errors.d.ts.map +1 -1
- package/dist/descriptors/errors.js +6 -5
- package/dist/descriptors/errors.js.map +1 -1
- package/dist/descriptors/index.d.ts +7 -3
- package/dist/descriptors/index.d.ts.map +1 -1
- package/dist/descriptors/index.js +7 -3
- package/dist/descriptors/index.js.map +1 -1
- package/dist/descriptors/logSource.d.ts +28 -6
- package/dist/descriptors/logSource.d.ts.map +1 -1
- package/dist/descriptors/logSource.js +33 -7
- package/dist/descriptors/logSource.js.map +1 -1
- package/dist/enrollment/enrollment.d.ts.map +1 -1
- package/dist/enrollment/enrollment.js +3 -7
- package/dist/enrollment/enrollment.js.map +1 -1
- package/dist/genesis/accountGenesis.d.ts +8 -10
- package/dist/genesis/accountGenesis.d.ts.map +1 -1
- package/dist/genesis/accountGenesis.js +39 -41
- package/dist/genesis/accountGenesis.js.map +1 -1
- package/dist/genesis/kmsAuthentication.d.ts +50 -0
- package/dist/genesis/kmsAuthentication.d.ts.map +1 -0
- package/dist/genesis/kmsAuthentication.js +49 -0
- package/dist/genesis/kmsAuthentication.js.map +1 -0
- package/dist/keyring/kdf.d.ts +16 -20
- package/dist/keyring/kdf.d.ts.map +1 -1
- package/dist/keyring/kdf.js +2 -2
- package/dist/keyring/kdf.js.map +1 -1
- package/dist/keyring/unlockSpace.d.ts +8 -30
- package/dist/keyring/unlockSpace.d.ts.map +1 -1
- package/dist/keyring/unlockSpace.js +8 -31
- package/dist/keyring/unlockSpace.js.map +1 -1
- package/dist/keys/clientKeyRecord.d.ts +2 -1
- package/dist/keys/clientKeyRecord.d.ts.map +1 -1
- package/dist/keys/clientKeyRecord.js +28 -11
- package/dist/keys/clientKeyRecord.js.map +1 -1
- package/dist/keys/index.d.ts +19 -5
- package/dist/keys/index.d.ts.map +1 -1
- package/dist/keys/index.js +17 -3
- package/dist/keys/index.js.map +1 -1
- package/dist/keys/rosterLogStore.d.ts +3 -1
- package/dist/keys/rosterLogStore.d.ts.map +1 -1
- package/dist/keys/rosterLogStore.js +20 -8
- package/dist/keys/rosterLogStore.js.map +1 -1
- package/dist/keys/spaceEpochs.d.ts +92 -3
- package/dist/keys/spaceEpochs.d.ts.map +1 -1
- package/dist/keys/spaceEpochs.js +110 -4
- package/dist/keys/spaceEpochs.js.map +1 -1
- package/dist/keys/userKeyCascade.d.ts +8 -5
- package/dist/keys/userKeyCascade.d.ts.map +1 -1
- package/dist/keys/userKeyCascade.js +7 -6
- package/dist/keys/userKeyCascade.js.map +1 -1
- package/dist/keys/userKeyRoster.d.ts +68 -4
- package/dist/keys/userKeyRoster.d.ts.map +1 -1
- package/dist/keys/userKeyRoster.js +146 -33
- package/dist/keys/userKeyRoster.js.map +1 -1
- package/dist/keys/userKeyRosterCascade.d.ts +110 -10
- package/dist/keys/userKeyRosterCascade.d.ts.map +1 -1
- package/dist/keys/userKeyRosterCascade.js +184 -40
- package/dist/keys/userKeyRosterCascade.js.map +1 -1
- package/dist/recovery/continuation.d.ts +255 -0
- package/dist/recovery/continuation.d.ts.map +1 -0
- package/dist/recovery/continuation.js +471 -0
- package/dist/recovery/continuation.js.map +1 -0
- 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/recoveryDelegation.d.ts +40 -120
- package/dist/recovery/recoveryDelegation.d.ts.map +1 -1
- package/dist/recovery/recoveryDelegation.js +36 -268
- package/dist/recovery/recoveryDelegation.js.map +1 -1
- package/dist/recovery/recoveryWebvh.d.ts +42 -83
- package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
- package/dist/recovery/recoveryWebvh.js +44 -380
- package/dist/recovery/recoveryWebvh.js.map +1 -1
- package/dist/request/appKey.d.ts +35 -1
- package/dist/request/appKey.d.ts.map +1 -1
- package/dist/request/appKey.js +29 -10
- package/dist/request/appKey.js.map +1 -1
- package/dist/request/classify.d.ts +3 -14
- package/dist/request/classify.d.ts.map +1 -1
- package/dist/request/classify.js +19 -40
- package/dist/request/classify.js.map +1 -1
- package/dist/request/index.d.ts +1 -0
- package/dist/request/index.d.ts.map +1 -1
- package/dist/request/index.js +1 -0
- package/dist/request/index.js.map +1 -1
- package/dist/request/onboarding.d.ts.map +1 -1
- package/dist/request/onboarding.js +19 -27
- package/dist/request/onboarding.js.map +1 -1
- package/dist/request/parse.d.ts +5 -3
- package/dist/request/parse.d.ts.map +1 -1
- package/dist/request/parse.js +7 -6
- package/dist/request/parse.js.map +1 -1
- package/dist/request/processRequest.d.ts.map +1 -1
- package/dist/request/processRequest.js +2 -1
- package/dist/request/processRequest.js.map +1 -1
- package/dist/request/queryPredicates.d.ts +98 -0
- package/dist/request/queryPredicates.d.ts.map +1 -0
- package/dist/request/queryPredicates.js +107 -0
- package/dist/request/queryPredicates.js.map +1 -0
- package/dist/resourceLog/document.d.ts +39 -0
- package/dist/resourceLog/document.d.ts.map +1 -1
- package/dist/resourceLog/document.js +41 -0
- package/dist/resourceLog/document.js.map +1 -1
- package/dist/resourceLog/ladderRungs.d.ts.map +1 -1
- package/dist/resourceLog/ladderRungs.js +3 -2
- package/dist/resourceLog/ladderRungs.js.map +1 -1
- package/dist/sync/contactsConflict.d.ts.map +1 -1
- package/dist/sync/contactsConflict.js +8 -2
- package/dist/sync/contactsConflict.js.map +1 -1
- package/dist/sync/engine.d.ts +38 -23
- package/dist/sync/engine.d.ts.map +1 -1
- package/dist/sync/engine.js +36 -5
- package/dist/sync/engine.js.map +1 -1
- package/dist/sync/index.d.ts +9 -12
- package/dist/sync/index.d.ts.map +1 -1
- package/dist/sync/index.js +8 -11
- package/dist/sync/index.js.map +1 -1
- package/dist/sync/push.d.ts.map +1 -1
- package/dist/sync/push.js +1 -2
- package/dist/sync/push.js.map +1 -1
- package/dist/sync/remint.d.ts +0 -31
- package/dist/sync/remint.d.ts.map +1 -1
- package/dist/sync/remint.js +32 -1
- package/dist/sync/remint.js.map +1 -1
- package/dist/sync/types.d.ts +4 -41
- package/dist/sync/types.d.ts.map +1 -1
- package/dist/sync/types.js +4 -47
- package/dist/sync/types.js.map +1 -1
- package/dist/unlock/index.d.ts +1 -1
- 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 +16 -56
- package/dist/unlock/retire.d.ts.map +1 -1
- package/dist/unlock/retire.js +7 -76
- package/dist/unlock/retire.js.map +1 -1
- package/dist/unlock/standingWebvh.d.ts +20 -40
- package/dist/unlock/standingWebvh.d.ts.map +1 -1
- package/dist/unlock/standingWebvh.js +35 -76
- package/dist/unlock/standingWebvh.js.map +1 -1
- package/dist/unlock/unlockRecord.d.ts.map +1 -1
- package/dist/unlock/unlockRecord.js +69 -44
- package/dist/unlock/unlockRecord.js.map +1 -1
- package/dist/webvh/accountEntry.d.ts +63 -7
- package/dist/webvh/accountEntry.d.ts.map +1 -1
- package/dist/webvh/accountEntry.js +110 -19
- package/dist/webvh/accountEntry.js.map +1 -1
- package/dist/webvh/delegatedLogStore.d.ts +18 -12
- package/dist/webvh/delegatedLogStore.d.ts.map +1 -1
- package/dist/webvh/delegatedLogStore.js +32 -11
- package/dist/webvh/delegatedLogStore.js.map +1 -1
- package/dist/webvh/didWebvh.d.ts +39 -23
- package/dist/webvh/didWebvh.d.ts.map +1 -1
- package/dist/webvh/didWebvh.js +63 -45
- package/dist/webvh/didWebvh.js.map +1 -1
- package/dist/webvh/enrollClient.d.ts.map +1 -1
- package/dist/webvh/enrollClient.js +19 -23
- package/dist/webvh/enrollClient.js.map +1 -1
- package/dist/webvh/index.d.ts +11 -7
- package/dist/webvh/index.d.ts.map +1 -1
- package/dist/webvh/index.js +9 -6
- package/dist/webvh/index.js.map +1 -1
- package/dist/webvh/listClients.d.ts.map +1 -1
- package/dist/webvh/listClients.js +102 -65
- package/dist/webvh/listClients.js.map +1 -1
- package/dist/webvh/mergeMethods.d.ts +84 -0
- package/dist/webvh/mergeMethods.d.ts.map +1 -0
- package/dist/webvh/mergeMethods.js +46 -0
- package/dist/webvh/mergeMethods.js.map +1 -0
- package/dist/webvh/revokeClient.d.ts +12 -2
- package/dist/webvh/revokeClient.d.ts.map +1 -1
- package/dist/webvh/revokeClient.js +126 -48
- package/dist/webvh/revokeClient.js.map +1 -1
- package/dist/webvh/verifyLog.d.ts +21 -0
- package/dist/webvh/verifyLog.d.ts.map +1 -1
- package/dist/webvh/verifyLog.js +36 -14
- package/dist/webvh/verifyLog.js.map +1 -1
- package/package.json +11 -11
|
@@ -71,7 +71,7 @@ import type { EncryptionDescriptorStore } from '@interop/was-client/edv';
|
|
|
71
71
|
import type { WebvhIdStore } from '../webvh/didWebvh.js';
|
|
72
72
|
import type { ResourceLogPinStore } from '@interop/vh-resource-log';
|
|
73
73
|
import type { RevokedClientKeys } from '../webvh/revokeClient.js';
|
|
74
|
-
import { type CascadeCollections, type UserKey, type UserKeyCascadeResult } from '../keys/index.js';
|
|
74
|
+
import { type CascadeCollections, type UserKey, type UserKeyAdoptedHook, type UserKeyCascadeResult } from '../keys/index.js';
|
|
75
75
|
import type { UnlockLogStore } from '../unlock/standingWebvh.js';
|
|
76
76
|
/**
|
|
77
77
|
* What a completed forget reports: whether the roster's wrap for the
|
|
@@ -154,11 +154,7 @@ export declare function forgetEnrolledClient({ logStore, clientLogStore, pinStor
|
|
|
154
154
|
credentialKeyAgreementKey: IKeyAgreementKey;
|
|
155
155
|
userKey?: UserKey;
|
|
156
156
|
pinnedEpochId?: string | null;
|
|
157
|
-
onUserKeyAdopted?:
|
|
158
|
-
userKey: UserKey;
|
|
159
|
-
latestEpochId: string;
|
|
160
|
-
descriptor: CollectionEncryption;
|
|
161
|
-
}) => Promise<void>;
|
|
157
|
+
onUserKeyAdopted?: UserKeyAdoptedHook;
|
|
162
158
|
collections: CascadeCollections;
|
|
163
159
|
}): Promise<EnrolledClientForgetResult>;
|
|
164
160
|
//# sourceMappingURL=forget.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forget.d.ts","sourceRoot":"","sources":["../../src/clientAnnex/forget.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AACH,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;
|
|
1
|
+
{"version":3,"file":"forget.d.ts","sourceRoot":"","sources":["../../src/clientAnnex/forget.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AACH,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,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAGL,KAAK,kBAAkB,EACvB,KAAK,OAAO,EACZ,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EAC1B,MAAM,kBAAkB,CAAA;AAMzB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAEhE;;;;;;;GAOG;AACH,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,OAAO,CAAA;IAChB,WAAW,EAAE,oBAAoB,CAAA;IACjC,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,gBAAgB,CAAC,EAAE,oBAAoB,CAAA;CACxC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,wBAAsB,oBAAoB,CAAC,EACzC,QAAQ,EACR,cAAc,EACd,QAAQ,EACR,KAAK,EACL,UAAU,EACV,eAAe,EACf,iCAAiC,EACjC,iBAAiB,EACjB,WAAW,EACX,WAAW,EACX,yBAAyB,EACzB,OAAO,EACP,aAAa,EACb,gBAAgB,EAChB,WAAW,EACZ,EAAE;IACD,QAAQ,EAAE,cAAc,CAAA;IACxB,cAAc,EAAE,IAAI,CAAC,YAAY,EAAE,kBAAkB,GAAG,eAAe,CAAC,CAAA;IACxE,QAAQ,CAAC,EAAE,mBAAmB,CAAA;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,UAAU,CAAA;IACtB,eAAe,EAAE,iBAAiB,CAAA;IAClC,iCAAiC,EAAE,MAAM,CAAA;IACzC,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC5B,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,yBAAyB,CAAA;IACtC,yBAAyB,EAAE,gBAAgB,CAAA;IAC3C,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,gBAAgB,CAAC,EAAE,kBAAkB,CAAA;IACrC,WAAW,EAAE,kBAAkB,CAAA;CAChC,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAmEtC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { relationIds } from '../resourceLog/document.js';
|
|
2
1
|
import { readPublishedLogOrThrow } from '../webvh/didWebvh.js';
|
|
3
|
-
import {
|
|
4
|
-
import { forgetWebvhClient, LastEnrolledClientForgetError } from './ladderAnchored.js';
|
|
2
|
+
import { retireRosterRecipientAndCascade, rosterRecipientKid } from '../keys/index.js';
|
|
3
|
+
import { forgetWebvhClient, isSoleEnrolledClient, LastEnrolledClientForgetError } from './ladderAnchored.js';
|
|
5
4
|
/**
|
|
6
5
|
* Forgets one enrolled client -- this browser's own -- from its
|
|
7
6
|
* account. See the module doc for the stage order (rotation and fan-out
|
|
@@ -65,65 +64,36 @@ export async function forgetEnrolledClient({ logStore, clientLogStore, pinStore,
|
|
|
65
64
|
...(logId !== undefined ? { logId } : {}),
|
|
66
65
|
missingMessage: 'did:webvh: did.jsonl is missing; nothing to forget from.'
|
|
67
66
|
});
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
if (isSoleEnrolledClient({
|
|
68
|
+
doc: published.doc,
|
|
69
|
+
vmId: `${published.did}#${forgottenClient.signingKeyMultibase}`
|
|
70
|
+
})) {
|
|
72
71
|
throw new LastEnrolledClientForgetError();
|
|
73
72
|
}
|
|
74
73
|
// Stages 1 and 2: the roster rotation off this client's wrap and the
|
|
75
|
-
// collection fan-out, both under this client's still-standing authority
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
74
|
+
// collection fan-out, both under this client's still-standing authority
|
|
75
|
+
// -- the shared recipient-retiring tail, anchored at the pre-edit head
|
|
76
|
+
// this read verified (the orchestrator sets the roster store's minimum
|
|
77
|
+
// controller version there, so a store wired over a stale cached view
|
|
78
|
+
// still appends under a view that carries every recipient the rotation
|
|
79
|
+
// resolves). The wrap is retired by its roster kid explicitly, since the
|
|
80
|
+
// document still lists this client, and the fresh key comes back through
|
|
81
|
+
// the credential's standing wrap.
|
|
82
|
+
const tail = await retireRosterRecipientAndCascade({
|
|
83
|
+
rosterStore,
|
|
84
|
+
did: published.did,
|
|
85
|
+
doc: published.doc,
|
|
86
|
+
log: published.log,
|
|
87
|
+
retireRecipientId: rosterRecipientKid({
|
|
82
88
|
signingKeyMultibase: forgottenClient.signingKeyMultibase,
|
|
83
89
|
keyAgreementKeyMultibase: forgottenKeyAgreementKeyMultibase
|
|
84
|
-
})
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
document: published.doc,
|
|
92
|
-
retireRecipientId: forgottenKid
|
|
93
|
-
});
|
|
94
|
-
rotated = true;
|
|
95
|
-
}
|
|
96
|
-
// The fresh key comes back through the credential's standing wrap -- this
|
|
97
|
-
// client's own is gone from the current epoch -- with the continuity and
|
|
98
|
-
// possession checks still running on the threaded descriptor.
|
|
99
|
-
const adopted = await readUserKeyRoster({
|
|
100
|
-
store: rosterStore,
|
|
101
|
-
descriptor,
|
|
102
|
-
...(userKey ? { userKey } : {}),
|
|
103
|
-
clientKeyAgreementKey: credentialKeyAgreementKey,
|
|
104
|
-
pinnedEpochId
|
|
105
|
-
});
|
|
106
|
-
if (adopted.rotated) {
|
|
107
|
-
await onUserKeyAdopted?.({
|
|
108
|
-
userKey: adopted.userKey,
|
|
109
|
-
latestEpochId: adopted.latestEpochId,
|
|
110
|
-
descriptor: adopted.descriptor
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
read = { userKey: adopted.userKey, descriptor: adopted.descriptor };
|
|
114
|
-
cascade = await cascadeCollectionsToUserKey({
|
|
115
|
-
collectionIds: typeof collections.collectionIds === 'function'
|
|
116
|
-
? await collections.collectionIds()
|
|
117
|
-
: collections.collectionIds,
|
|
118
|
-
storeFor: collections.storeFor,
|
|
119
|
-
...(collections.isEncrypted
|
|
120
|
-
? { isEncrypted: collections.isEncrypted }
|
|
121
|
-
: {}),
|
|
122
|
-
rosterDescriptor: adopted.descriptor,
|
|
123
|
-
clientKeyAgreementKey: credentialKeyAgreementKey,
|
|
124
|
-
userKey: adopted.userKey
|
|
125
|
-
});
|
|
126
|
-
}
|
|
90
|
+
}),
|
|
91
|
+
...(userKey ? { userKey } : {}),
|
|
92
|
+
readBackKeyAgreementKey: credentialKeyAgreementKey,
|
|
93
|
+
pinnedEpochId,
|
|
94
|
+
...(onUserKeyAdopted ? { onUserKeyAdopted } : {}),
|
|
95
|
+
collections
|
|
96
|
+
});
|
|
127
97
|
// Stage 3: the atomic ladder-signed removal entry, through the bridge.
|
|
128
98
|
const removed = await forgetWebvhClient({
|
|
129
99
|
store: logStore,
|
|
@@ -136,12 +106,12 @@ export async function forgetEnrolledClient({ logStore, clientLogStore, pinStore,
|
|
|
136
106
|
...(logId !== undefined ? { logId } : {})
|
|
137
107
|
});
|
|
138
108
|
return {
|
|
139
|
-
rotated,
|
|
140
|
-
collections:
|
|
109
|
+
rotated: tail.rotated,
|
|
110
|
+
collections: tail.collections,
|
|
141
111
|
did: removed.did,
|
|
142
112
|
document: removed.doc,
|
|
143
|
-
...(
|
|
144
|
-
? { userKey:
|
|
113
|
+
...(tail.userKey && tail.rosterDescriptor
|
|
114
|
+
? { userKey: tail.userKey, rosterDescriptor: tail.rosterDescriptor }
|
|
145
115
|
: {})
|
|
146
116
|
};
|
|
147
117
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forget.js","sourceRoot":"","sources":["../../src/clientAnnex/forget.ts"],"names":[],"mappings":"AAsEA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"forget.js","sourceRoot":"","sources":["../../src/clientAnnex/forget.ts"],"names":[],"mappings":"AAsEA,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AAI9D,OAAO,EACL,+BAA+B,EAC/B,kBAAkB,EAKnB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,6BAA6B,EAC9B,MAAM,qBAAqB,CAAA;AAoB5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,EACzC,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AAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/B,uBAAuB,EAAE,yBAAyB;QAClD,aAAa;QACb,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACjD,WAAW;KACZ,CAAC,CAAA;IAEF,uEAAuE;IACvE,MAAM,OAAO,GAAG,MAAM,iBAAiB,CAAC;QACtC,KAAK,EAAE,QAAQ;QACf,eAAe,EAAE,cAAc;QAC/B,UAAU;QACV,eAAe;QACf,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACnD,WAAW;QACX,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACjC,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC1C,CAAC,CAAA;IAEF,OAAO;QACL,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,QAAQ,EAAE,OAAO,CAAC,GAAG;QACrB,GAAG,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,gBAAgB;YACvC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,EAAE;YACpE,CAAC,CAAC,EAAE,CAAC;KACR,CAAA;AACH,CAAC"}
|
|
@@ -38,17 +38,22 @@
|
|
|
38
38
|
* the ENROLLED client's root authority, and not through the credential's
|
|
39
39
|
* bridge delegation. The bridge is often signed by the very VM the strike
|
|
40
40
|
* removes -- the readiness stage's renewal mints it as the ladder, and
|
|
41
|
-
* stage
|
|
41
|
+
* stage 5 re-signs it as the ladder again -- so a bridge-invoked reinstall
|
|
42
42
|
* would be authorized against the post-strike document under the
|
|
43
43
|
* current-key-set rule and refused, leaving the account VM-less with every
|
|
44
44
|
* ladder-signed delegation rotted and a re-run failing identically. The
|
|
45
|
-
* client stands until stage
|
|
45
|
+
* client stands until stage 6 and holds root authority on the Space, so
|
|
46
46
|
* its store is the one that carries the pair. Only the HTTP invocation
|
|
47
47
|
* changes: both entries stay ladder-SIGNED.
|
|
48
48
|
* 2. **The roster rotation**, ladder-signed, anchored at the reinstall entry,
|
|
49
49
|
* HTTP-invoked under the still-standing client: the user key rotates off
|
|
50
50
|
* this client's wrap in ONE append (the license's one-shot shape), read
|
|
51
|
-
* back through the credential's standing wrap.
|
|
51
|
+
* back through the credential's standing wrap. The anchoring is this
|
|
52
|
+
* ceremony's guarantee rather than the app's wiring: the shared
|
|
53
|
+
* recipient-retiring tail (`retireRosterRecipientAndCascade`) sets the
|
|
54
|
+
* roster store's minimum controller version from the post-reinstall log,
|
|
55
|
+
* so a store resolving its controller from a cached pre-transition view
|
|
56
|
+
* still lands the append at the reinstall version. Because the append's
|
|
52
57
|
* signer is the ladder VM -- a key the post-removal document still lists
|
|
53
58
|
* -- the roster log needs no seal repair afterwards, which matters on
|
|
54
59
|
* an account where no enrolled client's login sweep will ever run again.
|
|
@@ -68,39 +73,18 @@
|
|
|
68
73
|
* is what keeps a torn run from stranding the generation delegation-less.
|
|
69
74
|
* A delegation a surviving sibling credential's ladder signed is left
|
|
70
75
|
* standing, since the revocation loop never reaches it either.
|
|
71
|
-
* 5. **The
|
|
72
|
-
* other standing credential's and recovery code's bridge (and
|
|
73
|
-
* `delegatedClients` sibling, where the record carries one) is re-signed
|
|
74
|
-
* by the ladder VM and its record re-sealed through the entry's
|
|
75
|
-
* management zcap -- the revocation cascade's re-mint pass
|
|
76
|
-
* (`remintRecoveryDelegations`), run with the ladder VM as the delegating
|
|
77
|
-
* and record-signing key and the forgotten client named as retiring, so
|
|
78
|
-
* every delegation it signed counts as rotted ahead of the removal entry.
|
|
79
|
-
* Delegations the removed client had signed rot at that entry, and on a
|
|
80
|
-
* client-less account no remembered login's refresh block will ever run
|
|
81
|
-
* again to heal them, so this is the one pass that reaches them. The
|
|
82
|
-
* HTTP side still invokes under the still-standing client (the
|
|
83
|
-
* management zcaps are granted to the account DID, which only an enrolled
|
|
84
|
-
* client can invoke) -- which is why the stage must run before the
|
|
85
|
-
* removal entry. The pass walks every entry and reports each one's fate,
|
|
86
|
-
* but the ceremony does not carry an unsettled entry past this point: a
|
|
87
|
-
* `failed` or `pending-entry` outcome refuses the removal entry
|
|
88
|
-
* ({@link RecordRemintFailedError}, naming the records the pass left
|
|
89
|
-
* unreached), since after the removal nothing could ever re-sign that
|
|
90
|
-
* record's bridge. The client stays
|
|
91
|
-
* enrolled, and a re-run reaches the entry again.
|
|
92
|
-
* 6. **The record re-bind seam** (`onBeforeRemoval`, required): the caller
|
|
76
|
+
* 5. **The record re-bind seam** (`onBeforeRemoval`, required): the caller
|
|
93
77
|
* re-signs the LOGIN credential's bridge and `delegatedClients` sibling
|
|
94
78
|
* with the ladder VM and re-seals its unlock record with the credential
|
|
95
|
-
* in hand (a full re-wrap, proof verified rather than settled).
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
* client -- an account nothing can write to --
|
|
102
|
-
* omits the seam is refused before any read.
|
|
103
|
-
*
|
|
79
|
+
* in hand (a full re-wrap, proof verified rather than settled). It is the
|
|
80
|
+
* only unlock record this ceremony writes. Every OTHER credential's
|
|
81
|
+
* record is signed by its own credential's ladder VM, which this ceremony
|
|
82
|
+
* does not strike, so this transition rots no sibling record and re-seals
|
|
83
|
+
* none (`decisions/0019`). Without the seam the removal entry would leave
|
|
84
|
+
* the login credential's own bridge signed by the struck client's key on
|
|
85
|
+
* an account with no enrolled client -- an account nothing can write to --
|
|
86
|
+
* which is why a call that omits the seam is refused before any read.
|
|
87
|
+
* 6. **The removal entry** ({@link forgetLastWebvhClient}): the client's
|
|
104
88
|
* whole document inventory out while the reinstalled ladder VM keeps the
|
|
105
89
|
* account anchored. The post-removal `did:web` projection is PUT through
|
|
106
90
|
* `clientLogStore` immediately BEFORE that entry, since the entry itself
|
|
@@ -128,9 +112,7 @@
|
|
|
128
112
|
* the generation stage re-asks the same staleness policy (a prior run's own
|
|
129
113
|
* fresh delegation reads as retiring, so a re-run churns one delegation and
|
|
130
114
|
* strands nothing, while a sibling-signed one churns none), and the record
|
|
131
|
-
* re-
|
|
132
|
-
* already ladder-signed reads as current, one whose re-mint failed is still
|
|
133
|
-
* rotted and is re-minted). Torn after the removal entry is the
|
|
115
|
+
* re-bind seam is idempotent. Torn after the removal entry is the
|
|
134
116
|
* finish-the-wipe state the app's next login maps.
|
|
135
117
|
*
|
|
136
118
|
* The honest limitation is the cascade's, as everywhere: ciphertext this
|
|
@@ -138,17 +120,13 @@
|
|
|
138
120
|
* and old epochs stay open to keys it already held.
|
|
139
121
|
*/
|
|
140
122
|
import type { DIDDoc, DIDLog } from '@interop/did-method-webvh';
|
|
141
|
-
import type { IKeyAgreementKey
|
|
142
|
-
import type { ZcapClient } from '@interop/ezcap';
|
|
123
|
+
import type { IKeyAgreementKey } from '@interop/data-integrity-core';
|
|
143
124
|
import type { CollectionEncryption, IDelegatedZcap } from '@interop/was-client';
|
|
144
|
-
import type { EncryptionDescriptorStore } from '@interop/was-client/edv';
|
|
145
125
|
import type { WebvhIdStore } from '../webvh/didWebvh.js';
|
|
146
126
|
import { type RevokedClientKeys } from '../webvh/revokeClient.js';
|
|
147
127
|
import type { ResourceLogPinStore } from '@interop/vh-resource-log';
|
|
148
|
-
import { type CascadeCollections, type UserKey, type UserKeyCascadeResult } from '../keys/index.js';
|
|
128
|
+
import { type CascadeCollections, type SealableEncryptionDescriptorStore, type UserKey, type UserKeyAdoptedHook, type UserKeyCascadeResult } from '../keys/index.js';
|
|
149
129
|
import type { UnlockLogStore } from '../unlock/standingWebvh.js';
|
|
150
|
-
import type { AccountPointer } from '../keyring/record.js';
|
|
151
|
-
import { type RecordRemintOutcome, type RecoveryDelegationEntry } from '../recovery/recoveryDelegation.js';
|
|
152
130
|
import { type ClientAnnexWriteStore } from './log.js';
|
|
153
131
|
/**
|
|
154
132
|
* What the ceremony's generation stage did: the revoked delegation ids, and
|
|
@@ -169,76 +147,26 @@ export interface GenerationDelegationRetirement {
|
|
|
169
147
|
replaced: boolean;
|
|
170
148
|
skipped?: 'no-pointer' | 'log-unreadable' | 'rung-uncommitted' | 'already-removed';
|
|
171
149
|
}
|
|
172
|
-
/**
|
|
173
|
-
* The other unlock methods' reach for the record re-mint stage: the registry
|
|
174
|
-
* entries to walk (the OTHER methods' -- the login credential's own record is
|
|
175
|
-
* the `onBeforeRemoval` seam's, re-wrapped with the credential in hand; an
|
|
176
|
-
* entry for it here is harmless but redundant), the unlock Spaces' storage
|
|
177
|
-
* server, the management-zcap client factory (invoking as the still-standing
|
|
178
|
-
* client), and the registry record-back seam. The shape is the revocation
|
|
179
|
-
* cascade's re-mint seams verbatim, so an app binds both from one place.
|
|
180
|
-
*/
|
|
181
|
-
export interface UnlockMethodsRemintReach<Entry extends RecoveryDelegationEntry = RecoveryDelegationEntry> {
|
|
182
|
-
entries: Entry[];
|
|
183
|
-
pointer: AccountPointer;
|
|
184
|
-
storageServerUrl: string;
|
|
185
|
-
managementZcapClient: (options: {
|
|
186
|
-
capability: IZcap;
|
|
187
|
-
}) => ZcapClient;
|
|
188
|
-
recordEntry: (options: {
|
|
189
|
-
entry: Entry;
|
|
190
|
-
}) => Promise<void>;
|
|
191
|
-
}
|
|
192
150
|
/**
|
|
193
151
|
* What a completed last-client forget reports: whether the reinstall half of
|
|
194
152
|
* the strike-and-reinstall pair ran on this call (`false` on a resumed run
|
|
195
153
|
* that owed no rotation, so neither entry was published), whether the
|
|
196
154
|
* roster's wrap for the
|
|
197
155
|
* forgotten client was retired on this run, the per-collection fan-out
|
|
198
|
-
* result, the generation stage's report, the
|
|
199
|
-
*
|
|
200
|
-
*
|
|
201
|
-
* since that refuses the removal entry instead), the document as the removal
|
|
202
|
-
* entry left it, and -- when the account has a roster -- the rotated key with
|
|
203
|
-
* the roster descriptor it was read from.
|
|
156
|
+
* result, the generation stage's report, the document as the removal entry
|
|
157
|
+
* left it, and -- when the account has a roster -- the rotated key with the
|
|
158
|
+
* roster descriptor it was read from.
|
|
204
159
|
*/
|
|
205
160
|
export interface LastEnrolledClientForgetResult {
|
|
206
161
|
reinstalled: boolean;
|
|
207
162
|
rotated: boolean;
|
|
208
163
|
collections: UserKeyCascadeResult;
|
|
209
164
|
generation: GenerationDelegationRetirement;
|
|
210
|
-
unlockMethods?: {
|
|
211
|
-
reminted: number;
|
|
212
|
-
skipped: number;
|
|
213
|
-
outcomes: RecordRemintOutcome[];
|
|
214
|
-
};
|
|
215
165
|
did: string;
|
|
216
166
|
document: object;
|
|
217
167
|
userKey?: UserKey;
|
|
218
168
|
rosterDescriptor?: CollectionEncryption;
|
|
219
169
|
}
|
|
220
|
-
/**
|
|
221
|
-
* The record re-mint stage could not settle every other unlock method's
|
|
222
|
-
* record, so the removal entry was refused: `failed` names the entries the
|
|
223
|
-
* pass left unreached -- those whose re-mint threw (each carrying its cause)
|
|
224
|
-
* and those it skipped as pending-shaped (the entry's identity members name
|
|
225
|
-
* a credential other than the one its record is sealed to) -- and
|
|
226
|
-
* `unlockMethods` is the whole stage report. A pending-shaped entry blocks
|
|
227
|
-
* for the same reason a failed one does: its bridge is left signed by the
|
|
228
|
-
* key the removal entry strikes, and on a client-less account no login will
|
|
229
|
-
* ever heal it. The mender is a remembered login, which is exactly what the
|
|
230
|
-
* removal would end. The forgotten client is still enrolled and every stage
|
|
231
|
-
* before this one has landed, so a re-run resumes at the re-mint. Matched
|
|
232
|
-
* on `name` (the errors cross app-injected seams that may resolve to another
|
|
233
|
-
* copy of this package).
|
|
234
|
-
*/
|
|
235
|
-
export declare class RecordRemintFailedError extends Error {
|
|
236
|
-
readonly failed: RecordRemintOutcome[];
|
|
237
|
-
readonly unlockMethods: NonNullable<LastEnrolledClientForgetResult['unlockMethods']>;
|
|
238
|
-
constructor({ unlockMethods }: {
|
|
239
|
-
unlockMethods: NonNullable<LastEnrolledClientForgetResult['unlockMethods']>;
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
170
|
/**
|
|
243
171
|
* Forgets the account's LAST enrolled client -- this browser's own
|
|
244
172
|
* -- transitioning the account to the client-less, ladder-anchored state.
|
|
@@ -258,7 +186,7 @@ export declare class RecordRemintFailedError extends Error {
|
|
|
258
186
|
* `logStore` is often signed by the ladder VM the strike removes and the
|
|
259
187
|
* reinstall would then be refused under the current-key-set rule. Both
|
|
260
188
|
* entries stay ladder-signed; only the HTTP invocation differs. It also
|
|
261
|
-
* carries the removal entry's pre-entry `did:web` projection PUT (stage
|
|
189
|
+
* carries the removal entry's pre-entry `did:web` projection PUT (stage 6),
|
|
262
190
|
* the one write the bridge store cannot make. Required: a call without it
|
|
263
191
|
* throws a `TypeError` before any read
|
|
264
192
|
* @param [options.pinStore] {ResourceLogPinStore} this client's chain-head
|
|
@@ -280,13 +208,19 @@ export declare class RecordRemintFailedError extends Error {
|
|
|
280
208
|
* excluded from the staged-hash attribution
|
|
281
209
|
* @param options.expectedDid {string} the account DID from the caller's
|
|
282
210
|
* stored account pointer
|
|
283
|
-
* @param options.
|
|
284
|
-
*
|
|
285
|
-
* SIGNED BY THE LADDER VM
|
|
286
|
-
*
|
|
287
|
-
*
|
|
288
|
-
*
|
|
289
|
-
*
|
|
211
|
+
* @param options.rosterStore {SealableEncryptionDescriptorStore} the
|
|
212
|
+
* log-governed `key-map/user-key.jsonl` roster store whose appends are
|
|
213
|
+
* SIGNED BY THE LADDER VM while its HTTP requests invoke under the
|
|
214
|
+
* still-standing client. Its controller view is the ceremony's to anchor,
|
|
215
|
+
* not the app's: the orchestrator sets the minimum controller version at
|
|
216
|
+
* the pre-transition head for the opening read and at the post-reinstall
|
|
217
|
+
* head for the rotation (the inventory-changing anchor the ceremony-tail
|
|
218
|
+
* license admits), so a store wired over a cached pre-transition view
|
|
219
|
+
* still anchors the one ladder-signed append past the reinstall entry.
|
|
220
|
+
* Required to be anchorable: a store without `setMinimumControllerVersion`
|
|
221
|
+
* is refused with a `TypeError` before any read, since the pair would
|
|
222
|
+
* otherwise publish two entries per attempt ahead of a rotation the
|
|
223
|
+
* license refuses every time
|
|
290
224
|
* @param options.credentialKeyAgreementKey {IKeyAgreementKey} the standing
|
|
291
225
|
* credential's key-agreement key -- the recipient whose wrap survives the
|
|
292
226
|
* rotation, reading the fresh key back and unwrapping the generations for
|
|
@@ -312,28 +246,18 @@ export declare class RecordRemintFailedError extends Error {
|
|
|
312
246
|
* fresh delegation's target subtree)
|
|
313
247
|
* @param [options.annex.pinStore] {ResourceLogPinStore} chain-head pins
|
|
314
248
|
* for the pointed generation's read
|
|
315
|
-
* @param [options.unlockMethods] {UnlockMethodsRemintReach} the other
|
|
316
|
-
* unlock methods' record re-mint reach (stage 5): the registry entries
|
|
317
|
-
* whose bridge (and sibling) the ladder VM re-signs and whose records it
|
|
318
|
-
* re-seals through their management zcaps, invoked as the still-standing
|
|
319
|
-
* client. Omitted, the stage is skipped and the result carries no
|
|
320
|
-
* `unlockMethods` report -- the residue decision 0004's amendment stated.
|
|
321
|
-
* Supplied, an entry the pass could not re-mint -- or skipped as
|
|
322
|
-
* pending-shaped -- refuses the removal entry
|
|
323
|
-
* (`RecordRemintFailedError`)
|
|
324
249
|
* @param options.onBeforeRemoval {Function}
|
|
325
250
|
* `({ did, doc, log }) => Promise<void>` -- the record re-bind seam: runs
|
|
326
|
-
*
|
|
327
|
-
*
|
|
328
|
-
*
|
|
329
|
-
*
|
|
330
|
-
*
|
|
331
|
-
*
|
|
332
|
-
* without it throws a `TypeError` before any read
|
|
251
|
+
* immediately before the removal entry, with the post-reinstall published
|
|
252
|
+
* state. The caller re-signs the login credential's bridge and
|
|
253
|
+
* `delegatedClients` sibling with the ladder VM and re-seals its unlock
|
|
254
|
+
* record here -- the only unlock record this ceremony writes. Must be
|
|
255
|
+
* idempotent (a resumed run invokes it again). Required: a call without it
|
|
256
|
+
* throws a `TypeError` before any read
|
|
333
257
|
* @param [options.now] {number} epoch milliseconds, for tests
|
|
334
258
|
* @returns {Promise<LastEnrolledClientForgetResult>}
|
|
335
259
|
*/
|
|
336
|
-
export declare function forgetLastEnrolledClient({ logStore, clientLogStore, pinStore, ladderSeed, forgottenClient, forgottenKeyAgreementKeyMultibase, knownLatentHashes, expectedDid,
|
|
260
|
+
export declare function forgetLastEnrolledClient({ logStore, clientLogStore, pinStore, ladderSeed, forgottenClient, forgottenKeyAgreementKeyMultibase, knownLatentHashes, expectedDid, rosterStore, credentialKeyAgreementKey, userKey, pinnedEpochId, onUserKeyAdopted, collections, annex, onBeforeRemoval, now }: {
|
|
337
261
|
logStore: UnlockLogStore;
|
|
338
262
|
clientLogStore: UnlockLogStore;
|
|
339
263
|
pinStore?: ResourceLogPinStore;
|
|
@@ -342,18 +266,11 @@ export declare function forgetLastEnrolledClient({ logStore, clientLogStore, pin
|
|
|
342
266
|
forgottenKeyAgreementKeyMultibase: string;
|
|
343
267
|
knownLatentHashes?: string[];
|
|
344
268
|
expectedDid: string;
|
|
345
|
-
|
|
346
|
-
did: string;
|
|
347
|
-
log: DIDLog;
|
|
348
|
-
}) => EncryptionDescriptorStore;
|
|
269
|
+
rosterStore: SealableEncryptionDescriptorStore;
|
|
349
270
|
credentialKeyAgreementKey: IKeyAgreementKey;
|
|
350
271
|
userKey?: UserKey;
|
|
351
272
|
pinnedEpochId?: string | null;
|
|
352
|
-
onUserKeyAdopted?:
|
|
353
|
-
userKey: UserKey;
|
|
354
|
-
latestEpochId: string;
|
|
355
|
-
descriptor: CollectionEncryption;
|
|
356
|
-
}) => Promise<void>;
|
|
273
|
+
onUserKeyAdopted?: UserKeyAdoptedHook;
|
|
357
274
|
collections: CascadeCollections;
|
|
358
275
|
annex: {
|
|
359
276
|
storeFor: (options: {
|
|
@@ -365,7 +282,6 @@ export declare function forgetLastEnrolledClient({ logStore, clientLogStore, pin
|
|
|
365
282
|
accountSpaceId: string;
|
|
366
283
|
pinStore?: ResourceLogPinStore;
|
|
367
284
|
};
|
|
368
|
-
unlockMethods?: UnlockMethodsRemintReach;
|
|
369
285
|
onBeforeRemoval: (published: {
|
|
370
286
|
did: string;
|
|
371
287
|
doc: object;
|
|
@@ -374,7 +290,7 @@ export declare function forgetLastEnrolledClient({ logStore, clientLogStore, pin
|
|
|
374
290
|
now?: number;
|
|
375
291
|
}): Promise<LastEnrolledClientForgetResult>;
|
|
376
292
|
/**
|
|
377
|
-
* THE LAST-CLIENT REMOVAL ENTRY (stage
|
|
293
|
+
* THE LAST-CLIENT REMOVAL ENTRY (stage 6, the transition's own removal): the
|
|
378
294
|
* plain forget's removal shape (`clientForgetEntryOnce`) with this ceremony's
|
|
379
295
|
* removability invariant injected instead of the plain forget's last-client
|
|
380
296
|
* refusal -- the forgotten client IS the last enrolled client, and the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forgetLast.d.ts","sourceRoot":"","sources":["../../src/clientAnnex/forgetLast.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"forgetLast.d.ts","sourceRoot":"","sources":["../../src/clientAnnex/forgetLast.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqHG;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,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAM/E,OAAO,KAAK,EAAqB,YAAY,EAAE,M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