@interop/wallet-core 0.61.0 → 0.62.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/dist/clientAnnex/forgetLast.d.ts +66 -19
- package/dist/clientAnnex/forgetLast.d.ts.map +1 -1
- package/dist/clientAnnex/forgetLast.js +120 -38
- package/dist/clientAnnex/forgetLast.js.map +1 -1
- package/dist/clientAnnex/heal.d.ts +64 -29
- package/dist/clientAnnex/heal.d.ts.map +1 -1
- package/dist/clientAnnex/heal.js +287 -50
- package/dist/clientAnnex/heal.js.map +1 -1
- package/dist/clientAnnex/index.d.ts +2 -2
- package/dist/clientAnnex/index.d.ts.map +1 -1
- package/dist/clientAnnex/index.js +2 -2
- package/dist/clientAnnex/index.js.map +1 -1
- package/dist/clientAnnex/ladder.d.ts +246 -18
- package/dist/clientAnnex/ladder.d.ts.map +1 -1
- package/dist/clientAnnex/ladder.js +742 -53
- package/dist/clientAnnex/ladder.js.map +1 -1
- package/dist/clientAnnex/ladderAnchored.d.ts +113 -6
- package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -1
- package/dist/clientAnnex/ladderAnchored.js +208 -27
- package/dist/clientAnnex/ladderAnchored.js.map +1 -1
- package/dist/clientAnnex/log.d.ts +37 -1
- package/dist/clientAnnex/log.d.ts.map +1 -1
- package/dist/clientAnnex/log.js +34 -10
- package/dist/clientAnnex/log.js.map +1 -1
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts +32 -7
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts.map +1 -1
- package/dist/clientAnnex/recoveryLadderAnchored.js +124 -23
- package/dist/clientAnnex/recoveryLadderAnchored.js.map +1 -1
- package/dist/clientAnnex/zcap.js +2 -2
- package/dist/clientAnnex/zcap.js.map +1 -1
- package/dist/identity/agents.js +2 -2
- package/dist/identity/agents.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/userKeyRoster.d.ts +32 -2
- package/dist/keys/userKeyRoster.d.ts.map +1 -1
- package/dist/keys/userKeyRoster.js +40 -2
- package/dist/keys/userKeyRoster.js.map +1 -1
- package/dist/recovery/recoveryDelegation.d.ts +4 -1
- package/dist/recovery/recoveryDelegation.d.ts.map +1 -1
- package/dist/recovery/recoveryDelegation.js +4 -2
- package/dist/recovery/recoveryDelegation.js.map +1 -1
- package/dist/recovery/recoveryWebvh.d.ts +42 -2
- package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
- package/dist/recovery/recoveryWebvh.js +160 -18
- package/dist/recovery/recoveryWebvh.js.map +1 -1
- package/dist/unlock/index.d.ts +2 -2
- package/dist/unlock/index.d.ts.map +1 -1
- package/dist/unlock/index.js +1 -1
- package/dist/unlock/index.js.map +1 -1
- package/dist/unlock/retire.d.ts +62 -9
- package/dist/unlock/retire.d.ts.map +1 -1
- package/dist/unlock/retire.js +59 -5
- package/dist/unlock/retire.js.map +1 -1
- package/dist/unlock/standingWebvh.d.ts +131 -21
- package/dist/unlock/standingWebvh.d.ts.map +1 -1
- package/dist/unlock/standingWebvh.js +239 -54
- package/dist/unlock/standingWebvh.js.map +1 -1
- package/dist/webvh/didWebvh.d.ts +3 -2
- package/dist/webvh/didWebvh.d.ts.map +1 -1
- package/dist/webvh/didWebvh.js +7 -5
- package/dist/webvh/didWebvh.js.map +1 -1
- package/dist/webvh/index.d.ts +2 -2
- package/dist/webvh/index.d.ts.map +1 -1
- package/dist/webvh/index.js +1 -1
- package/dist/webvh/index.js.map +1 -1
- package/dist/webvh/keyAgreement.d.ts +25 -0
- package/dist/webvh/keyAgreement.d.ts.map +1 -1
- package/dist/webvh/keyAgreement.js +24 -0
- package/dist/webvh/keyAgreement.js.map +1 -1
- package/dist/webvh/listClients.d.ts +7 -5
- package/dist/webvh/listClients.d.ts.map +1 -1
- package/dist/webvh/listClients.js +7 -5
- package/dist/webvh/listClients.js.map +1 -1
- package/dist/webvh/revokeClient.d.ts +48 -0
- package/dist/webvh/revokeClient.d.ts.map +1 -1
- package/dist/webvh/revokeClient.js +85 -1
- package/dist/webvh/revokeClient.js.map +1 -1
- package/dist/webvh/zcap.js +3 -3
- package/dist/webvh/zcap.js.map +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retire.js","sourceRoot":"","sources":["../../src/unlock/retire.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"retire.js","sourceRoot":"","sources":["../../src/unlock/retire.ts"],"names":[],"mappings":"AAiGA,OAAO,EACL,gCAAgC,EAKjC,MAAM,kBAAkB,CAAA;AAGzB,OAAO,EACL,8BAA8B,EAC9B,cAAc,EACd,eAAe,EAGhB,MAAM,oBAAoB,CAAA;AAwC3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,EAC3C,OAAO,EACP,UAAU,EACV,UAAU,EACV,UAAU,EACV,WAAW,EACX,QAAQ,EACR,KAAK,EACL,IAAI,EACJ,WAAW,EACX,OAAO,EACP,qBAAqB,EACrB,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,sBAAsB,EACtB,0BAA0B,EAC1B,iBAAiB,EA4BlB;IACC,2EAA2E;IAC3E,yEAAyE;IACzE,2EAA2E;IAC3E,wEAAwE;IACxE,0EAA0E;IAC1E,wEAAwE;IACxE,4CAA4C;IAC5C,MAAM,MAAM,GAAG;QACb,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACjC,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC1C,CAAA;IACD,IAAI,gBAAyB,CAAA;IAC7B,IAAI,mBAAyC,CAAA;IAC7C,I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AAC;IAED,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;QACjB,MAAM,iBAAiB,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAA;IACtD,CAAC;IAED,OAAO;QACL,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,QAAQ;QACR,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3D,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,QAAQ,EAAE,GAAG;QACb,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;QACvC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACvC,GAAG,CAAC,sBAAsB,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACxD,CAAA;AACH,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { DIDDoc, DIDLog, VerificationMethod } from '@interop/did-method-webvh';
|
|
2
2
|
import type { ClientWebvhUpdateKeys, PublishedWebvhLog, WebvhIdStore } from '../webvh/didWebvh.js';
|
|
3
3
|
import type { ResourceLogPinStore } from '@interop/vh-resource-log';
|
|
4
|
+
import { type LadderStandingInventory } from '../clientAnnex/ladder.js';
|
|
4
5
|
/**
|
|
5
6
|
* The narrow store seam the self-enrolling and delegated-bridge ceremonies
|
|
6
7
|
* write through: a public read of the log and the delegated `did.jsonl` PUT.
|
|
@@ -8,6 +9,41 @@ import type { ResourceLogPinStore } from '@interop/vh-resource-log';
|
|
|
8
9
|
* it too.
|
|
9
10
|
*/
|
|
10
11
|
export type UnlockLogStore = Pick<WebvhIdStore, 'getIdResourceRaw' | 'putIdResource'>;
|
|
12
|
+
/**
|
|
13
|
+
* The ladder inventory the removal edit resolved from the log diverges from
|
|
14
|
+
* what the caller was told one read earlier. A ceremony that names its
|
|
15
|
+
* expected ladder VM ids (the retirement's stage 0, which hands the same list
|
|
16
|
+
* to the dependent-record re-mint pass) gets this refusal BEFORE the edit is
|
|
17
|
+
* published, so a concurrent ceremony -- or a host serving different log
|
|
18
|
+
* versions to the two reads -- cannot make the strike diverge from what the
|
|
19
|
+
* re-mint pass acted on. Nothing is written. Matched on `name` (the error
|
|
20
|
+
* crosses app-injected seams that may resolve to another copy of this
|
|
21
|
+
* package).
|
|
22
|
+
*/
|
|
23
|
+
export declare class LadderInventoryDriftError extends Error {
|
|
24
|
+
readonly expected: string[];
|
|
25
|
+
readonly attributed: string[];
|
|
26
|
+
constructor({ expected, attributed }: {
|
|
27
|
+
expected: string[];
|
|
28
|
+
attributed: string[];
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* What the removal edit says about ladder VMs: `struck`, the ids this entry
|
|
33
|
+
* removed from the document, and `unclaimed`, the ladder VMs still standing
|
|
34
|
+
* afterwards that this credential's attribution could not claim.
|
|
35
|
+
*
|
|
36
|
+
* `unclaimed` is information rather than a gate, and the caller cannot read
|
|
37
|
+
* an orphan out of it by subtraction alone: a VM standing here may perfectly
|
|
38
|
+
* well be a SIBLING credential's, which this ladder has no business claiming.
|
|
39
|
+
* What it does catch is the seedless strike whose attribution claims nothing
|
|
40
|
+
* -- a retirement that returns clean while the credential's VM stands on --
|
|
41
|
+
* which would otherwise be reported as a completed removal.
|
|
42
|
+
*/
|
|
43
|
+
export interface LadderVmRemovalReport {
|
|
44
|
+
struck: string[];
|
|
45
|
+
unclaimed: string[];
|
|
46
|
+
}
|
|
11
47
|
/**
|
|
12
48
|
* How a credential's key-agreement key is published in the document: the key
|
|
13
49
|
* verbatim (a high-entropy credential -- passkey PRF, recovery code), or its
|
|
@@ -44,6 +80,33 @@ export declare function unlockKeyVmId({ did, keyAgreement }: {
|
|
|
44
80
|
did: string;
|
|
45
81
|
keyAgreement: UnlockKeyAgreementPublication;
|
|
46
82
|
}): string;
|
|
83
|
+
/**
|
|
84
|
+
* What of a standing credential's ladder currently stands in the published
|
|
85
|
+
* log, resolved with the recorded update key as ANCHOR and the credential's
|
|
86
|
+
* own key-agreement id as the attribution's second arm. The removal edit uses
|
|
87
|
+
* it to know what to strike; the retirement ceremony uses it one stage
|
|
88
|
+
* earlier, to name the ladder VM it is about to strike to the pass that
|
|
89
|
+
* re-mints whatever that VM signed for other credentials.
|
|
90
|
+
*
|
|
91
|
+
* It lives here rather than in the ceremony because this module is the one
|
|
92
|
+
* base-side holder of the annex attribution helpers (the pinned lint
|
|
93
|
+
* exception).
|
|
94
|
+
*
|
|
95
|
+
* @param options {object}
|
|
96
|
+
* @param options.log {DIDLog} a resolved, caller-verified log
|
|
97
|
+
* @param options.did {string} the account DID the log resolves to
|
|
98
|
+
* @param options.unlockKeys {StandingUnlockKeys} the credential's recorded
|
|
99
|
+
* public inventory
|
|
100
|
+
* @param [options.ladderSeed] {Uint8Array} the credential's ladder seed,
|
|
101
|
+
* when the ceremony holds it
|
|
102
|
+
* @returns {Promise<LadderStandingInventory>}
|
|
103
|
+
*/
|
|
104
|
+
export declare function attributeUnlockLadderInventory({ log, did, unlockKeys, ladderSeed }: {
|
|
105
|
+
log: DIDLog;
|
|
106
|
+
did: string;
|
|
107
|
+
unlockKeys: StandingUnlockKeys;
|
|
108
|
+
ladderSeed?: Uint8Array;
|
|
109
|
+
}): Promise<LadderStandingInventory>;
|
|
47
110
|
/**
|
|
48
111
|
* The credential's `keyAgreement` verification method: an ordinary unmarked
|
|
49
112
|
* entry carrying either the key verbatim (a `Multikey` with
|
|
@@ -88,12 +151,25 @@ export declare function readLogOrThrow({ store, expectedDid, pinStore, logId }:
|
|
|
88
151
|
/**
|
|
89
152
|
* BIND (run by an enrolled client, root authority): publishes a standing
|
|
90
153
|
* credential's split configuration into the document -- one entry adding the
|
|
91
|
-
* credential's `keyAgreement` entry (verbatim or commitment)
|
|
92
|
-
*
|
|
93
|
-
* `
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
154
|
+
* credential's `keyAgreement` entry (verbatim or commitment), committing its
|
|
155
|
+
* current update key's hash in `nextKeyHashes`, and installing its LADDER VM
|
|
156
|
+
* under `assertionMethod` and `capabilityDelegation`, and under no other
|
|
157
|
+
* relation -- the asymmetry that recognizes it. The update key joins `updateKeys` nowhere.
|
|
158
|
+
* One entry for the whole inventory: a separate install would open a window
|
|
159
|
+
* in which the credential stands without the key it signs with.
|
|
160
|
+
*
|
|
161
|
+
* The ladder seed is the CALLER's to mint and to have already written
|
|
162
|
+
* durably. This function never mints one, so a torn bind's re-run tests
|
|
163
|
+
* idempotence against the SAME seed, finds the completed stage and publishes
|
|
164
|
+
* nothing -- where a mint-when-absent would publish a second VM that no
|
|
165
|
+
* anchored attribution could later strike. A credential with no ladder at all
|
|
166
|
+
* (a recovery code, whose inventory is one key-agreement method and one
|
|
167
|
+
* update key) passes `null` and gets no VM.
|
|
168
|
+
*
|
|
169
|
+
* Idempotent: an inventory already published is a no-op, so re-running a torn
|
|
170
|
+
* bind converges. The entry publishes conditionally on the log this call
|
|
171
|
+
* read; a race lost to a concurrent ceremony re-runs and rebases on the new
|
|
172
|
+
* head.
|
|
97
173
|
*
|
|
98
174
|
* @param options {object}
|
|
99
175
|
* @param options.idStore {WebvhIdStore}
|
|
@@ -101,6 +177,9 @@ export declare function readLogOrThrow({ store, expectedDid, pinStore, logId }:
|
|
|
101
177
|
* did:webvh update-key seeds
|
|
102
178
|
* @param options.unlockKeys {StandingUnlockKeys} the credential's public
|
|
103
179
|
* inventory
|
|
180
|
+
* @param options.ladderSeed {Uint8Array | null} the credential's ladder
|
|
181
|
+
* seed, whose VM this entry installs; `null` for a credential that carries
|
|
182
|
+
* no ladder
|
|
104
183
|
* @param [options.expectedDid] {string} the account DID the log must resolve
|
|
105
184
|
* to, from the caller's stored account pointer
|
|
106
185
|
* @param [options.pinStore] {ResourceLogPinStore} the caller's chain-head
|
|
@@ -120,6 +199,7 @@ export declare function publishUnlockKey(options: {
|
|
|
120
199
|
idStore: WebvhIdStore;
|
|
121
200
|
updateKeys: ClientWebvhUpdateKeys;
|
|
122
201
|
unlockKeys: StandingUnlockKeys;
|
|
202
|
+
ladderSeed: Uint8Array | null;
|
|
123
203
|
expectedDid?: string;
|
|
124
204
|
pinStore?: ResourceLogPinStore;
|
|
125
205
|
logId?: string;
|
|
@@ -146,31 +226,60 @@ export declare function publishUnlockKey(options: {
|
|
|
146
226
|
* rung key still sitting in `updateKeys` (plus the never-claimed hashes its
|
|
147
227
|
* reveal entry committed). Trusting the recorded multibase alone would leave
|
|
148
228
|
* the live rung commitment standing: a latent re-seizure credential via the
|
|
149
|
-
* reveal mechanism.
|
|
150
|
-
*
|
|
151
|
-
*
|
|
229
|
+
* reveal mechanism. The seedless walk recovers the rungs BEHIND the anchor
|
|
230
|
+
* too, reading the log's positional rules backwards, so an anchor advanced by
|
|
231
|
+
* a self-enrollment resolves the same inventory a bind-time anchor does
|
|
232
|
+
* wherever each rung's hash was committed by an entry that also revealed the
|
|
233
|
+
* previous rung, or by a handover. One reachable shape falls outside that: a
|
|
234
|
+
* ladder VM the last-client transition reinstalled, whose acting rung a later
|
|
235
|
+
* self-enrollment then spends. That reveal-and-commit entry authorizes no key,
|
|
236
|
+
* so the backward walk cannot name the rung that signed it, and the VM stays
|
|
237
|
+
* standing as `unclaimed` (WC-158). A supplied `ladderSeed` is then a shortcut
|
|
238
|
+
* and a cross-check rather than a requirement (every rung known outright, no
|
|
239
|
+
* backward walk). For a
|
|
240
|
+
* single-key credential (a
|
|
152
241
|
* recovery code, a never-self-enrolled bind) the resolution degenerates to
|
|
153
242
|
* exactly the recorded key's hash, as before.
|
|
154
243
|
*
|
|
155
|
-
* The
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
*
|
|
244
|
+
* The credential's LADDER VM goes in the same entry, so a retired credential
|
|
245
|
+
* no longer signs governed-log appends or account delegations. This is the
|
|
246
|
+
* sole remover, and it needs no seed to do it: the VM is attributed from the
|
|
247
|
+
* log on any of three arms ({@link attributeLadderInventory}). The SIGNER
|
|
248
|
+
* arm claims a VM whose publishing entry a ladder rung signed. The
|
|
249
|
+
* CO-INTRODUCTION arm claims one whose publishing entry also introduced this
|
|
250
|
+
* credential's own `keyAgreement` member, which is what reaches a bind entry
|
|
251
|
+
* an enrolled client signed; it fires only when that entry introduced exactly
|
|
252
|
+
* one credential-class key-agreement member and exactly one ladder VM. The
|
|
253
|
+
* COMMITMENT arm claims one whose publishing entry committed a hash this
|
|
254
|
+
* ladder knows a priori and introduced no other credential's member, which is
|
|
255
|
+
* what reaches a reinstall for a credential whose member already stands. A VM
|
|
256
|
+
* no arm claims is left standing rather than struck -- on an account
|
|
257
|
+
* with several standing credentials, striking an unattributed key would take
|
|
258
|
+
* out a survivor's. With the seed in hand the derived id is struck too, and
|
|
259
|
+
* an attribution naming any OTHER VM refuses with
|
|
260
|
+
* {@link LadderAttributionError} rather than acting on a ladder the seed and
|
|
261
|
+
* the recorded anchor disagree about.
|
|
163
262
|
*
|
|
164
|
-
* @param options {object} see {@link publishUnlockKey}, plus
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
263
|
+
* @param options {object} see {@link publishUnlockKey}, plus:
|
|
264
|
+
* @param [options.ladderSeed] {Uint8Array} the retired credential's ladder
|
|
265
|
+
* seed, when in hand
|
|
266
|
+
* @param [options.expectedLadderVmIds] {string[]} the ladder VM ids the
|
|
267
|
+
* caller already resolved for this credential, from its own read of the
|
|
268
|
+
* log. Supplied, this edit's own attribution must match them as a set --
|
|
269
|
+
* after the seed cross-check above -- or the edit refuses with
|
|
270
|
+
* {@link LadderInventoryDriftError} before writing anything. That is what
|
|
271
|
+
* ties the retirement's stage-0 read (whose list the dependent-record
|
|
272
|
+
* re-mint pass acted on) to this one, which is otherwise independent
|
|
273
|
+
* @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog, ladderVm:
|
|
274
|
+
* LadderVmRemovalReport }>} see {@link publishUnlockKey}, plus the ladder
|
|
275
|
+
* VM report: what this entry struck, and what stands unclaimed after it
|
|
168
276
|
*/
|
|
169
277
|
export declare function removeUnlockKey(options: {
|
|
170
278
|
idStore: WebvhIdStore;
|
|
171
279
|
updateKeys: ClientWebvhUpdateKeys;
|
|
172
280
|
unlockKeys: StandingUnlockKeys;
|
|
173
281
|
ladderSeed?: Uint8Array;
|
|
282
|
+
expectedLadderVmIds?: string[];
|
|
174
283
|
expectedDid?: string;
|
|
175
284
|
pinStore?: ResourceLogPinStore;
|
|
176
285
|
logId?: string;
|
|
@@ -179,5 +288,6 @@ export declare function removeUnlockKey(options: {
|
|
|
179
288
|
did: string;
|
|
180
289
|
doc: DIDDoc;
|
|
181
290
|
log: DIDLog;
|
|
291
|
+
ladderVm: LadderVmRemovalReport;
|
|
182
292
|
}>;
|
|
183
293
|
//# sourceMappingURL=standingWebvh.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standingWebvh.d.ts","sourceRoot":"","sources":["../../src/unlock/standingWebvh.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"standingWebvh.d.ts","sourceRoot":"","sources":["../../src/unlock/standingWebvh.ts"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EACV,MAAM,EACN,MAAM,EACN,kBAAkB,EACnB,MAAM,2BAA2B,CAAA;AAclC,OAAO,KAAK,EACV,qBAAqB,EACrB,iBAAiB,EACjB,YAAY,EACb,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAMnE,OAAO,EAIL,KAAK,uBAAuB,EAC7B,MAAM,0BAA0B,CAAA;AAEjC;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,IAAI,CAC/B,YAAY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