@interop/wallet-core 0.71.0 → 0.73.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 +14 -3
- package/dist/clientAnnex/credentialAnchoredGenesis.d.ts +2 -2
- package/dist/clientAnnex/credentialAnchoredGenesis.d.ts.map +1 -1
- package/dist/clientAnnex/credentialAnchoredGenesis.js +1 -1
- package/dist/clientAnnex/forget.d.ts.map +1 -1
- package/dist/clientAnnex/forget.js +4 -3
- package/dist/clientAnnex/forget.js.map +1 -1
- package/dist/clientAnnex/forgetLast.d.ts +55 -35
- package/dist/clientAnnex/forgetLast.d.ts.map +1 -1
- package/dist/clientAnnex/forgetLast.js +87 -35
- package/dist/clientAnnex/forgetLast.js.map +1 -1
- package/dist/clientAnnex/gc.d.ts +48 -19
- package/dist/clientAnnex/gc.d.ts.map +1 -1
- package/dist/clientAnnex/gc.js +82 -31
- package/dist/clientAnnex/gc.js.map +1 -1
- package/dist/clientAnnex/grantRevocation.d.ts +137 -0
- package/dist/clientAnnex/grantRevocation.d.ts.map +1 -0
- package/dist/clientAnnex/grantRevocation.js +135 -0
- package/dist/clientAnnex/grantRevocation.js.map +1 -0
- package/dist/clientAnnex/index.d.ts +4 -2
- package/dist/clientAnnex/index.d.ts.map +1 -1
- package/dist/clientAnnex/index.js +2 -1
- package/dist/clientAnnex/index.js.map +1 -1
- package/dist/clientAnnex/ladderAnchored.d.ts +0 -22
- package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -1
- package/dist/clientAnnex/ladderAnchored.js +8 -34
- package/dist/clientAnnex/ladderAnchored.js.map +1 -1
- package/dist/clientAnnex/log.d.ts +65 -13
- package/dist/clientAnnex/log.d.ts.map +1 -1
- package/dist/clientAnnex/log.js +160 -67
- package/dist/clientAnnex/log.js.map +1 -1
- package/dist/clientAnnex/mend.js +51 -24
- package/dist/clientAnnex/mend.js.map +1 -1
- package/dist/clientAnnex/zcap.d.ts.map +1 -1
- package/dist/clientAnnex/zcap.js +3 -10
- package/dist/clientAnnex/zcap.js.map +1 -1
- package/dist/clients/grantState.d.ts +6 -3
- package/dist/clients/grantState.d.ts.map +1 -1
- package/dist/clients/grantState.js +6 -3
- package/dist/clients/grantState.js.map +1 -1
- package/dist/clients/policy.d.ts.map +1 -1
- package/dist/clients/policy.js +3 -0
- package/dist/clients/policy.js.map +1 -1
- package/dist/genesis/accountGenesis.d.ts +1 -1
- package/dist/genesis/accountGenesis.d.ts.map +1 -1
- package/dist/keyring/fetch.d.ts +6 -2
- package/dist/keyring/fetch.d.ts.map +1 -1
- package/dist/keyring/fetch.js +7 -3
- package/dist/keyring/fetch.js.map +1 -1
- package/dist/keyring/index.d.ts +15 -10
- package/dist/keyring/index.d.ts.map +1 -1
- package/dist/keyring/index.js +15 -10
- package/dist/keyring/index.js.map +1 -1
- package/dist/keyring/kdf.d.ts +1 -1
- package/dist/keyring/kdf.d.ts.map +1 -1
- package/dist/keyring/kdf.js +1 -1
- package/dist/keyring/kdf.js.map +1 -1
- package/dist/keyring/record.d.ts +15 -0
- package/dist/keyring/record.d.ts.map +1 -1
- package/dist/keyring/record.js +22 -0
- package/dist/keyring/record.js.map +1 -1
- package/dist/keyring/unlockSpace.d.ts +45 -68
- package/dist/keyring/unlockSpace.d.ts.map +1 -1
- package/dist/keyring/unlockSpace.js +66 -88
- package/dist/keyring/unlockSpace.js.map +1 -1
- package/dist/keys/clientKeyRecord.d.ts +3 -4
- package/dist/keys/clientKeyRecord.d.ts.map +1 -1
- package/dist/keys/clientKeyRecord.js +6 -25
- package/dist/keys/clientKeyRecord.js.map +1 -1
- package/dist/keys/index.d.ts +6 -1
- package/dist/keys/index.d.ts.map +1 -1
- package/dist/keys/index.js +6 -1
- package/dist/keys/index.js.map +1 -1
- package/dist/keys/userKey.d.ts +57 -11
- package/dist/keys/userKey.d.ts.map +1 -1
- package/dist/keys/userKey.js +76 -11
- package/dist/keys/userKey.js.map +1 -1
- package/dist/keys/userKeyRoster.d.ts +3 -3
- package/dist/menders/derive.d.ts +85 -0
- package/dist/menders/derive.d.ts.map +1 -0
- package/dist/menders/derive.js +138 -0
- package/dist/menders/derive.js.map +1 -0
- package/dist/menders/ids.d.ts +20 -0
- package/dist/menders/ids.d.ts.map +1 -0
- package/dist/menders/ids.js +85 -0
- package/dist/menders/ids.js.map +1 -0
- package/dist/menders/index.d.ts +42 -0
- package/dist/menders/index.d.ts.map +1 -0
- package/dist/menders/index.js +37 -0
- package/dist/menders/index.js.map +1 -0
- package/dist/menders/registry.d.ts +84 -0
- package/dist/menders/registry.d.ts.map +1 -0
- package/dist/menders/registry.js +62 -0
- package/dist/menders/registry.js.map +1 -0
- package/dist/menders/runner.d.ts +143 -0
- package/dist/menders/runner.d.ts.map +1 -0
- package/dist/menders/runner.js +222 -0
- package/dist/menders/runner.js.map +1 -0
- package/dist/menders/types.d.ts +146 -0
- package/dist/menders/types.d.ts.map +1 -0
- package/dist/menders/types.js +2 -0
- package/dist/menders/types.js.map +1 -0
- package/dist/menders/vocabulary.d.ts +90 -0
- package/dist/menders/vocabulary.d.ts.map +1 -0
- package/dist/menders/vocabulary.js +86 -0
- package/dist/menders/vocabulary.js.map +1 -0
- package/dist/recovery/index.d.ts +1 -1
- package/dist/recovery/index.js +1 -1
- package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
- package/dist/recovery/recoveryWebvh.js +11 -17
- package/dist/recovery/recoveryWebvh.js.map +1 -1
- package/dist/resourceLog/document.d.ts.map +1 -1
- package/dist/resourceLog/document.js +30 -6
- package/dist/resourceLog/document.js.map +1 -1
- package/dist/space/activity.d.ts +70 -0
- package/dist/space/activity.d.ts.map +1 -1
- package/dist/space/activity.js +82 -0
- package/dist/space/activity.js.map +1 -1
- package/dist/space/deleteSpace.d.ts.map +1 -1
- package/dist/space/deleteSpace.js +6 -5
- package/dist/space/deleteSpace.js.map +1 -1
- package/dist/space/index.d.ts +1 -1
- package/dist/space/index.d.ts.map +1 -1
- package/dist/space/index.js +1 -1
- package/dist/space/index.js.map +1 -1
- package/dist/testing.d.ts +78 -0
- package/dist/testing.d.ts.map +1 -0
- package/dist/testing.js +89 -0
- package/dist/testing.js.map +1 -0
- package/dist/unlock/index.d.ts +2 -2
- package/dist/unlock/index.d.ts.map +1 -1
- package/dist/unlock/index.js +1 -1
- package/dist/unlock/retire.d.ts +20 -5
- package/dist/unlock/retire.d.ts.map +1 -1
- package/dist/unlock/retire.js.map +1 -1
- package/dist/unlock/standingWebvh.d.ts +22 -2
- package/dist/unlock/standingWebvh.d.ts.map +1 -1
- package/dist/unlock/standingWebvh.js +22 -2
- package/dist/unlock/standingWebvh.js.map +1 -1
- package/dist/webvh/didWebvh.d.ts +33 -0
- package/dist/webvh/didWebvh.d.ts.map +1 -1
- package/dist/webvh/didWebvh.js +52 -18
- package/dist/webvh/didWebvh.js.map +1 -1
- package/dist/webvh/enrollClient.d.ts.map +1 -1
- package/dist/webvh/enrollClient.js +4 -16
- package/dist/webvh/enrollClient.js.map +1 -1
- package/dist/webvh/index.d.ts +13 -3
- package/dist/webvh/index.d.ts.map +1 -1
- package/dist/webvh/index.js +13 -3
- package/dist/webvh/index.js.map +1 -1
- package/dist/webvh/listClients.d.ts +47 -0
- package/dist/webvh/listClients.d.ts.map +1 -1
- package/dist/webvh/listClients.js +40 -1
- package/dist/webvh/listClients.js.map +1 -1
- package/dist/webvh/standingZcap.d.ts +66 -0
- package/dist/webvh/standingZcap.d.ts.map +1 -1
- package/dist/webvh/standingZcap.js +96 -0
- package/dist/webvh/standingZcap.js.map +1 -1
- package/dist/webvh/zcap.d.ts +1 -1
- package/package.json +22 -10
package/README.md
CHANGED
|
@@ -161,6 +161,17 @@ The subpaths:
|
|
|
161
161
|
per-visit readiness ensure, and the transient-recovery continuation. It sits
|
|
162
162
|
on top of the other subpaths and none of them import from it.
|
|
163
163
|
|
|
164
|
+
- **`@interop/wallet-core/menders`** -- the mender registry keyed by invariant:
|
|
165
|
+
the `InvariantDeclaration` and `Registration` types, the closed vocabularies
|
|
166
|
+
(authorities, triggers, account shapes, evidence, mend outcomes, gap kinds),
|
|
167
|
+
the `INVARIANT_IDS` census, the `menderRegistry` readers with
|
|
168
|
+
`heldAuthorities`, the `runMenderBlock` runner with its
|
|
169
|
+
`mendReportAccumulator`, and the derived sets a wallet's audit tests pin
|
|
170
|
+
(`transientReachableInvariants`, `deriveGaps`, `undeclaredGaps`,
|
|
171
|
+
`undeclaredInvariants`). A wallet declares its own invariant table and its own
|
|
172
|
+
registrations; nothing here executes a ceremony, and the subpath imports
|
|
173
|
+
nothing from the signing or KMS graph.
|
|
174
|
+
|
|
164
175
|
The request pipeline (input classification, VPR parsing, cryptosuite
|
|
165
176
|
negotiation, VP composition, the App Connect app-key credential) now lives in
|
|
166
177
|
[`@interop/wallet-request`](https://npm.im/@interop/wallet-request).
|
|
@@ -201,9 +212,9 @@ import {
|
|
|
201
212
|
|
|
202
213
|
The `sync` and `space` subpaths are re-exported from the package root as well.
|
|
203
214
|
Every other subpath (`webvh`, `resourceLog`, `keys`, `clients`, `descriptors`,
|
|
204
|
-
`keyring`, `enrollment`, `genesis`, `unlock`, `recovery`, `clientAnnex
|
|
205
|
-
import-directly-only, so consumers of the root never pull the
|
|
206
|
-
document-loader dependency graph.
|
|
215
|
+
`keyring`, `enrollment`, `genesis`, `unlock`, `recovery`, `clientAnnex`,
|
|
216
|
+
`menders`) is import-directly-only, so consumers of the root never pull the
|
|
217
|
+
signing / KMS / document-loader dependency graph.
|
|
207
218
|
|
|
208
219
|
One further export is a leaf of that same isolation, carved out to stay
|
|
209
220
|
dependency-light: `keys/clientKeyRecord` is the client-key record codec alone,
|
|
@@ -69,11 +69,11 @@ import { type StageNotifier } from '../log.js';
|
|
|
69
69
|
* the ladder seed is minted by the unlock layer beside the record that
|
|
70
70
|
* carries it, and every other key derives from it.
|
|
71
71
|
*
|
|
72
|
-
* @returns {Promise<{ spaceId: string, userKey:
|
|
72
|
+
* @returns {Promise<{ spaceId: string, userKey: UserKey }>}
|
|
73
73
|
*/
|
|
74
74
|
export declare function mintCredentialAnchoredAccountKeySet(): Promise<{
|
|
75
75
|
spaceId: string;
|
|
76
|
-
userKey:
|
|
76
|
+
userKey: UserKey;
|
|
77
77
|
}>;
|
|
78
78
|
/**
|
|
79
79
|
* Runs the credential-anchored account-genesis ceremony (see the module doc
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentialAnchoredGenesis.d.ts","sourceRoot":"","sources":["../../src/clientAnnex/credentialAnchoredGenesis.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAAK,EAAwB,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC1E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAA;AAIxE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AACvD,OAAO,KAAK,EACV,wBAAwB,EACxB,iBAAiB,EACjB,YAAY,EACb,MAAM,sBAAsB,CAAA;AAE7B,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAA;AAC/E,OAAO,EAGL,KAAK,OAAO,EAEb,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,8BAA8B,CAAA;AAErC,OAAO,EAAiB,KAAK,aAAa,EAAE,MAAM,WAAW,CAAA;AAM7D;;;;;;;;GAQG;AACH,wBAAsB,mCAAmC,IAAI,OAAO,CAAC;IACnE,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"credentialAnchoredGenesis.d.ts","sourceRoot":"","sources":["../../src/clientAnnex/credentialAnchoredGenesis.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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OAAO,CAAA;IAChB,OAAO,EAAE,YAAY,CAAA;IACrB,cAAc,EAAE,CAAC,OAAO,EAAE;QACxB,GAAG,EAAE,MAAM,CAAA;QACX,GAAG,EAAE,MAAM,CAAA;KACZ,KAAK,yBAAyB,CAAA;IAC/B,kBAAkB,EAAE,CAAC,OAAO,EAAE;QAC5B,GAAG,EAAE,MAAM,CAAA;QACX,GAAG,EAAE,MAAM,CAAA;KACZ,KAAK,CAAC,YAAY,EAAE,MAAM,KAAK,yBAAyB,CAAA;IACzD,wBAAwB,CAAC,EAAE,CAAC,OAAO,EAAE;QACnC,UAAU,EAAE,OAAO,CAAC,OAAO,CAAC,CAAA;KAC7B,KAAK,OAAO,CAAC,wBAAwB,GAAG,SAAS,CAAC,CAAA;IACnD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,cAAc,CAAC,EAAE,CAAC,SAAS,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC9D,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,OAAO,CAAC,EAAE,aAAa,CAAA;CACxB,GAAG,OAAO,CACT,oBAAoB,GAAG;IAAE,SAAS,EAAE,iBAAiB,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAE,CAC5E,CAqIA"}
|
|
@@ -69,7 +69,7 @@ import { CONTROLLER_PROMOTION_STAGE } from './stages.js';
|
|
|
69
69
|
* the ladder seed is minted by the unlock layer beside the record that
|
|
70
70
|
* carries it, and every other key derives from it.
|
|
71
71
|
*
|
|
72
|
-
* @returns {Promise<{ spaceId: string, userKey:
|
|
72
|
+
* @returns {Promise<{ spaceId: string, userKey: UserKey }>}
|
|
73
73
|
*/
|
|
74
74
|
export async function mintCredentialAnchoredAccountKeySet() {
|
|
75
75
|
return { spaceId: mintSpaceId(), userKey: await mintUserKey() };
|
|
@@ -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;AAExE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,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;AAExD,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;AAKzB,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,wBAAsB,oBAAoB,CAAC,EACzC,QAAQ,EACR,cAAc,EACd,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,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,CA+DtC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { readPublishedLogOrThrow } from '../webvh/didWebvh.js';
|
|
2
|
+
import { isLastEnrolledClient } from '../webvh/listClients.js';
|
|
2
3
|
import { retireRosterRecipientAndCascade, rosterRecipientKid } from '../keys/index.js';
|
|
3
|
-
import { forgetWebvhClient,
|
|
4
|
+
import { forgetWebvhClient, LastEnrolledClientForgetError } from './ladderAnchored.js';
|
|
4
5
|
/**
|
|
5
6
|
* Forgets one enrolled client -- this browser's own -- from its
|
|
6
7
|
* account. See the module doc for the stage order (rotation and fan-out
|
|
@@ -56,9 +57,9 @@ export async function forgetEnrolledClient({ logStore, clientLogStore, ladderSee
|
|
|
56
57
|
expectedDid,
|
|
57
58
|
missingMessage: 'did:webvh: did.jsonl is missing; nothing to forget from.'
|
|
58
59
|
});
|
|
59
|
-
if (
|
|
60
|
+
if (isLastEnrolledClient({
|
|
60
61
|
doc: published.doc,
|
|
61
|
-
|
|
62
|
+
signingVmId: `${published.did}#${forgottenClient.signingKeyMultibase}`
|
|
62
63
|
})) {
|
|
63
64
|
throw new LastEnrolledClientForgetError();
|
|
64
65
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forget.js","sourceRoot":"","sources":["../../src/clientAnnex/forget.ts"],"names":[],"mappings":"AAsEA,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"forget.js","sourceRoot":"","sources":["../../src/clientAnnex/forget.ts"],"names":[],"mappings":"AAsEA,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AAE9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AAE9D,OAAO,EACL,+BAA+B,EAC/B,kBAAkB,EAKnB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,iBAAiB,EACjB,6BAA6B,EAC9B,MAAM,qBAAqB,CAAA;AAoB5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,EACzC,QAAQ,EACR,cAAc,EACd,UAAU,EACV,eAAe,EACf,iCAAiC,EACjC,iBAAiB,EACjB,WAAW,EACX,WAAW,EACX,yBAAyB,EACzB,OAAO,EACP,aAAa,EACb,gBAAgB,EAChB,WAAW,EAeZ;IACC,0EAA0E;IAC1E,2EAA2E;IAC3E,2EAA2E;IAC3E,qDAAqD;IACrD,MAAM,SAAS,GAAG,MAAM,uBAAuB,CAAC;QAC9C,OAAO,EAAE,QAAQ;QACjB,WAAW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,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"}
|
|
@@ -59,20 +59,27 @@
|
|
|
59
59
|
* an account where no enrolled client's login sweep will ever run again.
|
|
60
60
|
* 3. **The collection fan-out**, still under this client's invocation
|
|
61
61
|
* authority: every encrypted collection re-epochs onto the fresh key.
|
|
62
|
-
* 4. **The generation-delegation
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
* is what keeps
|
|
74
|
-
*
|
|
75
|
-
*
|
|
62
|
+
* 4. **The generation-delegation revocations and replacement**: EVERY
|
|
63
|
+
* delegation the annex log's history ever embedded that this
|
|
64
|
+
* credential's ladder VM signed is revoked at the server (a renewal
|
|
65
|
+
* inside the 30-day window can leave two, and a prior torn run's own
|
|
66
|
+
* fresh one is another) -- closing the resurrection window a reinstalled
|
|
67
|
+
* derived-key VM would otherwise reopen -- and a fresh ladder-signed
|
|
68
|
+
* generation delegation replaces the embedded one when the house
|
|
69
|
+
* staleness policy, read against a projected post-edit document, says it
|
|
70
|
+
* is owed: this credential's ladder VM and the forgotten client are both
|
|
71
|
+
* named retiring, which is every key this ceremony ends. The order is
|
|
72
|
+
* revoke the historical members, replace, then revoke the embedded one.
|
|
73
|
+
* The replacement is what keeps the account transient-login-reachable
|
|
74
|
+
* after the transition; replace-before-revoke for the one live delegation
|
|
75
|
+
* is what keeps a torn run from stranding the generation
|
|
76
|
+
* delegation-less; and revoking the historical members before anything
|
|
77
|
+
* is minted is what keeps a revocation the server persistently refuses
|
|
78
|
+
* from adding a fresh doomed delegation per attempt (the first attempt
|
|
79
|
+
* mints once before the embedded delegation's refusal is seen; every
|
|
80
|
+
* re-run halts before minting). A delegation a
|
|
81
|
+
* surviving sibling credential's ladder signed is left standing, since
|
|
82
|
+
* the revocation loop never reaches it either.
|
|
76
83
|
* 5. **The record re-bind seam** (`onBeforeRemoval`, required): the caller
|
|
77
84
|
* re-signs the LOGIN credential's bridge and `delegatedClients` sibling
|
|
78
85
|
* with the ladder VM and re-seals its unlock record with the credential
|
|
@@ -104,15 +111,19 @@
|
|
|
104
111
|
* client's root authority rather than the credential's bridge -- the bridge
|
|
105
112
|
* the strike may itself have rotted cannot authorize that write, and nothing
|
|
106
113
|
* else on a one-client account could. Both entries of the pair are
|
|
107
|
-
* idempotent and the pair is
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
114
|
+
* idempotent and the pair is skipped once the rotation has landed, an
|
|
115
|
+
* already-rotated roster skips the append (no second ladder-signed append is
|
|
116
|
+
* ever attempted), the fan-out is staleness-driven, a re-POSTed revocation
|
|
117
|
+
* reads was-client's genuine `AlreadyRevokedError` as success and a
|
|
118
|
+
* delegation expired beyond the clock-skew margin skips the POST outright
|
|
119
|
+
* (decision 0006's resume contract) -- any OTHER revocation failure instead
|
|
120
|
+
* fails the stage and the whole ceremony, so a re-run resumes rather than
|
|
121
|
+
* the transition declaring the resurrection window closed on a delegation
|
|
122
|
+
* still standing -- the generation stage re-asks the same staleness policy
|
|
123
|
+
* (a prior run's own fresh delegation reads as retiring, so a re-run revokes
|
|
124
|
+
* it among the historical members and churns one delegation, while a
|
|
125
|
+
* sibling-signed one churns none), and the record re-bind seam is
|
|
126
|
+
* idempotent. Torn after the removal entry is the
|
|
116
127
|
* finish-the-wipe state the app's next login maps.
|
|
117
128
|
*
|
|
118
129
|
* The honest limitation is the cascade's, as everywhere: ciphertext this
|
|
@@ -128,18 +139,27 @@ import { type CascadeCollections, type SealableEncryptionDescriptorStore, type U
|
|
|
128
139
|
import type { UnlockLogStore } from '../unlock/standingWebvh.js';
|
|
129
140
|
import { type ClientAnnexWriteStore } from './log.js';
|
|
130
141
|
/**
|
|
131
|
-
* What the ceremony's generation stage did: the
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
* the
|
|
142
|
+
* What the ceremony's generation stage did: the ids of every doomed
|
|
143
|
+
* delegation actually revoked (the POST landed, or was-client answered the
|
|
144
|
+
* genuine `AlreadyRevokedError`; a doomed delegation expired beyond the
|
|
145
|
+
* clock-skew margin is skipped and not listed, and since every doomed
|
|
146
|
+
* delegation's proof key is this credential's own ladder VM, which stage 1
|
|
147
|
+
* just reinstalled, a server refusal is never read as signer death), and
|
|
148
|
+
* whether the stage wrote a replacement -- `false` with no `skipped`
|
|
149
|
+
* reason means nothing was owed, the standing delegation being one a
|
|
150
|
+
* surviving sibling credential's ladder signed. A `skipped` reason names
|
|
151
|
+
* the stage that could not run --
|
|
152
|
+
* `no-pointer` (the account points at no generation: nothing to revoke or
|
|
153
|
+
* replace), `log-unreadable` (the pointed generation's `did.jsonl` is gone;
|
|
154
|
+
* the delegation bytes are unrecoverable, decision 0006's honest limit),
|
|
155
|
+
* `rung-uncommitted` (this credential cannot write the generation's log; the
|
|
156
|
+
* account lands delegation-less until a fresh-generation heal),
|
|
157
|
+
* `already-removed` (the whole ceremony completed on an earlier run; nothing
|
|
158
|
+
* here can still invoke) -- and a skip never fails the ceremony. A doomed
|
|
159
|
+
* delegation that fails to revoke for any other reason is NOT a skip: the
|
|
160
|
+
* stage throws instead, so the ceremony halts before the removal entry
|
|
161
|
+
* rather than declaring the resurrection window closed while that delegation
|
|
162
|
+
* still stands.
|
|
143
163
|
*/
|
|
144
164
|
export interface GenerationDelegationRetirement {
|
|
145
165
|
revoked: string[];
|
|
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgIG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAS,MAAM,8BAA8B,CAAA;AAC3E,OAAO,KAAK,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAK/E,OAAO,KAAK,EAAqB,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAC3E,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,0BAA0B,CAAA;AAGjC,OAAO,EAML,KAAK,kBAAkB,EACvB,KAAK,iCAAiC,EACtC,KAAK,OAAO,EACZ,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EAC1B,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAchE,OAAO,EASL,KAAK,qBAAqB,EAC3B,MAAM,UAAU,CAAA;AAEjB;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,8BAA8B;IAC7C,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,QAAQ,EAAE,OAAO,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QACL,QAAQ,EAAE,CAAC,OAAO,EAAE;YAClB,OAAO,EAAE,MAAM,CAAA;YACf,YAAY,EAAE,MAAM,CAAA;SACrB,KAAK,qBAAqB,CAAA;QAC3B,MAAM,EAAE,CAAC,UAAU,EAAE,cAAc,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;QACrD,YAAY,EAAE,MAAM,CAAA;QACpB,cAAc,EAAE,MAAM,CAAA;KACvB,CAAA;IACD,eAAe,EAAE,CAAC,SAAS,EAAE;QAC3B,GAAG,EAAE,MAAM,CAAA;QACX,GAAG,EAAE,MAAM,CAAA;QACX,GAAG,EAAE,MAAM,CAAA;KACZ,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACnB,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,GAAG,OAAO,CAAC,8BAA8B,CAAC,CAkO1C;AA4MD;;;;;;;;;;;;GAYG;AACH,wBAAsB,qBAAqB,CAAC,OAAO,EAAE;IACnD,KAAK,EAAE,cAAc,CAAA;IACrB,eAAe,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,kBAAkB,GAAG,eAAe,CAAC,CAAA;IAC1E,UAAU,EAAE,UAAU,CAAA;IACtB,eAAe,EAAE,iBAAiB,CAAA;IAClC,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,GAAG,OAAO,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CAWrD"}
|
|
@@ -4,10 +4,11 @@ import { delegationProofKeyId } from '../webvh/standingZcap.js';
|
|
|
4
4
|
import { vmFragmentOf } from '@interop/vh-resource-log';
|
|
5
5
|
import { anchorRosterStoreAt, isSealableDescriptorStore, retireRosterRecipientAndCascade, rosterRecipientKid, rosterWrapsRecipient } from '../keys/index.js';
|
|
6
6
|
import { ladderVmKeyMultibase } from './ladder.js';
|
|
7
|
-
import { ladderVmIds
|
|
7
|
+
import { ladderVmIds } from '../resourceLog/document.js';
|
|
8
|
+
import { enrolledClientVmIds, isLastEnrolledClient } from '../webvh/listClients.js';
|
|
8
9
|
import { ladderVmZcapClient } from './zcap.js';
|
|
9
10
|
import { clientForgetEntryOnce, installLadderVmWebvh, strikeLadderVmWebvh } from './ladderAnchored.js';
|
|
10
|
-
import { clientAnnexDidParts, delegatedClientsPointer, ensureGenerationDelegationCurrent, generationDelegationHistory, mintGenerationDelegation, readClientAnnexLogOrAbsent, revokeTreatingAlreadyRevokedAsSuccess } from './log.js';
|
|
11
|
+
import { clientAnnexDidParts, delegatedClientsPointer, ensureGenerationDelegationCurrent, embeddedGenerationDelegation, generationDelegationHistory, mintGenerationDelegation, readClientAnnexLogOrAbsent, revokeTreatingAlreadyRevokedAsSuccess } from './log.js';
|
|
11
12
|
/**
|
|
12
13
|
* Forgets the account's LAST enrolled client -- this browser's own
|
|
13
14
|
* -- transitioning the account to the client-less, ladder-anchored state.
|
|
@@ -147,8 +148,13 @@ export async function forgetLastEnrolledClient({ logStore, clientLogStore, ladde
|
|
|
147
148
|
};
|
|
148
149
|
}
|
|
149
150
|
const signingVmId = `${before.did}#${forgottenClient.signingKeyMultibase}`;
|
|
150
|
-
|
|
151
|
-
|
|
151
|
+
// The transition applies while this client stands alone. Past the removal
|
|
152
|
+
// entry (`present` above says the key or a hash lingers, the method is
|
|
153
|
+
// gone) the document lists no enrolled client at all, and the remaining
|
|
154
|
+
// stages converge on that state.
|
|
155
|
+
const enrolled = enrolledClientVmIds({ doc: before.doc });
|
|
156
|
+
if (enrolled.length > 0 &&
|
|
157
|
+
!isLastEnrolledClient({ doc: before.doc, signingVmId })) {
|
|
152
158
|
throw new Error('did:webvh: another enrolled client remains; the last-client ' +
|
|
153
159
|
'transition ceremony does not apply -- run the ordinary forget.');
|
|
154
160
|
}
|
|
@@ -294,14 +300,18 @@ export async function forgetLastEnrolledClient({ logStore, clientLogStore, ladde
|
|
|
294
300
|
};
|
|
295
301
|
}
|
|
296
302
|
/**
|
|
297
|
-
* The generation stage: reads the pointed generation's log,
|
|
298
|
-
*
|
|
299
|
-
*
|
|
300
|
-
*
|
|
301
|
-
*
|
|
302
|
-
*
|
|
303
|
-
* it
|
|
304
|
-
*
|
|
303
|
+
* The generation stage: reads the pointed generation's log, revokes every
|
|
304
|
+
* delegation the log's history embedded that this credential's ladder VM
|
|
305
|
+
* signed other than the currently embedded one, replaces the embedded
|
|
306
|
+
* delegation with a fresh ladder-signed one (so the account stays
|
|
307
|
+
* transient-login-reachable), then revokes the one it replaced. The doomed
|
|
308
|
+
* set is collected before the replacement, so the fresh delegation is never
|
|
309
|
+
* in it. Replace-before-revoke for the embedded delegation is the
|
|
310
|
+
* tear-safety order: a run torn anywhere leaves the generation with a live
|
|
311
|
+
* delegation. Revoke-before-mint for the historical members is the
|
|
312
|
+
* bounded-retry order: a revocation the server persistently refuses halts
|
|
313
|
+
* the stage before anything is minted, so a re-run finds the doomed set it
|
|
314
|
+
* left rather than one delegation larger.
|
|
305
315
|
*
|
|
306
316
|
* The replacement is decided by the house staleness policy read against a
|
|
307
317
|
* PROJECTED post-edit document, not by an unconditional force: this
|
|
@@ -339,26 +349,73 @@ async function retireLadderGenerationDelegations({ doc, accountDid, ladderSeed,
|
|
|
339
349
|
if (published === undefined) {
|
|
340
350
|
return { revoked: [], replaced: false, skipped: 'log-unreadable' };
|
|
341
351
|
}
|
|
342
|
-
// The doomed set
|
|
343
|
-
//
|
|
344
|
-
// is
|
|
345
|
-
//
|
|
346
|
-
//
|
|
352
|
+
// The doomed set: every delegation the history embedded whose proof key
|
|
353
|
+
// is this credential's ladder VM, the currently embedded one included. It
|
|
354
|
+
// is collected BEFORE the replacement so the fresh delegation can never
|
|
355
|
+
// join it, and split in two around the replacement: the historical
|
|
356
|
+
// members (everything but the embedded one) are revoked first, the
|
|
357
|
+
// embedded one only after its replacement stands. Expiry is not filtered
|
|
358
|
+
// here; the revoke helper skips a delegation expired beyond the clock-skew
|
|
359
|
+
// margin and reports it `expired`, which is not a failure.
|
|
347
360
|
const ladderVmKey = await ladderVmKeyMultibase({ ladderSeed });
|
|
348
361
|
const doomed = generationDelegationHistory({ log: published.log }).filter(delegation => {
|
|
349
362
|
const proofKeyId = delegationProofKeyId(delegation);
|
|
350
363
|
const fragment = proofKeyId === undefined ? null : vmFragmentOf(proofKeyId);
|
|
351
|
-
|
|
352
|
-
return false;
|
|
353
|
-
}
|
|
354
|
-
const expires = Date.parse(delegation.expires ?? '');
|
|
355
|
-
return Number.isNaN(expires) || expires > now;
|
|
364
|
+
return fragment === ladderVmKey;
|
|
356
365
|
});
|
|
357
|
-
|
|
366
|
+
const embeddedId = embeddedGenerationDelegation({ doc: published.doc })?.id;
|
|
367
|
+
const isEmbedded = (delegation) => embeddedId !== undefined &&
|
|
368
|
+
delegation.id === embeddedId;
|
|
369
|
+
const revoked = [];
|
|
370
|
+
const revokeDoomed = async (delegations) => {
|
|
371
|
+
// Each revocation independent, so they run together via
|
|
372
|
+
// `Promise.allSettled` rather than `Promise.all`: a genuine
|
|
373
|
+
// `AlreadyRevokedError` still reads as success (the blind resumable
|
|
374
|
+
// re-POST), but every other failure must be seen and reported rather
|
|
375
|
+
// than aborting the batch, so `revoked` reports only what is provably
|
|
376
|
+
// off the account and a failure surfaces once every revocation has
|
|
377
|
+
// settled.
|
|
378
|
+
const settled = await Promise.allSettled(delegations.map(delegation => revokeTreatingAlreadyRevokedAsSuccess({
|
|
379
|
+
revoke: annex.revoke,
|
|
380
|
+
delegation,
|
|
381
|
+
now,
|
|
382
|
+
accountDoc: doc
|
|
383
|
+
})));
|
|
384
|
+
let firstRejection;
|
|
385
|
+
settled.forEach((settledResult, index) => {
|
|
386
|
+
if (settledResult.status === 'rejected') {
|
|
387
|
+
firstRejection ??= settledResult;
|
|
388
|
+
return;
|
|
389
|
+
}
|
|
390
|
+
// `expired` is a delegation nothing can invoke, not one this stage
|
|
391
|
+
// took off the account, so it stays out of `revoked`. `signer-gone`
|
|
392
|
+
// cannot be reported here: every doomed delegation's proof key is
|
|
393
|
+
// this credential's own ladder VM, which stage 1 reinstalled into
|
|
394
|
+
// `doc` before this stage ran, so a server refusal of one rethrows.
|
|
395
|
+
const outcome = settledResult.value;
|
|
396
|
+
const id = delegations[index].id;
|
|
397
|
+
if (typeof id === 'string' &&
|
|
398
|
+
(outcome === 'revoked' || outcome === 'already-revoked')) {
|
|
399
|
+
revoked.push(id);
|
|
400
|
+
}
|
|
401
|
+
});
|
|
402
|
+
if (firstRejection !== undefined) {
|
|
403
|
+
// Rethrown verbatim, not wrapped: every consumer dispatches on
|
|
404
|
+
// `err.name`, which a wrapper would erase.
|
|
405
|
+
throw firstRejection.reason;
|
|
406
|
+
}
|
|
407
|
+
};
|
|
408
|
+
// The historical members first, before anything is minted: a revocation
|
|
409
|
+
// the server persistently refuses halts the ceremony here, with no fresh
|
|
410
|
+
// delegation minted for the next attempt to find doomed in its turn. The
|
|
411
|
+
// embedded delegation is not among them, so a run torn after this batch
|
|
412
|
+
// leaves the generation with its live delegation.
|
|
413
|
+
await revokeDoomed(doomed.filter(delegation => !isEmbedded(delegation)));
|
|
414
|
+
// The replacement next: a ladder-signed fresh delegation under the
|
|
358
415
|
// reinstalled VM, the annex entry signed by this credential's committed
|
|
359
416
|
// annex rung. A credential the generation does not commit cannot write the
|
|
360
417
|
// entry -- the honest skip, leaving the generation delegation-less once
|
|
361
|
-
// the
|
|
418
|
+
// the embedded delegation is revoked below.
|
|
362
419
|
let replaced = false;
|
|
363
420
|
let rungUncommitted = false;
|
|
364
421
|
const ladderClient = await ladderVmZcapClient({ accountDid, ladderSeed });
|
|
@@ -381,7 +438,7 @@ async function retireLadderGenerationDelegations({ doc, accountDid, ladderSeed,
|
|
|
381
438
|
});
|
|
382
439
|
// `replaced` reports what the stage actually wrote. A delegation the
|
|
383
440
|
// policy leaves standing -- a surviving sibling ladder's, which the
|
|
384
|
-
// revocations
|
|
441
|
+
// revocations never reach -- ends the stage current rather than
|
|
385
442
|
// replaced, with no `skipped` reason: nothing was owed.
|
|
386
443
|
replaced = ensured.renewed;
|
|
387
444
|
}
|
|
@@ -392,16 +449,11 @@ async function retireLadderGenerationDelegations({ doc, accountDid, ladderSeed,
|
|
|
392
449
|
}
|
|
393
450
|
rungUncommitted = true;
|
|
394
451
|
}
|
|
395
|
-
// The
|
|
396
|
-
//
|
|
397
|
-
//
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
delegation
|
|
401
|
-
})));
|
|
402
|
-
const revoked = doomed
|
|
403
|
-
.map(delegation => delegation.id)
|
|
404
|
-
.filter((id) => typeof id === 'string');
|
|
452
|
+
// The embedded delegation last, now that its replacement stands (or the
|
|
453
|
+
// rung-uncommitted skip has been taken): replace-before-revoke for the
|
|
454
|
+
// one live delegation is what keeps a torn run from stranding the
|
|
455
|
+
// generation delegation-less.
|
|
456
|
+
await revokeDoomed(doomed.filter(isEmbedded));
|
|
405
457
|
return rungUncommitted
|
|
406
458
|
? { revoked, replaced, skipped: 'rung-uncommitted' }
|
|
407
459
|
: { revoked, replaced };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forgetLast.js","sourceRoot":"","sources":["../../src/clientAnnex/forgetLast.ts"],"names":[],"mappings":"AA4HA,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EACL,mBAAmB,EAEpB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACvD,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,+BAA+B,EAC/B,kBAAkB,EAClB,oBAAoB,EAMrB,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;A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ED;;;;;;;;;;;;GAYG;AACH,KAAK,UAAU,wBAAwB,CAAC,EACtC,SAAS,EACT,UAAU,EAIX;IACC,MAAM,UAAU,GAAG,GAAG,SAAS,CAAC,GAAG,IAAI,MAAM,oBAAoB,CAAC;QAChE,UAAU;KACX,CAAC,EAAE,CAAA;IACJ,IAAI,CAAC,WAAW,CAAC,EAAE,GAAG,EAAE,SAAS,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;QAC9D,MAAM,IAAI,KAAK,CACb,iEAAiE;YAC/D,kEAAkE;YAClE,oBAAoB,CACvB,CAAA;IACH,CAAC;AACH,CAAC"}
|
package/dist/clientAnnex/gc.d.ts
CHANGED
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
* every `gen-` collection the pointer does not name -- the generation a
|
|
27
27
|
* swap just superseded, a torn GC's leftover, a torn signup's orphan, a
|
|
28
28
|
* double-genesis loser -- gets identical treatment (revoke its embedded
|
|
29
|
-
* delegation blind, reading
|
|
30
|
-
* success
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
* success.
|
|
29
|
+
* delegation blind, reading was-client's genuine `AlreadyRevokedError` as
|
|
30
|
+
* success and an already-expired delegation as needing no POST at all;
|
|
31
|
+
* write the digest; delete), so a GC torn anywhere resumes at the next
|
|
32
|
+
* login instead of waiting a quarter. Failures are collected per generation
|
|
33
|
+
* and never abort the fan-out: a partial pass is a resumable success.
|
|
34
34
|
*
|
|
35
35
|
* The completion predicate is durable state alone (exactly one `gen-`
|
|
36
36
|
* collection exists in the auxiliary Space and it is the one the pointer
|
|
@@ -55,6 +55,7 @@ import type { ZcapClient } from '@interop/ezcap';
|
|
|
55
55
|
import type { WasClient } from '@interop/was-client';
|
|
56
56
|
import type { AccountLogSigner } from '../webvh/accountEntry.js';
|
|
57
57
|
import type { ClientWebvhUpdateKeys, PublishedWebvhLog, WebvhIdStore } from '../webvh/didWebvh.js';
|
|
58
|
+
import type { ClientAnnexSwapRevokeOutcome } from '../unlock/retire.js';
|
|
58
59
|
/**
|
|
59
60
|
* The fixed GC cadence: a generation is replaced at the first remembered login
|
|
60
61
|
* 90 days after the current pointer value was established. Wallet GC policy
|
|
@@ -158,16 +159,36 @@ export interface ClientAnnexGcReport {
|
|
|
158
159
|
/**
|
|
159
160
|
* One generation swap's outcome: the fresh annex DID the account now points
|
|
160
161
|
* at, and what the revoke stage did with the old generation's embedded
|
|
161
|
-
* delegation -- `revoked` (the POST landed, or
|
|
162
|
-
*
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
*
|
|
166
|
-
*
|
|
162
|
+
* delegation -- `revoked` (the POST landed, or was-client answered the
|
|
163
|
+
* genuine `AlreadyRevokedError`), `expired` (the delegation's own `expires`
|
|
164
|
+
* is past beyond doubt, so no POST was sent, or the server refused the POST
|
|
165
|
+
* inside the skew band around `expires`), `signer-gone` (the server refused
|
|
166
|
+
* the POST and the delegation's proof key has left the account document --
|
|
167
|
+
* a rotted chain), `refused` (the server, or was-client before the POST,
|
|
168
|
+
* refused the revocation for a reason the stage could not classify; the
|
|
169
|
+
* error rides in `revokeError`, the re-point still landed, and the old
|
|
170
|
+
* generation is left for the collect fan-out, which re-attempts the
|
|
171
|
+
* revocation and keeps the generation while it keeps failing),
|
|
172
|
+
* `no-delegation` (the old log stands and embeds none), or `log-absent` (the
|
|
173
|
+
* pointed log does not exist, so there were no bytes to revoke; pointer
|
|
174
|
+
* equality retires the delegation on a conforming server). Reported rather
|
|
175
|
+
* than folded into the DID so a caller can tell a swap that revoked from one
|
|
176
|
+
* that could not.
|
|
177
|
+
*
|
|
178
|
+
* A refusal does not abort the swap: by the time the revoke stage runs the
|
|
179
|
+
* fresh generation is minted and its delegation installed, and a swap that
|
|
180
|
+
* threw here would leave that orphan behind and mint another at every due
|
|
181
|
+
* login, with the old generation never superseded. Re-pointing anyway costs
|
|
182
|
+
* nothing the refusal did not already cost: a delegation the server refused
|
|
183
|
+
* to revoke fails the chain check an invocation under it runs too, a
|
|
184
|
+
* refusal raised client-side before any POST is a configuration fault the
|
|
185
|
+
* next pass meets again, and the fan-out keeps the bytes until a pass
|
|
186
|
+
* succeeds.
|
|
167
187
|
*/
|
|
168
188
|
export interface ClientAnnexGenerationSwap {
|
|
169
189
|
clientAnnexDid: string;
|
|
170
|
-
revoke:
|
|
190
|
+
revoke: ClientAnnexSwapRevokeOutcome;
|
|
191
|
+
revokeError?: unknown;
|
|
171
192
|
}
|
|
172
193
|
/**
|
|
173
194
|
* One annex GC pass: the quarterly swap when due and quiet, then the
|
|
@@ -175,11 +196,13 @@ export interface ClientAnnexGenerationSwap {
|
|
|
175
196
|
* See the module header for the stage order and its load-bearing constraints.
|
|
176
197
|
*
|
|
177
198
|
* Convergence: every stage detects completion from durable state. A re-run
|
|
178
|
-
* after a tear re-POSTs the revocation blind (
|
|
179
|
-
* success
|
|
180
|
-
*
|
|
181
|
-
*
|
|
182
|
-
*
|
|
199
|
+
* after a tear re-POSTs the revocation blind (a genuine `AlreadyRevokedError`
|
|
200
|
+
* reads as success; a delegation expired beyond the clock-skew margin is
|
|
201
|
+
* skipped locally before any POST, and a refusal inside the skew band or of
|
|
202
|
+
* a chain whose signer has left the document is read as that), re-writes
|
|
203
|
+
* the digest (the deterministic payload id collapses the second row at read
|
|
204
|
+
* time), and re-runs the idempotent delete; a swap torn before its re-point
|
|
205
|
+
* leaves an unpointed fresh generation the same fan-out collects.
|
|
183
206
|
*
|
|
184
207
|
* @param options {object}
|
|
185
208
|
* @param options.was {WasClient} the storage client, signing as an
|
|
@@ -248,16 +271,21 @@ export declare function runClientAnnexGc({ was, wasServerUrl, accountSpaceId, ac
|
|
|
248
271
|
* the revoke is skipped and reported as `log-absent`, and pointer equality
|
|
249
272
|
* retires the old delegation on a conforming server; a served log that fails
|
|
250
273
|
* verification or falls behind this client's pin throws, since a swap over a
|
|
251
|
-
* log this client cannot trust would skip a revoke it may owe.
|
|
274
|
+
* log this client cannot trust would skip a revoke it may owe. This is the
|
|
275
|
+
* arm credential retirement calls, and the standing delegation there is
|
|
276
|
+
* often signed by a ladder VM a PRIOR retirement already struck: the server
|
|
277
|
+
* refuses that chain, and the revoke stage reads the refusal against the
|
|
278
|
+
* caller's `account.doc` and reports `signer-gone`.
|
|
252
279
|
*
|
|
253
280
|
* @param options {object} see {@link runClientAnnexGc} for the shared
|
|
254
281
|
* members ({ was, wasServerUrl, accountSpaceId, account, idStore,
|
|
255
282
|
* updateKeys, zcapClient }); `ladderSeed` here is the SURVIVING
|
|
256
283
|
* credential's seed the fresh generation is minted from
|
|
284
|
+
* @param [options.now] {number} epoch milliseconds, for tests
|
|
257
285
|
* @returns {Promise<ClientAnnexGenerationSwap>} the fresh annex DID and
|
|
258
286
|
* what the revoke stage did
|
|
259
287
|
*/
|
|
260
|
-
export declare function swapClientAnnexGeneration({ was, wasServerUrl, accountSpaceId, account, idStore, signer, zcapClient, ladderSeed }: {
|
|
288
|
+
export declare function swapClientAnnexGeneration({ was, wasServerUrl, accountSpaceId, account, idStore, signer, zcapClient, ladderSeed, now }: {
|
|
261
289
|
was: WasClient;
|
|
262
290
|
wasServerUrl: string;
|
|
263
291
|
accountSpaceId: string;
|
|
@@ -266,5 +294,6 @@ export declare function swapClientAnnexGeneration({ was, wasServerUrl, accountSp
|
|
|
266
294
|
signer: AccountLogSigner;
|
|
267
295
|
zcapClient: ZcapClient;
|
|
268
296
|
ladderSeed: Uint8Array;
|
|
297
|
+
now?: number;
|
|
269
298
|
}): Promise<ClientAnnexGenerationSwap>;
|
|
270
299
|
//# sourceMappingURL=gc.d.ts.map
|