@interop/wallet-core 0.51.0 → 0.53.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 +7 -11
- package/dist/clientAnnex/credentialAnchoredGenesis.d.ts +2 -2
- package/dist/clientAnnex/credentialAnchoredGenesis.d.ts.map +1 -1
- package/dist/clientAnnex/credentialAnchoredGenesis.js +1 -1
- package/dist/clientAnnex/forget.d.ts +18 -6
- package/dist/clientAnnex/forget.d.ts.map +1 -1
- package/dist/clientAnnex/forget.js +19 -6
- package/dist/clientAnnex/forget.js.map +1 -1
- package/dist/clientAnnex/forgetLast.d.ts +51 -30
- package/dist/clientAnnex/forgetLast.d.ts.map +1 -1
- package/dist/clientAnnex/forgetLast.js +72 -26
- package/dist/clientAnnex/forgetLast.js.map +1 -1
- package/dist/clientAnnex/gc.d.ts +3 -3
- package/dist/clientAnnex/gc.d.ts.map +1 -1
- package/dist/clientAnnex/gc.js +2 -2
- package/dist/clientAnnex/gc.js.map +1 -1
- package/dist/clientAnnex/index.d.ts +6 -6
- package/dist/clientAnnex/index.d.ts.map +1 -1
- package/dist/clientAnnex/index.js +5 -5
- package/dist/clientAnnex/index.js.map +1 -1
- package/dist/clientAnnex/ladder.d.ts +19 -11
- package/dist/clientAnnex/ladder.d.ts.map +1 -1
- package/dist/clientAnnex/ladder.js +77 -14
- package/dist/clientAnnex/ladder.js.map +1 -1
- package/dist/clientAnnex/ladderAnchored.d.ts +146 -10
- package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -1
- package/dist/clientAnnex/ladderAnchored.js +230 -26
- package/dist/clientAnnex/ladderAnchored.js.map +1 -1
- package/dist/clientAnnex/log.d.ts +6 -6
- package/dist/clientAnnex/log.d.ts.map +1 -1
- package/dist/clientAnnex/log.js +8 -8
- package/dist/clientAnnex/log.js.map +1 -1
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts +18 -7
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts.map +1 -1
- package/dist/clientAnnex/recoveryLadderAnchored.js +54 -14
- package/dist/clientAnnex/recoveryLadderAnchored.js.map +1 -1
- package/dist/clientAnnex/selfEnroll.d.ts +67 -6
- package/dist/clientAnnex/selfEnroll.d.ts.map +1 -1
- package/dist/clientAnnex/selfEnroll.js +91 -15
- package/dist/clientAnnex/selfEnroll.js.map +1 -1
- package/dist/clients/listing.d.ts +1 -1
- package/dist/clients/listing.d.ts.map +1 -1
- package/dist/clients/listing.js +1 -1
- package/dist/clients/listing.js.map +1 -1
- package/dist/clients/revocation.d.ts +1 -1
- package/dist/clients/rosterPolicy.d.ts +1 -1
- package/dist/clients/rosterPolicy.d.ts.map +1 -1
- package/dist/clients/rosterPolicy.js +10 -7
- package/dist/clients/rosterPolicy.js.map +1 -1
- package/dist/descriptors/acquire.js +1 -1
- package/dist/descriptors/logSource.d.ts +6 -4
- package/dist/descriptors/logSource.d.ts.map +1 -1
- package/dist/descriptors/logSource.js +7 -4
- package/dist/descriptors/logSource.js.map +1 -1
- package/dist/enrollment/enrollment.d.ts +1 -1
- package/dist/enrollment/enrollment.d.ts.map +1 -1
- package/dist/enrollment/enrollment.js +2 -1
- package/dist/enrollment/enrollment.js.map +1 -1
- package/dist/genesis/accountGenesis.d.ts +1 -1
- package/dist/genesis/accountGenesis.d.ts.map +1 -1
- package/dist/genesis/accountGenesis.js +1 -1
- package/dist/index.d.ts +8 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/keyring/kdf.d.ts +6 -20
- package/dist/keyring/kdf.d.ts.map +1 -1
- package/dist/keyring/kdf.js +8 -5
- package/dist/keyring/kdf.js.map +1 -1
- package/dist/keyring/unlockSpace.js +1 -1
- package/dist/keys/clientKeyRecord.d.ts +68 -1
- package/dist/keys/clientKeyRecord.d.ts.map +1 -1
- package/dist/keys/clientKeyRecord.js +155 -20
- package/dist/keys/clientKeyRecord.js.map +1 -1
- package/dist/keys/index.d.ts +2 -2
- 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 +16 -14
- package/dist/keys/rosterLogStore.d.ts.map +1 -1
- package/dist/keys/rosterLogStore.js +164 -32
- package/dist/keys/rosterLogStore.js.map +1 -1
- package/dist/keys/rosterStore.d.ts +8 -7
- package/dist/keys/rosterStore.d.ts.map +1 -1
- package/dist/keys/rosterStore.js +6 -6
- package/dist/keys/rosterStore.js.map +1 -1
- package/dist/keys/spaceEpochs.d.ts +1 -1
- package/dist/keys/spaceEpochs.js +1 -1
- package/dist/keys/userKeyRoster.d.ts +3 -3
- package/dist/keys/userKeyRoster.d.ts.map +1 -1
- package/dist/keys/userKeyRoster.js +3 -3
- package/dist/keys/userKeyRoster.js.map +1 -1
- package/dist/log.d.ts +49 -0
- package/dist/log.d.ts.map +1 -0
- package/dist/log.js +53 -0
- package/dist/log.js.map +1 -0
- package/dist/recovery/index.d.ts +2 -2
- package/dist/recovery/index.js +2 -2
- package/dist/recovery/recoveryDelegation.d.ts +6 -2
- package/dist/recovery/recoveryDelegation.d.ts.map +1 -1
- package/dist/recovery/recoveryDelegation.js +32 -6
- package/dist/recovery/recoveryDelegation.js.map +1 -1
- package/dist/recovery/recoveryWebvh.d.ts +67 -8
- package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
- package/dist/recovery/recoveryWebvh.js +114 -19
- package/dist/recovery/recoveryWebvh.js.map +1 -1
- package/dist/request/appKey.d.ts +9 -3
- package/dist/request/appKey.d.ts.map +1 -1
- package/dist/request/appKey.js +13 -8
- package/dist/request/appKey.js.map +1 -1
- package/dist/request/capabilityRequest.d.ts +9 -1
- package/dist/request/capabilityRequest.d.ts.map +1 -1
- package/dist/request/capabilityRequest.js +13 -2
- package/dist/request/capabilityRequest.js.map +1 -1
- package/dist/request/classify.d.ts +37 -1
- package/dist/request/classify.d.ts.map +1 -1
- package/dist/request/classify.js +74 -3
- package/dist/request/classify.js.map +1 -1
- package/dist/request/ephemeralExchange.d.ts +5 -18
- package/dist/request/ephemeralExchange.d.ts.map +1 -1
- package/dist/request/ephemeralExchange.js +9 -3
- package/dist/request/ephemeralExchange.js.map +1 -1
- package/dist/request/exchangeClient.d.ts +0 -23
- package/dist/request/exchangeClient.d.ts.map +1 -1
- package/dist/request/exchangeClient.js +30 -1
- package/dist/request/exchangeClient.js.map +1 -1
- package/dist/request/index.d.ts +4 -1
- package/dist/request/index.d.ts.map +1 -1
- package/dist/request/index.js +4 -1
- package/dist/request/index.js.map +1 -1
- package/dist/request/interactionRequest.d.ts +23 -0
- package/dist/request/interactionRequest.d.ts.map +1 -0
- package/dist/request/interactionRequest.js +46 -0
- package/dist/request/interactionRequest.js.map +1 -0
- package/dist/request/interactionUrl.d.ts +3 -14
- package/dist/request/interactionUrl.d.ts.map +1 -1
- package/dist/request/interactionUrl.js +24 -3
- package/dist/request/interactionUrl.js.map +1 -1
- package/dist/request/parse.d.ts +0 -10
- package/dist/request/parse.d.ts.map +1 -1
- package/dist/request/parse.js +15 -1
- package/dist/request/parse.js.map +1 -1
- package/dist/request/processRequest.d.ts.map +1 -1
- package/dist/request/processRequest.js +2 -1
- package/dist/request/processRequest.js.map +1 -1
- package/dist/request/types.d.ts +23 -2
- package/dist/request/types.d.ts.map +1 -1
- package/dist/resourceLog/controller.d.ts +48 -49
- package/dist/resourceLog/controller.d.ts.map +1 -1
- package/dist/resourceLog/controller.js +41 -20
- package/dist/resourceLog/controller.js.map +1 -1
- package/dist/resourceLog/errors.d.ts +12 -78
- package/dist/resourceLog/errors.d.ts.map +1 -1
- package/dist/resourceLog/errors.js +12 -79
- package/dist/resourceLog/errors.js.map +1 -1
- package/dist/resourceLog/index.d.ts +17 -22
- package/dist/resourceLog/index.d.ts.map +1 -1
- package/dist/resourceLog/index.js +16 -21
- package/dist/resourceLog/index.js.map +1 -1
- package/dist/resourceLog/license.d.ts +42 -27
- package/dist/resourceLog/license.d.ts.map +1 -1
- package/dist/resourceLog/license.js +53 -30
- package/dist/resourceLog/license.js.map +1 -1
- package/dist/space/activity.d.ts +48 -1
- package/dist/space/activity.d.ts.map +1 -1
- package/dist/space/activity.js +52 -4
- package/dist/space/activity.js.map +1 -1
- package/dist/space/index.d.ts +1 -1
- package/dist/space/index.d.ts.map +1 -1
- package/dist/space/index.js +1 -1
- package/dist/space/index.js.map +1 -1
- package/dist/sync/pull.d.ts +0 -22
- package/dist/sync/pull.d.ts.map +1 -1
- package/dist/sync/pull.js +30 -2
- package/dist/sync/pull.js.map +1 -1
- package/dist/unlock/index.d.ts +7 -7
- package/dist/unlock/index.d.ts.map +1 -1
- package/dist/unlock/index.js +6 -6
- package/dist/unlock/index.js.map +1 -1
- package/dist/unlock/retire.d.ts +29 -28
- package/dist/unlock/retire.d.ts.map +1 -1
- package/dist/unlock/retire.js +25 -16
- package/dist/unlock/retire.js.map +1 -1
- package/dist/unlock/standingClient.d.ts +1 -1
- package/dist/unlock/standingClient.js +3 -3
- package/dist/unlock/standingWebvh.d.ts +28 -10
- package/dist/unlock/standingWebvh.d.ts.map +1 -1
- package/dist/unlock/standingWebvh.js +75 -37
- package/dist/unlock/standingWebvh.js.map +1 -1
- package/dist/unlock/unlockRecord.d.ts +37 -0
- package/dist/unlock/unlockRecord.d.ts.map +1 -1
- package/dist/unlock/unlockRecord.js +54 -1
- package/dist/unlock/unlockRecord.js.map +1 -1
- package/dist/webvh/delegatedLogStore.d.ts +2 -2
- package/dist/webvh/delegatedLogStore.js +2 -2
- package/dist/webvh/didWeb.js +1 -1
- package/dist/webvh/didWeb.js.map +1 -1
- package/dist/webvh/didWebvh.d.ts +33 -3
- package/dist/webvh/didWebvh.d.ts.map +1 -1
- package/dist/webvh/didWebvh.js +40 -11
- package/dist/webvh/didWebvh.js.map +1 -1
- package/dist/webvh/index.d.ts +1 -1
- 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/listClients.js +1 -1
- package/dist/webvh/listClients.js.map +1 -1
- package/dist/webvh/verifyLog.d.ts +1 -1
- package/dist/webvh/verifyLog.d.ts.map +1 -1
- package/dist/webvh/verifyLog.js +1 -2
- package/dist/webvh/verifyLog.js.map +1 -1
- package/package.json +9 -11
- package/dist/display/alignment.d.ts +0 -55
- package/dist/display/alignment.d.ts.map +0 -1
- package/dist/display/alignment.js +0 -117
- package/dist/display/alignment.js.map +0 -1
- package/dist/display/credentialName.d.ts +0 -42
- package/dist/display/credentialName.d.ts.map +0 -1
- package/dist/display/credentialName.js +0 -106
- package/dist/display/credentialName.js.map +0 -1
- package/dist/display/displayFields.d.ts +0 -59
- package/dist/display/displayFields.d.ts.map +0 -1
- package/dist/display/displayFields.js +0 -136
- package/dist/display/displayFields.js.map +0 -1
- package/dist/display/evidence.d.ts +0 -50
- package/dist/display/evidence.d.ts.map +0 -1
- package/dist/display/evidence.js +0 -67
- package/dist/display/evidence.js.map +0 -1
- package/dist/display/image.d.ts +0 -18
- package/dist/display/image.d.ts.map +0 -1
- package/dist/display/image.js +0 -23
- package/dist/display/image.js.map +0 -1
- package/dist/display/index.d.ts +0 -38
- package/dist/display/index.d.ts.map +0 -1
- package/dist/display/index.js +0 -32
- package/dist/display/index.js.map +0 -1
- package/dist/display/issuer.d.ts +0 -105
- package/dist/display/issuer.d.ts.map +0 -1
- package/dist/display/issuer.js +0 -126
- package/dist/display/issuer.js.map +0 -1
- package/dist/display/obv3.d.ts +0 -82
- package/dist/display/obv3.d.ts.map +0 -1
- package/dist/display/obv3.js +0 -117
- package/dist/display/obv3.js.map +0 -1
- package/dist/display/parse.d.ts +0 -66
- package/dist/display/parse.d.ts.map +0 -1
- package/dist/display/parse.js +0 -104
- package/dist/display/parse.js.map +0 -1
- package/dist/display/subject.d.ts +0 -79
- package/dist/display/subject.d.ts.map +0 -1
- package/dist/display/subject.js +0 -124
- package/dist/display/subject.js.map +0 -1
- package/dist/display/text.d.ts +0 -53
- package/dist/display/text.d.ts.map +0 -1
- package/dist/display/text.js +0 -78
- package/dist/display/text.js.map +0 -1
- package/dist/display/types.d.ts +0 -55
- package/dist/display/types.d.ts.map +0 -1
- package/dist/display/types.js +0 -41
- package/dist/display/types.js.map +0 -1
- package/dist/display/validity.d.ts +0 -51
- package/dist/display/validity.d.ts.map +0 -1
- package/dist/display/validity.js +0 -51
- package/dist/display/validity.js.map +0 -1
- package/dist/display/verificationView.d.ts +0 -115
- package/dist/display/verificationView.d.ts.map +0 -1
- package/dist/display/verificationView.js +0 -199
- package/dist/display/verificationView.js.map +0 -1
- package/dist/resourceLog/append.d.ts +0 -112
- package/dist/resourceLog/append.d.ts.map +0 -1
- package/dist/resourceLog/append.js +0 -197
- package/dist/resourceLog/append.js.map +0 -1
- package/dist/resourceLog/entry.d.ts +0 -68
- package/dist/resourceLog/entry.d.ts.map +0 -1
- package/dist/resourceLog/entry.js +0 -167
- package/dist/resourceLog/entry.js.map +0 -1
- package/dist/resourceLog/pin.d.ts +0 -82
- package/dist/resourceLog/pin.d.ts.map +0 -1
- package/dist/resourceLog/pin.js +0 -57
- package/dist/resourceLog/pin.js.map +0 -1
- package/dist/resourceLog/seal.d.ts +0 -97
- package/dist/resourceLog/seal.d.ts.map +0 -1
- package/dist/resourceLog/seal.js +0 -113
- package/dist/resourceLog/seal.js.map +0 -1
- package/dist/resourceLog/verify.d.ts +0 -96
- package/dist/resourceLog/verify.d.ts.map +0 -1
- package/dist/resourceLog/verify.js +0 -474
- package/dist/resourceLog/verify.js.map +0 -1
- package/dist/resourceLog/vmFragment.d.ts +0 -33
- package/dist/resourceLog/vmFragment.d.ts.map +0 -1
- package/dist/resourceLog/vmFragment.js +0 -39
- package/dist/resourceLog/vmFragment.js.map +0 -1
package/dist/unlock/retire.d.ts
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* passphrase" and "remove this passkey", run synchronously in an enrolled
|
|
7
7
|
* client, in dependency order. A standing credential is not a stored string to
|
|
8
8
|
* overwrite -- it holds a wrap in the user key roster and a `keyAgreement`
|
|
9
|
-
*
|
|
9
|
+
* inventory in the account's did:webvh document -- so retiring one is a real
|
|
10
10
|
* rotation, on the same stages the client-revocation cascade runs.
|
|
11
11
|
*
|
|
12
|
-
* 1. **The document
|
|
12
|
+
* 1. **The document inventory edit** (`removeUnlockKey`): the credential's
|
|
13
13
|
* `keyAgreement` entry (verbatim key or commitment) and its committed
|
|
14
14
|
* update-key hash leave the document in one log entry. That kills the
|
|
15
15
|
* credential's latent self-enrollment authority -- with its rung
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
* first means a run torn anywhere after it leaves the roster keying a
|
|
27
27
|
* recipient the document no longer backs -- exactly the state the login-time
|
|
28
28
|
* sweep detects and finishes. Torn the other way around, a rotation with the
|
|
29
|
-
*
|
|
29
|
+
* inventory still standing would simply re-escrow the credential and look
|
|
30
30
|
* healthy.
|
|
31
31
|
*
|
|
32
32
|
* There is deliberately no recovery-delegation re-mint stage here (the
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
* credential's bridge chains through it.
|
|
37
37
|
*
|
|
38
38
|
* The client annex reach is its own stage (1b, the injected
|
|
39
|
-
* `
|
|
39
|
+
* `retireClientAnnexInventory` closure), between the document edit and the
|
|
40
40
|
* roster tail: a standing credential's annex rung-0 key and hash live in
|
|
41
41
|
* the pointed generation's log, kept nowhere the account document edit can
|
|
42
42
|
* reach, so without it a retired credential keeps annex-write authority
|
|
@@ -49,12 +49,13 @@
|
|
|
49
49
|
* `delegatedClients` sibling: no server revocation is possible or needed --
|
|
50
50
|
* the sibling delegation's record dies with the unlock Space the caller
|
|
51
51
|
* deletes, and a swap (or the ordinary GC cadence) retires the generation it
|
|
52
|
-
* targeted. Best-effort by contract
|
|
53
|
-
*
|
|
54
|
-
* remedy -- always
|
|
52
|
+
* targeted. Best-effort by contract, enforced by the ceremony itself: a
|
|
53
|
+
* throw escaping the closure is caught here and reported as the `failed`
|
|
54
|
+
* skip, so the roster rotation -- the ceremony's essential remedy -- always
|
|
55
|
+
* runs.
|
|
55
56
|
*
|
|
56
57
|
* Convergence is the design: every stage detects its own completion from
|
|
57
|
-
* durable state alone -- the
|
|
58
|
+
* durable state alone -- the inventory edit no-ops when the document is already
|
|
58
59
|
* settled, the rotation no-ops once every current-epoch recipient is
|
|
59
60
|
* document-backed, and a collection is stale exactly when its current epoch
|
|
60
61
|
* names a non-current user key generation -- so a naive full re-run finishes
|
|
@@ -76,7 +77,7 @@ import { type StandingUnlockKeys } from './standingWebvh.js';
|
|
|
76
77
|
* this run (a re-run of an already-complete retirement reports `false`), the
|
|
77
78
|
* roster's seal-backstop report (present when the roster store is sealable and
|
|
78
79
|
* the roster stage ran), the per-collection fan-out result, the document as
|
|
79
|
-
* the
|
|
80
|
+
* the inventory edit left it, and the rotated key with the roster descriptor it
|
|
80
81
|
* was read from.
|
|
81
82
|
*/
|
|
82
83
|
export interface UnlockCredentialRetirementResult {
|
|
@@ -86,40 +87,40 @@ export interface UnlockCredentialRetirementResult {
|
|
|
86
87
|
document: object;
|
|
87
88
|
userKey?: UserKey;
|
|
88
89
|
rosterDescriptor?: CollectionEncryption;
|
|
89
|
-
clientAnnex?:
|
|
90
|
+
clientAnnex?: ClientAnnexInventoryRetirement;
|
|
90
91
|
}
|
|
91
92
|
/**
|
|
92
|
-
* What the annex-
|
|
93
|
+
* What the annex-inventory stage reports: `struck` (a strike entry dropped
|
|
93
94
|
* the retired rung's key and hash), `swapped` (a fresh generation replaced
|
|
94
|
-
* the old one wholesale), `clean` (the pointed generation held no
|
|
95
|
+
* the old one wholesale), `clean` (the pointed generation held no inventory
|
|
95
96
|
* for the retired credential), or `skipped` with the reason (`no-pointer`:
|
|
96
|
-
* the account has no annex
|
|
97
|
-
* no seed that could strike or swap; `failed`: the closure
|
|
98
|
-
*
|
|
97
|
+
* the account has no annex inventory; `no-ladder-seed`: the ceremony holds
|
|
98
|
+
* no seed that could strike or swap; `failed`: the closure reported a
|
|
99
|
+
* failure, or threw and the ceremony caught it).
|
|
99
100
|
*/
|
|
100
|
-
export interface
|
|
101
|
+
export interface ClientAnnexInventoryRetirement {
|
|
101
102
|
action: 'struck' | 'swapped' | 'clean' | 'skipped';
|
|
102
103
|
reason?: 'no-pointer' | 'no-ladder-seed' | 'failed';
|
|
103
104
|
}
|
|
104
105
|
/**
|
|
105
106
|
* Retires one standing unlock credential from an account. See the module doc
|
|
106
|
-
* for the order and the convergence story. Once the
|
|
107
|
+
* for the order and the convergence story. Once the inventory edit lands, a
|
|
107
108
|
* thrown later stage leaves durable state a naive re-run -- or the login-time
|
|
108
109
|
* sweep -- converges from.
|
|
109
110
|
*
|
|
110
111
|
* @param options {object}
|
|
111
112
|
* @param options.idStore {WebvhIdStore} the account's `id` collection store
|
|
112
113
|
* @param options.updateKeys {ClientWebvhUpdateKeys} the RETIRING (enrolled)
|
|
113
|
-
* client's own did:webvh update-key seeds, which sign the
|
|
114
|
+
* client's own did:webvh update-key seeds, which sign the inventory edit
|
|
114
115
|
* @param options.unlockKeys {StandingUnlockKeys} the retired credential's
|
|
115
|
-
* public
|
|
116
|
-
* key, which the
|
|
116
|
+
* public inventory (its key-agreement publication and its recorded update
|
|
117
|
+
* key, which the inventory edit treats as a ladder anchor rather than truth
|
|
117
118
|
* -- see `removeUnlockKey`)
|
|
118
119
|
* @param [options.ladderSeed] {Uint8Array} the retired credential's ladder
|
|
119
120
|
* seed, when the ceremony holds the credential's secret; it strengthens the
|
|
120
121
|
* ladder attribution but is not required
|
|
121
122
|
* @param [options.expectedDid] {string} the account DID from the caller's
|
|
122
|
-
* stored account pointer; supplied, the
|
|
123
|
+
* stored account pointer; supplied, the inventory edit refuses a `did.jsonl`
|
|
123
124
|
* resolving to any other account
|
|
124
125
|
* @param [options.verb] {string} what the caller is doing, for the
|
|
125
126
|
* pending-rotation refusal message (e.g. `'changing your passphrase'`)
|
|
@@ -134,16 +135,16 @@ export interface ClientAnnexPostureRetirement {
|
|
|
134
135
|
* called with `{ userKey, latestEpochId, descriptor }` after the roster read
|
|
135
136
|
* and BEFORE the fan-out. The key and the epoch pin must persist atomically
|
|
136
137
|
* @param options.collections {CascadeCollections} the fan-out's work
|
|
137
|
-
* @param [options.
|
|
138
|
-
* Promise<
|
|
139
|
-
* the module doc), run against the post-edit document;
|
|
140
|
-
*
|
|
138
|
+
* @param [options.retireClientAnnexInventory] {Function} `({ document }) =>
|
|
139
|
+
* Promise<ClientAnnexInventoryRetirement>` -- the annex reach (stage 1b in
|
|
140
|
+
* the module doc), run against the post-edit document; a throw is caught
|
|
141
|
+
* and reported as `{ action: 'skipped', reason: 'failed' }`
|
|
141
142
|
* @param [options.onRotationAdopted] {Function} `({ userKey }) =>
|
|
142
143
|
* Promise<void>` -- the live-session adoption of a rotated key, run last so
|
|
143
144
|
* the session keeps operating without a re-login
|
|
144
145
|
* @returns {Promise<UnlockCredentialRetirementResult>}
|
|
145
146
|
*/
|
|
146
|
-
export declare function retireUnlockCredential({ idStore, updateKeys, unlockKeys, ladderSeed, expectedDid, verb, rosterStore, userKey, clientKeyAgreementKey, pinnedEpochId, onUserKeyAdopted, collections,
|
|
147
|
+
export declare function retireUnlockCredential({ idStore, updateKeys, unlockKeys, ladderSeed, expectedDid, verb, rosterStore, userKey, clientKeyAgreementKey, pinnedEpochId, onUserKeyAdopted, collections, retireClientAnnexInventory, onRotationAdopted }: {
|
|
147
148
|
idStore: WebvhIdStore;
|
|
148
149
|
updateKeys: ClientWebvhUpdateKeys;
|
|
149
150
|
unlockKeys: StandingUnlockKeys;
|
|
@@ -160,9 +161,9 @@ export declare function retireUnlockCredential({ idStore, updateKeys, unlockKeys
|
|
|
160
161
|
descriptor: CollectionEncryption;
|
|
161
162
|
}) => Promise<void>;
|
|
162
163
|
collections: CascadeCollections;
|
|
163
|
-
|
|
164
|
+
retireClientAnnexInventory?: (options: {
|
|
164
165
|
document: object;
|
|
165
|
-
}) => Promise<
|
|
166
|
+
}) => Promise<ClientAnnexInventoryRetirement>;
|
|
166
167
|
onRotationAdopted?: (rotation: {
|
|
167
168
|
userKey: UserKey;
|
|
168
169
|
}) => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retire.d.ts","sourceRoot":"","sources":["../../src/unlock/retire.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"retire.d.ts","sourceRoot":"","sources":["../../src/unlock/retire.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AACpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAC/D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAA;AACxE,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,OAAO,EACZ,KAAK,oBAAoB,EAC1B,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAC5E,OAAO,EAAmB,KAAK,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAE7E;;;;;;;GAOG;AACH,MAAM,WAAW,gCAAgC;IAC/C,OAAO,EAAE,OAAO,CAAA;IAChB,UAAU,CAAC,EAAE,gBAAgB,CAAA;IAC7B,WAAW,EAAE,oBAAoB,CAAA;IACjC,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,gBAAgB,CAAC,EAAE,oBAAoB,CAAA;IACvC,WAAW,CAAC,EAAE,8BAA8B,CAAA;CAC7C;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,8BAA8B;IAC7C,MAAM,EAAE,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAA;IAClD,MAAM,CAAC,EAAE,YAAY,GAAG,gBAAgB,GA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';
|
|
|
2
2
|
import { removeUnlockKey } from './standingWebvh.js';
|
|
3
3
|
/**
|
|
4
4
|
* Retires one standing unlock credential from an account. See the module doc
|
|
5
|
-
* for the order and the convergence story. Once the
|
|
5
|
+
* for the order and the convergence story. Once the inventory edit lands, a
|
|
6
6
|
* thrown later stage leaves durable state a naive re-run -- or the login-time
|
|
7
7
|
* sweep -- converges from.
|
|
8
8
|
*
|
|
9
9
|
* @param options {object}
|
|
10
10
|
* @param options.idStore {WebvhIdStore} the account's `id` collection store
|
|
11
11
|
* @param options.updateKeys {ClientWebvhUpdateKeys} the RETIRING (enrolled)
|
|
12
|
-
* client's own did:webvh update-key seeds, which sign the
|
|
12
|
+
* client's own did:webvh update-key seeds, which sign the inventory edit
|
|
13
13
|
* @param options.unlockKeys {StandingUnlockKeys} the retired credential's
|
|
14
|
-
* public
|
|
15
|
-
* key, which the
|
|
14
|
+
* public inventory (its key-agreement publication and its recorded update
|
|
15
|
+
* key, which the inventory edit treats as a ladder anchor rather than truth
|
|
16
16
|
* -- see `removeUnlockKey`)
|
|
17
17
|
* @param [options.ladderSeed] {Uint8Array} the retired credential's ladder
|
|
18
18
|
* seed, when the ceremony holds the credential's secret; it strengthens the
|
|
19
19
|
* ladder attribution but is not required
|
|
20
20
|
* @param [options.expectedDid] {string} the account DID from the caller's
|
|
21
|
-
* stored account pointer; supplied, the
|
|
21
|
+
* stored account pointer; supplied, the inventory edit refuses a `did.jsonl`
|
|
22
22
|
* resolving to any other account
|
|
23
23
|
* @param [options.verb] {string} what the caller is doing, for the
|
|
24
24
|
* pending-rotation refusal message (e.g. `'changing your passphrase'`)
|
|
@@ -33,17 +33,17 @@ import { removeUnlockKey } from './standingWebvh.js';
|
|
|
33
33
|
* called with `{ userKey, latestEpochId, descriptor }` after the roster read
|
|
34
34
|
* and BEFORE the fan-out. The key and the epoch pin must persist atomically
|
|
35
35
|
* @param options.collections {CascadeCollections} the fan-out's work
|
|
36
|
-
* @param [options.
|
|
37
|
-
* Promise<
|
|
38
|
-
* the module doc), run against the post-edit document;
|
|
39
|
-
*
|
|
36
|
+
* @param [options.retireClientAnnexInventory] {Function} `({ document }) =>
|
|
37
|
+
* Promise<ClientAnnexInventoryRetirement>` -- the annex reach (stage 1b in
|
|
38
|
+
* the module doc), run against the post-edit document; a throw is caught
|
|
39
|
+
* and reported as `{ action: 'skipped', reason: 'failed' }`
|
|
40
40
|
* @param [options.onRotationAdopted] {Function} `({ userKey }) =>
|
|
41
41
|
* Promise<void>` -- the live-session adoption of a rotated key, run last so
|
|
42
42
|
* the session keeps operating without a re-login
|
|
43
43
|
* @returns {Promise<UnlockCredentialRetirementResult>}
|
|
44
44
|
*/
|
|
45
|
-
export async function retireUnlockCredential({ idStore, updateKeys, unlockKeys, ladderSeed, expectedDid, verb, rosterStore, userKey, clientKeyAgreementKey, pinnedEpochId, onUserKeyAdopted, collections,
|
|
46
|
-
// 1. The document
|
|
45
|
+
export async function retireUnlockCredential({ idStore, updateKeys, unlockKeys, ladderSeed, expectedDid, verb, rosterStore, userKey, clientKeyAgreementKey, pinnedEpochId, onUserKeyAdopted, collections, retireClientAnnexInventory, onRotationAdopted }) {
|
|
46
|
+
// 1. The document inventory edit -- the credential's standing, first. It
|
|
47
47
|
// resolves the document as it now stands, which is what stage 2 resolves
|
|
48
48
|
// its remaining recipients from.
|
|
49
49
|
const { did, doc, log } = await removeUnlockKey({
|
|
@@ -55,10 +55,19 @@ export async function retireUnlockCredential({ idStore, updateKeys, unlockKeys,
|
|
|
55
55
|
...(verb !== undefined ? { verb } : {})
|
|
56
56
|
});
|
|
57
57
|
// 1b. The annex reach, against the post-edit document: strike the
|
|
58
|
-
// retired credential's rung
|
|
59
|
-
// the generation out from under it. Best-effort by
|
|
60
|
-
//
|
|
61
|
-
|
|
58
|
+
// retired credential's rung inventory out of the pointed generation, or swap
|
|
59
|
+
// the generation out from under it. Best-effort by contract, enforced here:
|
|
60
|
+
// a throw escaping the closure maps to the `failed` skip, so the roster
|
|
61
|
+
// rotation below always runs.
|
|
62
|
+
let clientAnnex;
|
|
63
|
+
if (retireClientAnnexInventory) {
|
|
64
|
+
try {
|
|
65
|
+
clientAnnex = await retireClientAnnexInventory({ document: doc });
|
|
66
|
+
}
|
|
67
|
+
catch {
|
|
68
|
+
clientAnnex = { action: 'skipped', reason: 'failed' };
|
|
69
|
+
}
|
|
70
|
+
}
|
|
62
71
|
// 2. The shared roster-and-cascade tail: the roster rotation onto the
|
|
63
72
|
// post-edit document (with its post-edit controller floor and its seal
|
|
64
73
|
// backstop), then the collection fan-out onto the fresh key.
|
|
@@ -74,7 +83,7 @@ export async function retireUnlockCredential({ idStore, updateKeys, unlockKeys,
|
|
|
74
83
|
collections
|
|
75
84
|
});
|
|
76
85
|
if (!tail.rosterDescriptor || !tail.userKey) {
|
|
77
|
-
// No roster to rotate: the
|
|
86
|
+
// No roster to rotate: the inventory edit has landed, so the credential IS
|
|
78
87
|
// retired -- a completed ceremony with nothing rotated.
|
|
79
88
|
return {
|
|
80
89
|
rotated: false,
|
|
@@ -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":"AAuEA,OAAO,EACL,gCAAgC,EAKjC,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAE,eAAe,EAA2B,MAAM,oBAAoB,CAAA;AAkC7E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,EAC3C,OAAO,EACP,UAAU,EACV,UAAU,EACV,UAAU,EACV,WAAW,EACX,IAAI,EACJ,WAAW,EACX,OAAO,EACP,qBAAqB,EACrB,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,0BAA0B,EAC1B,iBAAiB,EAsBlB;IACC,yEAAyE;IACzE,yEAAyE;IACzE,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,OAAO,EAAE,CAAC;QAC5C,2EAA2E;QAC3E,wDAAwD;QACxD,OAAO;YACL,OAAO,EAAE,KAAK;YACd,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,QAAQ,EAAE,GAAG;YACb,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACxC,CAAA;IACH,CAAC;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,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;KACxC,CAAA;AACH,CAAC"}
|
|
@@ -32,7 +32,7 @@ export interface UnlockClientIdentity {
|
|
|
32
32
|
* Assembles a client identity from its 32-byte client seed: the one place the
|
|
33
33
|
* agents, multibases, and roster kid are derived, shared by the standing
|
|
34
34
|
* credential derivation here and the recovery code's
|
|
35
|
-
* (`recoveryClientFromCode`), so the two
|
|
35
|
+
* (`recoveryClientFromCode`), so the two derivations can never disagree on how a
|
|
36
36
|
* seed becomes an identity.
|
|
37
37
|
*
|
|
38
38
|
* @param options {object}
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* The standing unlock credential's client identity: the deterministic key set
|
|
6
6
|
* every unlock method (a passphrase, a passkey PRF output) derives from its
|
|
7
|
-
* own unlock seed under the standing-credential
|
|
8
|
-
*
|
|
7
|
+
* own unlock seed under the standing-credential configuration -- the recovery-code
|
|
8
|
+
* configuration minus spend-on-use. The credential's key-agreement key holds a
|
|
9
9
|
* standing wrap in the user key roster (escrowed into every epoch, kept alive
|
|
10
10
|
* by rotation fan-out), and its binding MAC key authenticates the unlock
|
|
11
11
|
* record's account core, so a fresh browser holding nothing but the
|
|
@@ -37,7 +37,7 @@ const STANDING_BINDING_MAC_INFO = 'binding-mac';
|
|
|
37
37
|
* Assembles a client identity from its 32-byte client seed: the one place the
|
|
38
38
|
* agents, multibases, and roster kid are derived, shared by the standing
|
|
39
39
|
* credential derivation here and the recovery code's
|
|
40
|
-
* (`recoveryClientFromCode`), so the two
|
|
40
|
+
* (`recoveryClientFromCode`), so the two derivations can never disagree on how a
|
|
41
41
|
* seed becomes an identity.
|
|
42
42
|
*
|
|
43
43
|
* @param options {object}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { DIDDoc, DIDLog, VerificationMethod } from '@interop/did-method-webvh';
|
|
2
2
|
import type { ClientWebvhUpdateKeys, PublishedWebvhLog, WebvhIdStore } from '../webvh/didWebvh.js';
|
|
3
|
+
import type { ResourceLogPinStore } from '@interop/vh-resource-log';
|
|
3
4
|
/**
|
|
4
5
|
* The narrow store seam the self-enrolling and delegated-bridge ceremonies
|
|
5
6
|
* write through: a public read of the log and the delegated `did.jsonl` PUT.
|
|
@@ -20,7 +21,7 @@ export type UnlockKeyAgreementPublication = {
|
|
|
20
21
|
commitment: string;
|
|
21
22
|
};
|
|
22
23
|
/**
|
|
23
|
-
* A standing credential's public
|
|
24
|
+
* A standing credential's public inventory as the document and log carry it:
|
|
24
25
|
* its key-agreement publication and the update key whose hash stands in
|
|
25
26
|
* `nextKeyHashes` (ladder rung 0 at bind time; a code's single derived key).
|
|
26
27
|
*/
|
|
@@ -70,18 +71,26 @@ export declare function unlockKeyVerificationMethod({ did, keyAgreement }: {
|
|
|
70
71
|
* @param options.store {UnlockLogStore}
|
|
71
72
|
* @param [options.expectedDid] {string} the account DID the log must resolve
|
|
72
73
|
* to, where the caller holds one
|
|
74
|
+
* @param [options.pinStore] {ResourceLogPinStore} the caller's chain-head
|
|
75
|
+
* pins; a served log that is a rollback, a fork, or an identity switch
|
|
76
|
+
* against the pinned head is refused (`ResourceLogContinuityError`)
|
|
77
|
+
* @param [options.logId] {string} the account log's pin slot
|
|
78
|
+
* (`accountLogPinId({ spaceId })`); required whenever a `pinStore` is
|
|
79
|
+
* supplied
|
|
73
80
|
* @returns {Promise<PublishedWebvhLog>}
|
|
74
81
|
*/
|
|
75
|
-
export declare function readLogOrThrow({ store, expectedDid }: {
|
|
82
|
+
export declare function readLogOrThrow({ store, expectedDid, pinStore, logId }: {
|
|
76
83
|
store: UnlockLogStore;
|
|
77
84
|
expectedDid?: string;
|
|
85
|
+
pinStore?: ResourceLogPinStore;
|
|
86
|
+
logId?: string;
|
|
78
87
|
}): Promise<PublishedWebvhLog>;
|
|
79
88
|
/**
|
|
80
89
|
* BIND (run by an enrolled client, root authority): publishes a standing
|
|
81
|
-
* credential's split
|
|
90
|
+
* credential's split configuration into the document -- one entry adding the
|
|
82
91
|
* credential's `keyAgreement` entry (verbatim or commitment) and committing
|
|
83
92
|
* its current update key's hash in `nextKeyHashes`. The update key joins
|
|
84
|
-
* `updateKeys` nowhere. Idempotent:
|
|
93
|
+
* `updateKeys` nowhere. Idempotent: an inventory already published is a no-op,
|
|
85
94
|
* so re-running a torn bind converges. The entry publishes conditionally on
|
|
86
95
|
* the log this call read; a race lost to a concurrent ceremony re-runs and
|
|
87
96
|
* rebases on the new head.
|
|
@@ -91,14 +100,14 @@ export declare function readLogOrThrow({ store, expectedDid }: {
|
|
|
91
100
|
* @param options.updateKeys {ClientWebvhUpdateKeys} the BINDING client's own
|
|
92
101
|
* did:webvh update-key seeds
|
|
93
102
|
* @param options.unlockKeys {StandingUnlockKeys} the credential's public
|
|
94
|
-
*
|
|
103
|
+
* inventory
|
|
95
104
|
* @param [options.expectedDid] {string} the account DID the log must resolve
|
|
96
105
|
* to, from the caller's stored account pointer
|
|
97
106
|
* @param [options.verb] {string} what the caller is doing, for the
|
|
98
107
|
* pending-rotation refusal message (e.g. `'issuing a recovery code'`)
|
|
99
108
|
* @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog }>} the account
|
|
100
109
|
* DID and the document and log as this call leaves them (unchanged when the
|
|
101
|
-
*
|
|
110
|
+
* inventory was already settled), which is what the caller's roster-side half
|
|
102
111
|
* converges onto
|
|
103
112
|
*/
|
|
104
113
|
export declare function publishUnlockKey(options: {
|
|
@@ -114,7 +123,7 @@ export declare function publishUnlockKey(options: {
|
|
|
114
123
|
}>;
|
|
115
124
|
/**
|
|
116
125
|
* REMOVAL (run by an enrolled client, root authority): removes a standing
|
|
117
|
-
* credential's
|
|
126
|
+
* credential's inventory from the document -- its `keyAgreement` entry and
|
|
118
127
|
* everything of its ladder that still stands -- in one entry. Idempotent. The
|
|
119
128
|
* roster-side half (rotating the user key epoch off the credential's wrap) is
|
|
120
129
|
* the caller's, and runs after this so the resolver's document no longer
|
|
@@ -123,18 +132,27 @@ export declare function publishUnlockKey(options: {
|
|
|
123
132
|
* The recorded `unlockKeys.updateKeyMultibase` is treated as an ANCHOR, not
|
|
124
133
|
* as truth: a credential that has self-enrolled since its bind advanced its
|
|
125
134
|
* standing commitment past the recorded rung, so the removal resolves the
|
|
126
|
-
* ladder's current
|
|
127
|
-
* ({@link
|
|
135
|
+
* ladder's current inventory from the log itself
|
|
136
|
+
* ({@link attributeLadderInventory}) and strikes all of it -- every committed
|
|
128
137
|
* hash the ladder accounts for AND, for a torn self-enrollment, the revealed
|
|
129
138
|
* rung key still sitting in `updateKeys` (plus the never-claimed hashes its
|
|
130
139
|
* reveal entry committed). Trusting the recorded multibase alone would leave
|
|
131
140
|
* the live rung commitment standing: a latent re-seizure credential via the
|
|
132
141
|
* reveal mechanism. A supplied `ladderSeed` strengthens the attribution (every
|
|
133
142
|
* rung known a priori, independent of the anchor's staleness); without it the
|
|
134
|
-
* log walk alone resolves the
|
|
143
|
+
* log walk alone resolves the inventory. For a single-key credential (a
|
|
135
144
|
* recovery code, a never-self-enrolled bind) the resolution degenerates to
|
|
136
145
|
* exactly the recorded key's hash, as before.
|
|
137
146
|
*
|
|
147
|
+
* The seed also names the credential's LADDER VM -- the stable sibling a
|
|
148
|
+
* last-client forget's install entry publishes under `assertionMethod` and
|
|
149
|
+
* `capabilityDelegation`, left standing by a forget torn after that entry --
|
|
150
|
+
* and the removal strikes it in the same entry, so a retired seed no longer
|
|
151
|
+
* signs governed-log appends or account delegations. The sibling is derived
|
|
152
|
+
* from the seed alone, with nothing in the log attributing it to a ladder, so
|
|
153
|
+
* a removal without the seed leaves it: rotation is the remedy for a leaked
|
|
154
|
+
* seed exactly when the ceremony holds the credential.
|
|
155
|
+
*
|
|
138
156
|
* @param options {object} see {@link publishUnlockKey}, plus
|
|
139
157
|
* `[ladderSeed]` -- the retired credential's ladder seed, when in hand
|
|
140
158
|
* @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog }>} see
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standingWebvh.d.ts","sourceRoot":"","sources":["../../src/unlock/standingWebvh.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EACV,MAAM,EACN,MAAM,EACN,kBAAkB,EACnB,MAAM,2BAA2B,CAAA;AAalC,OAAO,KAAK,EACV,qBAAqB,EACrB,iBAAiB,EACjB,YAAY,EACb,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"standingWebvh.d.ts","sourceRoot":"","sources":["../../src/unlock/standingWebvh.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EACV,MAAM,EACN,MAAM,EACN,kBAAkB,EACnB,MAAM,2BAA2B,CAAA;AAalC,OAAO,KAAK,EACV,qBAAqB,EACrB,iBAAiB,EACjB,YAAY,EACb,MAAM,s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