@interop/wallet-core 0.38.1 → 0.40.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 +8 -6
- package/dist/clients/revocation.d.ts.map +1 -1
- package/dist/clients/revocation.js +5 -10
- package/dist/clients/revocation.js.map +1 -1
- package/dist/keyring/fetch.d.ts +2 -1
- package/dist/keyring/fetch.d.ts.map +1 -1
- package/dist/keyring/fetch.js +7 -2
- package/dist/keyring/fetch.js.map +1 -1
- package/dist/keyring/index.d.ts +15 -9
- package/dist/keyring/index.d.ts.map +1 -1
- package/dist/keyring/index.js +14 -8
- package/dist/keyring/index.js.map +1 -1
- package/dist/keyring/kdf.d.ts +3 -1
- package/dist/keyring/kdf.d.ts.map +1 -1
- package/dist/keyring/kdf.js +16 -2
- package/dist/keyring/kdf.js.map +1 -1
- package/dist/keyring/record.d.ts +207 -41
- package/dist/keyring/record.d.ts.map +1 -1
- package/dist/keyring/record.js +318 -32
- package/dist/keyring/record.js.map +1 -1
- package/dist/keyring/unlockSpace.d.ts +25 -0
- package/dist/keyring/unlockSpace.d.ts.map +1 -1
- package/dist/keyring/unlockSpace.js +31 -2
- package/dist/keyring/unlockSpace.js.map +1 -1
- package/dist/keys/rosterLogStore.d.ts.map +1 -1
- package/dist/keys/rosterLogStore.js +6 -1
- package/dist/keys/rosterLogStore.js.map +1 -1
- package/dist/keys/userKeyRoster.d.ts +22 -3
- package/dist/keys/userKeyRoster.d.ts.map +1 -1
- package/dist/keys/userKeyRoster.js +11 -59
- package/dist/keys/userKeyRoster.js.map +1 -1
- package/dist/recovery/index.d.ts +8 -3
- package/dist/recovery/index.d.ts.map +1 -1
- package/dist/recovery/index.js +7 -2
- package/dist/recovery/index.js.map +1 -1
- package/dist/recovery/recoveryCode.d.ts +7 -0
- package/dist/recovery/recoveryCode.d.ts.map +1 -1
- package/dist/recovery/recoveryCode.js +10 -0
- package/dist/recovery/recoveryCode.js.map +1 -1
- package/dist/recovery/recoveryRecord.d.ts +134 -43
- package/dist/recovery/recoveryRecord.d.ts.map +1 -1
- package/dist/recovery/recoveryRecord.js +226 -23
- package/dist/recovery/recoveryRecord.js.map +1 -1
- package/dist/request/index.d.ts +1 -1
- package/dist/request/index.js +1 -1
- package/dist/request/matching.d.ts +24 -5
- package/dist/request/matching.d.ts.map +1 -1
- package/dist/request/matching.js +36 -39
- package/dist/request/matching.js.map +1 -1
- package/dist/request/walletInput.d.ts.map +1 -1
- package/dist/request/walletInput.js +3 -6
- package/dist/request/walletInput.js.map +1 -1
- package/dist/resourceLog/controller.d.ts +7 -4
- package/dist/resourceLog/controller.d.ts.map +1 -1
- package/dist/resourceLog/controller.js +17 -35
- package/dist/resourceLog/controller.js.map +1 -1
- package/dist/resourceLog/index.d.ts +1 -0
- package/dist/resourceLog/index.d.ts.map +1 -1
- package/dist/resourceLog/index.js +1 -0
- package/dist/resourceLog/index.js.map +1 -1
- package/dist/resourceLog/seal.d.ts +9 -1
- package/dist/resourceLog/seal.d.ts.map +1 -1
- package/dist/resourceLog/seal.js +21 -11
- package/dist/resourceLog/seal.js.map +1 -1
- package/dist/resourceLog/verify.d.ts.map +1 -1
- package/dist/resourceLog/verify.js +26 -9
- package/dist/resourceLog/verify.js.map +1 -1
- package/dist/resourceLog/vmFragment.d.ts +33 -0
- package/dist/resourceLog/vmFragment.d.ts.map +1 -0
- package/dist/resourceLog/vmFragment.js +39 -0
- package/dist/resourceLog/vmFragment.js.map +1 -0
- package/dist/space/collections.d.ts +22 -1
- package/dist/space/collections.d.ts.map +1 -1
- package/dist/space/collections.js +40 -10
- package/dist/space/collections.js.map +1 -1
- package/dist/space/index.d.ts +3 -2
- package/dist/space/index.d.ts.map +1 -1
- package/dist/space/index.js +3 -2
- package/dist/space/index.js.map +1 -1
- package/dist/space/publicLink.d.ts +2 -0
- package/dist/space/publicLink.d.ts.map +1 -1
- package/dist/space/publicLink.js +13 -1
- package/dist/space/publicLink.js.map +1 -1
- package/dist/space/wasLink.d.ts +5 -0
- package/dist/space/wasLink.d.ts.map +1 -1
- package/dist/space/wasLink.js +7 -2
- package/dist/space/wasLink.js.map +1 -1
- package/dist/webvh/didWeb.d.ts +3 -11
- package/dist/webvh/didWeb.d.ts.map +1 -1
- package/dist/webvh/didWeb.js +5 -1
- package/dist/webvh/didWeb.js.map +1 -1
- package/dist/webvh/listClients.d.ts +3 -1
- package/dist/webvh/listClients.d.ts.map +1 -1
- package/dist/webvh/listClients.js +46 -29
- package/dist/webvh/listClients.js.map +1 -1
- package/dist/webvh/verifyLog.d.ts.map +1 -1
- package/dist/webvh/verifyLog.js +5 -1
- package/dist/webvh/verifyLog.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rosterLogStore.js","sourceRoot":"","sources":["../../src/keys/rosterLogStore.ts"],"names":[],"mappings":"AA6BA,OAAO,EACL,aAAa,EACb,mBAAmB,EAEpB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,eAAe,EACf,sBAAsB,EACtB,yBAAyB,EACzB,eAAe,EACf,iBAAiB,EAKlB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAA;AAE5E,OAAO,EAAE,8BAA8B,EAAE,CAAA;AAezC;;;;;;;;GAQG;AACH,MAAM,UAAU,yBAAyB,CACvC,KAAgC;IAEhC,OAAO,CACL,OAAQ,KAAoD,CAAC,IAAI;QACjE,UAAU,CACX,CAAA;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,0BAA0B,CAAC,EACzC,GAAG,EACH,iBAAiB,EACjB,QAAQ,EACR,MAAM,EAMP;IACC,4EAA4E;IAC5E,2EAA2E;IAC3E,oDAAoD;IACpD,IAAI,YAAY,GAA+B,IAAI,CAAA;IAEnD,SAAS,OAAO,CACd,UAAgC;QAEhC,MAAM,EAAE,OAAO,EAAE,QAAQ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U,GAAG,MAAM,iBAAiB,EAAE,CAAA;YAC5C,sEAAsE;YACtE,sEAAsE;YACtE,wEAAwE;YACxE,wEAAwE;YACxE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,eAAe,CAAC;gBACjD,KAAK,EAAE,GAAG;gBACV,UAAU;gBACV,cAAc,EAAE,mBAAmB;gBACnC,QAAQ;gBACR,MAAM;gBACN,GAAG,CAAC,YAAY,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC;aAC7D,CAAC,CAAA;YACF,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;gBACtB,YAAY,GAAG,QAAQ,CAAA;YACzB,CAAC;YACD,OAAO,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAA;QACnC,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
import type { IKeyAgreementKey } from '@interop/data-integrity-core';
|
|
51
51
|
import type { CollectionEncryption } from '@interop/was-client';
|
|
52
52
|
import { type EncryptionDescriptorStore, type RecipientPublicKey } from '@interop/was-client/edv';
|
|
53
|
-
import type
|
|
53
|
+
import { type ResourceLogSigner } from '../resourceLog/index.js';
|
|
54
54
|
import { type ICapabilityAgent } from '../webvh/zcap.js';
|
|
55
55
|
import type { UserKey } from './userKey.js';
|
|
56
56
|
/**
|
|
@@ -316,18 +316,37 @@ export interface UserKeyRosterReadResult {
|
|
|
316
316
|
* path; the result's `rotated` is then true (the user key was adopted from the
|
|
317
317
|
* roster).
|
|
318
318
|
*
|
|
319
|
+
* A caller that just performed a verified roster operation on the same store
|
|
320
|
+
* -- a rotation, or a read moments ago -- may thread that operation's
|
|
321
|
+
* descriptor in as `descriptor`, skipping this read's own fetch: provenance
|
|
322
|
+
* (step 1) is then the earlier operation's, while continuity and possession
|
|
323
|
+
* still run here. That is a within-one-operation reuse, not a cache -- a
|
|
324
|
+
* genuinely distinct acquisition reads the store and re-verifies as always.
|
|
325
|
+
*
|
|
319
326
|
* @param options {object}
|
|
320
327
|
* @param options.store {EncryptionDescriptorStore} the roster's descriptor
|
|
321
328
|
* store
|
|
329
|
+
* @param [options.descriptor] {CollectionEncryption} a descriptor a verified
|
|
330
|
+
* operation on the same store just resolved (the return of
|
|
331
|
+
* {@link rotateUserKeyRoster}); supplied, the store is not read
|
|
322
332
|
* @param [options.userKey] {UserKey} this client's cached user key, when it holds one
|
|
323
333
|
* @param options.clientKeyAgreementKey {IKeyAgreementKey} this client's own
|
|
324
334
|
* (identity) key-agreement key, unwrapping a rotated epoch
|
|
325
335
|
* @param [options.pinnedEpochId] {string} the locally pinned latest-seen
|
|
326
336
|
* roster epoch, when this client has seen the roster before
|
|
327
|
-
* @returns {Promise<UserKeyRosterReadResult | null>}
|
|
337
|
+
* @returns {Promise<UserKeyRosterReadResult | null>} `null` only on an
|
|
338
|
+
* absent roster, which a supplied `descriptor` rules out
|
|
328
339
|
*/
|
|
329
|
-
export declare function readUserKeyRoster(
|
|
340
|
+
export declare function readUserKeyRoster(options: {
|
|
330
341
|
store: EncryptionDescriptorStore;
|
|
342
|
+
descriptor: CollectionEncryption;
|
|
343
|
+
userKey?: UserKey;
|
|
344
|
+
clientKeyAgreementKey: IKeyAgreementKey;
|
|
345
|
+
pinnedEpochId?: string | null;
|
|
346
|
+
}): Promise<UserKeyRosterReadResult>;
|
|
347
|
+
export declare function readUserKeyRoster(options: {
|
|
348
|
+
store: EncryptionDescriptorStore;
|
|
349
|
+
descriptor?: CollectionEncryption;
|
|
331
350
|
userKey?: UserKey;
|
|
332
351
|
clientKeyAgreementKey: IKeyAgreementKey;
|
|
333
352
|
pinnedEpochId?: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userKeyRoster.d.ts","sourceRoot":"","sources":["../../src/keys/userKeyRoster.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;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yBAAyB,CAAA;IAChC,UAAU,CAAC,EAAE,oBAAoB,CAAA;IACjC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,qBAAqB,EAAE,gBAAgB,CAAA;IACvC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC9B,GAAG,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { addRecipient, initRecipients, ownerRecipient, removeRecipient, unwrapEpochSecret } from '@interop/was-client/edv';
|
|
2
|
+
import { vmFragmentOf } from '../resourceLog/index.js';
|
|
2
3
|
import { clientSigningKeyMultibase } from '../webvh/zcap.js';
|
|
3
4
|
/**
|
|
4
5
|
* Thrown when a served roster fails its client-side consistency checks: a
|
|
@@ -83,19 +84,6 @@ export function userKeyRosterLogSigner({ keyAgent }) {
|
|
|
83
84
|
export function rosterRecipientKid({ signingKeyMultibase, keyAgreementKeyMultibase }) {
|
|
84
85
|
return `did:key:${signingKeyMultibase}#${keyAgreementKeyMultibase}`;
|
|
85
86
|
}
|
|
86
|
-
/**
|
|
87
|
-
* The fragment after the last `#` of a key/VM id -- for the ids this roster
|
|
88
|
-
* handles (did:key KAK ids, `<did>#<multibase>` VM ids) that fragment is the
|
|
89
|
-
* key's public multibase, which is what makes kid-to-VM matching key-material
|
|
90
|
-
* equality rather than string equality across id formats.
|
|
91
|
-
*
|
|
92
|
-
* @param id {string}
|
|
93
|
-
* @returns {string | undefined}
|
|
94
|
-
*/
|
|
95
|
-
function multibaseFragmentOf(id) {
|
|
96
|
-
const hash = id.lastIndexOf('#');
|
|
97
|
-
return hash === -1 ? undefined : id.slice(hash + 1);
|
|
98
|
-
}
|
|
99
87
|
/**
|
|
100
88
|
* Builds the recipient resolver for roster rotations, backed by a locally
|
|
101
89
|
* verified did:webvh document -- the enforcement point for "the roster
|
|
@@ -128,13 +116,12 @@ export function userKeyRosterRecipientResolver({ document }) {
|
|
|
128
116
|
}
|
|
129
117
|
}
|
|
130
118
|
return async function resolveRecipientKey(kid) {
|
|
131
|
-
const fragment =
|
|
119
|
+
const fragment = vmFragmentOf(kid);
|
|
132
120
|
if (!fragment) {
|
|
133
121
|
return null;
|
|
134
122
|
}
|
|
135
123
|
const match = keyAgreementMethods.find(method => method.publicKeyMultibase === fragment ||
|
|
136
|
-
(typeof method.id === 'string' &&
|
|
137
|
-
multibaseFragmentOf(method.id) === fragment));
|
|
124
|
+
(typeof method.id === 'string' && vmFragmentOf(method.id) === fragment));
|
|
138
125
|
if (!match) {
|
|
139
126
|
// No document verification method backs this roster entry: drop it.
|
|
140
127
|
return null;
|
|
@@ -325,50 +312,15 @@ export async function convergeUserKeyRosterToDocument({ store, document, descrip
|
|
|
325
312
|
});
|
|
326
313
|
return { rotated: true, staleRecipientIds, descriptor: rotated };
|
|
327
314
|
}
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
* every epoch this read can deliver was signed onto the log by an
|
|
337
|
-
* enrolled client. (The detached `epochsSig` this step used to verify on
|
|
338
|
-
* the adopt path is retired; the entry proof covers every read.)
|
|
339
|
-
* 2. **Continuity**: the served epochs must contain the pinned latest-seen
|
|
340
|
-
* epoch, and `currentEpoch` must not precede it in the append-only list
|
|
341
|
-
* (`UserKeyRosterContinuityError` -- the rollback/replay refusal).
|
|
342
|
-
* 3. **Possession**: `currentEpoch === userKey.id` confirms the cached user key
|
|
343
|
-
* current; otherwise the current epoch was rotated by another client and
|
|
344
|
-
* this client's wrap is unwrapped with its own key-agreement key
|
|
345
|
-
* (`UserKeyRosterUnwrapError` when it holds none).
|
|
346
|
-
*
|
|
347
|
-
* A rotated read returns the fresh user key; its Ed25519 signing seed does not
|
|
348
|
-
* travel through the roster (the roster wraps the key-agreement secret
|
|
349
|
-
* alone), so the returned user key carries none.
|
|
350
|
-
*
|
|
351
|
-
* A caller with no cached user key at all -- a freshly enrolled client making
|
|
352
|
-
* its first post-enrollment read -- omits `userKey` and always takes the unwrap
|
|
353
|
-
* path; the result's `rotated` is then true (the user key was adopted from the
|
|
354
|
-
* roster).
|
|
355
|
-
*
|
|
356
|
-
* @param options {object}
|
|
357
|
-
* @param options.store {EncryptionDescriptorStore} the roster's descriptor
|
|
358
|
-
* store
|
|
359
|
-
* @param [options.userKey] {UserKey} this client's cached user key, when it holds one
|
|
360
|
-
* @param options.clientKeyAgreementKey {IKeyAgreementKey} this client's own
|
|
361
|
-
* (identity) key-agreement key, unwrapping a rotated epoch
|
|
362
|
-
* @param [options.pinnedEpochId] {string} the locally pinned latest-seen
|
|
363
|
-
* roster epoch, when this client has seen the roster before
|
|
364
|
-
* @returns {Promise<UserKeyRosterReadResult | null>}
|
|
365
|
-
*/
|
|
366
|
-
export async function readUserKeyRoster({ store, userKey, clientKeyAgreementKey, pinnedEpochId }) {
|
|
367
|
-
const current = await store.read();
|
|
368
|
-
if (current === null) {
|
|
369
|
-
return null;
|
|
315
|
+
export async function readUserKeyRoster({ store, descriptor: knownDescriptor, userKey, clientKeyAgreementKey, pinnedEpochId }) {
|
|
316
|
+
let descriptor = knownDescriptor;
|
|
317
|
+
if (!descriptor) {
|
|
318
|
+
const current = await store.read();
|
|
319
|
+
if (current === null) {
|
|
320
|
+
return null;
|
|
321
|
+
}
|
|
322
|
+
descriptor = current.descriptor;
|
|
370
323
|
}
|
|
371
|
-
const descriptor = current.descriptor;
|
|
372
324
|
const epochIds = (descriptor.epochs ?? []).map(epoch => epoch.id);
|
|
373
325
|
const currentIndex = descriptor.currentEpoch
|
|
374
326
|
? epochIds.indexOf(descriptor.currentEpoch)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userKeyRoster.js","sourceRoot":"","sources":["../../src/keys/userKeyRoster.ts"],"names":[],"mappings":"AAmDA,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,eAAe,EACf,iBAAiB,EAGlB,MAAM,yBAAyB,C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|
|
15
15
|
* - `wrapRecoveryRecord` / `unwrapRecoveryRecord` -- the keyring-record
|
|
16
16
|
* sibling carrying the account pointer plus the pre-minted
|
|
17
|
-
* PUT-on-`did.jsonl` delegation (never a seed, never a user key wrap)
|
|
17
|
+
* PUT-on-`did.jsonl` delegation (never a seed, never a user key wrap),
|
|
18
|
+
* signed into the same frame under the mixed-signer policy (the code's
|
|
19
|
+
* unlock key at issuance, an enrolled client's account key on a re-mint),
|
|
20
|
+
* with the `{ controller, pointer }` core authenticated by a MAC under a
|
|
21
|
+
* code-derived key (`computeRecoveryBinding` / `recoveryRecordBinding`),
|
|
22
|
+
* so a storage host can never redirect recovery at another account.
|
|
18
23
|
* - `publishRecoveryKey` / `removeRecoveryKey` / `recoverWebvhClient` -- the
|
|
19
24
|
* document half: issuance's split posture, revocation's removal, and the
|
|
20
25
|
* self-enrolling recovery continuation.
|
|
@@ -24,8 +29,8 @@
|
|
|
24
29
|
*/
|
|
25
30
|
export { decodeRecoveryCode, formatRecoveryCode, generateRecoveryCode, normalizeRecoveryCode, RECOVERY_CODE_BYTES, RECOVERY_KDF, RecoveryCodeInvalidError, recoveryClientFromCode } from './recoveryCode.js';
|
|
26
31
|
export type { RecoveryClient } from './recoveryCode.js';
|
|
27
|
-
export { unwrapRecoveryRecord, wrapRecoveryRecord } from './recoveryRecord.js';
|
|
28
|
-
export type { RecoveryRecordContents } from './recoveryRecord.js';
|
|
32
|
+
export { computeRecoveryBinding, RecoveryBindingError, recoveryRecordBinding, unwrapRecoveryRecord, wrapRecoveryRecord } from './recoveryRecord.js';
|
|
33
|
+
export type { RecoveryRecordContents, RecoveryRecordProofState, SignedRecoveryRecord } from './recoveryRecord.js';
|
|
29
34
|
export { publishRecoveryKey, recoverWebvhClient, RecoveryKeyNotCommittedError, recoveryVmId, removeRecoveryKey } from './recoveryWebvh.js';
|
|
30
35
|
export type { RecoveryLogStore, RecoveryPublicKeys } from './recoveryWebvh.js';
|
|
31
36
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/recovery/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/recovery/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,YAAY,EACZ,wBAAwB,EACxB,sBAAsB,EACvB,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAEvD,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EACV,sBAAsB,EACtB,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,4BAA4B,EAC5B,YAAY,EACZ,iBAAiB,EAClB,MAAM,oBAAoB,CAAA;AAC3B,YAAY,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA"}
|
package/dist/recovery/index.js
CHANGED
|
@@ -14,7 +14,12 @@
|
|
|
14
14
|
* single did:webvh update key whose hash stands pre-committed.
|
|
15
15
|
* - `wrapRecoveryRecord` / `unwrapRecoveryRecord` -- the keyring-record
|
|
16
16
|
* sibling carrying the account pointer plus the pre-minted
|
|
17
|
-
* PUT-on-`did.jsonl` delegation (never a seed, never a user key wrap)
|
|
17
|
+
* PUT-on-`did.jsonl` delegation (never a seed, never a user key wrap),
|
|
18
|
+
* signed into the same frame under the mixed-signer policy (the code's
|
|
19
|
+
* unlock key at issuance, an enrolled client's account key on a re-mint),
|
|
20
|
+
* with the `{ controller, pointer }` core authenticated by a MAC under a
|
|
21
|
+
* code-derived key (`computeRecoveryBinding` / `recoveryRecordBinding`),
|
|
22
|
+
* so a storage host can never redirect recovery at another account.
|
|
18
23
|
* - `publishRecoveryKey` / `removeRecoveryKey` / `recoverWebvhClient` -- the
|
|
19
24
|
* document half: issuance's split posture, revocation's removal, and the
|
|
20
25
|
* self-enrolling recovery continuation.
|
|
@@ -23,6 +28,6 @@
|
|
|
23
28
|
* was-client dependency graph (the same isolation pattern as `./keyring`).
|
|
24
29
|
*/
|
|
25
30
|
export { decodeRecoveryCode, formatRecoveryCode, generateRecoveryCode, normalizeRecoveryCode, RECOVERY_CODE_BYTES, RECOVERY_KDF, RecoveryCodeInvalidError, recoveryClientFromCode } from './recoveryCode.js';
|
|
26
|
-
export { unwrapRecoveryRecord, wrapRecoveryRecord } from './recoveryRecord.js';
|
|
31
|
+
export { computeRecoveryBinding, RecoveryBindingError, recoveryRecordBinding, unwrapRecoveryRecord, wrapRecoveryRecord } from './recoveryRecord.js';
|
|
27
32
|
export { publishRecoveryKey, recoverWebvhClient, RecoveryKeyNotCommittedError, recoveryVmId, removeRecoveryKey } from './recoveryWebvh.js';
|
|
28
33
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/recovery/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/recovery/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,YAAY,EACZ,wBAAwB,EACxB,sBAAsB,EACvB,MAAM,mBAAmB,CAAA;AAG1B,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,qBAAqB,CAAA;AAO5B,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,4BAA4B,EAC5B,YAAY,EACZ,iBAAiB,EAClB,MAAM,oBAAoB,CAAA"}
|
|
@@ -77,6 +77,13 @@ export interface RecoveryClient {
|
|
|
77
77
|
codeBytes: Uint8Array;
|
|
78
78
|
clientSeed: Uint8Array;
|
|
79
79
|
updateSeed: Uint8Array;
|
|
80
|
+
/**
|
|
81
|
+
* The symmetric key that MACs the recovery record's account binding
|
|
82
|
+
* (`{ controller, pointer }`): computed at issuance, verified at recovery
|
|
83
|
+
* before the pointer is trusted. Derived from the code bytes, so the
|
|
84
|
+
* storage host never holds it.
|
|
85
|
+
*/
|
|
86
|
+
bindingMacKey: Uint8Array;
|
|
80
87
|
agents: ProfileAgents;
|
|
81
88
|
clientDid: string;
|
|
82
89
|
signingKeyMultibase: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recoveryCode.d.ts","sourceRoot":"","sources":["../../src/recovery/recoveryCode.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAGlD;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,KAAK,CAAA;AAErC;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,EAAE,SAM1B,CAAA;
|
|
1
|
+
{"version":3,"file":"recoveryCode.d.ts","sourceRoot":"","sources":["../../src/recovery/recoveryCode.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAGlD;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,KAAK,CAAA;AAErC;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,EAAE,SAM1B,CAAA;AAoBD;;;;;;GAMG;AACH,qBAAa,wBAAyB,SAAQ,KAAK;gBACrC,OAAO,SAAuC;CAI3D;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAI7C;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAErE;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAE1E;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,UAAU,CAazE;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,UAAU,CAAA;IACrB,UAAU,EAAE,UAAU,CAAA;IACtB,UAAU,EAAE,UAAU,CAAA;IACtB;;;;;OAKG;IACH,aAAa,EAAE,UAAU,CAAA;IACzB,MAAM,EAAE,aAAa,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;IACjB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,wBAAwB,EAAE,MAAM,CAAA;IAChC,kBAAkB,EAAE,MAAM,CAAA;IAC1B;;;;OAIG;IACH,YAAY,EAAE,MAAM,CAAA;CACrB;AAED;;;;;;;;;GASG;AACH,wBAAsB,sBAAsB,CAAC,EAC3C,IAAI,EACL,EAAE;IACD,IAAI,EAAE,MAAM,CAAA;CACb,GAAG,OAAO,CAAC,cAAc,CAAC,CA2C1B"}
|
|
@@ -50,6 +50,14 @@ export const RECOVERY_KDF = {
|
|
|
50
50
|
const RECOVERY_CLIENT_SALT = 'freewallet/recovery/client-keys/v1';
|
|
51
51
|
const RECOVERY_CLIENT_SEED_INFO = 'client-seed';
|
|
52
52
|
const RECOVERY_UPDATE_SEED_INFO = 'update-key';
|
|
53
|
+
/**
|
|
54
|
+
* The HKDF info string for the code's account-binding MAC key, expanded
|
|
55
|
+
* under the unlock salt beside the unlock-seed expansion above. The key MACs
|
|
56
|
+
* the recovery record's `{ controller, pointer }` core at issuance, so only
|
|
57
|
+
* a holder of the code bytes -- never the storage host -- can bind a record
|
|
58
|
+
* to an account. Permanent, like every other expansion here.
|
|
59
|
+
*/
|
|
60
|
+
const RECOVERY_BINDING_MAC_INFO = 'freewallet/binding-mac';
|
|
53
61
|
/**
|
|
54
62
|
* Thrown for text that is not a well-formed recovery code (characters outside
|
|
55
63
|
* the base58 alphabet, or the wrong decoded length). Deliberately distinct
|
|
@@ -134,6 +142,7 @@ export async function recoveryClientFromCode({ code }) {
|
|
|
134
142
|
const salt = new TextEncoder().encode(RECOVERY_CLIENT_SALT);
|
|
135
143
|
const clientSeed = hkdf(sha256, codeBytes, salt, new TextEncoder().encode(RECOVERY_CLIENT_SEED_INFO), 32);
|
|
136
144
|
const updateSeed = hkdf(sha256, codeBytes, salt, new TextEncoder().encode(RECOVERY_UPDATE_SEED_INFO), 32);
|
|
145
|
+
const bindingMacKey = hkdf(sha256, codeBytes, new TextEncoder().encode(RECOVERY_KDF.salt), new TextEncoder().encode(RECOVERY_BINDING_MAC_INFO), 32);
|
|
137
146
|
const agents = await agentsFromSeed({ seed: clientSeed });
|
|
138
147
|
const { publicKeyMultibase: keyAgreementKeyMultibase } = agents.keyAgreementKey;
|
|
139
148
|
if (!keyAgreementKeyMultibase) {
|
|
@@ -144,6 +153,7 @@ export async function recoveryClientFromCode({ code }) {
|
|
|
144
153
|
codeBytes,
|
|
145
154
|
clientSeed,
|
|
146
155
|
updateSeed,
|
|
156
|
+
bindingMacKey,
|
|
147
157
|
agents,
|
|
148
158
|
clientDid: agents.keyAgent.id,
|
|
149
159
|
signingKeyMultibase: signingKeyMultibase,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recoveryCode.js","sourceRoot":"","sources":["../../src/recovery/recoveryCode.ts"],"names":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CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAC/D,OAAO;QACL,SAAS;QACT,UAAU;QACV,UAAU;QACV,aAAa;QACb,MAAM;QACN,SAAS,EAAE,MAAM,CAAC,QAAQ,CAAC,EAAE;QAC7B,mBAAmB,EAAE,mBAAoB;QACzC,wBAAwB;QACxB,kBAAkB,EAAE,MAAM,kBAAkB,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;QAClE,YAAY,EAAE,GAAG,MAAM,CAAC,QAAQ,CAAC,EAAE,IAAI,wBAAwB,EAAE;KAClE,CAAA;AACH,CAAC"}
|
|
@@ -1,80 +1,171 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*/
|
|
1
|
+
import type { IKeyAgreementKey, IKeyResolver, IZcap } from '@interop/data-integrity-core';
|
|
2
|
+
import type { AccountPointer, RecordSigner, SignedRecord } from '../keyring/record.js';
|
|
4
3
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* pointer
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* a pure pointer.
|
|
13
|
-
*
|
|
14
|
-
* The wrap reuses the keyring record construction verbatim (cipher context and
|
|
15
|
-
* record-own epoch alike), so a recovery record IS a keyring record to every
|
|
16
|
-
* generic consumer (an ordinary `unwrapKeyringRecord` recovers its pointer and
|
|
17
|
-
* ignores the extra member) -- only the recovery flow demands the delegation.
|
|
4
|
+
* A recovery record's account binding is absent, malformed, or does not
|
|
5
|
+
* verify under the typed code's binding MAC key. Its own class, distinct from
|
|
6
|
+
* a proof or decrypt failure: this is the refusal that says the record's
|
|
7
|
+
* `{ controller, pointer }` core was not written by a holder of this code --
|
|
8
|
+
* a forged record redirecting recovery at another account, or a record from
|
|
9
|
+
* before the account moved hosts (either way the code cannot recover here
|
|
10
|
+
* and must be re-issued).
|
|
18
11
|
*/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
export declare class RecoveryBindingError extends Error {
|
|
13
|
+
constructor(message: string);
|
|
14
|
+
}
|
|
22
15
|
/**
|
|
23
|
-
* The unwrapped contents of a recovery keyring record: the
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* without a Space).
|
|
16
|
+
* The unwrapped contents of a recovery keyring record: the code-authenticated
|
|
17
|
+
* account binding (controller + pointer) plus the delegation and bind
|
|
18
|
+
* timestamp. `pointer` is required -- a recovery record exists only on WAS
|
|
19
|
+
* deployments (there is nothing to recover toward without a Space).
|
|
27
20
|
*/
|
|
28
21
|
export interface RecoveryRecordContents {
|
|
29
22
|
controller: string;
|
|
30
|
-
email?: string;
|
|
31
23
|
pointer: AccountPointer;
|
|
32
24
|
delegation: IZcap;
|
|
25
|
+
createdAt: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* A stored recovery record: the shared signed frame plus the account-binding
|
|
29
|
+
* tag the frame proof also covers.
|
|
30
|
+
*/
|
|
31
|
+
export interface SignedRecoveryRecord extends SignedRecord {
|
|
32
|
+
binding: string;
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* Where a recovery record's proof stands after the unwrap: `'verified'` when
|
|
36
|
+
* the code-derived unlock key signed it (checked before decryption), or a
|
|
37
|
+
* pending marker naming the signer the caller must still check against the
|
|
38
|
+
* account's verified did:webvh document -- the re-mint case, where an enrolled
|
|
39
|
+
* client signed on the code's behalf. The pending case is a value the caller
|
|
40
|
+
* cannot ignore by accident: the shell is not trustworthy until
|
|
41
|
+
* `verifyRecordProof` is run against the document-listed keys. The account
|
|
42
|
+
* the document belongs to is the one the code-authenticated pointer names --
|
|
43
|
+
* the binding is verified either way, so the pending state defers the shell's
|
|
44
|
+
* authenticity only, never the account identity.
|
|
45
|
+
*/
|
|
46
|
+
export type RecoveryRecordProofState = 'verified' | {
|
|
47
|
+
pending: {
|
|
48
|
+
verificationMethod: string;
|
|
49
|
+
keyMultibase: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Computes the account-binding tag: HMAC-SHA-256 over the binding values
|
|
54
|
+
* under the code-derived binding MAC key, base64url (no pad). Issuance calls
|
|
55
|
+
* it to stamp the record; recovery recomputes it to verify.
|
|
56
|
+
*
|
|
57
|
+
* @param options {object}
|
|
58
|
+
* @param options.bindingMacKey {Uint8Array} the code-derived MAC key
|
|
59
|
+
* @param options.controller {string} the account did:key
|
|
60
|
+
* @param options.pointer {AccountPointer} the account pointer
|
|
61
|
+
* @returns {string}
|
|
62
|
+
*/
|
|
63
|
+
export declare function computeRecoveryBinding({ bindingMacKey, controller, pointer }: {
|
|
64
|
+
bindingMacKey: Uint8Array;
|
|
65
|
+
controller: string;
|
|
66
|
+
pointer: AccountPointer;
|
|
67
|
+
}): string;
|
|
68
|
+
/**
|
|
69
|
+
* Reads the `binding` frame member off a stored recovery record without
|
|
70
|
+
* decrypting anything. The re-mint path uses it to carry the tag forward
|
|
71
|
+
* verbatim -- it cannot recompute the tag (no code bytes) and does not need
|
|
72
|
+
* to. Refuses a record with no binding: such a record predates the
|
|
73
|
+
* code-authenticated core and cannot be re-minted -- its code must be
|
|
74
|
+
* re-issued.
|
|
75
|
+
*
|
|
76
|
+
* @param options {object}
|
|
77
|
+
* @param options.record {unknown} the stored record envelope
|
|
78
|
+
* @returns {string}
|
|
79
|
+
*/
|
|
80
|
+
export declare function recoveryRecordBinding({ record }: {
|
|
81
|
+
record: unknown;
|
|
82
|
+
}): string;
|
|
83
|
+
/**
|
|
84
|
+
* Wraps the recovery record: controller, pointer, and the pre-minted
|
|
36
85
|
* `did.jsonl` PUT delegation, encrypted under the code's unlock KAK via the
|
|
37
|
-
* keyring EDV cipher context
|
|
86
|
+
* keyring EDV cipher context, then signed into the same frame the keyring
|
|
87
|
+
* record uses -- with the account-binding tag as one more frame member the
|
|
88
|
+
* proof covers. Issuance passes the code-derived `bindingMacKey` (the tag is
|
|
89
|
+
* computed here) and the code-derived unlock signer; the revocation cascade's
|
|
90
|
+
* re-mint path passes the standing record's `binding` verbatim and an
|
|
91
|
+
* enrolled client's account signer (see this module's header for the policy
|
|
92
|
+
* the reader applies to the two). Exactly one of the two binding inputs must
|
|
93
|
+
* be given.
|
|
38
94
|
*
|
|
39
95
|
* @param options {object}
|
|
40
96
|
* @param options.controller {string} the account did:key
|
|
41
|
-
* @param [options.email] {string} the account email, when known
|
|
42
97
|
* @param options.pointer {AccountPointer} the account pointer
|
|
43
98
|
* @param options.delegation {IZcap} the PUT-on-`did.jsonl` delegation to the
|
|
44
99
|
* code-derived signing DID
|
|
45
100
|
* @param options.keyAgreementKey {IKeyAgreementKey} the code's unlock KAK
|
|
46
101
|
* @param options.keyResolver {IKeyResolver}
|
|
47
|
-
* @
|
|
48
|
-
*
|
|
102
|
+
* @param options.signer {RecordSigner} the signing key: the code's unlock
|
|
103
|
+
* key at issuance, an enrolled client's account key on a re-mint
|
|
104
|
+
* @param [options.bindingMacKey] {Uint8Array} the code-derived binding MAC
|
|
105
|
+
* key -- the issuance path, which computes the tag
|
|
106
|
+
* @param [options.binding] {string} the standing record's tag, carried
|
|
107
|
+
* forward verbatim -- the re-mint path, which cannot recompute it
|
|
108
|
+
* @param [options.createdAt] {string} the bind timestamp to stamp, as an ISO
|
|
109
|
+
* string; defaults to now. Supplied by a caller that pins record freshness.
|
|
110
|
+
* @returns {Promise<SignedRecoveryRecord>}
|
|
49
111
|
*/
|
|
50
|
-
export declare function wrapRecoveryRecord({ controller,
|
|
112
|
+
export declare function wrapRecoveryRecord({ controller, pointer, delegation, keyAgreementKey, keyResolver, signer, bindingMacKey, binding, createdAt }: {
|
|
51
113
|
controller: string;
|
|
52
|
-
email?: string;
|
|
53
114
|
pointer: AccountPointer;
|
|
54
115
|
delegation: IZcap;
|
|
55
116
|
keyAgreementKey: IKeyAgreementKey;
|
|
56
117
|
keyResolver: IKeyResolver;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}>;
|
|
118
|
+
signer: RecordSigner;
|
|
119
|
+
bindingMacKey?: Uint8Array;
|
|
120
|
+
binding?: string;
|
|
121
|
+
createdAt?: string;
|
|
122
|
+
}): Promise<SignedRecoveryRecord>;
|
|
62
123
|
/**
|
|
63
124
|
* Unwraps and validates a recovery record: the ordinary keyring-record checks
|
|
64
|
-
* plus the required pointer and
|
|
65
|
-
* not a recovery record (an ordinary keyring record
|
|
66
|
-
* unlock Space would mean a corrupted issuance) and is
|
|
125
|
+
* plus the required pointer, delegation, and account binding. A record
|
|
126
|
+
* without a delegation is not a recovery record (an ordinary keyring record
|
|
127
|
+
* found under a code's unlock Space would mean a corrupted issuance) and is
|
|
128
|
+
* refused.
|
|
129
|
+
*
|
|
130
|
+
* The account binding is verified before the contents are returned: the
|
|
131
|
+
* decrypted `{ controller, pointer }` must carry the tag the code-derived
|
|
132
|
+
* MAC key computes over them, or the record is refused as forged
|
|
133
|
+
* ({@link RecoveryBindingError}) -- the check that closes the host-forgery
|
|
134
|
+
* redirect, since the host never holds the MAC key. Nothing downstream may
|
|
135
|
+
* trust the pointer before this returns.
|
|
136
|
+
*
|
|
137
|
+
* Proof verification is mixed-signer and ordered deliberately. A proof by the
|
|
138
|
+
* code's own unlock key is verified BEFORE decryption -- the strong path,
|
|
139
|
+
* where the typed code alone establishes what may have signed the record. A
|
|
140
|
+
* proof by any other key can only be checked after decryption, because the
|
|
141
|
+
* re-minting client is knowable only once the code-authenticated pointer says
|
|
142
|
+
* which account this is and that account's log has been verified; the
|
|
143
|
+
* contents come back with a pending proof state naming the signer, and the
|
|
144
|
+
* caller completes the check with {@link verifyRecordProof} against the
|
|
145
|
+
* document's keys. That second phase is what makes an unexpected signer
|
|
146
|
+
* refuse: a record whose proof belongs to neither class ends in a
|
|
147
|
+
* `RecordProofError` there.
|
|
67
148
|
*
|
|
68
149
|
* @param options {object}
|
|
69
150
|
* @param options.record {unknown} the stored `{ version, encryption,
|
|
70
|
-
* wrapped }` envelope
|
|
151
|
+
* wrapped, binding, proof }` envelope
|
|
71
152
|
* @param options.keyAgreementKey {IKeyAgreementKey} the code's unlock KAK
|
|
72
153
|
* @param options.keyResolver {IKeyResolver}
|
|
73
|
-
* @
|
|
154
|
+
* @param options.expectedKeyMultibase {string} the code-derived unlock
|
|
155
|
+
* signing key's multibase
|
|
156
|
+
* @param options.bindingMacKey {Uint8Array} the code-derived binding MAC
|
|
157
|
+
* key the record's account binding must verify under
|
|
158
|
+
* @returns {Promise<{ contents: RecoveryRecordContents,
|
|
159
|
+
* proofState: RecoveryRecordProofState }>}
|
|
74
160
|
*/
|
|
75
|
-
export declare function unwrapRecoveryRecord({ record, keyAgreementKey, keyResolver }: {
|
|
161
|
+
export declare function unwrapRecoveryRecord({ record, keyAgreementKey, keyResolver, expectedKeyMultibase, bindingMacKey }: {
|
|
76
162
|
record: unknown;
|
|
77
163
|
keyAgreementKey: IKeyAgreementKey;
|
|
78
164
|
keyResolver: IKeyResolver;
|
|
79
|
-
|
|
165
|
+
expectedKeyMultibase: string;
|
|
166
|
+
bindingMacKey: Uint8Array;
|
|
167
|
+
}): Promise<{
|
|
168
|
+
contents: RecoveryRecordContents;
|
|
169
|
+
proofState: RecoveryRecordProofState;
|
|
170
|
+
}>;
|
|
80
171
|
//# sourceMappingURL=recoveryRecord.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recoveryRecord.d.ts","sourceRoot":"","sources":["../../src/recovery/recoveryRecord.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"recoveryRecord.d.ts","sourceRoot":"","sources":["../../src/recovery/recoveryRecord.ts"],"names":[],"mappings":"AA+CA,OAAO,KAAK,EACV,gBAAgB,EAChB,YAAY,EACZ,KAAK,EACN,MAAM,8BAA8B,CAAA;AAarC,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EACZ,YAAY,EACb,MAAM,sBAAsB,CAAA;AAQ7B;;;;;;;;GA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