@interop/wallet-core 0.49.0 → 0.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -2
- package/dist/clientAnnex/credentialAnchoredGenesis.d.ts +118 -0
- package/dist/clientAnnex/credentialAnchoredGenesis.d.ts.map +1 -0
- package/dist/clientAnnex/credentialAnchoredGenesis.js +174 -0
- package/dist/clientAnnex/credentialAnchoredGenesis.js.map +1 -0
- package/dist/clientAnnex/forget.d.ts +138 -0
- package/dist/clientAnnex/forget.d.ts.map +1 -0
- package/dist/clientAnnex/forget.js +133 -0
- package/dist/clientAnnex/forget.js.map +1 -0
- package/dist/clientAnnex/forgetLast.d.ts +267 -0
- package/dist/clientAnnex/forgetLast.d.ts.map +1 -0
- package/dist/clientAnnex/forgetLast.js +374 -0
- package/dist/clientAnnex/forgetLast.js.map +1 -0
- package/dist/{webvh/companionGc.d.ts → clientAnnex/gc.d.ts} +50 -16
- package/dist/clientAnnex/gc.d.ts.map +1 -0
- package/dist/{webvh/companionGc.js → clientAnnex/gc.js} +103 -71
- package/dist/clientAnnex/gc.js.map +1 -0
- package/dist/clientAnnex/index.d.ts +60 -0
- package/dist/clientAnnex/index.d.ts.map +1 -0
- package/dist/clientAnnex/index.js +60 -0
- package/dist/clientAnnex/index.js.map +1 -0
- package/dist/{unlock → clientAnnex}/ladder.d.ts +89 -15
- package/dist/clientAnnex/ladder.d.ts.map +1 -0
- package/dist/clientAnnex/ladder.js +474 -0
- package/dist/clientAnnex/ladder.js.map +1 -0
- package/dist/clientAnnex/ladderAnchored.d.ts +276 -0
- package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -0
- package/dist/clientAnnex/ladderAnchored.js +631 -0
- package/dist/clientAnnex/ladderAnchored.js.map +1 -0
- package/dist/{webvh/companion.d.ts → clientAnnex/log.d.ts} +333 -119
- package/dist/clientAnnex/log.d.ts.map +1 -0
- package/dist/{webvh/companion.js → clientAnnex/log.js} +583 -199
- package/dist/clientAnnex/log.js.map +1 -0
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts +103 -0
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts.map +1 -0
- package/dist/clientAnnex/recoveryLadderAnchored.js +263 -0
- package/dist/clientAnnex/recoveryLadderAnchored.js.map +1 -0
- package/dist/{unlock → clientAnnex}/selfEnroll.d.ts +1 -1
- package/dist/clientAnnex/selfEnroll.d.ts.map +1 -0
- package/dist/{unlock → clientAnnex}/selfEnroll.js +1 -1
- package/dist/clientAnnex/selfEnroll.js.map +1 -0
- package/dist/clientAnnex/zcap.d.ts +49 -0
- package/dist/clientAnnex/zcap.d.ts.map +1 -0
- package/dist/clientAnnex/zcap.js +101 -0
- package/dist/clientAnnex/zcap.js.map +1 -0
- package/dist/clients/index.d.ts +9 -6
- package/dist/clients/index.d.ts.map +1 -1
- package/dist/clients/index.js +8 -5
- package/dist/clients/index.js.map +1 -1
- package/dist/clients/listing.d.ts +32 -0
- package/dist/clients/listing.d.ts.map +1 -1
- package/dist/clients/listing.js +47 -1
- package/dist/clients/listing.js.map +1 -1
- package/dist/clients/revocation.d.ts +33 -1
- package/dist/clients/revocation.d.ts.map +1 -1
- package/dist/clients/revocation.js +16 -4
- package/dist/clients/revocation.js.map +1 -1
- package/dist/enrollment/index.d.ts +6 -4
- package/dist/enrollment/index.d.ts.map +1 -1
- package/dist/enrollment/index.js +6 -4
- package/dist/enrollment/index.js.map +1 -1
- package/dist/enrollment/onboardingInvite.d.ts +5 -88
- package/dist/enrollment/onboardingInvite.d.ts.map +1 -1
- package/dist/enrollment/onboardingInvite.js +5 -168
- package/dist/enrollment/onboardingInvite.js.map +1 -1
- package/dist/genesis/index.d.ts +5 -0
- package/dist/genesis/index.d.ts.map +1 -1
- package/dist/genesis/index.js +5 -0
- package/dist/genesis/index.js.map +1 -1
- package/dist/keys/index.d.ts +1 -1
- package/dist/keys/index.d.ts.map +1 -1
- package/dist/keys/index.js +1 -1
- package/dist/keys/index.js.map +1 -1
- package/dist/keys/spaceEpochs.d.ts +7 -2
- package/dist/keys/spaceEpochs.d.ts.map +1 -1
- package/dist/keys/spaceEpochs.js +8 -2
- package/dist/keys/spaceEpochs.js.map +1 -1
- package/dist/keys/userKeyRoster.d.ts +39 -0
- package/dist/keys/userKeyRoster.d.ts.map +1 -1
- package/dist/keys/userKeyRoster.js +43 -1
- package/dist/keys/userKeyRoster.js.map +1 -1
- package/dist/recovery/index.d.ts +5 -3
- package/dist/recovery/index.d.ts.map +1 -1
- package/dist/recovery/index.js +4 -2
- package/dist/recovery/index.js.map +1 -1
- package/dist/recovery/recoveryDelegation.d.ts +35 -12
- package/dist/recovery/recoveryDelegation.d.ts.map +1 -1
- package/dist/recovery/recoveryDelegation.js +84 -86
- package/dist/recovery/recoveryDelegation.js.map +1 -1
- package/dist/recovery/recoveryWebvh.d.ts +32 -1
- package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
- package/dist/recovery/recoveryWebvh.js +2 -2
- package/dist/recovery/recoveryWebvh.js.map +1 -1
- package/dist/request/capabilityRequest.d.ts +33 -0
- package/dist/request/capabilityRequest.d.ts.map +1 -0
- package/dist/request/capabilityRequest.js +35 -0
- package/dist/request/capabilityRequest.js.map +1 -0
- package/dist/request/ephemeralExchange.d.ts +118 -0
- package/dist/request/ephemeralExchange.d.ts.map +1 -0
- package/dist/request/ephemeralExchange.js +224 -0
- package/dist/request/ephemeralExchange.js.map +1 -0
- package/dist/request/index.d.ts +6 -0
- package/dist/request/index.d.ts.map +1 -1
- package/dist/request/index.js +6 -0
- package/dist/request/index.js.map +1 -1
- package/dist/space/activity.d.ts +2 -2
- package/dist/space/activity.js +3 -3
- package/dist/space/activity.js.map +1 -1
- package/dist/unlock/index.d.ts +11 -23
- package/dist/unlock/index.d.ts.map +1 -1
- package/dist/unlock/index.js +10 -21
- package/dist/unlock/index.js.map +1 -1
- package/dist/unlock/retire.d.ts +47 -3
- package/dist/unlock/retire.d.ts.map +1 -1
- package/dist/unlock/retire.js +21 -5
- package/dist/unlock/retire.js.map +1 -1
- package/dist/unlock/standingWebvh.d.ts +37 -82
- package/dist/unlock/standingWebvh.d.ts.map +1 -1
- package/dist/unlock/standingWebvh.js +64 -247
- package/dist/unlock/standingWebvh.js.map +1 -1
- package/dist/unlock/unlockRecord.d.ts +13 -6
- package/dist/unlock/unlockRecord.d.ts.map +1 -1
- package/dist/unlock/unlockRecord.js +14 -8
- package/dist/unlock/unlockRecord.js.map +1 -1
- package/dist/webvh/delegatedLogStore.d.ts +5 -5
- package/dist/webvh/delegatedLogStore.js +1 -1
- package/dist/webvh/didWebvh.d.ts +19 -9
- package/dist/webvh/didWebvh.d.ts.map +1 -1
- package/dist/webvh/didWebvh.js +16 -16
- package/dist/webvh/didWebvh.js.map +1 -1
- package/dist/webvh/index.d.ts +9 -25
- package/dist/webvh/index.d.ts.map +1 -1
- package/dist/webvh/index.js +9 -23
- package/dist/webvh/index.js.map +1 -1
- package/dist/webvh/revokeClient.d.ts +77 -5
- package/dist/webvh/revokeClient.d.ts.map +1 -1
- package/dist/webvh/revokeClient.js +154 -61
- package/dist/webvh/revokeClient.js.map +1 -1
- package/dist/webvh/standingZcap.d.ts +11 -1
- package/dist/webvh/standingZcap.d.ts.map +1 -1
- package/dist/webvh/standingZcap.js +13 -14
- package/dist/webvh/standingZcap.js.map +1 -1
- package/dist/webvh/wasIdStore.d.ts +13 -7
- package/dist/webvh/wasIdStore.d.ts.map +1 -1
- package/dist/webvh/wasIdStore.js +8 -4
- package/dist/webvh/wasIdStore.js.map +1 -1
- package/dist/webvh/zcap.d.ts +0 -24
- package/dist/webvh/zcap.d.ts.map +1 -1
- package/dist/webvh/zcap.js +0 -42
- package/dist/webvh/zcap.js.map +1 -1
- package/package.json +40 -34
- package/dist/unlock/ladder.d.ts.map +0 -1
- package/dist/unlock/ladder.js +0 -258
- package/dist/unlock/ladder.js.map +0 -1
- package/dist/unlock/selfEnroll.d.ts.map +0 -1
- package/dist/unlock/selfEnroll.js.map +0 -1
- package/dist/webvh/companion.d.ts.map +0 -1
- package/dist/webvh/companion.js.map +0 -1
- package/dist/webvh/companionGc.d.ts.map +0 -1
- package/dist/webvh/companionGc.js.map +0 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) 2026 Interop Alliance. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Client-annex GC: the quarterly wholesale replacement of the annex
|
|
6
6
|
* generation, and the collection of everything it leaves behind.
|
|
7
7
|
*
|
|
8
8
|
* The ceremony has two halves with different rhythms:
|
|
@@ -54,7 +54,7 @@ import type { DIDLog } from '@interop/did-method-webvh';
|
|
|
54
54
|
import type { ZcapClient } from '@interop/ezcap';
|
|
55
55
|
import type { WasClient } from '@interop/was-client';
|
|
56
56
|
import type { ResourceLogPinStore } from '../resourceLog/pin.js';
|
|
57
|
-
import type { ClientWebvhUpdateKeys, PublishedWebvhLog, WebvhIdStore } from '
|
|
57
|
+
import type { ClientWebvhUpdateKeys, PublishedWebvhLog, WebvhIdStore } from '../webvh/didWebvh.js';
|
|
58
58
|
/**
|
|
59
59
|
* The fixed GC cadence: a generation is replaced at the first durable login
|
|
60
60
|
* 90 days after the current pointer value was established. Wallet GC policy
|
|
@@ -82,7 +82,7 @@ export declare const GENERATION_QUIET_GRACE_MS: number;
|
|
|
82
82
|
/**
|
|
83
83
|
* The `versionTime` of the account-log entry that established the CURRENT
|
|
84
84
|
* `#DelegatedClients` pointer value: the newest entry whose state names a
|
|
85
|
-
* different
|
|
85
|
+
* different annex DID than the entry before it (or the first entry, when
|
|
86
86
|
* the pointer has been there since genesis). This is the cadence's clock --
|
|
87
87
|
* "the pointer-update entry is the record" -- and it is read off the log a
|
|
88
88
|
* durable login has already verified, so the cadence costs no extra fetch
|
|
@@ -106,7 +106,7 @@ export declare function delegatedClientsPointerEstablishedAt({ log }: {
|
|
|
106
106
|
* @param [options.now] {number} epoch milliseconds, for tests
|
|
107
107
|
* @returns {boolean}
|
|
108
108
|
*/
|
|
109
|
-
export declare function
|
|
109
|
+
export declare function clientAnnexGcDue({ log, now }: {
|
|
110
110
|
log: DIDLog;
|
|
111
111
|
now?: number;
|
|
112
112
|
}): boolean;
|
|
@@ -119,7 +119,7 @@ export declare function companionGcDue({ log, now }: {
|
|
|
119
119
|
* swap defers rather than abandoning a possibly-live visit.
|
|
120
120
|
*
|
|
121
121
|
* @param options {object}
|
|
122
|
-
* @param options.log {DIDLog} the pointed generation's VERIFIED
|
|
122
|
+
* @param options.log {DIDLog} the pointed generation's VERIFIED annex
|
|
123
123
|
* log
|
|
124
124
|
* @param [options.now] {number} epoch milliseconds, for tests
|
|
125
125
|
* @returns {boolean}
|
|
@@ -131,23 +131,23 @@ export declare function generationQuiet({ log, now }: {
|
|
|
131
131
|
/**
|
|
132
132
|
* What the swap half of one GC pass did. `replaced` is the successful swap;
|
|
133
133
|
* `not-due` and `deferred-live` are the two healthy skips (cadence and quiet
|
|
134
|
-
* bound); `no-pointer` means the account has no
|
|
134
|
+
* bound); `no-pointer` means the account has no annex posture (the whole
|
|
135
135
|
* pass no-ops -- without a pointer there is no auxiliary Space to list);
|
|
136
136
|
* `no-ladder-seed` means the swap was due but the login held no ladder seed
|
|
137
137
|
* to mint with (a non-standing record); `failed` means a swap stage threw --
|
|
138
138
|
* reported in `failed` under the pointed generation's id, with the collect
|
|
139
139
|
* fan-out still run.
|
|
140
140
|
*/
|
|
141
|
-
export type
|
|
141
|
+
export type ClientAnnexGcSwapOutcome = 'replaced' | 'not-due' | 'deferred-live' | 'no-pointer' | 'no-ladder-seed' | 'failed';
|
|
142
142
|
/**
|
|
143
|
-
* One GC pass's report: the swap outcome, the
|
|
143
|
+
* One GC pass's report: the swap outcome, the annex DID the account
|
|
144
144
|
* points at after the pass, the generation ids collected (revoked, digested,
|
|
145
145
|
* deleted), and the per-generation failures. A report with `failed` entries
|
|
146
146
|
* is a resumable success -- the next durable login's pass picks up exactly
|
|
147
147
|
* the generations still listed.
|
|
148
148
|
*/
|
|
149
|
-
export interface
|
|
150
|
-
swap:
|
|
149
|
+
export interface ClientAnnexGcReport {
|
|
150
|
+
swap: ClientAnnexGcSwapOutcome;
|
|
151
151
|
pointedDid?: string;
|
|
152
152
|
collected: string[];
|
|
153
153
|
failed: Array<{
|
|
@@ -156,7 +156,7 @@ export interface CompanionGcReport {
|
|
|
156
156
|
}>;
|
|
157
157
|
}
|
|
158
158
|
/**
|
|
159
|
-
* One
|
|
159
|
+
* One annex GC pass: the quarterly swap when due and quiet, then the
|
|
160
160
|
* predicate-driven collect fan-out over every non-pointed `gen-` collection.
|
|
161
161
|
* See the module header for the stage order and its load-bearing constraints.
|
|
162
162
|
*
|
|
@@ -190,14 +190,14 @@ export interface CompanionGcReport {
|
|
|
190
190
|
* delete, and a throw keeps the generation for the next pass
|
|
191
191
|
* @param [options.onCollected] {Function}
|
|
192
192
|
* `({ generationId }) => Promise<void>` -- local cleanup after a
|
|
193
|
-
* generation's delete (the caller's
|
|
193
|
+
* generation's delete (the caller's annex pin-slot drop); a throw is
|
|
194
194
|
* reported but cannot be retried (the collection is already gone)
|
|
195
195
|
* @param [options.pinStore] {ResourceLogPinStore} chain-head pins for the
|
|
196
196
|
* account-log re-point and the pointed generation's read
|
|
197
197
|
* @param [options.now] {number} epoch milliseconds, for tests
|
|
198
|
-
* @returns {Promise<
|
|
198
|
+
* @returns {Promise<ClientAnnexGcReport>}
|
|
199
199
|
*/
|
|
200
|
-
export declare function
|
|
200
|
+
export declare function runClientAnnexGc({ was, wasServerUrl, accountSpaceId, account, idStore, updateKeys, zcapClient, ladderSeed, recordDigest, onCollected, pinStore, now }: {
|
|
201
201
|
was: WasClient;
|
|
202
202
|
wasServerUrl: string;
|
|
203
203
|
accountSpaceId: string;
|
|
@@ -217,5 +217,39 @@ export declare function runCompanionGc({ was, wasServerUrl, accountSpaceId, acco
|
|
|
217
217
|
}) => Promise<void>;
|
|
218
218
|
pinStore?: ResourceLogPinStore;
|
|
219
219
|
now?: number;
|
|
220
|
-
}): Promise<
|
|
221
|
-
|
|
220
|
+
}): Promise<ClientAnnexGcReport>;
|
|
221
|
+
/**
|
|
222
|
+
* AN OFF-CADENCE GENERATION SWAP: replaces the pointed annex generation
|
|
223
|
+
* outside the quarterly rhythm -- the credential-rotation ceremony's
|
|
224
|
+
* fallback when no distinct committed rung can sign a strike entry
|
|
225
|
+
* (`retireClientAnnexRung`): a fresh generation minted from a SURVIVING
|
|
226
|
+
* credential's seed commits only that credential's rung-0 hash, so the
|
|
227
|
+
* retired credential's annex posture dies with the whole generation the
|
|
228
|
+
* moment the re-point lands. The abandoned generation is an ordinary
|
|
229
|
+
* non-pointed `gen-` collection the standing collect fan-out picks up at the
|
|
230
|
+
* next durable login.
|
|
231
|
+
*
|
|
232
|
+
* Same four swap stages and ordering as the quarterly GC swap, minus the
|
|
233
|
+
* cadence and quiet gates (the caller's reason for swapping is authority
|
|
234
|
+
* removal, not hygiene). The pointed generation's log is read for the revoke
|
|
235
|
+
* stage's delegation bytes; unreadable, the revoke is skipped and pointer
|
|
236
|
+
* equality retires the old delegation on a conforming server.
|
|
237
|
+
*
|
|
238
|
+
* @param options {object} see {@link runClientAnnexGc} for the shared
|
|
239
|
+
* members ({ was, wasServerUrl, accountSpaceId, account, idStore,
|
|
240
|
+
* updateKeys, zcapClient, pinStore }); `ladderSeed` here is the SURVIVING
|
|
241
|
+
* credential's seed the fresh generation is minted from
|
|
242
|
+
* @returns {Promise<string>} the fresh annex DID
|
|
243
|
+
*/
|
|
244
|
+
export declare function swapClientAnnexGeneration({ was, wasServerUrl, accountSpaceId, account, idStore, updateKeys, zcapClient, ladderSeed, pinStore }: {
|
|
245
|
+
was: WasClient;
|
|
246
|
+
wasServerUrl: string;
|
|
247
|
+
accountSpaceId: string;
|
|
248
|
+
account: Pick<PublishedWebvhLog, 'did' | 'doc'>;
|
|
249
|
+
idStore: WebvhIdStore;
|
|
250
|
+
updateKeys: ClientWebvhUpdateKeys;
|
|
251
|
+
zcapClient: ZcapClient;
|
|
252
|
+
ladderSeed: Uint8Array;
|
|
253
|
+
pinStore?: ResourceLogPinStore;
|
|
254
|
+
}): Promise<string>;
|
|
255
|
+
//# sourceMappingURL=gc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gc.d.ts","sourceRoot":"","sources":["../../src/clientAnnex/gc.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAehE,OAAO,KAAK,EACV,qBAAqB,EACrB,iBAAiB,EACjB,YAAY,EACb,MAAM,sBAAsB,CAAA;AAG7B;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,QAA2B,CAAA;AAE/D;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,QAAsB,CAAA;AAE5D;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,QAAiB,CAAA;AAEvD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oCAAoC,CAAC,EACnD,GAAG,EACJ,EAAE;IACD,GAAG,EAAE,MAAM,CAAA;CACZ,GAAG,MAAM,GAAG,SAAS,CAgBrB;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,GAAG,EACH,GAAgB,EACjB,EAAE;IACD,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,GAAG,OAAO,CAUV;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,EAC9B,GAAG,EACH,GAAgB,EACjB,EAAE;IACD,GAAG,EAAE,MAA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,CAAC,OAAO,EAAE;QAAE,YAAY,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAClE,QAAQ,CAAC,EAAE,mBAAmB,CAAA;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAmG/B;AA2JD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,yBAAyB,CAAC,EAC9C,GAAG,EACH,YAAY,EACZ,cAAc,EACd,OAAO,EACP,OAAO,EACP,UAAU,EACV,UAAU,EACV,UAAU,EACV,QAAQ,EACT,EAAE;IACD,GAAG,EAAE,SAAS,CAAA;IACd,YAAY,EAAE,MAAM,CAAA;IACpB,cAAc,EAAE,MAAM,CAAA;IACtB,OAAO,EAAE,IAAI,CAAC,iBAAiB,EAAE,KAAK,GAAG,KAAK,CAAC,CAAA;IAC/C,OAAO,EAAE,YAAY,CAAA;IACrB,UAAU,EAAE,qBAAqB,CAAA;IACjC,UAAU,EAAE,UAAU,CAAA;IACtB,UAAU,EAAE,UAAU,CAAA;IACtB,QAAQ,CAAC,EAAE,mBAAmB,CAAA;CAC/B,GAAG,OAAO,CAAC,MAAM,CAAC,CA6BlB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { readPublishedLog } from '
|
|
3
|
-
import { accountLogPinId } from '
|
|
1
|
+
import { clientAnnexDidParts, clientAnnexLogPinId, clientAnnexLogStore, delegatedClientsPointer, embeddedGenerationDelegation, ensureGenerationDelegationCurrent, GENERATION_ID_PREFIX, mintCredentialClientAnnexGeneration, mintGenerationDelegation, revokeTreatingAlreadyRevokedAsSuccess, setDelegatedClientsPointer } from './log.js';
|
|
2
|
+
import { readPublishedLog } from '../webvh/didWebvh.js';
|
|
3
|
+
import { accountLogPinId } from '../webvh/verifyLog.js';
|
|
4
4
|
/**
|
|
5
5
|
* The fixed GC cadence: a generation is replaced at the first durable login
|
|
6
6
|
* 90 days after the current pointer value was established. Wallet GC policy
|
|
@@ -28,7 +28,7 @@ export const GENERATION_QUIET_GRACE_MS = 60 * 60 * 1000;
|
|
|
28
28
|
/**
|
|
29
29
|
* The `versionTime` of the account-log entry that established the CURRENT
|
|
30
30
|
* `#DelegatedClients` pointer value: the newest entry whose state names a
|
|
31
|
-
* different
|
|
31
|
+
* different annex DID than the entry before it (or the first entry, when
|
|
32
32
|
* the pointer has been there since genesis). This is the cadence's clock --
|
|
33
33
|
* "the pointer-update entry is the record" -- and it is read off the log a
|
|
34
34
|
* durable login has already verified, so the cadence costs no extra fetch
|
|
@@ -48,7 +48,7 @@ export function delegatedClientsPointerEstablishedAt({ log }) {
|
|
|
48
48
|
establishedAt = entry.versionTime;
|
|
49
49
|
}
|
|
50
50
|
if (pointed === undefined) {
|
|
51
|
-
// A document with no pointer has no
|
|
51
|
+
// A document with no pointer has no annex posture; a later entry
|
|
52
52
|
// restoring one establishes afresh.
|
|
53
53
|
establishedAt = undefined;
|
|
54
54
|
}
|
|
@@ -66,7 +66,7 @@ export function delegatedClientsPointerEstablishedAt({ log }) {
|
|
|
66
66
|
* @param [options.now] {number} epoch milliseconds, for tests
|
|
67
67
|
* @returns {boolean}
|
|
68
68
|
*/
|
|
69
|
-
export function
|
|
69
|
+
export function clientAnnexGcDue({ log, now = Date.now() }) {
|
|
70
70
|
const establishedAt = delegatedClientsPointerEstablishedAt({ log });
|
|
71
71
|
if (establishedAt === undefined) {
|
|
72
72
|
return false;
|
|
@@ -84,7 +84,7 @@ export function companionGcDue({ log, now = Date.now() }) {
|
|
|
84
84
|
* swap defers rather than abandoning a possibly-live visit.
|
|
85
85
|
*
|
|
86
86
|
* @param options {object}
|
|
87
|
-
* @param options.log {DIDLog} the pointed generation's VERIFIED
|
|
87
|
+
* @param options.log {DIDLog} the pointed generation's VERIFIED annex
|
|
88
88
|
* log
|
|
89
89
|
* @param [options.now] {number} epoch milliseconds, for tests
|
|
90
90
|
* @returns {boolean}
|
|
@@ -99,7 +99,7 @@ export function generationQuiet({ log, now = Date.now() }) {
|
|
|
99
99
|
now - newestMs >= GENERATION_QUIET_BOUND_MS + GENERATION_QUIET_GRACE_MS);
|
|
100
100
|
}
|
|
101
101
|
/**
|
|
102
|
-
* One
|
|
102
|
+
* One annex GC pass: the quarterly swap when due and quiet, then the
|
|
103
103
|
* predicate-driven collect fan-out over every non-pointed `gen-` collection.
|
|
104
104
|
* See the module header for the stage order and its load-bearing constraints.
|
|
105
105
|
*
|
|
@@ -133,19 +133,19 @@ export function generationQuiet({ log, now = Date.now() }) {
|
|
|
133
133
|
* delete, and a throw keeps the generation for the next pass
|
|
134
134
|
* @param [options.onCollected] {Function}
|
|
135
135
|
* `({ generationId }) => Promise<void>` -- local cleanup after a
|
|
136
|
-
* generation's delete (the caller's
|
|
136
|
+
* generation's delete (the caller's annex pin-slot drop); a throw is
|
|
137
137
|
* reported but cannot be retried (the collection is already gone)
|
|
138
138
|
* @param [options.pinStore] {ResourceLogPinStore} chain-head pins for the
|
|
139
139
|
* account-log re-point and the pointed generation's read
|
|
140
140
|
* @param [options.now] {number} epoch milliseconds, for tests
|
|
141
|
-
* @returns {Promise<
|
|
141
|
+
* @returns {Promise<ClientAnnexGcReport>}
|
|
142
142
|
*/
|
|
143
|
-
export async function
|
|
143
|
+
export async function runClientAnnexGc({ was, wasServerUrl, accountSpaceId, account, idStore, updateKeys, zcapClient, ladderSeed, recordDigest, onCollected, pinStore, now = Date.now() }) {
|
|
144
144
|
const pointedDid = delegatedClientsPointer({ doc: account.doc });
|
|
145
145
|
if (pointedDid === undefined) {
|
|
146
146
|
return { swap: 'no-pointer', collected: [], failed: [] };
|
|
147
147
|
}
|
|
148
|
-
const { spaceId } =
|
|
148
|
+
const { spaceId } = clientAnnexDidParts({ did: pointedDid });
|
|
149
149
|
const failed = [];
|
|
150
150
|
// 1. The swap, when the quarterly cadence is due. Its own failure is
|
|
151
151
|
// collected under the pointed generation's id rather than aborting the
|
|
@@ -153,14 +153,14 @@ export async function runCompanionGc({ was, wasServerUrl, accountSpaceId, accoun
|
|
|
153
153
|
// durable login re-attempts the swap from durable state.
|
|
154
154
|
let swap = 'not-due';
|
|
155
155
|
let currentDid = pointedDid;
|
|
156
|
-
if (
|
|
156
|
+
if (clientAnnexGcDue({ log: account.log, now })) {
|
|
157
157
|
swap =
|
|
158
158
|
ladderSeed === undefined
|
|
159
159
|
? 'no-ladder-seed'
|
|
160
160
|
: await (async () => {
|
|
161
|
-
const oldParts =
|
|
161
|
+
const oldParts = clientAnnexDidParts({ did: pointedDid });
|
|
162
162
|
try {
|
|
163
|
-
const old = await
|
|
163
|
+
const old = await readClientAnnexGeneration({
|
|
164
164
|
was,
|
|
165
165
|
spaceId,
|
|
166
166
|
generationId: oldParts.generationId,
|
|
@@ -175,7 +175,7 @@ export async function runCompanionGc({ was, wasServerUrl, accountSpaceId, accoun
|
|
|
175
175
|
// read as quiet.
|
|
176
176
|
return old === undefined ? 'failed' : 'deferred-live';
|
|
177
177
|
}
|
|
178
|
-
currentDid = await
|
|
178
|
+
currentDid = await replaceClientAnnexGeneration({
|
|
179
179
|
was,
|
|
180
180
|
wasServerUrl,
|
|
181
181
|
accountSpaceId,
|
|
@@ -184,7 +184,7 @@ export async function runCompanionGc({ was, wasServerUrl, accountSpaceId, accoun
|
|
|
184
184
|
updateKeys,
|
|
185
185
|
zcapClient,
|
|
186
186
|
ladderSeed,
|
|
187
|
-
|
|
187
|
+
clientAnnexSpaceId: spaceId,
|
|
188
188
|
oldGeneration: old,
|
|
189
189
|
pinStore
|
|
190
190
|
});
|
|
@@ -201,7 +201,7 @@ export async function runCompanionGc({ was, wasServerUrl, accountSpaceId, accoun
|
|
|
201
201
|
// auxiliary Space's collection listing -- no registry of generations
|
|
202
202
|
// exists anywhere -- and a torn GC's old generation, a torn signup's
|
|
203
203
|
// orphan, and a double-genesis loser get identical treatment.
|
|
204
|
-
const currentGenerationId =
|
|
204
|
+
const currentGenerationId = clientAnnexDidParts({
|
|
205
205
|
did: currentDid
|
|
206
206
|
}).generationId;
|
|
207
207
|
const space = was.space(spaceId);
|
|
@@ -233,79 +233,82 @@ export async function runCompanionGc({ was, wasServerUrl, accountSpaceId, accoun
|
|
|
233
233
|
return { swap, pointedDid: currentDid, collected, failed };
|
|
234
234
|
}
|
|
235
235
|
/**
|
|
236
|
-
* Reads and verifies one generation's published
|
|
236
|
+
* Reads and verifies one generation's published annex log, or resolves
|
|
237
237
|
* undefined when its `did.jsonl` does not exist (a generation that never
|
|
238
238
|
* finished minting, or whose collection outlived a torn delete).
|
|
239
239
|
*
|
|
240
240
|
* @param options {object}
|
|
241
241
|
* @param options.was {WasClient}
|
|
242
|
-
* @param options.spaceId {string} the auxiliary
|
|
242
|
+
* @param options.spaceId {string} the auxiliary annex Space's id
|
|
243
243
|
* @param options.generationId {string}
|
|
244
244
|
* @param [options.expectedDid] {string}
|
|
245
245
|
* @param [options.pinStore] {ResourceLogPinStore}
|
|
246
246
|
* @returns {Promise<PublishedWebvhLog | undefined>}
|
|
247
247
|
*/
|
|
248
|
-
async function
|
|
249
|
-
const store =
|
|
248
|
+
async function readClientAnnexGeneration({ was, spaceId, generationId, expectedDid, pinStore }) {
|
|
249
|
+
const store = clientAnnexLogStore({ was, spaceId, generationId });
|
|
250
250
|
return readPublishedLog({
|
|
251
251
|
idStore: store,
|
|
252
252
|
...(expectedDid !== undefined ? { expectedDid } : {}),
|
|
253
253
|
...(pinStore !== undefined
|
|
254
|
-
? { pinStore, logId:
|
|
254
|
+
? { pinStore, logId: clientAnnexLogPinId({ spaceId, generationId }) }
|
|
255
255
|
: {})
|
|
256
256
|
});
|
|
257
257
|
}
|
|
258
258
|
/**
|
|
259
259
|
* The swap's four stages, in the fixed order: mint + genesis; install the
|
|
260
260
|
* fresh generation's delegation service entry; revoke the old generation's
|
|
261
|
-
* delegation; re-point the account document. Returns the fresh
|
|
261
|
+
* delegation; re-point the account document. Returns the fresh annex
|
|
262
262
|
* DID. The digest and the delete are deliberately NOT here -- once the
|
|
263
263
|
* re-point lands, the old generation is an ordinary non-pointed `gen-`
|
|
264
264
|
* collection and the standing collect fan-out handles it, which is also
|
|
265
265
|
* what makes a swap torn after its re-point resume for free.
|
|
266
266
|
*
|
|
267
|
-
* @param options {object} see {@link
|
|
268
|
-
* @param options.
|
|
269
|
-
* @param options.oldGeneration {PublishedWebvhLog} the pointed
|
|
270
|
-
* generation's verified log, read by the quiet check
|
|
271
|
-
*
|
|
267
|
+
* @param options {object} see {@link runClientAnnexGc}, plus:
|
|
268
|
+
* @param options.clientAnnexSpaceId {string} the auxiliary Space's id
|
|
269
|
+
* @param [options.oldGeneration] {PublishedWebvhLog} the pointed
|
|
270
|
+
* generation's verified log, read by the quiet check; absent (an
|
|
271
|
+
* off-cadence swap whose pointed log is unreadable), the revoke stage is
|
|
272
|
+
* skipped and the old generation's delegation dies with the re-point on a
|
|
273
|
+
* conforming server
|
|
274
|
+
* @returns {Promise<string>} the fresh annex DID
|
|
272
275
|
*/
|
|
273
|
-
async function
|
|
276
|
+
async function replaceClientAnnexGeneration({ was, wasServerUrl, accountSpaceId, account, idStore, updateKeys, zcapClient, ladderSeed, clientAnnexSpaceId, oldGeneration, pinStore }) {
|
|
274
277
|
// 1. Mint + genesis: a fresh generation in the existing auxiliary Space
|
|
275
278
|
// (the typed-Space ensure no-ops on it; the controller argument is only
|
|
276
279
|
// read when the Space does not exist). The genesis commits the minting
|
|
277
280
|
// credential's rung-0 hash for the fresh generation id.
|
|
278
|
-
const minted = await
|
|
281
|
+
const minted = await mintCredentialClientAnnexGeneration({
|
|
279
282
|
was,
|
|
280
283
|
wasServerUrl,
|
|
281
|
-
spaceId:
|
|
284
|
+
spaceId: clientAnnexSpaceId,
|
|
282
285
|
controller: account.did,
|
|
283
286
|
ladderSeed
|
|
284
287
|
});
|
|
285
288
|
// 2. Install the fresh generation's delegation service entry (the
|
|
286
289
|
// install-when-absent half of the renew-precedes-mint helper), the
|
|
287
290
|
// delegation signed by this enrolled client's promoted account key and the
|
|
288
|
-
// installing
|
|
291
|
+
// installing annex entry by the credential's rung 0.
|
|
289
292
|
await ensureGenerationDelegationCurrent({
|
|
290
|
-
store:
|
|
293
|
+
store: clientAnnexLogStore({
|
|
291
294
|
was,
|
|
292
|
-
spaceId:
|
|
295
|
+
spaceId: clientAnnexSpaceId,
|
|
293
296
|
generationId: minted.generationId
|
|
294
297
|
}),
|
|
295
298
|
ladderSeed,
|
|
296
299
|
generationId: minted.generationId,
|
|
297
|
-
mintGenerationDelegation: async ({
|
|
300
|
+
mintGenerationDelegation: async ({ clientAnnexDid }) => mintGenerationDelegation({
|
|
298
301
|
zcapClient,
|
|
299
302
|
wasServerUrl,
|
|
300
303
|
spaceId: accountSpaceId,
|
|
301
|
-
|
|
304
|
+
clientAnnexDid
|
|
302
305
|
}),
|
|
303
306
|
expectedDid: minted.did,
|
|
304
307
|
...(pinStore !== undefined
|
|
305
308
|
? {
|
|
306
309
|
pinStore,
|
|
307
|
-
logId:
|
|
308
|
-
spaceId:
|
|
310
|
+
logId: clientAnnexLogPinId({
|
|
311
|
+
spaceId: clientAnnexSpaceId,
|
|
309
312
|
generationId: minted.generationId
|
|
310
313
|
})
|
|
311
314
|
}
|
|
@@ -315,10 +318,12 @@ async function replaceCompanionGeneration({ was, wasServerUrl, accountSpaceId, a
|
|
|
315
318
|
// revocation POST verifies against the currently resolved document, so it
|
|
316
319
|
// only chains while the pointer still names the old generation) and
|
|
317
320
|
// before the delete (the POST needs bytes the delete destroys).
|
|
318
|
-
const oldDelegation =
|
|
321
|
+
const oldDelegation = oldGeneration === undefined
|
|
322
|
+
? undefined
|
|
323
|
+
: embeddedGenerationDelegation({ doc: oldGeneration.doc });
|
|
319
324
|
if (oldDelegation !== undefined) {
|
|
320
325
|
await revokeTreatingAlreadyRevokedAsSuccess({
|
|
321
|
-
was,
|
|
326
|
+
revoke: zcap => was.revoke(zcap),
|
|
322
327
|
delegation: oldDelegation
|
|
323
328
|
});
|
|
324
329
|
}
|
|
@@ -329,7 +334,7 @@ async function replaceCompanionGeneration({ was, wasServerUrl, accountSpaceId, a
|
|
|
329
334
|
await setDelegatedClientsPointer({
|
|
330
335
|
idStore,
|
|
331
336
|
updateKeys,
|
|
332
|
-
|
|
337
|
+
clientAnnexDid: minted.did,
|
|
333
338
|
expectedDid: account.did,
|
|
334
339
|
...(pinStore !== undefined
|
|
335
340
|
? { pinStore, logId: accountLogPinId({ spaceId: accountSpaceId }) }
|
|
@@ -337,6 +342,57 @@ async function replaceCompanionGeneration({ was, wasServerUrl, accountSpaceId, a
|
|
|
337
342
|
});
|
|
338
343
|
return minted.did;
|
|
339
344
|
}
|
|
345
|
+
/**
|
|
346
|
+
* AN OFF-CADENCE GENERATION SWAP: replaces the pointed annex generation
|
|
347
|
+
* outside the quarterly rhythm -- the credential-rotation ceremony's
|
|
348
|
+
* fallback when no distinct committed rung can sign a strike entry
|
|
349
|
+
* (`retireClientAnnexRung`): a fresh generation minted from a SURVIVING
|
|
350
|
+
* credential's seed commits only that credential's rung-0 hash, so the
|
|
351
|
+
* retired credential's annex posture dies with the whole generation the
|
|
352
|
+
* moment the re-point lands. The abandoned generation is an ordinary
|
|
353
|
+
* non-pointed `gen-` collection the standing collect fan-out picks up at the
|
|
354
|
+
* next durable login.
|
|
355
|
+
*
|
|
356
|
+
* Same four swap stages and ordering as the quarterly GC swap, minus the
|
|
357
|
+
* cadence and quiet gates (the caller's reason for swapping is authority
|
|
358
|
+
* removal, not hygiene). The pointed generation's log is read for the revoke
|
|
359
|
+
* stage's delegation bytes; unreadable, the revoke is skipped and pointer
|
|
360
|
+
* equality retires the old delegation on a conforming server.
|
|
361
|
+
*
|
|
362
|
+
* @param options {object} see {@link runClientAnnexGc} for the shared
|
|
363
|
+
* members ({ was, wasServerUrl, accountSpaceId, account, idStore,
|
|
364
|
+
* updateKeys, zcapClient, pinStore }); `ladderSeed` here is the SURVIVING
|
|
365
|
+
* credential's seed the fresh generation is minted from
|
|
366
|
+
* @returns {Promise<string>} the fresh annex DID
|
|
367
|
+
*/
|
|
368
|
+
export async function swapClientAnnexGeneration({ was, wasServerUrl, accountSpaceId, account, idStore, updateKeys, zcapClient, ladderSeed, pinStore }) {
|
|
369
|
+
const pointedDid = delegatedClientsPointer({ doc: account.doc });
|
|
370
|
+
if (pointedDid === undefined) {
|
|
371
|
+
throw new Error('clientAnnex: the account document carries no delegated-clients ' +
|
|
372
|
+
'service entry; no generation exists to swap.');
|
|
373
|
+
}
|
|
374
|
+
const { spaceId } = clientAnnexDidParts({ did: pointedDid });
|
|
375
|
+
const oldGeneration = await readClientAnnexGeneration({
|
|
376
|
+
was,
|
|
377
|
+
spaceId,
|
|
378
|
+
generationId: clientAnnexDidParts({ did: pointedDid }).generationId,
|
|
379
|
+
expectedDid: pointedDid,
|
|
380
|
+
...(pinStore !== undefined ? { pinStore } : {})
|
|
381
|
+
});
|
|
382
|
+
return replaceClientAnnexGeneration({
|
|
383
|
+
was,
|
|
384
|
+
wasServerUrl,
|
|
385
|
+
accountSpaceId,
|
|
386
|
+
account,
|
|
387
|
+
idStore,
|
|
388
|
+
updateKeys,
|
|
389
|
+
zcapClient,
|
|
390
|
+
ladderSeed,
|
|
391
|
+
clientAnnexSpaceId: spaceId,
|
|
392
|
+
...(oldGeneration !== undefined ? { oldGeneration } : {}),
|
|
393
|
+
...(pinStore !== undefined ? { pinStore } : {})
|
|
394
|
+
});
|
|
395
|
+
}
|
|
340
396
|
/**
|
|
341
397
|
* Collects one non-pointed generation: revoke its embedded delegation
|
|
342
398
|
* (blind; the server's 400 already-revoked answer reads as success), write
|
|
@@ -350,8 +406,8 @@ async function replaceCompanionGeneration({ was, wasServerUrl, accountSpaceId, a
|
|
|
350
406
|
* @param options.was {WasClient}
|
|
351
407
|
* @param options.spaceId {string}
|
|
352
408
|
* @param options.generationId {string}
|
|
353
|
-
* @param options.recordDigest {Function} see {@link
|
|
354
|
-
* @param [options.onCollected] {Function} see {@link
|
|
409
|
+
* @param options.recordDigest {Function} see {@link runClientAnnexGc}
|
|
410
|
+
* @param [options.onCollected] {Function} see {@link runClientAnnexGc}
|
|
355
411
|
* @returns {Promise<void>}
|
|
356
412
|
*/
|
|
357
413
|
async function collectOneGeneration({ was, spaceId, generationId, recordDigest, onCollected }) {
|
|
@@ -359,7 +415,7 @@ async function collectOneGeneration({ was, spaceId, generationId, recordDigest,
|
|
|
359
415
|
// client, and its chain-head slot is about to be dropped either way. The
|
|
360
416
|
// log still fully verifies (hash chain, prerotation, rung signatures) --
|
|
361
417
|
// the digest quotes only a log that resolves.
|
|
362
|
-
const published = await
|
|
418
|
+
const published = await readClientAnnexGeneration({
|
|
363
419
|
was,
|
|
364
420
|
spaceId,
|
|
365
421
|
generationId
|
|
@@ -368,7 +424,7 @@ async function collectOneGeneration({ was, spaceId, generationId, recordDigest,
|
|
|
368
424
|
const oldDelegation = embeddedGenerationDelegation({ doc: published.doc });
|
|
369
425
|
if (oldDelegation !== undefined) {
|
|
370
426
|
await revokeTreatingAlreadyRevokedAsSuccess({
|
|
371
|
-
was,
|
|
427
|
+
revoke: zcap => was.revoke(zcap),
|
|
372
428
|
delegation: oldDelegation
|
|
373
429
|
});
|
|
374
430
|
}
|
|
@@ -386,28 +442,4 @@ async function collectOneGeneration({ was, spaceId, generationId, recordDigest,
|
|
|
386
442
|
await was.space(spaceId).collection(generationId).delete();
|
|
387
443
|
await onCollected?.({ generationId });
|
|
388
444
|
}
|
|
389
|
-
|
|
390
|
-
* Submits the revocation of a generation delegation, reading the server's
|
|
391
|
-
* 400 answer as success: an already-revoked chain (a resumed GC's blind
|
|
392
|
-
* re-POST) and an expired delegation (which no longer needs revoking) both
|
|
393
|
-
* land there, and the revocation protocol exposes no read endpoint to
|
|
394
|
-
* distinguish them beforehand. Matched on `err.name` -- error classes do not
|
|
395
|
-
* survive crossing package copies.
|
|
396
|
-
*
|
|
397
|
-
* @param options {object}
|
|
398
|
-
* @param options.was {WasClient}
|
|
399
|
-
* @param options.delegation {IZcap}
|
|
400
|
-
* @returns {Promise<void>}
|
|
401
|
-
*/
|
|
402
|
-
async function revokeTreatingAlreadyRevokedAsSuccess({ was, delegation }) {
|
|
403
|
-
try {
|
|
404
|
-
await was.revoke(delegation);
|
|
405
|
-
}
|
|
406
|
-
catch (err) {
|
|
407
|
-
if (err.name === 'ValidationError') {
|
|
408
|
-
return;
|
|
409
|
-
}
|
|
410
|
-
throw err;
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
//# sourceMappingURL=companionGc.js.map
|
|
445
|
+
//# sourceMappingURL=gc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gc.js","sourceRoot":"","sources":["../../src/clientAnnex/gc.ts"],"names":[],"mappings":"AAwDA,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,4BAA4B,EAC5B,iCAAiC,EACjC,oBAAoB,EACpB,mCAAmC,EACnC,wBAAwB,EACxB,qCAAqC,EACrC,0BAA0B,EAC3B,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAMvD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEvD;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAA;AAE/D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAA;AAE5D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAA;AAEvD;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,oCAAoC,CAAC,EACnD,GAAG,EAGJ;IACC,IAAI,aAAiC,CAAA;IACrC,IAAI,QAA4B,CAAA;IAChC,KAAK,MAAM,KAAK,IAAI,GAAG,EAAE,CAAC;QACxB,MAAM,OAAO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S,EAAE,CAAC;YAChC,MAAM,qCAAqC,CAAC;gBAC1C,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC;gBAChC,UAAU,EAAE,aAAa;aAC1B,CAAC,CAAA;QACJ,CAAC;QACD,kEAAkE;QAClE,oEAAoE;QACpE,iEAAiE;QACjE,MAAM,YAAY,CAAC;YACjB,YAAY;YACZ,UAAU,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,WAAW;YACzC,SAAS,EAAE,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,WAAW;YAC/D,UAAU,EAAE,SAAS,CAAC,GAAG,CAAC,MAAM;SACjC,CAAC,CAAA;IACJ,CAAC;IAED,2EAA2E;IAC3E,MAAM,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,MAAM,EAAE,CAAA;IAC1D,MAAM,WAAW,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,CAAA;AACvC,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2026 Interop Alliance. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* The `@interop/wallet-core/clientAnnex` subpath: the client annex -- the
|
|
6
|
+
* authoring and maintenance surface of everything anchored on a standing
|
|
7
|
+
* credential's ladder rather than on an enrolled durable client. One boundary
|
|
8
|
+
* rule holds throughout: this subpath imports from the base subpaths;
|
|
9
|
+
* nothing in the base imports from it (enforced in the lint pass, with one
|
|
10
|
+
* pinned exception -- `unlock/standingWebvh.ts` uses the shared ladder
|
|
11
|
+
* attribution helpers here, never the annex log machinery). The verify-side
|
|
12
|
+
* halves every wallet needs regardless of posture stay in the base: the
|
|
13
|
+
* resource-log ladder-append license and `ControllerPosture` ladder-key
|
|
14
|
+
* computation (`resourceLog`), `ladderVmIds` recognition (`webvh`), the
|
|
15
|
+
* unlock-record codec with its `ladder` and `delegatedClients` members
|
|
16
|
+
* (`unlock`), the standing-zcap staleness policy and the generalized log
|
|
17
|
+
* store seams (`webvh`), and the `GenerationCollect` activity builder
|
|
18
|
+
* (`space`).
|
|
19
|
+
*
|
|
20
|
+
* - The ladder (`ladder.ts`): rung and ladder-VM derivation from the record's
|
|
21
|
+
* random seed, and the shared attribution walks (`attributeLadderRung`,
|
|
22
|
+
* `attributeLadderPosture`) that recover the ladder's state from the
|
|
23
|
+
* published log itself.
|
|
24
|
+
* - The annex log (`log.ts`) and its GC (`gc.ts`): the disposable sidecar
|
|
25
|
+
* did:webvh of GC'd generations holding transient per-visit verification
|
|
26
|
+
* methods, the generation delegation, the account document's
|
|
27
|
+
* `#DelegatedClients` pointer, and the quarterly swap-and-collect.
|
|
28
|
+
* - ZCap signing as the ladder VM (`zcap.ts`): `ladderVmZcapClient` and the
|
|
29
|
+
* bootstrap `ladderVmAgent`.
|
|
30
|
+
* - The ladder-anchored account-log ceremonies (`ladderAnchored.ts`):
|
|
31
|
+
* ladder-anchored genesis, the self-enrolling continuation, the one-entry
|
|
32
|
+
* forget -- plus the composed flows around them (`selfEnroll.ts`,
|
|
33
|
+
* `forget.ts`), the credential-anchored account genesis
|
|
34
|
+
* (`credentialAnchoredGenesis.ts`), and the transient-recovery
|
|
35
|
+
* continuation (`recoveryLadderAnchored.ts`).
|
|
36
|
+
*
|
|
37
|
+
* The subsystem's decision records are the subpath's reading list:
|
|
38
|
+
* `decisions/0002` (annex log update authority is static rung 0),
|
|
39
|
+
* `decisions/0003` (generation identity and the ladder HKDF label family),
|
|
40
|
+
* `decisions/0005` (the `delegatedClients` sealed record member),
|
|
41
|
+
* `decisions/0006` (generation GC observables and the `GenerationCollect`
|
|
42
|
+
* digest), and `decisions/0007` (the reveal entry's hash order).
|
|
43
|
+
*/
|
|
44
|
+
export { attributeLadderPosture, attributeLadderRung, clientAnnexRung, clientAnnexRungSeed, generateLadderSeed, LADDER_MAX_SCAN, LadderAttributionError, ladderRung, ladderRungSeed, ladderVmKeyMultibase, ladderVmSeed } from './ladder.js';
|
|
45
|
+
export type { LadderRung, LadderRungState, LadderStandingPosture } from './ladder.js';
|
|
46
|
+
export { assertGenerationId, clampGrantExpires, CLIENT_ANNEX_SPACE_TYPE, clientAnnexDidParts, clientAnnexLogPinId, clientAnnexLogStore, ClientAnnexRungUncommittedError, commitClientAnnexRung, createClientAnnexLog, DELEGATED_CLIENTS_DELEGATION_ACTIONS, DELEGATED_CLIENTS_DELEGATION_TTL_MS, DELEGATED_CLIENTS_SERVICE_TYPE, delegatedClientsDelegationMinter, delegatedClientsDelegationSpaceId, delegatedClientsPointer, delegatedClientsServiceEntry, embeddedGenerationDelegation, enrollClientAnnexTransientClient, enrollTransientClient, ensureClientAnnexSpace, ensureGenerationDelegationCurrent, GENERATION_DELEGATION_ACTIONS, GENERATION_DELEGATION_SERVICE_TYPE, GENERATION_DELEGATION_TTL_MS, GENERATION_ID_PREFIX, generationDelegationHistory, generationDelegationServiceEntry, mintClientAnnexGeneration, mintCredentialClientAnnexGeneration, mintDelegatedClientsDelegation, mintGenerationDelegation, mintGenerationId, retireClientAnnexRung, revokeTreatingAlreadyRevokedAsSuccess, servicesPointedAtClientAnnex, setDelegatedClientsPointer } from './log.js';
|
|
47
|
+
export type { ClientAnnexWriteStore } from './log.js';
|
|
48
|
+
export { clientAnnexGcDue, delegatedClientsPointerEstablishedAt, GENERATION_GC_PERIOD_MS, GENERATION_QUIET_BOUND_MS, GENERATION_QUIET_GRACE_MS, generationQuiet, runClientAnnexGc, swapClientAnnexGeneration } from './gc.js';
|
|
49
|
+
export type { ClientAnnexGcReport, ClientAnnexGcSwapOutcome } from './gc.js';
|
|
50
|
+
export { ladderVmAgent, ladderVmZcapClient } from './zcap.js';
|
|
51
|
+
export { createLadderAnchoredAccountLog, ensureLadderAnchoredDidWebvh, forgetLastWebvhClient, forgetWebvhClient, installLadderVmWebvh, LastDurableClientForgetError, selfEnrollWebvhClient } from './ladderAnchored.js';
|
|
52
|
+
export { selfEnrollClientCore } from './selfEnroll.js';
|
|
53
|
+
export { forgetDurableClient } from './forget.js';
|
|
54
|
+
export type { DurableClientForgetResult } from './forget.js';
|
|
55
|
+
export { forgetLastDurableClient } from './forgetLast.js';
|
|
56
|
+
export type { GenerationDelegationRetirement, LastDurableClientForgetResult, UnlockMethodsRemintReach } from './forgetLast.js';
|
|
57
|
+
export { ensureCredentialAnchoredAccountGenesis, mintCredentialAnchoredAccountKeySet } from './credentialAnchoredGenesis.js';
|
|
58
|
+
export { recoverWebvhLadderAnchored } from './recoveryLadderAnchored.js';
|
|
59
|
+
export { createLadderAnchoredWebvhLog, ladderVerificationMethod } from '../webvh/didWebvh.js';
|
|
60
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/clientAnnex/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,UAAU,EACV,cAAc,EACd,oBAAoB,EACpB,YAAY,EACb,MAAM,aAAa,CAAA;AACpB,YAAY,EACV,UAAU,EACV,eAAe,EACf,qBAAqB,EACtB,MAAM,aAAa,CAAA;AAEpB,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,EACvB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,+BAA+B,EAC/B,qBAAqB,EACrB,oBAAoB,EACpB,oCAAoC,EACpC,mCAAmC,EACnC,8BAA8B,EAC9B,gCAAgC,EAChC,iCAAiC,EACjC,uBAAuB,EACvB,4BAA4B,EAC5B,4BAA4B,EAC5B,gCAAgC,EAChC,qBAAqB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