@interop/wallet-core 0.62.0 → 0.66.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 +41 -16
- package/dist/clientAnnex/credentialAnchoredGenesis.d.ts +46 -26
- package/dist/clientAnnex/credentialAnchoredGenesis.d.ts.map +1 -1
- package/dist/clientAnnex/credentialAnchoredGenesis.js +91 -39
- package/dist/clientAnnex/credentialAnchoredGenesis.js.map +1 -1
- package/dist/clientAnnex/establish.d.ts +119 -35
- package/dist/clientAnnex/establish.d.ts.map +1 -1
- package/dist/clientAnnex/establish.js +227 -160
- package/dist/clientAnnex/establish.js.map +1 -1
- package/dist/clientAnnex/forget.d.ts +18 -8
- package/dist/clientAnnex/forget.d.ts.map +1 -1
- package/dist/clientAnnex/forget.js +37 -64
- package/dist/clientAnnex/forget.js.map +1 -1
- package/dist/clientAnnex/forgetLast.d.ts +85 -38
- package/dist/clientAnnex/forgetLast.d.ts.map +1 -1
- package/dist/clientAnnex/forgetLast.js +155 -98
- package/dist/clientAnnex/forgetLast.js.map +1 -1
- package/dist/clientAnnex/gc.d.ts +3 -2
- package/dist/clientAnnex/gc.d.ts.map +1 -1
- package/dist/clientAnnex/gc.js +16 -7
- package/dist/clientAnnex/gc.js.map +1 -1
- package/dist/clientAnnex/heal.d.ts +65 -14
- package/dist/clientAnnex/heal.d.ts.map +1 -1
- package/dist/clientAnnex/heal.js +397 -298
- package/dist/clientAnnex/heal.js.map +1 -1
- package/dist/clientAnnex/index.d.ts +23 -7
- package/dist/clientAnnex/index.d.ts.map +1 -1
- package/dist/clientAnnex/index.js +26 -7
- package/dist/clientAnnex/index.js.map +1 -1
- package/dist/clientAnnex/ladder.d.ts +58 -0
- package/dist/clientAnnex/ladder.d.ts.map +1 -1
- package/dist/clientAnnex/ladder.js +249 -41
- package/dist/clientAnnex/ladder.js.map +1 -1
- package/dist/clientAnnex/ladderAnchored.d.ts +148 -22
- package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -1
- package/dist/clientAnnex/ladderAnchored.js +391 -346
- package/dist/clientAnnex/ladderAnchored.js.map +1 -1
- package/dist/clientAnnex/log.d.ts +237 -53
- package/dist/clientAnnex/log.d.ts.map +1 -1
- package/dist/clientAnnex/log.js +533 -198
- package/dist/clientAnnex/log.js.map +1 -1
- package/dist/clientAnnex/mend.d.ts +12 -6
- package/dist/clientAnnex/mend.d.ts.map +1 -1
- package/dist/clientAnnex/mend.js +44 -72
- package/dist/clientAnnex/mend.js.map +1 -1
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts +6 -4
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts.map +1 -1
- package/dist/clientAnnex/recoveryLadderAnchored.js +56 -35
- package/dist/clientAnnex/recoveryLadderAnchored.js.map +1 -1
- package/dist/clientAnnex/spaceCapability.d.ts +123 -0
- package/dist/clientAnnex/spaceCapability.d.ts.map +1 -0
- package/dist/clientAnnex/spaceCapability.js +152 -0
- package/dist/clientAnnex/spaceCapability.js.map +1 -0
- package/dist/clientAnnex/stages.d.ts +63 -0
- package/dist/clientAnnex/stages.d.ts.map +1 -0
- package/dist/clientAnnex/stages.js +64 -0
- package/dist/clientAnnex/stages.js.map +1 -0
- package/dist/clientAnnex/zcap.d.ts +1 -1
- package/dist/clientAnnex/zcap.d.ts.map +1 -1
- package/dist/clientAnnex/zcap.js +42 -35
- package/dist/clientAnnex/zcap.js.map +1 -1
- package/dist/clients/policy.d.ts +15 -1
- package/dist/clients/policy.d.ts.map +1 -1
- package/dist/clients/policy.js +12 -6
- package/dist/clients/policy.js.map +1 -1
- package/dist/clients/revocation.d.ts +18 -10
- package/dist/clients/revocation.d.ts.map +1 -1
- package/dist/clients/revocation.js +13 -5
- package/dist/clients/revocation.js.map +1 -1
- package/dist/clients/rosterPolicy.d.ts +10 -2
- package/dist/clients/rosterPolicy.d.ts.map +1 -1
- package/dist/clients/rosterPolicy.js +41 -24
- package/dist/clients/rosterPolicy.js.map +1 -1
- package/dist/descriptors/acquire.d.ts.map +1 -1
- package/dist/descriptors/acquire.js +6 -23
- package/dist/descriptors/acquire.js.map +1 -1
- package/dist/descriptors/cipher.d.ts.map +1 -1
- package/dist/descriptors/cipher.js +5 -0
- package/dist/descriptors/cipher.js.map +1 -1
- package/dist/descriptors/errors.d.ts +43 -0
- package/dist/descriptors/errors.d.ts.map +1 -0
- package/dist/descriptors/errors.js +45 -0
- package/dist/descriptors/errors.js.map +1 -0
- package/dist/descriptors/index.d.ts +5 -0
- package/dist/descriptors/index.d.ts.map +1 -1
- package/dist/descriptors/index.js +5 -0
- package/dist/descriptors/index.js.map +1 -1
- package/dist/enrollment/enrollment.d.ts +37 -10
- package/dist/enrollment/enrollment.d.ts.map +1 -1
- package/dist/enrollment/enrollment.js +52 -15
- package/dist/enrollment/enrollment.js.map +1 -1
- package/dist/genesis/accountGenesis.d.ts +42 -11
- package/dist/genesis/accountGenesis.d.ts.map +1 -1
- package/dist/genesis/accountGenesis.js +80 -22
- package/dist/genesis/accountGenesis.js.map +1 -1
- package/dist/genesis/index.d.ts +3 -1
- package/dist/genesis/index.d.ts.map +1 -1
- package/dist/genesis/index.js +3 -1
- package/dist/genesis/index.js.map +1 -1
- package/dist/identity/agents.d.ts +17 -1
- package/dist/identity/agents.d.ts.map +1 -1
- package/dist/identity/agents.js +23 -7
- package/dist/identity/agents.js.map +1 -1
- package/dist/identity/index.d.ts +3 -1
- package/dist/identity/index.d.ts.map +1 -1
- package/dist/identity/index.js +3 -1
- package/dist/identity/index.js.map +1 -1
- package/dist/index.d.ts +6 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/keyring/index.d.ts +2 -1
- package/dist/keyring/index.d.ts.map +1 -1
- package/dist/keyring/index.js +2 -1
- package/dist/keyring/index.js.map +1 -1
- package/dist/keyring/record.d.ts.map +1 -1
- package/dist/keyring/record.js +3 -6
- package/dist/keyring/record.js.map +1 -1
- package/dist/keyring/unlockSpace.d.ts +14 -5
- package/dist/keyring/unlockSpace.d.ts.map +1 -1
- package/dist/keyring/unlockSpace.js +31 -36
- package/dist/keyring/unlockSpace.js.map +1 -1
- package/dist/keys/index.d.ts +22 -8
- package/dist/keys/index.d.ts.map +1 -1
- package/dist/keys/index.js +20 -6
- package/dist/keys/index.js.map +1 -1
- package/dist/keys/rosterLogStore.d.ts +15 -12
- package/dist/keys/rosterLogStore.d.ts.map +1 -1
- package/dist/keys/rosterLogStore.js +21 -16
- package/dist/keys/rosterLogStore.js.map +1 -1
- package/dist/keys/rosterStore.d.ts +3 -6
- package/dist/keys/rosterStore.d.ts.map +1 -1
- package/dist/keys/rosterStore.js +10 -9
- package/dist/keys/rosterStore.js.map +1 -1
- package/dist/keys/spaceEpochs.d.ts.map +1 -1
- package/dist/keys/spaceEpochs.js +2 -3
- package/dist/keys/spaceEpochs.js.map +1 -1
- package/dist/keys/userKeyCascade.d.ts +8 -5
- package/dist/keys/userKeyCascade.d.ts.map +1 -1
- package/dist/keys/userKeyCascade.js +7 -6
- package/dist/keys/userKeyCascade.js.map +1 -1
- package/dist/keys/userKeyRoster.d.ts +95 -8
- package/dist/keys/userKeyRoster.d.ts.map +1 -1
- package/dist/keys/userKeyRoster.js +278 -35
- package/dist/keys/userKeyRoster.js.map +1 -1
- package/dist/keys/userKeyRosterCascade.d.ts +117 -16
- package/dist/keys/userKeyRosterCascade.d.ts.map +1 -1
- package/dist/keys/userKeyRosterCascade.js +184 -43
- package/dist/keys/userKeyRosterCascade.js.map +1 -1
- package/dist/keys/wasLabelsStore.d.ts +9 -2
- package/dist/keys/wasLabelsStore.d.ts.map +1 -1
- package/dist/keys/wasLabelsStore.js +14 -6
- package/dist/keys/wasLabelsStore.js.map +1 -1
- package/dist/log.d.ts +7 -2
- package/dist/log.d.ts.map +1 -1
- package/dist/log.js +6 -1
- package/dist/log.js.map +1 -1
- package/dist/recovery/index.d.ts +13 -9
- package/dist/recovery/index.d.ts.map +1 -1
- package/dist/recovery/index.js +12 -8
- package/dist/recovery/index.js.map +1 -1
- package/dist/recovery/recoveryCode.d.ts +27 -7
- package/dist/recovery/recoveryCode.d.ts.map +1 -1
- package/dist/recovery/recoveryCode.js +18 -6
- package/dist/recovery/recoveryCode.js.map +1 -1
- package/dist/recovery/recoveryDelegation.d.ts +23 -0
- package/dist/recovery/recoveryDelegation.d.ts.map +1 -1
- package/dist/recovery/recoveryDelegation.js +66 -46
- package/dist/recovery/recoveryDelegation.js.map +1 -1
- package/dist/recovery/recoveryWebvh.d.ts +75 -63
- package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
- package/dist/recovery/recoveryWebvh.js +127 -116
- package/dist/recovery/recoveryWebvh.js.map +1 -1
- package/dist/request/appKey.d.ts +35 -1
- package/dist/request/appKey.d.ts.map +1 -1
- package/dist/request/appKey.js +29 -10
- package/dist/request/appKey.js.map +1 -1
- package/dist/request/classify.d.ts +32 -8
- package/dist/request/classify.d.ts.map +1 -1
- package/dist/request/classify.js +39 -14
- package/dist/request/classify.js.map +1 -1
- package/dist/request/ephemeralExchange.d.ts +1 -6
- package/dist/request/ephemeralExchange.d.ts.map +1 -1
- package/dist/request/ephemeralExchange.js.map +1 -1
- package/dist/request/onboarding.d.ts.map +1 -1
- package/dist/request/onboarding.js +2 -2
- package/dist/request/onboarding.js.map +1 -1
- package/dist/request/parse.d.ts.map +1 -1
- package/dist/request/parse.js +2 -3
- package/dist/request/parse.js.map +1 -1
- package/dist/resourceLog/controller.d.ts +34 -12
- package/dist/resourceLog/controller.d.ts.map +1 -1
- package/dist/resourceLog/controller.js +79 -86
- package/dist/resourceLog/controller.js.map +1 -1
- package/dist/resourceLog/document.d.ts +182 -0
- package/dist/resourceLog/document.d.ts.map +1 -0
- package/dist/resourceLog/document.js +159 -0
- package/dist/resourceLog/document.js.map +1 -0
- package/dist/resourceLog/errors.d.ts +47 -8
- package/dist/resourceLog/errors.d.ts.map +1 -1
- package/dist/resourceLog/errors.js +54 -8
- package/dist/resourceLog/errors.js.map +1 -1
- package/dist/resourceLog/index.d.ts +7 -3
- package/dist/resourceLog/index.d.ts.map +1 -1
- package/dist/resourceLog/index.js +7 -3
- package/dist/resourceLog/index.js.map +1 -1
- package/dist/resourceLog/ladderRungs.d.ts +35 -0
- package/dist/resourceLog/ladderRungs.d.ts.map +1 -0
- package/dist/resourceLog/ladderRungs.js +352 -0
- package/dist/resourceLog/ladderRungs.js.map +1 -0
- package/dist/resourceLog/license.d.ts +42 -17
- package/dist/resourceLog/license.d.ts.map +1 -1
- package/dist/resourceLog/license.js +38 -24
- package/dist/resourceLog/license.js.map +1 -1
- package/dist/space/activity.d.ts +15 -15
- package/dist/space/activity.d.ts.map +1 -1
- package/dist/space/activity.js +15 -15
- package/dist/space/activity.js.map +1 -1
- package/dist/space/collections.d.ts +11 -0
- package/dist/space/collections.d.ts.map +1 -1
- package/dist/space/collections.js +13 -0
- package/dist/space/collections.js.map +1 -1
- package/dist/space/deleteSpace.d.ts +28 -0
- package/dist/space/deleteSpace.d.ts.map +1 -0
- package/dist/space/deleteSpace.js +44 -0
- package/dist/space/deleteSpace.js.map +1 -0
- package/dist/space/errors.d.ts.map +1 -1
- package/dist/space/errors.js +0 -1
- package/dist/space/errors.js.map +1 -1
- package/dist/space/index.d.ts +6 -0
- package/dist/space/index.d.ts.map +1 -1
- package/dist/space/index.js +6 -0
- package/dist/space/index.js.map +1 -1
- package/dist/space/plaintextCollection.d.ts +43 -0
- package/dist/space/plaintextCollection.d.ts.map +1 -0
- package/dist/space/plaintextCollection.js +17 -0
- package/dist/space/plaintextCollection.js.map +1 -0
- package/dist/stages.d.ts +23 -0
- package/dist/stages.d.ts.map +1 -0
- package/dist/stages.js +23 -0
- package/dist/stages.js.map +1 -0
- package/dist/sync/index.d.ts +7 -0
- package/dist/sync/index.d.ts.map +1 -1
- package/dist/sync/index.js +7 -0
- package/dist/sync/index.js.map +1 -1
- package/dist/sync/push.js +4 -4
- package/dist/sync/push.js.map +1 -1
- package/dist/sync/remint.js +2 -2
- package/dist/sync/remint.js.map +1 -1
- package/dist/sync/types.d.ts +41 -1
- package/dist/sync/types.d.ts.map +1 -1
- package/dist/sync/types.js +47 -1
- package/dist/sync/types.js.map +1 -1
- package/dist/unlock/index.d.ts +5 -1
- package/dist/unlock/index.d.ts.map +1 -1
- package/dist/unlock/index.js +5 -1
- package/dist/unlock/index.js.map +1 -1
- package/dist/unlock/retire.d.ts +35 -7
- package/dist/unlock/retire.d.ts.map +1 -1
- package/dist/unlock/retire.js +52 -14
- package/dist/unlock/retire.js.map +1 -1
- package/dist/unlock/standingClient.d.ts.map +1 -1
- package/dist/unlock/standingClient.js +5 -1
- package/dist/unlock/standingClient.js.map +1 -1
- package/dist/unlock/standingWebvh.d.ts +217 -35
- package/dist/unlock/standingWebvh.d.ts.map +1 -1
- package/dist/unlock/standingWebvh.js +469 -210
- package/dist/unlock/standingWebvh.js.map +1 -1
- package/dist/webvh/accountEntry.d.ts +146 -0
- package/dist/webvh/accountEntry.d.ts.map +1 -0
- package/dist/webvh/accountEntry.js +239 -0
- package/dist/webvh/accountEntry.js.map +1 -0
- package/dist/webvh/didWeb.d.ts +12 -7
- package/dist/webvh/didWeb.d.ts.map +1 -1
- package/dist/webvh/didWeb.js +2 -2
- package/dist/webvh/didWeb.js.map +1 -1
- package/dist/webvh/didWebProjection.d.ts +164 -0
- package/dist/webvh/didWebProjection.d.ts.map +1 -0
- package/dist/webvh/didWebProjection.js +230 -0
- package/dist/webvh/didWebProjection.js.map +1 -0
- package/dist/webvh/didWebvh.d.ts +275 -136
- package/dist/webvh/didWebvh.d.ts.map +1 -1
- package/dist/webvh/didWebvh.js +307 -340
- package/dist/webvh/didWebvh.js.map +1 -1
- package/dist/webvh/enrollClient.d.ts +65 -0
- package/dist/webvh/enrollClient.d.ts.map +1 -0
- package/dist/webvh/enrollClient.js +172 -0
- package/dist/webvh/enrollClient.js.map +1 -0
- package/dist/webvh/index.d.ts +37 -12
- package/dist/webvh/index.d.ts.map +1 -1
- package/dist/webvh/index.js +33 -10
- package/dist/webvh/index.js.map +1 -1
- package/dist/webvh/listClients.d.ts +1 -35
- package/dist/webvh/listClients.d.ts.map +1 -1
- package/dist/webvh/listClients.js +2 -30
- package/dist/webvh/listClients.js.map +1 -1
- package/dist/webvh/revokeClient.d.ts +41 -11
- package/dist/webvh/revokeClient.d.ts.map +1 -1
- package/dist/webvh/revokeClient.js +99 -48
- package/dist/webvh/revokeClient.js.map +1 -1
- package/dist/webvh/standingZcap.d.ts +61 -14
- package/dist/webvh/standingZcap.d.ts.map +1 -1
- package/dist/webvh/standingZcap.js +91 -0
- package/dist/webvh/standingZcap.js.map +1 -1
- package/dist/webvh/verifyLog.d.ts +59 -5
- package/dist/webvh/verifyLog.d.ts.map +1 -1
- package/dist/webvh/verifyLog.js +76 -11
- package/dist/webvh/verifyLog.js.map +1 -1
- package/dist/webvh/wasIdStore.d.ts +8 -8
- package/dist/webvh/wasIdStore.d.ts.map +1 -1
- package/dist/webvh/wasIdStore.js +39 -14
- package/dist/webvh/wasIdStore.js.map +1 -1
- package/dist/webvh/zcap.d.ts +14 -1
- package/dist/webvh/zcap.d.ts.map +1 -1
- package/dist/webvh/zcap.js +3 -27
- package/dist/webvh/zcap.js.map +1 -1
- package/package.json +2 -2
- package/dist/webvh/keyAgreement.d.ts +0 -97
- package/dist/webvh/keyAgreement.d.ts.map +0 -1
- package/dist/webvh/keyAgreement.js +0 -71
- package/dist/webvh/keyAgreement.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unlockSpace.d.ts","sourceRoot":"","sources":["../../src/keyring/unlockSpace.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"unlockSpace.d.ts","sourceRoot":"","sources":["../../src/keyring/unlockSpace.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAKhD;;;;GAIG;AACH,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ACnD,gBAAgB,EAChB,UAAU,EACV,OAAO,EACP,MAAM,EACN,UAAU,EACX,EAAE;IACD,gBAAgB,EAAE,MAAM,CAAA;IACxB,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,KAAK,CAAA;CAClB,GAAG,OAAO,CAAC,IAAI,CAAC,CAUhB;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,iBAAiB,CAAC,EACtC,gBAAgB,EAChB,UAAU,EACV,OAAO,EACR,EAAE;IACD,gBAAgB,EAAE,MAAM,CAAA;IACxB,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,MAAM,CAAA;CAChB,GAAG,OAAO,CAAC,IAAI,CAAC,CAGhB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,+BAA+B,CAAC,EACpD,gBAAgB,EAChB,UAAU,EACV,OAAO,EACP,UAAU,EACX,EAAE;IACD,gBAAgB,EAAE,MAAM,CAAA;IACxB,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,KAAK,CAAA;CAClB,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,SAAS,GAAG,WAAW,CAAA;CAAE,CAAC,CAOhD"}
|
|
@@ -11,18 +11,15 @@
|
|
|
11
11
|
* invocation shape the data Space uses).
|
|
12
12
|
*
|
|
13
13
|
* The one resource is a plaintext JSON document (its keyring payload is
|
|
14
|
-
* already ciphertext), so no encryption provider is wired in
|
|
15
|
-
* read/write
|
|
16
|
-
*
|
|
17
|
-
* encrypted by reading the collection description, and when the unlock Space
|
|
18
|
-
* does not exist yet (every keyring lookup for a fresh unlock secret) that read
|
|
19
|
-
* 404s and the client refuses to guess, throwing an EncryptionError instead of
|
|
20
|
-
* surfacing the miss as a 404-shaped `null`.
|
|
14
|
+
* already ciphertext), so no encryption provider is wired in and every
|
|
15
|
+
* read/write handle is built by {@link plaintextCollection} -- load-bearing
|
|
16
|
+
* here for the absent Space a fresh unlock secret's keyring lookup meets.
|
|
21
17
|
*/
|
|
22
18
|
import { WasClient } from '@interop/was-client';
|
|
23
|
-
import { resourcePath
|
|
24
|
-
import { errorStatus } from '@interop/was-client/sync';
|
|
19
|
+
import { resourcePath } from '@interop/was-client/paths';
|
|
25
20
|
import { KEYRING_COLLECTION, KEYRING_RESOURCE } from '../space/collections.js';
|
|
21
|
+
import { deleteSpaceWithCapability } from '../space/deleteSpace.js';
|
|
22
|
+
import { plaintextCollection } from '../space/plaintextCollection.js';
|
|
26
23
|
/**
|
|
27
24
|
* The default Space Description name an unlock Space is configured with.
|
|
28
25
|
* Wire-visible (it is the Space's stored name), so it stays stable across
|
|
@@ -82,9 +79,7 @@ async function ensurePlaintextCollection({ storageServerUrl, zcapClient, spaceId
|
|
|
82
79
|
*/
|
|
83
80
|
async function getPlaintextRecord({ storageServerUrl, zcapClient, spaceId, collectionId, resourceId }) {
|
|
84
81
|
const was = unlockSpaceClient({ storageServerUrl, zcapClient });
|
|
85
|
-
const result = await was
|
|
86
|
-
.space(spaceId)
|
|
87
|
-
.collection(collectionId, { encryption: 'plaintext' })
|
|
82
|
+
const result = await plaintextCollection({ was, spaceId, collectionId })
|
|
88
83
|
.resource(resourceId)
|
|
89
84
|
.get();
|
|
90
85
|
return result === null ? null : result;
|
|
@@ -105,9 +100,7 @@ async function getPlaintextRecord({ storageServerUrl, zcapClient, spaceId, colle
|
|
|
105
100
|
async function putPlaintextRecord({ storageServerUrl, zcapClient, spaceId, collectionId, resourceId, record }) {
|
|
106
101
|
const was = unlockSpaceClient({ storageServerUrl, zcapClient });
|
|
107
102
|
const body = new TextEncoder().encode(JSON.stringify(record));
|
|
108
|
-
await was
|
|
109
|
-
.space(spaceId)
|
|
110
|
-
.collection(collectionId, { encryption: 'plaintext' })
|
|
103
|
+
await plaintextCollection({ was, spaceId, collectionId })
|
|
111
104
|
.resource(resourceId)
|
|
112
105
|
.put(body, { contentType: 'application/json' });
|
|
113
106
|
}
|
|
@@ -197,9 +190,12 @@ export async function putUnlockKeyring({ storageServerUrl, zcapClient, spaceId,
|
|
|
197
190
|
*/
|
|
198
191
|
export async function getUnlockKeyringWithCapability({ storageServerUrl, zcapClient, spaceId, capability }) {
|
|
199
192
|
const was = unlockSpaceClient({ storageServerUrl, zcapClient });
|
|
200
|
-
const result = await
|
|
201
|
-
|
|
202
|
-
|
|
193
|
+
const result = await plaintextCollection({
|
|
194
|
+
was,
|
|
195
|
+
spaceId,
|
|
196
|
+
collectionId: KEYRING_COLLECTION.id,
|
|
197
|
+
capability
|
|
198
|
+
})
|
|
203
199
|
.resource(KEYRING_RESOURCE)
|
|
204
200
|
.get();
|
|
205
201
|
return result === null ? null : result;
|
|
@@ -254,33 +250,32 @@ export async function deleteUnlockSpace({ storageServerUrl, zcapClient, spaceId
|
|
|
254
250
|
* Deletes an unlock Space with an explicitly attached management capability,
|
|
255
251
|
* rather than by root invocation. The `zcapClient` here is the DATA identity's
|
|
256
252
|
* (not the unlock identity's); the attached `capability` -- the management zcap
|
|
257
|
-
* the unlock identity delegated to the data identity at bind time
|
|
258
|
-
*
|
|
253
|
+
* the unlock identity delegated to the data identity at bind time, or a
|
|
254
|
+
* single-verb DELETE child of it -- is what authorizes the DELETE against the
|
|
255
|
+
* unlock Space. This is the tap-free
|
|
259
256
|
* revocation path for a lost unlock method: the data identity can retire it
|
|
260
257
|
* without re-deriving the unlock identity from the (possibly lost) secret. A
|
|
261
|
-
* 404 is
|
|
258
|
+
* 404 is REPORTED rather than decided here: a caller retiring a method reads
|
|
259
|
+
* it as idempotent success, while a deletion walk records the Space as
|
|
260
|
+
* already gone. `not-found` means the server answered 404, which is absent OR
|
|
261
|
+
* unauthorized -- was-teaching-server masks a refused invocation as 404, and
|
|
262
|
+
* the two are indistinguishable on the wire -- so no caller may read the
|
|
263
|
+
* outcome as absence without its own prior discovery.
|
|
262
264
|
*
|
|
263
265
|
* @param options {object}
|
|
264
266
|
* @param options.storageServerUrl {string}
|
|
265
267
|
* @param options.zcapClient {ZcapClient} the data identity's client
|
|
266
268
|
* @param options.spaceId {string} the unlock Space id
|
|
267
269
|
* @param options.capability {IZcap} the delegated management zcap
|
|
268
|
-
* @returns {Promise<
|
|
270
|
+
* @returns {Promise<{ outcome: 'deleted' | 'not-found' }>} `not-found` when
|
|
271
|
+
* the server answered 404 (absent or unauthorized, indistinguishable)
|
|
269
272
|
*/
|
|
270
273
|
export async function deleteUnlockSpaceWithCapability({ storageServerUrl, zcapClient, spaceId, capability }) {
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
});
|
|
278
|
-
}
|
|
279
|
-
catch (err) {
|
|
280
|
-
if (errorStatus(err) === 404) {
|
|
281
|
-
return;
|
|
282
|
-
}
|
|
283
|
-
throw err;
|
|
284
|
-
}
|
|
274
|
+
return deleteSpaceWithCapability({
|
|
275
|
+
storageServerUrl,
|
|
276
|
+
zcapClient,
|
|
277
|
+
spaceId,
|
|
278
|
+
capability
|
|
279
|
+
});
|
|
285
280
|
}
|
|
286
281
|
//# sourceMappingURL=unlockSpace.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unlockSpace.js","sourceRoot":"","sources":["../../src/keyring/unlockSpace.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"unlockSpace.js","sourceRoot":"","sources":["../../src/keyring/unlockSpace.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAGxD,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC9E,OAAO,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAA;AACnE,OAAO,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,kBAAkB,EAAE;QAC/C,IAAI;KACL,CAAC,CAAA;AACJ,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,EACtC,gBAAgB,EAChB,UAAU,EACV,OAAO,EAKR;IACC,MAAM,GAAG,GAAG,iBAAiB,CAAC,EAAE,gBAAgB,EAAE,UAAU,EAAE,CAAC,CAAA;IAC/D,MAAM,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAA;AACnC,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,KAAK,UAAU,+BAA+B,CAAC,EACpD,gBAAgB,EAChB,UAAU,EACV,OAAO,EACP,UAAU,EAMX;IACC,OAAO,yBAAyB,CAAC;QAC/B,gBAAgB;QAChB,UAAU;QACV,OAAO;QACP,UAAU;KACX,CAAC,CAAA;AACJ,CAAC"}
|
package/dist/keys/index.d.ts
CHANGED
|
@@ -18,6 +18,10 @@
|
|
|
18
18
|
* resource-hosted descriptor needs (the governing resource log, the
|
|
19
19
|
* latest-seen epoch pin, and a recipient resolver backed by the locally
|
|
20
20
|
* verified did:webvh document).
|
|
21
|
+
* - `currentEpochOf` -- the one implementation of "resolve a descriptor's
|
|
22
|
+
* current epoch, refusing a `currentEpoch` that names no epoch in its own
|
|
23
|
+
* list" (`UserKeyRosterIntegrityError`); every roster and collection
|
|
24
|
+
* descriptor read that needs the current epoch goes through it.
|
|
21
25
|
* - `userKeyRosterDescriptorStore` / `logGovernedDescriptorStore` -- that
|
|
22
26
|
* descriptor store: reads resolve to the roster log's verified head
|
|
23
27
|
* (`key-map/user-key.jsonl`), writes append signed entries; built from a
|
|
@@ -28,9 +32,13 @@
|
|
|
28
32
|
* - `rosterRecipientKid` -- the one builder of a client's roster kid, shared by
|
|
29
33
|
* the enrollment wrap and the roster read. A retiring rotation names no kid:
|
|
30
34
|
* it converges onto the account document instead.
|
|
31
|
-
* - `convergeUserKeyRosterToDocument` -- the standing detector for a
|
|
32
|
-
*
|
|
33
|
-
* recipient the document no longer keys is rotated
|
|
35
|
+
* - `convergeUserKeyRosterToDocument` -- the standing detector for a ceremony
|
|
36
|
+
* torn between its document edit and its roster append, in two directions
|
|
37
|
+
* and one append: a roster recipient the document no longer keys is rotated
|
|
38
|
+
* away from, and an enrolled client the document keys that holds no wrap is
|
|
39
|
+
* escrowed into every epoch.
|
|
40
|
+
* - `enrolledClientRosterRecipients` -- the enrolled clients a document keys,
|
|
41
|
+
* as roster recipients; the escrow direction's candidate list.
|
|
34
42
|
* - `readClientLabels` / `setClientLabel` / `removeClientLabel` /
|
|
35
43
|
* `wasClientLabelsStore` -- the enrolled-client display labels
|
|
36
44
|
* (`key-map/client-labels.json`), the record a "your wallets" surface names
|
|
@@ -44,9 +52,15 @@
|
|
|
44
52
|
* names (also the completion sweep's driver).
|
|
45
53
|
* - `rotateRosterToDocumentAndCascade` -- the shared roster-and-cascade tail
|
|
46
54
|
* every account-membership ceremony ends with (a client disconnected, a
|
|
47
|
-
* standing unlock credential retired): the post-edit controller
|
|
55
|
+
* standing unlock credential retired): the post-edit minimum controller version, the
|
|
48
56
|
* convergence rotation with its seal backstop, and the collection fan-out
|
|
49
57
|
* onto the fresh user key.
|
|
58
|
+
* - `retireRosterRecipientAndCascade` -- the same tail for a ceremony that
|
|
59
|
+
* rotates BEFORE its document edit (the two forgets): the minimum
|
|
60
|
+
* controller version at the caller's anchor, one named recipient retired
|
|
61
|
+
* (`rosterWrapsRecipient` deciding whether the append is still owed), the
|
|
62
|
+
* fresh key read back through a surviving recipient's wrap, and the same
|
|
63
|
+
* fan-out; no seal backstop.
|
|
50
64
|
* - `ensureWalletSpaceEpochs` -- the provision-time epoch[0] install for the
|
|
51
65
|
* wallet Space's encrypted collections, the EDV-bearing second step of
|
|
52
66
|
* `provisionWalletSpace`.
|
|
@@ -57,13 +71,13 @@ export { mintUserKey, userKeyVaultKeys } from './userKey.js';
|
|
|
57
71
|
export type { UserKey } from './userKey.js';
|
|
58
72
|
export { assertEnrolledClientKeyRecord, decodeClientKeyRecord, encodeClientKeyRecord, isEnrolledClientKeyRecord, parseClientRecordPending, parseClientRecordUserKey, parseClientRecordWebvhKeys } from './clientKeyRecord.js';
|
|
59
73
|
export type { ClientKeyRecord, ClientKeyRecordJson, ClientKeyRecordPending, EnrolledClientKeyRecord } from './clientKeyRecord.js';
|
|
60
|
-
export { addUserKeyRosterRecipient, convergeUserKeyRosterToDocument, ensureUserKeyRoster, UserKeyRosterContinuityError, UserKeyRosterIntegrityError, UserKeyRosterUnwrapError, userKeyRosterLogSigner, userKeyRosterRecipientResolver, readUserKeyRoster, replaceUserKeyRosterRecipients, rosterRecipientKid, rosterRecipientsToRetire, rotateUserKeyRoster } from './userKeyRoster.js';
|
|
74
|
+
export { addUserKeyRosterRecipient, convergeUserKeyRosterToDocument, currentEpochOf, enrolledClientRosterRecipients, ensureUserKeyRoster, UserKeyRosterContinuityError, UserKeyRosterIntegrityError, UserKeyRosterUnwrapError, userKeyRosterLogSigner, userKeyRosterRecipientResolver, readUserKeyRoster, replaceUserKeyRosterRecipients, rosterRecipientKid, rosterRecipientsToRetire, rosterWrapsRecipient, rotateUserKeyRoster } from './userKeyRoster.js';
|
|
61
75
|
export { cascadeCollectionsToUserKey, userKeyAsRecipient, rotateCollectionEpochsToUserKey, unwrapUserKeyGenerations } from './userKeyCascade.js';
|
|
62
76
|
export type { CollectionUserKeyRotationOutcome, UserKeyCascadeResult } from './userKeyCascade.js';
|
|
63
|
-
export { rotateRosterToDocumentAndCascade } from './userKeyRosterCascade.js';
|
|
64
|
-
export type { CascadeCollections, RosterCascadeResult, RosterSealReport } from './userKeyRosterCascade.js';
|
|
77
|
+
export { anchorRosterStoreAt, retireRosterRecipientAndCascade, rotateRosterToDocumentAndCascade } from './userKeyRosterCascade.js';
|
|
78
|
+
export type { CascadeCollections, RosterCascadeResult, RosterSealReport, UserKeyAdoptedHook } from './userKeyRosterCascade.js';
|
|
65
79
|
export type { UserKeyRosterReadResult } from './userKeyRoster.js';
|
|
66
|
-
export type { KeyAgreementDocument } from '../
|
|
80
|
+
export type { KeyAgreementDocument } from '../resourceLog/document.js';
|
|
67
81
|
export { userKeyRosterDescriptorStore, userKeyRosterPinId } from './rosterStore.js';
|
|
68
82
|
export { EPOCH_CONFIGURATION_STATE_TYPE, isSealableDescriptorStore, logGovernedDescriptorStore } from './rosterLogStore.js';
|
|
69
83
|
export type { SealableEncryptionDescriptorStore } from './rosterLogStore.js';
|
package/dist/keys/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/keys/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/keys/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AACH,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC5D,YAAY,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAE3C,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,EACrB,qBAAqB,EACrB,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC3B,MAAM,sBAAsB,CAAA;AAC7B,YAAY,EACV,eAAe,EACf,mBAAmB,EACnB,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EACL,yBAAyB,EACzB,+BAA+B,EAC/B,cAAc,EACd,8BAA8B,EAC9B,mBAAmB,EACnB,4BAA4B,EAC5B,2BAA2B,EAC3B,wBAAwB,EACxB,sBAAsB,EACtB,8BAA8B,EAC9B,iBAAiB,EACjB,8BAA8B,EAC9B,kBAAkB,EAClB,wBAAwB,EACxB,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,2BAA2B,EAC3B,kBAAkB,EAClB,+BAA+B,EAC/B,wBAAwB,EACzB,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EACV,gCAAgC,EAChC,oBAAoB,EACrB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,mBAAmB,EACnB,+BAA+B,EAC/B,gCAAgC,EACjC,MAAM,2BAA2B,CAAA;AAClC,YAAY,EACV,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,2BAA2B,CAAA;AAClC,YAAY,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AACjE,YAAY,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAEtE,OAAO,EACL,4BAA4B,EAC5B,kBAAkB,EACnB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,8BAA8B,EAC9B,yBAAyB,EACzB,0BAA0B,EAC3B,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EAAE,iCAAiC,EAAE,MAAM,qBAAqB,CAAA;AAE5E,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,kBAAkB,CAAA;AACzB,YAAY,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAE/D,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACf,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAE9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA"}
|
package/dist/keys/index.js
CHANGED
|
@@ -18,6 +18,10 @@
|
|
|
18
18
|
* resource-hosted descriptor needs (the governing resource log, the
|
|
19
19
|
* latest-seen epoch pin, and a recipient resolver backed by the locally
|
|
20
20
|
* verified did:webvh document).
|
|
21
|
+
* - `currentEpochOf` -- the one implementation of "resolve a descriptor's
|
|
22
|
+
* current epoch, refusing a `currentEpoch` that names no epoch in its own
|
|
23
|
+
* list" (`UserKeyRosterIntegrityError`); every roster and collection
|
|
24
|
+
* descriptor read that needs the current epoch goes through it.
|
|
21
25
|
* - `userKeyRosterDescriptorStore` / `logGovernedDescriptorStore` -- that
|
|
22
26
|
* descriptor store: reads resolve to the roster log's verified head
|
|
23
27
|
* (`key-map/user-key.jsonl`), writes append signed entries; built from a
|
|
@@ -28,9 +32,13 @@
|
|
|
28
32
|
* - `rosterRecipientKid` -- the one builder of a client's roster kid, shared by
|
|
29
33
|
* the enrollment wrap and the roster read. A retiring rotation names no kid:
|
|
30
34
|
* it converges onto the account document instead.
|
|
31
|
-
* - `convergeUserKeyRosterToDocument` -- the standing detector for a
|
|
32
|
-
*
|
|
33
|
-
* recipient the document no longer keys is rotated
|
|
35
|
+
* - `convergeUserKeyRosterToDocument` -- the standing detector for a ceremony
|
|
36
|
+
* torn between its document edit and its roster append, in two directions
|
|
37
|
+
* and one append: a roster recipient the document no longer keys is rotated
|
|
38
|
+
* away from, and an enrolled client the document keys that holds no wrap is
|
|
39
|
+
* escrowed into every epoch.
|
|
40
|
+
* - `enrolledClientRosterRecipients` -- the enrolled clients a document keys,
|
|
41
|
+
* as roster recipients; the escrow direction's candidate list.
|
|
34
42
|
* - `readClientLabels` / `setClientLabel` / `removeClientLabel` /
|
|
35
43
|
* `wasClientLabelsStore` -- the enrolled-client display labels
|
|
36
44
|
* (`key-map/client-labels.json`), the record a "your wallets" surface names
|
|
@@ -44,9 +52,15 @@
|
|
|
44
52
|
* names (also the completion sweep's driver).
|
|
45
53
|
* - `rotateRosterToDocumentAndCascade` -- the shared roster-and-cascade tail
|
|
46
54
|
* every account-membership ceremony ends with (a client disconnected, a
|
|
47
|
-
* standing unlock credential retired): the post-edit controller
|
|
55
|
+
* standing unlock credential retired): the post-edit minimum controller version, the
|
|
48
56
|
* convergence rotation with its seal backstop, and the collection fan-out
|
|
49
57
|
* onto the fresh user key.
|
|
58
|
+
* - `retireRosterRecipientAndCascade` -- the same tail for a ceremony that
|
|
59
|
+
* rotates BEFORE its document edit (the two forgets): the minimum
|
|
60
|
+
* controller version at the caller's anchor, one named recipient retired
|
|
61
|
+
* (`rosterWrapsRecipient` deciding whether the append is still owed), the
|
|
62
|
+
* fresh key read back through a surviving recipient's wrap, and the same
|
|
63
|
+
* fan-out; no seal backstop.
|
|
50
64
|
* - `ensureWalletSpaceEpochs` -- the provision-time epoch[0] install for the
|
|
51
65
|
* wallet Space's encrypted collections, the EDV-bearing second step of
|
|
52
66
|
* `provisionWalletSpace`.
|
|
@@ -55,9 +69,9 @@
|
|
|
55
69
|
*/
|
|
56
70
|
export { mintUserKey, userKeyVaultKeys } from './userKey.js';
|
|
57
71
|
export { assertEnrolledClientKeyRecord, decodeClientKeyRecord, encodeClientKeyRecord, isEnrolledClientKeyRecord, parseClientRecordPending, parseClientRecordUserKey, parseClientRecordWebvhKeys } from './clientKeyRecord.js';
|
|
58
|
-
export { addUserKeyRosterRecipient, convergeUserKeyRosterToDocument, ensureUserKeyRoster, UserKeyRosterContinuityError, UserKeyRosterIntegrityError, UserKeyRosterUnwrapError, userKeyRosterLogSigner, userKeyRosterRecipientResolver, readUserKeyRoster, replaceUserKeyRosterRecipients, rosterRecipientKid, rosterRecipientsToRetire, rotateUserKeyRoster } from './userKeyRoster.js';
|
|
72
|
+
export { addUserKeyRosterRecipient, convergeUserKeyRosterToDocument, currentEpochOf, enrolledClientRosterRecipients, ensureUserKeyRoster, UserKeyRosterContinuityError, UserKeyRosterIntegrityError, UserKeyRosterUnwrapError, userKeyRosterLogSigner, userKeyRosterRecipientResolver, readUserKeyRoster, replaceUserKeyRosterRecipients, rosterRecipientKid, rosterRecipientsToRetire, rosterWrapsRecipient, rotateUserKeyRoster } from './userKeyRoster.js';
|
|
59
73
|
export { cascadeCollectionsToUserKey, userKeyAsRecipient, rotateCollectionEpochsToUserKey, unwrapUserKeyGenerations } from './userKeyCascade.js';
|
|
60
|
-
export { rotateRosterToDocumentAndCascade } from './userKeyRosterCascade.js';
|
|
74
|
+
export { anchorRosterStoreAt, retireRosterRecipientAndCascade, rotateRosterToDocumentAndCascade } from './userKeyRosterCascade.js';
|
|
61
75
|
export { userKeyRosterDescriptorStore, userKeyRosterPinId } from './rosterStore.js';
|
|
62
76
|
export { EPOCH_CONFIGURATION_STATE_TYPE, isSealableDescriptorStore, logGovernedDescriptorStore } from './rosterLogStore.js';
|
|
63
77
|
export { ensureIndexedFirstEpoch, ensureWalletSpaceEpochs } from './spaceEpochs.js';
|
package/dist/keys/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/keys/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/keys/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AACH,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAG5D,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,EACrB,qBAAqB,EACrB,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC3B,MAAM,sBAAsB,CAAA;AAQ7B,OAAO,EACL,yBAAyB,EACzB,+BAA+B,EAC/B,cAAc,EACd,8BAA8B,EAC9B,mBAAmB,EACnB,4BAA4B,EAC5B,2BAA2B,EAC3B,wBAAwB,EACxB,sBAAsB,EACtB,8BAA8B,EAC9B,iBAAiB,EACjB,8BAA8B,EAC9B,kBAAkB,EAClB,wBAAwB,EACxB,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,2BAA2B,EAC3B,kBAAkB,EAClB,+BAA+B,EAC/B,wBAAwB,EACzB,MAAM,qBAAqB,CAAA;AAK5B,OAAO,EACL,mBAAmB,EACnB,+BAA+B,EAC/B,gCAAgC,EACjC,MAAM,2BAA2B,CAAA;AAUlC,OAAO,EACL,4BAA4B,EAC5B,kBAAkB,EACnB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,8BAA8B,EAC9B,yBAAyB,EACzB,0BAA0B,EAC3B,MAAM,qBAAqB,CAAA;AAG5B,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,kBAAkB,CAAA;AAGzB,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACf,MAAM,mBAAmB,CAAA;AAG1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -13,19 +13,20 @@ export { EPOCH_CONFIGURATION_STATE_TYPE };
|
|
|
13
13
|
* already sealed, absent, or has no membership change to seal against --
|
|
14
14
|
* `'noop'`.
|
|
15
15
|
*
|
|
16
|
-
* `
|
|
17
|
-
* just extended the account log (a revocation about to rotate
|
|
18
|
-
*
|
|
19
|
-
* store
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
16
|
+
* `setMinimumControllerVersion()` is the post-edit freshness contract: a
|
|
17
|
+
* ceremony that just extended the account log (a revocation about to rotate
|
|
18
|
+
* the roster, a ladder-signed enrollment approval about to escrow) hands the
|
|
19
|
+
* store the controller view built from that post-edit log, and the store's
|
|
20
|
+
* subsequent operations never resolve to anything staler. The injected
|
|
21
|
+
* `resolveController` still wins whenever it is at or past the minimum (it
|
|
22
|
+
* may be fresher -- a concurrent enrollment), so the minimum supersedes only
|
|
23
|
+
* a stale cached view, which would otherwise anchor the append before the
|
|
24
|
+
* edit: a rotation that leaves the log unsealed with the seal backstop blind
|
|
25
|
+
* to the removal, or a ladder-signed escrow the license refuses.
|
|
25
26
|
*/
|
|
26
27
|
export interface SealableEncryptionDescriptorStore extends EncryptionDescriptorStore {
|
|
27
28
|
seal(): Promise<'sealed' | 'noop'>;
|
|
28
|
-
|
|
29
|
+
setMinimumControllerVersion(options: {
|
|
29
30
|
controller: WebvhResourceLogController;
|
|
30
31
|
}): void;
|
|
31
32
|
}
|
|
@@ -33,7 +34,9 @@ export interface SealableEncryptionDescriptorStore extends EncryptionDescriptorS
|
|
|
33
34
|
* Whether a descriptor store is log-governed and sealable -- the guard the
|
|
34
35
|
* ceremonies and sweeps use to run the seal backstop only where a governing
|
|
35
36
|
* log exists (an ordinary Collection-Description-backed store has nothing to
|
|
36
|
-
* seal).
|
|
37
|
+
* seal). Both members of the interface are probed, since the cascade tail's
|
|
38
|
+
* anchoring preamble relies on the second: a store decorated down to `seal`
|
|
39
|
+
* alone would otherwise pass as anchorable and never be anchored.
|
|
37
40
|
*
|
|
38
41
|
* @param store {EncryptionDescriptorStore}
|
|
39
42
|
* @returns {boolean}
|
|
@@ -47,7 +50,7 @@ export declare function isSealableDescriptorStore(store: EncryptionDescriptorSto
|
|
|
47
50
|
* roster -- writes entries carrying the post-edit head it now verifies,
|
|
48
51
|
* which is exactly what makes its rotation the sealing append. The revocation
|
|
49
52
|
* orchestrator does not leave that freshness to the injected resolver's
|
|
50
|
-
* wiring: it calls `
|
|
53
|
+
* wiring: it calls `setMinimumControllerVersion` with the view built from the edit's
|
|
51
54
|
* own post-edit log, and a resolver still serving a stale cached view is
|
|
52
55
|
* superseded by it (see the interface doc).
|
|
53
56
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rosterLogStore.d.ts","sourceRoot":"","sources":["../../src/keys/rosterLogStore.ts"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAA;AAExE,OAAO,EASL,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EAEtB,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAA;AACzE,OAAO,EACL,8BAA8B,EAE/B,MAAM,6BAA6B,CAAA;AAEpC,OAAO,EAAE,8BAA8B,EAAE,CAAA;AAEzC
|
|
1
|
+
{"version":3,"file":"rosterLogStore.d.ts","sourceRoot":"","sources":["../../src/keys/rosterLogStore.ts"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAA;AAExE,OAAO,EASL,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EAEtB,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAA;AACzE,OAAO,EACL,8BAA8B,EAE/B,MAAM,6BAA6B,CAAA;AAEpC,OAAO,EAAE,8BAA8B,EAAE,CAAA;AAEzC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,WAAW,iCAAkC,SAAQ,yBAAyB;IAClF,IAAI,IAAI,OAAO,CAAC,QAAQ,GAAG,MAAM,CAAC,CAAA;IAClC,2BAA2B,CAAC,OAAO,EAAE;QACnC,UAAU,EAAE,0BAA0B,CAAA;KACvC,GAAG,IAAI,CAAA;CACT;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,yBAAyB,GAC/B,KAAK,IAAI,iCAAiC,CAM5C;AAuBD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,0BAA0B,CAAC,EACzC,GAAG,EACH,iBAAiB,EACjB,QAAQ,EACR,KAAK,EACL,MAAM,EACP,EAAE;IACD,GAAG,EAAE,gBAAgB,CAAA;IACrB,iBAAiB,EAAE,MAAM,OAAO,CAAC,0BAA0B,CAAC,CAAA;IAC5D,QAAQ,EAAE,mBAAmB,CAAA;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,iBAAiB,CAAA;CAC1B,GAAG,iCAAiC,CA0PpC"}
|
|
@@ -38,14 +38,17 @@ export { EPOCH_CONFIGURATION_STATE_TYPE };
|
|
|
38
38
|
* Whether a descriptor store is log-governed and sealable -- the guard the
|
|
39
39
|
* ceremonies and sweeps use to run the seal backstop only where a governing
|
|
40
40
|
* log exists (an ordinary Collection-Description-backed store has nothing to
|
|
41
|
-
* seal).
|
|
41
|
+
* seal). Both members of the interface are probed, since the cascade tail's
|
|
42
|
+
* anchoring preamble relies on the second: a store decorated down to `seal`
|
|
43
|
+
* alone would otherwise pass as anchorable and never be anchored.
|
|
42
44
|
*
|
|
43
45
|
* @param store {EncryptionDescriptorStore}
|
|
44
46
|
* @returns {boolean}
|
|
45
47
|
*/
|
|
46
48
|
export function isSealableDescriptorStore(store) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
+
const candidate = store;
|
|
50
|
+
return (typeof candidate.seal === 'function' &&
|
|
51
|
+
typeof candidate.setMinimumControllerVersion === 'function');
|
|
49
52
|
}
|
|
50
53
|
/**
|
|
51
54
|
* Translates the log-store port's CAS conflict (the library's
|
|
@@ -75,7 +78,7 @@ function asDescriptorStoreConflict(err) {
|
|
|
75
78
|
* roster -- writes entries carrying the post-edit head it now verifies,
|
|
76
79
|
* which is exactly what makes its rotation the sealing append. The revocation
|
|
77
80
|
* orchestrator does not leave that freshness to the injected resolver's
|
|
78
|
-
* wiring: it calls `
|
|
81
|
+
* wiring: it calls `setMinimumControllerVersion` with the view built from the edit's
|
|
79
82
|
* own post-edit log, and a resolver still serving a stale cached view is
|
|
80
83
|
* superseded by it (see the interface doc).
|
|
81
84
|
*
|
|
@@ -103,19 +106,21 @@ export function logGovernedDescriptorStore({ log, resolveController, pinStore, l
|
|
|
103
106
|
// THAT view's version list, so a replace may only run it against a view
|
|
104
107
|
// this one is a prefix of.
|
|
105
108
|
let lastVerifiedView = null;
|
|
106
|
-
// The
|
|
107
|
-
|
|
109
|
+
// The minimum controller version a post-edit ceremony set (see the
|
|
110
|
+
// interface doc).
|
|
111
|
+
let minimumControllerVersion = null;
|
|
108
112
|
async function currentController() {
|
|
109
113
|
const resolved = await resolveController();
|
|
110
|
-
if (
|
|
114
|
+
if (minimumControllerVersion === null) {
|
|
111
115
|
return resolved;
|
|
112
116
|
}
|
|
113
|
-
const
|
|
114
|
-
// A resolved view carrying the
|
|
115
|
-
//
|
|
116
|
-
//
|
|
117
|
-
if (
|
|
118
|
-
|
|
117
|
+
const minimumHead = minimumControllerVersion.versionIds[minimumControllerVersion.versionIds.length - 1];
|
|
118
|
+
// A resolved view carrying the minimum's head version is at or past it
|
|
119
|
+
// (the controller-log version list is append-only) and wins; one that
|
|
120
|
+
// does not is a stale cache the minimum supersedes.
|
|
121
|
+
if (minimumHead !== undefined &&
|
|
122
|
+
!resolved.versionIds.includes(minimumHead)) {
|
|
123
|
+
return minimumControllerVersion;
|
|
119
124
|
}
|
|
120
125
|
return resolved;
|
|
121
126
|
}
|
|
@@ -177,7 +182,7 @@ export function logGovernedDescriptorStore({ log, resolveController, pinStore, l
|
|
|
177
182
|
// account log is append-only, so carrying its head version is enough).
|
|
178
183
|
// A resolver that regressed is reported as the port's conflict class,
|
|
179
184
|
// so the edv machinery re-reads under the current view and rebases
|
|
180
|
-
// instead of the pass refusing on a
|
|
185
|
+
// instead of the pass refusing on a bound that indexes another list.
|
|
181
186
|
const verifiedHead = lastVerifiedView?.versionIds[lastVerifiedView.versionIds.length - 1];
|
|
182
187
|
if (verifiedHead !== undefined &&
|
|
183
188
|
!controller.versionIds.includes(verifiedHead)) {
|
|
@@ -300,8 +305,8 @@ export function logGovernedDescriptorStore({ log, resolveController, pinStore, l
|
|
|
300
305
|
}
|
|
301
306
|
return sealed ? 'sealed' : 'noop';
|
|
302
307
|
},
|
|
303
|
-
|
|
304
|
-
|
|
308
|
+
setMinimumControllerVersion({ controller }) {
|
|
309
|
+
minimumControllerVersion = controller;
|
|
305
310
|
}
|
|
306
311
|
};
|
|
307
312
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rosterLogStore.js","sourceRoot":"","sources":["../../src/keys/rosterLogStore.ts"],"names":[],"mappings":"AAAA;;GAEG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AAY,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;gBACvB,gBAAgB,GAAG,UAAU,CAAA;YAC/B,CAAC;YACD,OAAO,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAA;QACnC,CAAC;QAED,2BAA2B,CAAC,EAAE,UAAU,EAAE;YACxC,wBAAwB,GAAG,UAAU,CAAA;QACvC,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -9,12 +9,9 @@
|
|
|
9
9
|
* cipher) is built: it takes the bare signing client instead of a store
|
|
10
10
|
* instance.
|
|
11
11
|
*
|
|
12
|
-
* The
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* encryption error rather than as an absent roster; and on an encrypted
|
|
16
|
-
* collection the EDV codec would compute the write preconditions itself, so
|
|
17
|
-
* the log's compare-and-swap append guard would not be honored.
|
|
12
|
+
* The log resource is addressed through {@link plaintextCollection}, whose
|
|
13
|
+
* override keeps an absent roster a 404 rather than an encryption error and
|
|
14
|
+
* leaves the log's compare-and-swap append guard intact.
|
|
18
15
|
*/
|
|
19
16
|
import { type IZcap } from '@interop/was-client';
|
|
20
17
|
import type { ZcapClient } from '@interop/ezcap';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rosterStore.d.ts","sourceRoot":"","sources":["../../src/keys/rosterStore.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"rosterStore.d.ts","sourceRoot":"","sources":["../../src/keys/rosterStore.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;GAWG;AACH,OAAO,EAAa,KAAK,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEhD,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACvB,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAA;AAMzE,OAAO,EAEL,KAAK,iCAAiC,EACvC,MAAM,qBAAqB,CAAA;AAE5B;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAM3E;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,4BAA4B,CAAC,EAC3C,gBAAgB,EAChB,UAAU,EACV,OAAO,EACP,iBAAiB,EACjB,QAAQ,EACR,MAAM,EACN,UAAU,EACX,EAAE;IACD,gBAAgB,EAAE,MAAM,CAAA;IACxB,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,MAAM,CAAA;IACf,iBAAiB,EAAE,MAAM,OAAO,CAAC,0BAA0B,CAAC,CAAA;IAC5D,QAAQ,EAAE,mBAAmB,CAAA;IAC7B,MAAM,EAAE,iBAAiB,CAAA;IACzB,UAAU,CAAC,EAAE,KAAK,CAAA;CACnB,GAAG,iCAAiC,CAiBpC"}
|
package/dist/keys/rosterStore.js
CHANGED
|
@@ -9,17 +9,15 @@
|
|
|
9
9
|
* cipher) is built: it takes the bare signing client instead of a store
|
|
10
10
|
* instance.
|
|
11
11
|
*
|
|
12
|
-
* The
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* encryption error rather than as an absent roster; and on an encrypted
|
|
16
|
-
* collection the EDV codec would compute the write preconditions itself, so
|
|
17
|
-
* the log's compare-and-swap append guard would not be honored.
|
|
12
|
+
* The log resource is addressed through {@link plaintextCollection}, whose
|
|
13
|
+
* override keeps an absent roster a 404 rather than an encryption error and
|
|
14
|
+
* leaves the log's compare-and-swap append guard intact.
|
|
18
15
|
*/
|
|
19
16
|
import { WasClient } from '@interop/was-client';
|
|
20
17
|
import { resourceLogStore } from '@interop/was-client/log';
|
|
21
18
|
import { resourceLogPinId } from '@interop/vh-resource-log';
|
|
22
19
|
import { KEY_MAP_COLLECTION, USER_KEY_ROSTER_LOG_RESOURCE } from '../space/collections.js';
|
|
20
|
+
import { plaintextCollection } from '../space/plaintextCollection.js';
|
|
23
21
|
import { logGovernedDescriptorStore } from './rosterLogStore.js';
|
|
24
22
|
/**
|
|
25
23
|
* The pin-slot key for a Space's user key roster log
|
|
@@ -63,9 +61,12 @@ export function userKeyRosterPinId({ spaceId }) {
|
|
|
63
61
|
*/
|
|
64
62
|
export function userKeyRosterDescriptorStore({ storageServerUrl, zcapClient, spaceId, resolveController, pinStore, signer, capability }) {
|
|
65
63
|
const was = new WasClient({ serverUrl: storageServerUrl, zcapClient });
|
|
66
|
-
const collection =
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
const collection = plaintextCollection({
|
|
65
|
+
was,
|
|
66
|
+
spaceId,
|
|
67
|
+
collectionId: KEY_MAP_COLLECTION.id,
|
|
68
|
+
capability
|
|
69
|
+
});
|
|
69
70
|
return logGovernedDescriptorStore({
|
|
70
71
|
log: resourceLogStore({
|
|
71
72
|
resource: collection.resource(USER_KEY_ROSTER_LOG_RESOURCE)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rosterStore.js","sourceRoot":"","sources":["../../src/keys/rosterStore.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"rosterStore.js","sourceRoot":"","sources":["../../src/keys/rosterStore.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,SAAS,EAAc,MAAM,qBAAqB,CAAA;AAE3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EACL,gBAAgB,EAGjB,MAAM,0BAA0B,CAAA;AAEjC,OAAO,EACL,kBAAkB,E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B,KAAK,EACL,SAAS,EACV,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,yBAAyB,CAAA;AAIhC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAE3C;;;;;GAKG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,MAAM,CACd,MAAM,EACN;QAAE,SAAS,EAAE,OAAO,CAAC;QAAC,UAAU,EAAE,oBAAoB,CAAA;KAAE,CACzD,CAAA;IACD,MAAM,EAAE,KAAK,CAAC;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC,CAAA;CACxD;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,uBAAuB,CAAC,EAC5C,UAAU,EACV,UAAU,EACX,EAAE;IACD,UAAU,EAAE,UAAU,CAAA;IACtB,UAAU,EAAE,kBAAkB,EAAE,CAAA;CACjC,GAAG,OAAO,CAAC;IAAE,UAAU,EAAE,oBAAoB,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAE,CAAC,CAepE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,wBAAsB,uBAAuB,CAAC,EAC5C,GAAG,EACH,OAAO,EACP,OAAO,EACP,aAAa,EACb,UAAU,EACX,EAAE;IACD,GAAG,EAAE,SAAS,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,OAAO,CAAA;IAChB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;IACxB,UAAU,CAAC,EAAE,KAAK,CAAA;CACnB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CA2BnC"}
|
package/dist/keys/spaceEpochs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ensureFirstEpoch } from '@interop/was-client/edv';
|
|
2
|
-
import {
|
|
2
|
+
import { encryptedWalletCollectionIds } from '../space/collections.js';
|
|
3
3
|
import { userKeyAsRecipient } from './userKeyCascade.js';
|
|
4
4
|
/**
|
|
5
5
|
* Installs key epoch[0] on a collection together with its blinded-index HMAC
|
|
@@ -90,8 +90,7 @@ export async function ensureIndexedFirstEpoch({ collection, recipients }) {
|
|
|
90
90
|
* existing roster was adopted), plus the collections that failed
|
|
91
91
|
*/
|
|
92
92
|
export async function ensureWalletSpaceEpochs({ was, spaceId, userKey, collectionIds, capability }) {
|
|
93
|
-
const ids = collectionIds ??
|
|
94
|
-
WALLET_SPACE_PROVISION_ROSTER.filter(spec => spec.encryption === 'edv').map(spec => spec.collectionId);
|
|
93
|
+
const ids = collectionIds ?? encryptedWalletCollectionIds();
|
|
95
94
|
const outcomes = {};
|
|
96
95
|
const failed = [];
|
|
97
96
|
await Promise.all(ids.map(async (collectionId) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spaceEpochs.js","sourceRoot":"","sources":["../../src/keys/spaceEpochs.ts"],"names":[],"mappings":"AAgCA,OAAO,EACL,gBAAgB,EAEjB,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"spaceEpochs.js","sourceRoot":"","sources":["../../src/keys/spaceEpochs.ts"],"names":[],"mappings":"AAgCA,OAAO,EACL,gBAAgB,EAEjB,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAA;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAiBxD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,EAC5C,UAAU,EACV,UAAU,EAIX;IACC,IAAI,CAAC;QACH,OAAO,MAAM,gBAAgB,CAAC;YAC5B,UAAU;YACV,UAAU;YACV,YAAY,EAAE,IAAI;SACnB,CAAC,CAAA;IACJ,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,sE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