@interop/wallet-core 0.41.0 → 0.43.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 +17 -4
- package/dist/clients/rosterPolicy.d.ts +28 -16
- package/dist/clients/rosterPolicy.d.ts.map +1 -1
- package/dist/clients/rosterPolicy.js +51 -26
- package/dist/clients/rosterPolicy.js.map +1 -1
- package/dist/descriptors/index.d.ts +1 -1
- package/dist/descriptors/index.d.ts.map +1 -1
- package/dist/descriptors/index.js +1 -1
- package/dist/descriptors/index.js.map +1 -1
- package/dist/descriptors/logSource.d.ts +58 -6
- package/dist/descriptors/logSource.d.ts.map +1 -1
- package/dist/descriptors/logSource.js +57 -15
- package/dist/descriptors/logSource.js.map +1 -1
- package/dist/enrollment/enrollment.d.ts.map +1 -1
- package/dist/enrollment/enrollment.js +14 -26
- package/dist/enrollment/enrollment.js.map +1 -1
- package/dist/keyring/fetch.d.ts +12 -0
- package/dist/keyring/fetch.d.ts.map +1 -1
- package/dist/keyring/fetch.js +0 -2
- package/dist/keyring/fetch.js.map +1 -1
- package/dist/keyring/index.d.ts +1 -1
- package/dist/keyring/index.d.ts.map +1 -1
- package/dist/keyring/index.js +1 -1
- package/dist/keyring/index.js.map +1 -1
- package/dist/keyring/kdf.d.ts +22 -6
- package/dist/keyring/kdf.d.ts.map +1 -1
- package/dist/keyring/kdf.js +9 -14
- package/dist/keyring/kdf.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/rosterLogStore.d.ts +4 -1
- package/dist/keys/rosterLogStore.d.ts.map +1 -1
- package/dist/keys/rosterLogStore.js +13 -16
- package/dist/keys/rosterLogStore.js.map +1 -1
- package/dist/keys/rosterStore.d.ts +13 -1
- package/dist/keys/rosterStore.d.ts.map +1 -1
- package/dist/keys/rosterStore.js +18 -0
- package/dist/keys/rosterStore.js.map +1 -1
- package/dist/keys/userKeyRoster.d.ts +17 -5
- package/dist/keys/userKeyRoster.d.ts.map +1 -1
- package/dist/keys/userKeyRoster.js +38 -13
- package/dist/keys/userKeyRoster.js.map +1 -1
- package/dist/recovery/index.d.ts +14 -12
- package/dist/recovery/index.d.ts.map +1 -1
- package/dist/recovery/index.js +13 -11
- package/dist/recovery/index.js.map +1 -1
- package/dist/recovery/recoveryCode.d.ts +5 -17
- package/dist/recovery/recoveryCode.d.ts.map +1 -1
- package/dist/recovery/recoveryCode.js +4 -14
- package/dist/recovery/recoveryCode.js.map +1 -1
- package/dist/recovery/recoveryDelegation.d.ts +50 -19
- package/dist/recovery/recoveryDelegation.d.ts.map +1 -1
- package/dist/recovery/recoveryDelegation.js +86 -41
- package/dist/recovery/recoveryDelegation.js.map +1 -1
- package/dist/recovery/recoveryWebvh.d.ts +13 -22
- package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
- package/dist/recovery/recoveryWebvh.js +37 -129
- package/dist/recovery/recoveryWebvh.js.map +1 -1
- package/dist/resourceLog/append.d.ts +12 -3
- package/dist/resourceLog/append.d.ts.map +1 -1
- package/dist/resourceLog/append.js +17 -10
- package/dist/resourceLog/append.js.map +1 -1
- package/dist/resourceLog/index.d.ts +1 -1
- package/dist/resourceLog/index.d.ts.map +1 -1
- package/dist/resourceLog/index.js +1 -1
- package/dist/resourceLog/index.js.map +1 -1
- package/dist/resourceLog/pin.d.ts +46 -8
- package/dist/resourceLog/pin.d.ts.map +1 -1
- package/dist/resourceLog/pin.js +32 -7
- package/dist/resourceLog/pin.js.map +1 -1
- package/dist/resourceLog/seal.d.ts +4 -1
- package/dist/resourceLog/seal.d.ts.map +1 -1
- package/dist/resourceLog/seal.js +6 -2
- package/dist/resourceLog/seal.js.map +1 -1
- package/dist/unlock/index.d.ts +40 -0
- package/dist/unlock/index.d.ts.map +1 -0
- package/dist/unlock/index.js +36 -0
- package/dist/unlock/index.js.map +1 -0
- package/dist/unlock/ladder.d.ts +100 -0
- package/dist/unlock/ladder.d.ts.map +1 -0
- package/dist/unlock/ladder.js +144 -0
- package/dist/unlock/ladder.js.map +1 -0
- package/dist/unlock/selfEnroll.d.ts +83 -0
- package/dist/unlock/selfEnroll.d.ts.map +1 -0
- package/dist/unlock/selfEnroll.js +126 -0
- package/dist/unlock/selfEnroll.js.map +1 -0
- package/dist/unlock/standingClient.d.ts +68 -0
- package/dist/unlock/standingClient.d.ts.map +1 -0
- package/dist/unlock/standingClient.js +81 -0
- package/dist/unlock/standingClient.js.map +1 -0
- package/dist/unlock/standingWebvh.d.ts +153 -0
- package/dist/unlock/standingWebvh.d.ts.map +1 -0
- package/dist/unlock/standingWebvh.js +370 -0
- package/dist/unlock/standingWebvh.js.map +1 -0
- package/dist/unlock/unlockRecord.d.ts +207 -0
- package/dist/unlock/unlockRecord.d.ts.map +1 -0
- package/dist/unlock/unlockRecord.js +435 -0
- package/dist/unlock/unlockRecord.js.map +1 -0
- package/dist/webvh/didWebvh.d.ts +94 -6
- package/dist/webvh/didWebvh.d.ts.map +1 -1
- package/dist/webvh/didWebvh.js +175 -19
- package/dist/webvh/didWebvh.js.map +1 -1
- package/dist/webvh/index.d.ts +7 -2
- package/dist/webvh/index.d.ts.map +1 -1
- package/dist/webvh/index.js +7 -2
- package/dist/webvh/index.js.map +1 -1
- package/dist/webvh/keyAgreement.d.ts +22 -6
- package/dist/webvh/keyAgreement.d.ts.map +1 -1
- package/dist/webvh/keyAgreement.js +1 -1
- package/dist/webvh/keyAgreement.js.map +1 -1
- package/dist/webvh/verifyLog.d.ts +15 -2
- package/dist/webvh/verifyLog.d.ts.map +1 -1
- package/dist/webvh/verifyLog.js +22 -3
- package/dist/webvh/verifyLog.js.map +1 -1
- package/package.json +11 -5
- package/dist/recovery/recoveryRecord.d.ts +0 -172
- package/dist/recovery/recoveryRecord.d.ts.map +0 -1
- package/dist/recovery/recoveryRecord.js +0 -288
- package/dist/recovery/recoveryRecord.js.map +0 -1
|
@@ -6,21 +6,24 @@
|
|
|
6
6
|
* delegation and the revocation cascade's re-mint of it. The delegation is a
|
|
7
7
|
* wire artifact both apps must mint byte-identically (issuance and every
|
|
8
8
|
* re-mint produce the record another replica later recovers with), so its
|
|
9
|
-
* builder lives here: PUT on the one `did.jsonl` resource,
|
|
10
|
-
* to the code-derived signing DID. Its narrow scope is what keeps
|
|
11
|
-
* loud -- a stolen code must extend the world-readable log before it
|
|
12
|
-
* anything.
|
|
9
|
+
* builder lives here: PUT on the one `did.jsonl` resource, one-year TTL,
|
|
10
|
+
* delegated to the code-derived signing DID. Its narrow scope is what keeps
|
|
11
|
+
* recovery loud -- a stolen code must extend the world-readable log before it
|
|
12
|
+
* can read anything.
|
|
13
13
|
*
|
|
14
14
|
* Beside the builder lives the re-mint core (`remintRecoveryDelegations`):
|
|
15
15
|
* revoking a client kills, by the current-key-set rule, every `did.jsonl`
|
|
16
16
|
* delegation that client signed, which would brick recovery exactly when it
|
|
17
|
-
* is needed
|
|
18
|
-
*
|
|
17
|
+
* is needed -- and a delegation left standing eventually reaches its own
|
|
18
|
+
* expiry. For each registry entry whose recorded delegation no longer
|
|
19
|
+
* chains (its signing verification method left the document) or is expired
|
|
20
|
+
* or inside the renewal window, the acting
|
|
19
21
|
* client signs a fresh delegation to the code's signing DID, re-wraps the
|
|
20
22
|
* record to the code's unlock KAK (the public half the registry records --
|
|
21
23
|
* the record carries no secrets, so re-encryption needs none), re-PUTs it
|
|
22
24
|
* through the entry's management zcap, and updates the registry's
|
|
23
|
-
* `delegationKeyId`. The skip policy is
|
|
25
|
+
* `delegationKeyId` and `delegationExpires`. The skip policy is
|
|
26
|
+
* cross-replica correctness and is
|
|
24
27
|
* decided here once: an entry that predates the re-mint fields, or whose
|
|
25
28
|
* standing record cannot be read or carries no binding, is skipped and stays
|
|
26
29
|
* flagged by the login-time health check. What stays app-side is the seams:
|
|
@@ -31,17 +34,53 @@ import { X25519KeyAgreementKey2020 } from '@interop/x25519-key-agreement-key';
|
|
|
31
34
|
import { DID_LOG_RESOURCE, ID_COLLECTION } from '../space/collections.js';
|
|
32
35
|
import { delegationKeyInDocument } from '../webvh/listClients.js';
|
|
33
36
|
import { getUnlockKeyringWithCapability, putUnlockKeyringWithCapability } from '../keyring/unlockSpace.js';
|
|
34
|
-
import {
|
|
37
|
+
import { remintUnlockRecordBridge } from '../unlock/unlockRecord.js';
|
|
35
38
|
/**
|
|
36
|
-
* The recovery delegation's lifetime:
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* write that still has to verify
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
39
|
+
* The recovery delegation's lifetime: one year, following NIST SP 800-57's
|
|
40
|
+
* one-to-two-year cryptoperiod guidance for private signature keys. The
|
|
41
|
+
* delegation's scope stays narrow (PUT on the one world-readable DID log
|
|
42
|
+
* resource, whose worst-case abuse is a log write that still has to verify
|
|
43
|
+
* against the published hash chain and prerotation commitments to resolve),
|
|
44
|
+
* but a standing bearer artifact should not outlive its signing key's
|
|
45
|
+
* recommended cryptoperiod. A code must keep working past the year, so
|
|
46
|
+
* expiry is watched rather than terminal: the registry entry records the
|
|
47
|
+
* delegation's `expires`, {@link zcapExpiring} treats the
|
|
48
|
+
* renewal window before it as stale, the re-mint refreshes a stale
|
|
49
|
+
* delegation, and the login-time recovery health check flags one the same
|
|
50
|
+
* way it flags rot (the signing client's verification method leaving the
|
|
51
|
+
* document).
|
|
43
52
|
*/
|
|
44
|
-
export const RECOVERY_DELEGATION_TTL_MS =
|
|
53
|
+
export const RECOVERY_DELEGATION_TTL_MS = 365 * 24 * 60 * 60 * 1000;
|
|
54
|
+
/**
|
|
55
|
+
* How long before its `expires` a standing recorded zcap counts as stale:
|
|
56
|
+
* thirty days, so a refresh (a re-mint, a login-time re-delegation) or a
|
|
57
|
+
* regenerate nudge lands well before the zcap actually lapses.
|
|
58
|
+
*/
|
|
59
|
+
export const ZCAP_RENEWAL_WINDOW_MS = 30 * 24 * 60 * 60 * 1000;
|
|
60
|
+
/**
|
|
61
|
+
* Whether a recorded zcap expiry is past or inside the renewal window -- the
|
|
62
|
+
* expiry half of the staleness predicate for every long-lived zcap a wallet
|
|
63
|
+
* records beside its registry entries (the recovery `did.jsonl` delegation,
|
|
64
|
+
* an unlock Space's management zcap). The re-mint and the wallets'
|
|
65
|
+
* login-time checks all ask this one predicate. A record carrying no expiry
|
|
66
|
+
* (or an unparseable one) is uncheckable and therefore not assumed healthy,
|
|
67
|
+
* matching the rot check's treatment of a missing `delegationKeyId`.
|
|
68
|
+
*
|
|
69
|
+
* @param options {object}
|
|
70
|
+
* @param [options.expires] {string} the recorded ISO 8601 expiry
|
|
71
|
+
* @param [options.now] {number} epoch milliseconds, for tests
|
|
72
|
+
* @returns {boolean}
|
|
73
|
+
*/
|
|
74
|
+
export function zcapExpiring({ expires, now = Date.now() }) {
|
|
75
|
+
if (!expires) {
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
const expiresAt = Date.parse(expires);
|
|
79
|
+
if (Number.isNaN(expiresAt)) {
|
|
80
|
+
return true;
|
|
81
|
+
}
|
|
82
|
+
return expiresAt - now <= ZCAP_RENEWAL_WINDOW_MS;
|
|
83
|
+
}
|
|
45
84
|
/**
|
|
46
85
|
* The absolute URL of the account's `did.jsonl` log resource -- the
|
|
47
86
|
* invocation target of the pre-minted recovery delegation.
|
|
@@ -92,13 +131,15 @@ export function delegationProofKeyId(delegation) {
|
|
|
92
131
|
* the recovery-code delta riding the revocation cascade (see the module doc
|
|
93
132
|
* for the mechanism and the skip policy).
|
|
94
133
|
*
|
|
95
|
-
* The record's
|
|
134
|
+
* The record's credential-authenticated core is preserved verbatim: the
|
|
96
135
|
* re-mint reads the standing record through the entry's management zcap and
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
136
|
+
* replaces only its bridge member ({@link remintUnlockRecordBridge}) -- the
|
|
137
|
+
* shell, the ladder member (where one rides), and the binding tag all travel
|
|
138
|
+
* untouched, since the re-mint can decrypt none of them and does not need to.
|
|
139
|
+
* A re-mint therefore can never change the pointer or controller the
|
|
140
|
+
* credential was bound against -- and after a host migration the tag no
|
|
141
|
+
* longer matches the moved pointer, so credentials must be rebound (codes
|
|
142
|
+
* re-issued) when the account moves hosts.
|
|
102
143
|
*
|
|
103
144
|
* The re-mint holds the code's KAK public half but not its signing key, so
|
|
104
145
|
* every record it re-PUTs is signed with the acting client's own account key
|
|
@@ -114,8 +155,6 @@ export function delegationProofKeyId(delegation) {
|
|
|
114
155
|
* @param options.entries {RecoveryDelegationEntry[]} the registry's
|
|
115
156
|
* recovery-code entries, as the app's registry read returned them
|
|
116
157
|
* @param options.pointer {AccountPointer}
|
|
117
|
-
* @param options.controller {string} the account controller to stamp into
|
|
118
|
-
* re-wrapped records (an identity label, as at issuance)
|
|
119
158
|
* @param options.storageServerUrl {string} the unlock Spaces' storage server
|
|
120
159
|
* @param options.zcapClient {ZcapClient} the acting client's promoted
|
|
121
160
|
* signer, which mints the fresh delegations
|
|
@@ -127,20 +166,26 @@ export function delegationProofKeyId(delegation) {
|
|
|
127
166
|
* persists one updated registry entry (matching on the app's entry key)
|
|
128
167
|
* @returns {Promise<{ reminted: number; skipped: number }>}
|
|
129
168
|
*/
|
|
130
|
-
export async function remintRecoveryDelegations({ doc, entries, pointer,
|
|
169
|
+
export async function remintRecoveryDelegations({ doc, entries, pointer, storageServerUrl, zcapClient, recordSigner, managementZcapClient, recordEntry }) {
|
|
131
170
|
let reminted = 0;
|
|
132
171
|
let skipped = 0;
|
|
133
172
|
for (const entry of entries) {
|
|
134
173
|
// The current-key-set rule, decided once in `webvh`: an entry whose
|
|
135
174
|
// recorded signing key the document no longer publishes -- or that
|
|
136
|
-
// records no signing key at all -- is rotted.
|
|
175
|
+
// records no signing key at all -- is rotted. Expiry is the other
|
|
176
|
+
// staleness axis: a delegation expired or inside the renewal window
|
|
177
|
+
// (or recording no expiry at all) is re-minted even though its key
|
|
178
|
+
// still stands.
|
|
137
179
|
const stands = delegationKeyInDocument({
|
|
138
180
|
doc,
|
|
139
181
|
...(entry.delegationKeyId
|
|
140
182
|
? { delegationKeyId: entry.delegationKeyId }
|
|
141
183
|
: {})
|
|
142
184
|
});
|
|
143
|
-
|
|
185
|
+
const expiring = zcapExpiring({
|
|
186
|
+
...(entry.delegationExpires ? { expires: entry.delegationExpires } : {})
|
|
187
|
+
});
|
|
188
|
+
if (stands && !expiring) {
|
|
144
189
|
continue;
|
|
145
190
|
}
|
|
146
191
|
if (!entry.recoveryClientDid ||
|
|
@@ -153,10 +198,10 @@ export async function remintRecoveryDelegations({ doc, entries, pointer, control
|
|
|
153
198
|
continue;
|
|
154
199
|
}
|
|
155
200
|
try {
|
|
156
|
-
// The standing record
|
|
157
|
-
// verbatim (a record with
|
|
158
|
-
// re-minted -- `
|
|
159
|
-
// skipped into the health check's regenerate nudge).
|
|
201
|
+
// The standing record, whose credential-authenticated core travels
|
|
202
|
+
// verbatim (a record with no binding predates the standing layout and
|
|
203
|
+
// cannot be re-minted -- `remintUnlockRecordBridge` refuses, and the
|
|
204
|
+
// entry is skipped into the health check's regenerate nudge).
|
|
160
205
|
const standing = await getUnlockKeyringWithCapability({
|
|
161
206
|
storageServerUrl,
|
|
162
207
|
zcapClient: managementZcapClient({
|
|
@@ -165,28 +210,26 @@ export async function remintRecoveryDelegations({ doc, entries, pointer, control
|
|
|
165
210
|
spaceId: entry.unlockSpaceId,
|
|
166
211
|
capability: entry.manageCapability
|
|
167
212
|
});
|
|
168
|
-
const binding = recoveryRecordBinding({ record: standing });
|
|
169
213
|
const delegation = await delegateLogWrite({
|
|
170
214
|
zcapClient,
|
|
171
215
|
pointer,
|
|
172
216
|
recoveryClientDid: entry.recoveryClientDid
|
|
173
217
|
});
|
|
174
|
-
// The
|
|
175
|
-
//
|
|
176
|
-
//
|
|
218
|
+
// The credential's unlock KAK, public half only -- exactly enough to
|
|
219
|
+
// seal the fresh bridge to the same recipient the credential derives
|
|
220
|
+
// (sealing goes through the encrypt-only cipher, so no secret is
|
|
221
|
+
// needed).
|
|
177
222
|
const unlockKak = (await X25519KeyAgreementKey2020.from({
|
|
178
223
|
id: entry.unlockKeyAgreementKeyId,
|
|
179
224
|
controller: entry.unlockKeyAgreementKeyId.split('#')[0],
|
|
180
225
|
type: 'X25519KeyAgreementKey2020',
|
|
181
226
|
publicKeyMultibase: entry.unlockKeyAgreementKeyMultibase
|
|
182
227
|
}));
|
|
183
|
-
const wrapped = await
|
|
184
|
-
|
|
185
|
-
pointer,
|
|
228
|
+
const wrapped = await remintUnlockRecordBridge({
|
|
229
|
+
record: standing,
|
|
186
230
|
delegation,
|
|
187
231
|
keyAgreementKey: unlockKak,
|
|
188
|
-
signer: recordSigner
|
|
189
|
-
binding
|
|
232
|
+
signer: recordSigner
|
|
190
233
|
});
|
|
191
234
|
await putUnlockKeyringWithCapability({
|
|
192
235
|
storageServerUrl,
|
|
@@ -198,10 +241,12 @@ export async function remintRecoveryDelegations({ doc, entries, pointer, control
|
|
|
198
241
|
capability: entry.manageCapability
|
|
199
242
|
});
|
|
200
243
|
const delegationKeyId = delegationProofKeyId(delegation);
|
|
244
|
+
const delegationExpires = delegation.expires;
|
|
201
245
|
await recordEntry({
|
|
202
246
|
entry: {
|
|
203
247
|
...entry,
|
|
204
|
-
...(delegationKeyId ? { delegationKeyId } : {})
|
|
248
|
+
...(delegationKeyId ? { delegationKeyId } : {}),
|
|
249
|
+
...(delegationExpires ? { delegationExpires } : {})
|
|
205
250
|
}
|
|
206
251
|
});
|
|
207
252
|
reminted += 1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recoveryDelegation.js","sourceRoot":"","sources":["../../src/recovery/recoveryDelegation.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"recoveryDelegation.js","sourceRoot":"","sources":["../../src/recovery/recoveryDelegation.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;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C,8BAA8B;aACzD,CAAC,CAAqB,CAAA;YACvB,MAAM,OAAO,GAAG,MAAM,wBAAwB,CAAC;gBAC7C,MAAM,EAAE,QAAQ;gBAChB,UAAU;gBACV,eAAe,EAAE,SAAS;gBAC1B,MAAM,EAAE,YAAY;aACrB,CAAC,CAAA;YACF,MAAM,8BAA8B,CAAC;gBACnC,gBAAgB;gBAChB,UAAU,EAAE,oBAAoB,CAAC;oBAC/B,UAAU,EAAE,KAAK,CAAC,gBAAgB;iBACnC,CAAC;gBACF,OAAO,EAAE,KAAK,CAAC,aAAa;gBAC5B,MAAM,EAAE,OAAO;gBACf,UAAU,EAAE,KAAK,CAAC,gBAAgB;aACnC,CAAC,CAAA;YACF,MAAM,eAAe,GAAG,oBAAoB,CAAC,UAAU,CAAC,CAAA;YACxD,MAAM,iBAAiB,GAAI,UAAmC,CAAC,OAAO,CAAA;YACtE,MAAM,WAAW,CAAC;gBAChB,KAAK,EAAE;oBACL,GAAG,KAAK;oBACR,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;oBAC/C,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;iBACpD;aACF,CAAC,CAAA;YACF,QAAQ,IAAI,CAAC,CAAA;QACf,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,CAAC,IAAI,CACV,kDAAkD,KAAK,CAAC,KAAK,IAAI,EACjE,GAAG,CACJ,CAAA;YACD,OAAO,IAAI,CAAC,CAAA;QACd,CAAC;IACH,CAAC;IACD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAA;AAC9B,CAAC"}
|
|
@@ -41,12 +41,12 @@ export type RecoveryLogStore = Pick<WebvhIdStore, 'getIdResourceRaw' | 'putIdRes
|
|
|
41
41
|
/**
|
|
42
42
|
* ISSUANCE (run by an enrolled client, root authority): publishes a recovery
|
|
43
43
|
* code's split posture into the document -- one entry adding the code's
|
|
44
|
-
* `keyAgreement` verification method (an ordinary, unmarked Multikey entry
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
44
|
+
* `keyAgreement` verification method (an ordinary, unmarked Multikey entry,
|
|
45
|
+
* the key published verbatim: a code is high-entropy, so no commitment is
|
|
46
|
+
* needed) and committing its update-key hash in `nextKeyHashes`. The code's
|
|
47
|
+
* update key joins `updateKeys` nowhere. A thin wrapper over the standing
|
|
48
|
+
* unlock-key posture core ({@link publishUnlockKey}), which owns idempotence
|
|
49
|
+
* and the conditional publish.
|
|
50
50
|
*
|
|
51
51
|
* @param options {object}
|
|
52
52
|
* @param options.idStore {WebvhIdStore}
|
|
@@ -57,7 +57,7 @@ export type RecoveryLogStore = Pick<WebvhIdStore, 'getIdResourceRaw' | 'putIdRes
|
|
|
57
57
|
* resolve to, from the caller's stored account pointer
|
|
58
58
|
* @returns {Promise<{ did: string }>}
|
|
59
59
|
*/
|
|
60
|
-
export declare function publishRecoveryKey(
|
|
60
|
+
export declare function publishRecoveryKey({ idStore, updateKeys, recovery, expectedDid }: {
|
|
61
61
|
idStore: WebvhIdStore;
|
|
62
62
|
updateKeys: ClientWebvhUpdateKeys;
|
|
63
63
|
recovery: RecoveryPublicKeys;
|
|
@@ -68,24 +68,15 @@ export declare function publishRecoveryKey(options: {
|
|
|
68
68
|
/**
|
|
69
69
|
* REVOCATION (run by an enrolled client, root authority): removes a recovery
|
|
70
70
|
* code's posture from the document -- its `keyAgreement` verification method
|
|
71
|
-
* and its committed update-key hash -- in one entry
|
|
72
|
-
* roster-side half (rotating the
|
|
73
|
-
* caller's, and runs after this so
|
|
74
|
-
* the removed entry.
|
|
71
|
+
* and its committed update-key hash -- in one entry, through the same shared
|
|
72
|
+
* posture core ({@link removeUnlockKey}). The roster-side half (rotating the
|
|
73
|
+
* user key epoch off the code's wrap) is the caller's, and runs after this so
|
|
74
|
+
* the resolver's document no longer backs the removed entry.
|
|
75
75
|
*
|
|
76
|
-
*
|
|
77
|
-
* a concurrent ceremony re-runs and rebases on the new head.
|
|
78
|
-
*
|
|
79
|
-
* @param options {object}
|
|
80
|
-
* @param options.idStore {WebvhIdStore}
|
|
81
|
-
* @param options.updateKeys {ClientWebvhUpdateKeys} the REVOKING client's
|
|
82
|
-
* own did:webvh update-key seeds
|
|
83
|
-
* @param options.recovery {RecoveryPublicKeys} the code's public halves
|
|
84
|
-
* @param [options.expectedDid] {string} the account DID the log must
|
|
85
|
-
* resolve to, from the caller's stored account pointer
|
|
76
|
+
* @param options {object} see {@link publishRecoveryKey}
|
|
86
77
|
* @returns {Promise<{ did: string }>}
|
|
87
78
|
*/
|
|
88
|
-
export declare function removeRecoveryKey(
|
|
79
|
+
export declare function removeRecoveryKey({ idStore, updateKeys, recovery, expectedDid }: {
|
|
89
80
|
idStore: WebvhIdStore;
|
|
90
81
|
updateKeys: ClientWebvhUpdateKeys;
|
|
91
82
|
recovery: RecoveryPublicKeys;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recoveryWebvh.d.ts","sourceRoot":"","sources":["../../src/recovery/recoveryWebvh.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"recoveryWebvh.d.ts","sourceRoot":"","sources":["../../src/recovery/recoveryWebvh.ts"],"names":[],"mappings":"AA+CA,OAAO,KAAK,EACV,qBAAqB,EAErB,mBAAmB,EACnB,YAAY,EACb,MAAM,sBAAsB,CAAA;AAG7B;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,EAC3B,GAAG,EACH,wBAAwB,EACzB,EAAE;IACD,GAAG,EAAE,MAAM,CAAA;IACX,wBAAwB,EAAE,MAAM,CAAA;CACjC,GAAG,MAAM,CAET;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,wBAAwB,EAAE,MAAM,CAAA;IAChC,kBAAkB,EAAE,MAAM,CAAA;CAC3B;A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AAM,CAAA;CAAE,CAAC,CAE5C"}
|
|
@@ -34,7 +34,8 @@
|
|
|
34
34
|
* with the same key material converges without forking the log.
|
|
35
35
|
*/
|
|
36
36
|
import { deriveNextKeyHash, updateDID } from '@interop/did-method-webvh';
|
|
37
|
-
import { assertCarryOverCommitments, markedVerificationMethodPair, MULTIKEY_VM_TYPE,
|
|
37
|
+
import { assertCarryOverCommitments, markedVerificationMethodPair, MULTIKEY_VM_TYPE, putLogResource, readPublishedLog, relationIds, updateKeySigner, withLogConflictRetry } from '../webvh/didWebvh.js';
|
|
38
|
+
import { publishUnlockKey, removeUnlockKey } from '../unlock/standingWebvh.js';
|
|
38
39
|
/**
|
|
39
40
|
* The verification-method id a code's key-agreement key publishes under --
|
|
40
41
|
* the ordinary `<did>#<multibase>` form, indistinguishable by id from any
|
|
@@ -101,12 +102,12 @@ async function publishLogOnly({ store, log, ifMatch }) {
|
|
|
101
102
|
/**
|
|
102
103
|
* ISSUANCE (run by an enrolled client, root authority): publishes a recovery
|
|
103
104
|
* code's split posture into the document -- one entry adding the code's
|
|
104
|
-
* `keyAgreement` verification method (an ordinary, unmarked Multikey entry
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
105
|
+
* `keyAgreement` verification method (an ordinary, unmarked Multikey entry,
|
|
106
|
+
* the key published verbatim: a code is high-entropy, so no commitment is
|
|
107
|
+
* needed) and committing its update-key hash in `nextKeyHashes`. The code's
|
|
108
|
+
* update key joins `updateKeys` nowhere. A thin wrapper over the standing
|
|
109
|
+
* unlock-key posture core ({@link publishUnlockKey}), which owns idempotence
|
|
110
|
+
* and the conditional publish.
|
|
110
111
|
*
|
|
111
112
|
* @param options {object}
|
|
112
113
|
* @param options.idStore {WebvhIdStore}
|
|
@@ -117,137 +118,44 @@ async function publishLogOnly({ store, log, ifMatch }) {
|
|
|
117
118
|
* resolve to, from the caller's stored account pointer
|
|
118
119
|
* @returns {Promise<{ did: string }>}
|
|
119
120
|
*/
|
|
120
|
-
export async function publishRecoveryKey(
|
|
121
|
-
return
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
...(expectedDid !== undefined ? { expectedDid } : {})
|
|
121
|
+
export async function publishRecoveryKey({ idStore, updateKeys, recovery, expectedDid }) {
|
|
122
|
+
return publishUnlockKey({
|
|
123
|
+
idStore,
|
|
124
|
+
updateKeys,
|
|
125
|
+
unlockKeys: {
|
|
126
|
+
keyAgreement: {
|
|
127
|
+
publicKeyMultibase: recovery.keyAgreementKeyMultibase
|
|
128
|
+
},
|
|
129
|
+
updateKeyMultibase: recovery.updateKeyMultibase
|
|
130
|
+
},
|
|
131
|
+
...(expectedDid !== undefined ? { expectedDid } : {}),
|
|
132
|
+
verb: 'issuing a recovery code'
|
|
133
133
|
});
|
|
134
|
-
const { did, doc } = published;
|
|
135
|
-
const recoveryHash = await deriveNextKeyHash(recovery.updateKeyMultibase);
|
|
136
|
-
const vmId = recoveryVmId({
|
|
137
|
-
did,
|
|
138
|
-
keyAgreementKeyMultibase: recovery.keyAgreementKeyMultibase
|
|
139
|
-
});
|
|
140
|
-
const vmPresent = (doc.verificationMethod ?? []).some(method => method.id === vmId);
|
|
141
|
-
const hashCommitted = published.nextKeyHashes.includes(recoveryHash);
|
|
142
|
-
if (vmPresent && hashCommitted) {
|
|
143
|
-
return { did };
|
|
144
|
-
}
|
|
145
|
-
const activeKey = await updateKeyMultibase({ seed: updateKeys.updateSeed });
|
|
146
|
-
if (!published.updateKeys.includes(activeKey)) {
|
|
147
|
-
throw new Error("did:webvh: the published log does not authorize this client's active " +
|
|
148
|
-
'update key; finalize the pending rotation before issuing a ' +
|
|
149
|
-
'recovery code.');
|
|
150
|
-
}
|
|
151
|
-
await assertCarryOverCommitments({ published });
|
|
152
|
-
const existingMethods = (doc.verificationMethod ?? []);
|
|
153
|
-
// Controlled by the account, deliberately unmarked: a recovery code is not
|
|
154
|
-
// a listed client, so its key-agreement method must never carry the
|
|
155
|
-
// controller marker a client listing and a revocation removal match on.
|
|
156
|
-
const recoveryMethod = {
|
|
157
|
-
id: vmId,
|
|
158
|
-
type: MULTIKEY_VM_TYPE,
|
|
159
|
-
controller: did,
|
|
160
|
-
publicKeyMultibase: recovery.keyAgreementKeyMultibase
|
|
161
|
-
};
|
|
162
|
-
const signer = await updateKeySigner({ seed: updateKeys.updateSeed });
|
|
163
|
-
const updated = await updateDID({
|
|
164
|
-
log: published.log,
|
|
165
|
-
signer,
|
|
166
|
-
alsoKnownAsWeb: true,
|
|
167
|
-
updateKeys: published.updateKeys,
|
|
168
|
-
nextKeyHashes: [...new Set([...published.nextKeyHashes, recoveryHash])],
|
|
169
|
-
verificationMethods: [
|
|
170
|
-
...existingMethods.filter(method => method.id !== vmId),
|
|
171
|
-
recoveryMethod
|
|
172
|
-
],
|
|
173
|
-
authentication: relationIds(doc.authentication),
|
|
174
|
-
assertionMethod: relationIds(doc.assertionMethod),
|
|
175
|
-
keyAgreement: [...new Set([...relationIds(doc.keyAgreement), vmId])],
|
|
176
|
-
capabilityInvocation: relationIds(doc.capabilityInvocation),
|
|
177
|
-
capabilityDelegation: relationIds(doc.capabilityDelegation)
|
|
178
|
-
});
|
|
179
|
-
await publishUpdatedLog({ idStore, updated, ifMatch: published.etag });
|
|
180
|
-
return { did: updated.did };
|
|
181
134
|
}
|
|
182
135
|
/**
|
|
183
136
|
* REVOCATION (run by an enrolled client, root authority): removes a recovery
|
|
184
137
|
* code's posture from the document -- its `keyAgreement` verification method
|
|
185
|
-
* and its committed update-key hash -- in one entry
|
|
186
|
-
* roster-side half (rotating the
|
|
187
|
-
* caller's, and runs after this so
|
|
188
|
-
* the removed entry.
|
|
189
|
-
*
|
|
190
|
-
* The entry publishes conditionally on the log this call read; a race lost to
|
|
191
|
-
* a concurrent ceremony re-runs and rebases on the new head.
|
|
138
|
+
* and its committed update-key hash -- in one entry, through the same shared
|
|
139
|
+
* posture core ({@link removeUnlockKey}). The roster-side half (rotating the
|
|
140
|
+
* user key epoch off the code's wrap) is the caller's, and runs after this so
|
|
141
|
+
* the resolver's document no longer backs the removed entry.
|
|
192
142
|
*
|
|
193
|
-
* @param options {object}
|
|
194
|
-
* @param options.idStore {WebvhIdStore}
|
|
195
|
-
* @param options.updateKeys {ClientWebvhUpdateKeys} the REVOKING client's
|
|
196
|
-
* own did:webvh update-key seeds
|
|
197
|
-
* @param options.recovery {RecoveryPublicKeys} the code's public halves
|
|
198
|
-
* @param [options.expectedDid] {string} the account DID the log must
|
|
199
|
-
* resolve to, from the caller's stored account pointer
|
|
200
|
-
* @returns {Promise<{ did: string }>}
|
|
201
|
-
*/
|
|
202
|
-
export async function removeRecoveryKey(options) {
|
|
203
|
-
return withLogConflictRetry(() => removeRecoveryKeyOnce(options));
|
|
204
|
-
}
|
|
205
|
-
/**
|
|
206
|
-
* One attempt of {@link removeRecoveryKey}, re-invoked by the conflict retry.
|
|
207
|
-
*
|
|
208
|
-
* @param options {object} see {@link removeRecoveryKey}
|
|
143
|
+
* @param options {object} see {@link publishRecoveryKey}
|
|
209
144
|
* @returns {Promise<{ did: string }>}
|
|
210
145
|
*/
|
|
211
|
-
async function
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
const hashCommitted = published.nextKeyHashes.includes(recoveryHash);
|
|
224
|
-
if (!vmPresent && !hashCommitted) {
|
|
225
|
-
return { did };
|
|
226
|
-
}
|
|
227
|
-
const activeKey = await updateKeyMultibase({ seed: updateKeys.updateSeed });
|
|
228
|
-
if (!published.updateKeys.includes(activeKey)) {
|
|
229
|
-
throw new Error("did:webvh: the published log does not authorize this client's active " +
|
|
230
|
-
'update key; finalize the pending rotation before revoking a ' +
|
|
231
|
-
'recovery code.');
|
|
232
|
-
}
|
|
233
|
-
await assertCarryOverCommitments({ published });
|
|
234
|
-
const existingMethods = (doc.verificationMethod ?? []);
|
|
235
|
-
const signer = await updateKeySigner({ seed: updateKeys.updateSeed });
|
|
236
|
-
const updated = await updateDID({
|
|
237
|
-
log: published.log,
|
|
238
|
-
signer,
|
|
239
|
-
alsoKnownAsWeb: true,
|
|
240
|
-
updateKeys: published.updateKeys,
|
|
241
|
-
nextKeyHashes: published.nextKeyHashes.filter(hash => hash !== recoveryHash),
|
|
242
|
-
verificationMethods: existingMethods.filter(method => method.id !== vmId),
|
|
243
|
-
authentication: relationIds(doc.authentication),
|
|
244
|
-
assertionMethod: relationIds(doc.assertionMethod),
|
|
245
|
-
keyAgreement: relationIds(doc.keyAgreement).filter(id => id !== vmId),
|
|
246
|
-
capabilityInvocation: relationIds(doc.capabilityInvocation),
|
|
247
|
-
capabilityDelegation: relationIds(doc.capabilityDelegation)
|
|
146
|
+
export async function removeRecoveryKey({ idStore, updateKeys, recovery, expectedDid }) {
|
|
147
|
+
return removeUnlockKey({
|
|
148
|
+
idStore,
|
|
149
|
+
updateKeys,
|
|
150
|
+
unlockKeys: {
|
|
151
|
+
keyAgreement: {
|
|
152
|
+
publicKeyMultibase: recovery.keyAgreementKeyMultibase
|
|
153
|
+
},
|
|
154
|
+
updateKeyMultibase: recovery.updateKeyMultibase
|
|
155
|
+
},
|
|
156
|
+
...(expectedDid !== undefined ? { expectedDid } : {}),
|
|
157
|
+
verb: 'revoking a recovery code'
|
|
248
158
|
});
|
|
249
|
-
await publishUpdatedLog({ idStore, updated, ifMatch: published.etag });
|
|
250
|
-
return { did: updated.did };
|
|
251
159
|
}
|
|
252
160
|
/**
|
|
253
161
|
* RECOVERY (run by the code-derived client through the delegated `did.jsonl`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recoveryWebvh.js","sourceRoot":"","sources":["../../src/recovery/recoveryWebvh.ts"],"names":[],"mappings":"AAAA;;GAEG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AO,CAAC,GAAG,EAAE,OAAO,EAAE,SAAS,CAAC,IAAI,EAAE,CAAC,CAAA;IAC1E,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAA;AACrD,CAAC"}
|
|
@@ -19,13 +19,16 @@ import { type VerifiedResourceLog } from './verify.js';
|
|
|
19
19
|
* (also confirming any `history` dispatch hint the caller followed)
|
|
20
20
|
* @param options.pinStore {ResourceLogPinStore} this client's pin for this
|
|
21
21
|
* log
|
|
22
|
+
* @param options.logId {string} the pin-slot key for this log, from
|
|
23
|
+
* `resourceLogPinId`
|
|
22
24
|
* @returns {Promise<{ verified: VerifiedResourceLog; etag?: string } | null>}
|
|
23
25
|
*/
|
|
24
|
-
export declare function readResourceLog({ store, controller, expectedMethod, pinStore }: {
|
|
26
|
+
export declare function readResourceLog({ store, controller, expectedMethod, pinStore, logId }: {
|
|
25
27
|
store: ResourceLogStore;
|
|
26
28
|
controller: ResourceLogController;
|
|
27
29
|
expectedMethod: string;
|
|
28
30
|
pinStore: ResourceLogPinStore;
|
|
31
|
+
logId: string;
|
|
29
32
|
}): Promise<{
|
|
30
33
|
verified: VerifiedResourceLog;
|
|
31
34
|
etag?: string;
|
|
@@ -44,6 +47,8 @@ export declare function readResourceLog({ store, controller, expectedMethod, pin
|
|
|
44
47
|
* @param options.controller {ResourceLogController}
|
|
45
48
|
* @param options.expectedMethod {string}
|
|
46
49
|
* @param options.pinStore {ResourceLogPinStore}
|
|
50
|
+
* @param options.logId {string} the pin-slot key for this log, from
|
|
51
|
+
* `resourceLogPinId`
|
|
47
52
|
* @param options.signer {ResourceLogSigner}
|
|
48
53
|
* @param options.buildState {function} `(verified) => state | null` -- the
|
|
49
54
|
* full next state rebased on the verified head, or `null` when the head
|
|
@@ -54,11 +59,12 @@ export declare function readResourceLog({ store, controller, expectedMethod, pin
|
|
|
54
59
|
* @returns {Promise<VerifiedResourceLog>} the read-back, re-verified log
|
|
55
60
|
* (whether or not this call appended)
|
|
56
61
|
*/
|
|
57
|
-
export declare function appendResourceLog({ store, controller, expectedMethod, pinStore, signer, buildState, versionTime, maxAttempts }: {
|
|
62
|
+
export declare function appendResourceLog({ store, controller, expectedMethod, pinStore, logId, signer, buildState, versionTime, maxAttempts }: {
|
|
58
63
|
store: ResourceLogStore;
|
|
59
64
|
controller: ResourceLogController;
|
|
60
65
|
expectedMethod: string;
|
|
61
66
|
pinStore: ResourceLogPinStore;
|
|
67
|
+
logId: string;
|
|
62
68
|
signer: ResourceLogSigner;
|
|
63
69
|
buildState: (verified: VerifiedResourceLog) => Promise<ResourceLogEntry['state'] | null> | ResourceLogEntry['state'] | null;
|
|
64
70
|
versionTime?: string;
|
|
@@ -77,6 +83,8 @@ export declare function appendResourceLog({ store, controller, expectedMethod, p
|
|
|
77
83
|
* @param options.controller {ResourceLogController}
|
|
78
84
|
* @param options.method {string} the format identifier to declare
|
|
79
85
|
* @param options.pinStore {ResourceLogPinStore}
|
|
86
|
+
* @param options.logId {string} the pin-slot key for this log, from
|
|
87
|
+
* `resourceLogPinId`
|
|
80
88
|
* @param options.signer {ResourceLogSigner}
|
|
81
89
|
* @param options.state {ResourceLogEntry['state']} the full initial state
|
|
82
90
|
* @param [options.previousLog] {object} handover successors only
|
|
@@ -84,11 +92,12 @@ export declare function appendResourceLog({ store, controller, expectedMethod, p
|
|
|
84
92
|
* @returns {Promise<{ verified: VerifiedResourceLog; created: boolean }>}
|
|
85
93
|
* the verified log as it now stands, and whether this call created it
|
|
86
94
|
*/
|
|
87
|
-
export declare function createResourceLog({ store, controller, method, pinStore, signer, state, previousLog, versionTime }: {
|
|
95
|
+
export declare function createResourceLog({ store, controller, method, pinStore, logId, signer, state, previousLog, versionTime }: {
|
|
88
96
|
store: ResourceLogStore;
|
|
89
97
|
controller: ResourceLogController;
|
|
90
98
|
method: string;
|
|
91
99
|
pinStore: ResourceLogPinStore;
|
|
100
|
+
logId: string;
|
|
92
101
|
signer: ResourceLogSigner;
|
|
93
102
|
state: ResourceLogEntry['state'];
|
|
94
103
|
previousLog?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"append.d.ts","sourceRoot":"","sources":["../../src/resourceLog/append.ts"],"names":[],"mappings":"AAeA,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACtB,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AAE5D,OAAO,EAGL,KAAK,iBAAiB,EACvB,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AACnD,OAAO,EAAqB,KAAK,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAEzE
|
|
1
|
+
{"version":3,"file":"append.d.ts","sourceRoot":"","sources":["../../src/resourceLog/append.ts"],"names":[],"mappings":"AAeA,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACtB,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AAE5D,OAAO,EAGL,KAAK,iBAAiB,EACvB,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AACnD,OAAO,EAAqB,KAAK,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAEzE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,eAAe,CAAC,EACpC,KAAK,EACL,UAAU,EACV,cAAc,EACd,QAAQ,EACR,KAAK,EACN,EAAE;IACD,KAAK,EAAE,gBAAgB,CAAA;IACvB,UAAU,EAAE,qBAAqB,CAAA;IACjC,cAAc,EAAE,MAAM,CAAA;IACtB,QAAQ,EAAE,mBAAmB,CAAA;IAC7B,KAAK,EAAE,MAAM,CAAA;CACd,GAAG,OAAO,CAAC;IAAE,QAAQ,EAAE,mBAAmB,CAAC;IAAC,IAAI,CA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