@interop/wallet-core 0.48.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/clientAnnex/gc.d.ts +255 -0
- package/dist/clientAnnex/gc.d.ts.map +1 -0
- package/dist/clientAnnex/gc.js +445 -0
- 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 +99 -23
- 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} +373 -152
- package/dist/clientAnnex/log.d.ts.map +1 -0
- package/dist/{webvh/companion.js → clientAnnex/log.js} +654 -261
- 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 +38 -0
- package/dist/space/activity.d.ts.map +1 -1
- package/dist/space/activity.js +41 -1
- package/dist/space/activity.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/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 +20 -10
- package/dist/webvh/didWebvh.d.ts.map +1 -1
- package/dist/webvh/didWebvh.js +17 -17
- package/dist/webvh/didWebvh.js.map +1 -1
- package/dist/webvh/index.d.ts +9 -23
- package/dist/webvh/index.d.ts.map +1 -1
- package/dist/webvh/index.js +9 -22
- 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 -254
- 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
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2026 Interop Alliance. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Client-annex GC: the quarterly wholesale replacement of the annex
|
|
6
|
+
* generation, and the collection of everything it leaves behind.
|
|
7
|
+
*
|
|
8
|
+
* The ceremony has two halves with different rhythms:
|
|
9
|
+
*
|
|
10
|
+
* - The SWAP runs on the fixed quarterly cadence (90 days, at the first
|
|
11
|
+
* durable login after the period elapses -- coarse on purpose, so the
|
|
12
|
+
* account log's permanent pointer-entry rhythm reveals little about
|
|
13
|
+
* transient-use frequency), and only when the pointed generation is
|
|
14
|
+
* GC-quiet (the 24-hour max-visit quiet bound over its newest entry's
|
|
15
|
+
* `versionTime`, with a skew-margin grace hour -- a deferral policy only,
|
|
16
|
+
* never a session expiry). Its stage order is fixed: mint + genesis,
|
|
17
|
+
* install the fresh generation's delegation service entry, revoke the old
|
|
18
|
+
* generation's delegation, re-point the account document. Revoke lands
|
|
19
|
+
* before the re-point (closing the window where a fail-open non-conforming
|
|
20
|
+
* server still honors the old delegation -- and the revocation POST itself
|
|
21
|
+
* only verifies while the pointer still makes the old chain resolve), and
|
|
22
|
+
* before the delete (the POST needs the capability bytes the delete
|
|
23
|
+
* destroys).
|
|
24
|
+
*
|
|
25
|
+
* - The COLLECT fan-out is predicate-driven and runs at every durable login:
|
|
26
|
+
* every `gen-` collection the pointer does not name -- the generation a
|
|
27
|
+
* swap just superseded, a torn GC's leftover, a torn signup's orphan, a
|
|
28
|
+
* double-genesis loser -- gets identical treatment (revoke its embedded
|
|
29
|
+
* delegation blind, reading the server's 400 already-revoked answer as
|
|
30
|
+
* success; write the digest; delete), so a GC torn anywhere resumes at the
|
|
31
|
+
* next login instead of waiting a quarter. Failures are collected per
|
|
32
|
+
* generation and never abort the fan-out: a partial pass is a resumable
|
|
33
|
+
* success.
|
|
34
|
+
*
|
|
35
|
+
* The completion predicate is durable state alone (exactly one `gen-`
|
|
36
|
+
* collection exists in the auxiliary Space and it is the one the pointer
|
|
37
|
+
* names); no marker resource exists anywhere -- the account document's
|
|
38
|
+
* pointer-update entry is the record, and the cadence is read off its
|
|
39
|
+
* `versionTime`. The digest (`GenerationCollect`, built by the caller's
|
|
40
|
+
* `recordDigest` over `@interop/wallet-core/space`'s builder) is written
|
|
41
|
+
* before the delete: it is the owner's only record of the collected window's
|
|
42
|
+
* visits surviving the delete, and compromise detection ends at digest
|
|
43
|
+
* granularity.
|
|
44
|
+
*
|
|
45
|
+
* Honest limitations: the "no unexpired delegation names a dead generation"
|
|
46
|
+
* conjunct is an ordering obligation, not a check (the revocation protocol
|
|
47
|
+
* exposes no read endpoint, and the dead generation's delegation bytes are
|
|
48
|
+
* destroyed with its collection); orphaned generations are
|
|
49
|
+
* authorization-inert (no delegation ever names an unpointed generation
|
|
50
|
+
* under pointer equality), so what accretes between passes is a storage
|
|
51
|
+
* leak, never an authority leak.
|
|
52
|
+
*/
|
|
53
|
+
import type { DIDLog } from '@interop/did-method-webvh';
|
|
54
|
+
import type { ZcapClient } from '@interop/ezcap';
|
|
55
|
+
import type { WasClient } from '@interop/was-client';
|
|
56
|
+
import type { ResourceLogPinStore } from '../resourceLog/pin.js';
|
|
57
|
+
import type { ClientWebvhUpdateKeys, PublishedWebvhLog, WebvhIdStore } from '../webvh/didWebvh.js';
|
|
58
|
+
/**
|
|
59
|
+
* The fixed GC cadence: a generation is replaced at the first durable login
|
|
60
|
+
* 90 days after the current pointer value was established. Wallet GC policy
|
|
61
|
+
* over the account log's own timestamps, never a stored or wire value.
|
|
62
|
+
*/
|
|
63
|
+
export declare const GENERATION_GC_PERIOD_MS: number;
|
|
64
|
+
/**
|
|
65
|
+
* The quiet bound: a generation is GC-quiet when its newest entry's
|
|
66
|
+
* `versionTime` is over 24 hours old. The bound defers the swap only; it
|
|
67
|
+
* never expires a session. A visit outliving it merely loses guaranteed
|
|
68
|
+
* guard protection, and in the rare case a quarterly pass lands on one, the
|
|
69
|
+
* session's next authorization failure maps to the generation-lapse retry
|
|
70
|
+
* state.
|
|
71
|
+
*/
|
|
72
|
+
export declare const GENERATION_QUIET_BOUND_MS: number;
|
|
73
|
+
/**
|
|
74
|
+
* The skew-margin grace floor on the quiet bound: three clocks meet at the
|
|
75
|
+
* guard check (the enrolling writer's, any prior entry writer's, and the
|
|
76
|
+
* GC-running client's), and `versionTime` is asserted by the writer's clock,
|
|
77
|
+
* so the guard compares against the bound plus this margin. An hour is
|
|
78
|
+
* generous against real-world skew and defers the swap by at most an hour
|
|
79
|
+
* against a quarterly cadence.
|
|
80
|
+
*/
|
|
81
|
+
export declare const GENERATION_QUIET_GRACE_MS: number;
|
|
82
|
+
/**
|
|
83
|
+
* The `versionTime` of the account-log entry that established the CURRENT
|
|
84
|
+
* `#DelegatedClients` pointer value: the newest entry whose state names a
|
|
85
|
+
* different annex DID than the entry before it (or the first entry, when
|
|
86
|
+
* the pointer has been there since genesis). This is the cadence's clock --
|
|
87
|
+
* "the pointer-update entry is the record" -- and it is read off the log a
|
|
88
|
+
* durable login has already verified, so the cadence costs no extra fetch
|
|
89
|
+
* and every enrolled client agrees on it.
|
|
90
|
+
*
|
|
91
|
+
* @param options {object}
|
|
92
|
+
* @param options.log {DIDLog} the VERIFIED account log
|
|
93
|
+
* @returns {string | undefined} the establishing entry's `versionTime`,
|
|
94
|
+
* or undefined when no entry carries a pointer
|
|
95
|
+
*/
|
|
96
|
+
export declare function delegatedClientsPointerEstablishedAt({ log }: {
|
|
97
|
+
log: DIDLog;
|
|
98
|
+
}): string | undefined;
|
|
99
|
+
/**
|
|
100
|
+
* Whether the quarterly swap is due: the current pointer value was
|
|
101
|
+
* established {@link GENERATION_GC_PERIOD_MS} or more ago. A log with no
|
|
102
|
+
* pointer is never due (there is no generation to replace).
|
|
103
|
+
*
|
|
104
|
+
* @param options {object}
|
|
105
|
+
* @param options.log {DIDLog} the VERIFIED account log
|
|
106
|
+
* @param [options.now] {number} epoch milliseconds, for tests
|
|
107
|
+
* @returns {boolean}
|
|
108
|
+
*/
|
|
109
|
+
export declare function clientAnnexGcDue({ log, now }: {
|
|
110
|
+
log: DIDLog;
|
|
111
|
+
now?: number;
|
|
112
|
+
}): boolean;
|
|
113
|
+
/**
|
|
114
|
+
* The live-entry guard: whether a generation is GC-quiet -- its newest
|
|
115
|
+
* entry's `versionTime` is older than the quiet bound plus the skew grace
|
|
116
|
+
* margin. Applies to the POINTED generation only (an unpointed generation
|
|
117
|
+
* authorizes nothing under pointer equality, so nothing inside it ever
|
|
118
|
+
* defers deletion). An unparseable `versionTime` reads as not quiet: the
|
|
119
|
+
* swap defers rather than abandoning a possibly-live visit.
|
|
120
|
+
*
|
|
121
|
+
* @param options {object}
|
|
122
|
+
* @param options.log {DIDLog} the pointed generation's VERIFIED annex
|
|
123
|
+
* log
|
|
124
|
+
* @param [options.now] {number} epoch milliseconds, for tests
|
|
125
|
+
* @returns {boolean}
|
|
126
|
+
*/
|
|
127
|
+
export declare function generationQuiet({ log, now }: {
|
|
128
|
+
log: DIDLog;
|
|
129
|
+
now?: number;
|
|
130
|
+
}): boolean;
|
|
131
|
+
/**
|
|
132
|
+
* What the swap half of one GC pass did. `replaced` is the successful swap;
|
|
133
|
+
* `not-due` and `deferred-live` are the two healthy skips (cadence and quiet
|
|
134
|
+
* bound); `no-pointer` means the account has no annex posture (the whole
|
|
135
|
+
* pass no-ops -- without a pointer there is no auxiliary Space to list);
|
|
136
|
+
* `no-ladder-seed` means the swap was due but the login held no ladder seed
|
|
137
|
+
* to mint with (a non-standing record); `failed` means a swap stage threw --
|
|
138
|
+
* reported in `failed` under the pointed generation's id, with the collect
|
|
139
|
+
* fan-out still run.
|
|
140
|
+
*/
|
|
141
|
+
export type ClientAnnexGcSwapOutcome = 'replaced' | 'not-due' | 'deferred-live' | 'no-pointer' | 'no-ladder-seed' | 'failed';
|
|
142
|
+
/**
|
|
143
|
+
* One GC pass's report: the swap outcome, the annex DID the account
|
|
144
|
+
* points at after the pass, the generation ids collected (revoked, digested,
|
|
145
|
+
* deleted), and the per-generation failures. A report with `failed` entries
|
|
146
|
+
* is a resumable success -- the next durable login's pass picks up exactly
|
|
147
|
+
* the generations still listed.
|
|
148
|
+
*/
|
|
149
|
+
export interface ClientAnnexGcReport {
|
|
150
|
+
swap: ClientAnnexGcSwapOutcome;
|
|
151
|
+
pointedDid?: string;
|
|
152
|
+
collected: string[];
|
|
153
|
+
failed: Array<{
|
|
154
|
+
generationId: string;
|
|
155
|
+
error: unknown;
|
|
156
|
+
}>;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* One annex GC pass: the quarterly swap when due and quiet, then the
|
|
160
|
+
* predicate-driven collect fan-out over every non-pointed `gen-` collection.
|
|
161
|
+
* See the module header for the stage order and its load-bearing constraints.
|
|
162
|
+
*
|
|
163
|
+
* Convergence: every stage detects completion from durable state. A re-run
|
|
164
|
+
* after a tear re-POSTs the revocation blind (400 already-revoked reads as
|
|
165
|
+
* success), re-writes the digest (the deterministic payload id collapses the
|
|
166
|
+
* second row at read time), and re-runs the idempotent delete; a swap torn
|
|
167
|
+
* before its re-point leaves an unpointed fresh generation the same fan-out
|
|
168
|
+
* collects.
|
|
169
|
+
*
|
|
170
|
+
* @param options {object}
|
|
171
|
+
* @param options.was {WasClient} the storage client, signing as an
|
|
172
|
+
* enrolled client (root tier on both the account and auxiliary Spaces)
|
|
173
|
+
* @param options.wasServerUrl {string} the account pointer's host
|
|
174
|
+
* @param options.accountSpaceId {string} the ACCOUNT Space's id (the
|
|
175
|
+
* generation delegation's target subtree)
|
|
176
|
+
* @param options.account {object} the VERIFIED account log
|
|
177
|
+
* (`{ did, doc, log }` -- `verifyAccountLog`'s shape)
|
|
178
|
+
* @param options.idStore {WebvhIdStore} the account log's id store, for
|
|
179
|
+
* the re-point
|
|
180
|
+
* @param options.updateKeys {ClientWebvhUpdateKeys} this enrolled client's
|
|
181
|
+
* update keys, signing the re-point entry
|
|
182
|
+
* @param options.zcapClient {ZcapClient} signs the fresh generation
|
|
183
|
+
* delegation (the promoted account keyId)
|
|
184
|
+
* @param [options.ladderSeed] {Uint8Array} the login credential's ladder
|
|
185
|
+
* seed; absent, a due swap reports `no-ladder-seed` and only the collect
|
|
186
|
+
* fan-out runs
|
|
187
|
+
* @param options.recordDigest {Function}
|
|
188
|
+
* `({ generationId, firstEntry, lastEntry, entryCount }) => Promise<void>`
|
|
189
|
+
* -- writes the GenerationCollect wallet-activity row; called before the
|
|
190
|
+
* delete, and a throw keeps the generation for the next pass
|
|
191
|
+
* @param [options.onCollected] {Function}
|
|
192
|
+
* `({ generationId }) => Promise<void>` -- local cleanup after a
|
|
193
|
+
* generation's delete (the caller's annex pin-slot drop); a throw is
|
|
194
|
+
* reported but cannot be retried (the collection is already gone)
|
|
195
|
+
* @param [options.pinStore] {ResourceLogPinStore} chain-head pins for the
|
|
196
|
+
* account-log re-point and the pointed generation's read
|
|
197
|
+
* @param [options.now] {number} epoch milliseconds, for tests
|
|
198
|
+
* @returns {Promise<ClientAnnexGcReport>}
|
|
199
|
+
*/
|
|
200
|
+
export declare function runClientAnnexGc({ was, wasServerUrl, accountSpaceId, account, idStore, updateKeys, zcapClient, ladderSeed, recordDigest, onCollected, pinStore, now }: {
|
|
201
|
+
was: WasClient;
|
|
202
|
+
wasServerUrl: string;
|
|
203
|
+
accountSpaceId: string;
|
|
204
|
+
account: Pick<PublishedWebvhLog, 'did' | 'doc' | 'log'>;
|
|
205
|
+
idStore: WebvhIdStore;
|
|
206
|
+
updateKeys: ClientWebvhUpdateKeys;
|
|
207
|
+
zcapClient: ZcapClient;
|
|
208
|
+
ladderSeed?: Uint8Array;
|
|
209
|
+
recordDigest: (digest: {
|
|
210
|
+
generationId: string;
|
|
211
|
+
firstEntry?: string;
|
|
212
|
+
lastEntry?: string;
|
|
213
|
+
entryCount?: number;
|
|
214
|
+
}) => Promise<void>;
|
|
215
|
+
onCollected?: (options: {
|
|
216
|
+
generationId: string;
|
|
217
|
+
}) => Promise<void>;
|
|
218
|
+
pinStore?: ResourceLogPinStore;
|
|
219
|
+
now?: number;
|
|
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,CAA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