@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":"cipher.js","sourceRoot":"","sources":["../../src/descriptors/cipher.ts"],"names":[],"mappings":"AAsCA,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EAElB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EACL,iBAAiB,EAGlB,MAAM,cAAc,CAAA;AAErB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAAC,EACjD,eAAe,EACf,WAAW,EACX,YAAY,EACZ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AAC,IAAI,CAAC,MAAM,CAAC,EAAE;wBACpC,KAAK,GAAG,MAAM,CAAA;oBAChB,CAAC,CAAC,CAAA;oBACF,SAAS,GAAG,OAAO,CAAA;oBACnB,qEAAqE;oBACrE,oEAAoE;oBACpE,qEAAqE;oBACrE,mEAAmE;oBACnE,iEAAiE;oBACjE,0BAA0B;oBAC1B,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE;wBACjB,IAAI,SAAS,KAAK,OAAO,EAAE,CAAC;4BAC1B,SAAS,GAAG,IAAI,CAAA;wBAClB,CAAC;oBACH,CAAC,CAAC,CAAA;gBACJ,CAAC;gBACD,IAAI,CAAC;oBACH,MAAM,SAAS,CAAA;gBACjB,CAAC;gBAAC,MAAM,CAAC;oBACP,mEAAmE;oBACnE,gEAAgE;oBAChE,+DAA+D;oBAC/D,mDAAmD;oBACnD,MAAM,GAAG,CAAA;gBACX,CAAC;gBACD,iEAAiE;gBACjE,8DAA8D;gBAC9D,+DAA+D;gBAC/D,iEAAiE;gBACjE,2BAA2B;gBAC3B,OAAO,KAAK,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAA;YACpC,CAAC;QACH,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2026 Interop Alliance. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* The read-side classification of what an injected `DocCipher` throws when it
|
|
6
|
+
* cannot open an envelope.
|
|
7
|
+
*
|
|
8
|
+
* A decrypt has two distinguishable no-key outcomes, and a host that scans
|
|
9
|
+
* rows must tell them apart: an epoch the descriptor this reader holds does
|
|
10
|
+
* not list at all (`UnknownEpochError` -- possibly fresh data behind a stale
|
|
11
|
+
* descriptor, so a re-read may fix it), and an epoch the descriptor does list
|
|
12
|
+
* but this reader holds no key for (`KeyUnwrapError` -- real data, and
|
|
13
|
+
* permanently unreadable here, since re-reading the same descriptor cannot
|
|
14
|
+
* produce a key the reader was not given). Neither is corruption, so neither
|
|
15
|
+
* row may be treated as garbage.
|
|
16
|
+
*
|
|
17
|
+
* Both are matched on `err.name`, never `instanceof`: the cipher is an
|
|
18
|
+
* injected seam, and in a wallet whose `@interop/was-client` resolves to a
|
|
19
|
+
* second copy (a `link:` dev setup, a dedupe miss through a dependency tree)
|
|
20
|
+
* the class the cipher throws is not the class the caller imported. The cost
|
|
21
|
+
* of the miss lands on real data -- a scan that misses `KeyUnwrapError` drops
|
|
22
|
+
* the row into its undecryptable bucket, which a host is entitled to purge.
|
|
23
|
+
* Both classes assign their `name` explicitly, which is what makes the string
|
|
24
|
+
* a contract.
|
|
25
|
+
*
|
|
26
|
+
* The unknown-epoch half of the pair ships from `@interop/wallet-core/sync`
|
|
27
|
+
* as `isUnknownEpochError`: the create-loss re-mint dispatches on it, and
|
|
28
|
+
* `sync` deliberately imports nothing else in this library. This file is the
|
|
29
|
+
* home of the other half, beside the cipher that raises it, and stays
|
|
30
|
+
* import-free for the same reason `resourceLog/errors.ts` does.
|
|
31
|
+
*/
|
|
32
|
+
/**
|
|
33
|
+
* Whether an error is the cipher's not-a-recipient signal (`KeyUnwrapError`):
|
|
34
|
+
* the envelope's epoch IS on the descriptor this reader holds, but the reader
|
|
35
|
+
* has no key for it -- never a recipient of that epoch, or removed and the
|
|
36
|
+
* epoch rotated since. Real data, unreadable by this wallet, and never
|
|
37
|
+
* garbage: a caller skips such a row and leaves it in place.
|
|
38
|
+
*
|
|
39
|
+
* @param err {unknown}
|
|
40
|
+
* @returns {boolean}
|
|
41
|
+
*/
|
|
42
|
+
export declare function isKeyUnwrapError(err: unknown): boolean;
|
|
43
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/descriptors/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEtD"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2026 Interop Alliance. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* The read-side classification of what an injected `DocCipher` throws when it
|
|
6
|
+
* cannot open an envelope.
|
|
7
|
+
*
|
|
8
|
+
* A decrypt has two distinguishable no-key outcomes, and a host that scans
|
|
9
|
+
* rows must tell them apart: an epoch the descriptor this reader holds does
|
|
10
|
+
* not list at all (`UnknownEpochError` -- possibly fresh data behind a stale
|
|
11
|
+
* descriptor, so a re-read may fix it), and an epoch the descriptor does list
|
|
12
|
+
* but this reader holds no key for (`KeyUnwrapError` -- real data, and
|
|
13
|
+
* permanently unreadable here, since re-reading the same descriptor cannot
|
|
14
|
+
* produce a key the reader was not given). Neither is corruption, so neither
|
|
15
|
+
* row may be treated as garbage.
|
|
16
|
+
*
|
|
17
|
+
* Both are matched on `err.name`, never `instanceof`: the cipher is an
|
|
18
|
+
* injected seam, and in a wallet whose `@interop/was-client` resolves to a
|
|
19
|
+
* second copy (a `link:` dev setup, a dedupe miss through a dependency tree)
|
|
20
|
+
* the class the cipher throws is not the class the caller imported. The cost
|
|
21
|
+
* of the miss lands on real data -- a scan that misses `KeyUnwrapError` drops
|
|
22
|
+
* the row into its undecryptable bucket, which a host is entitled to purge.
|
|
23
|
+
* Both classes assign their `name` explicitly, which is what makes the string
|
|
24
|
+
* a contract.
|
|
25
|
+
*
|
|
26
|
+
* The unknown-epoch half of the pair ships from `@interop/wallet-core/sync`
|
|
27
|
+
* as `isUnknownEpochError`: the create-loss re-mint dispatches on it, and
|
|
28
|
+
* `sync` deliberately imports nothing else in this library. This file is the
|
|
29
|
+
* home of the other half, beside the cipher that raises it, and stays
|
|
30
|
+
* import-free for the same reason `resourceLog/errors.ts` does.
|
|
31
|
+
*/
|
|
32
|
+
/**
|
|
33
|
+
* Whether an error is the cipher's not-a-recipient signal (`KeyUnwrapError`):
|
|
34
|
+
* the envelope's epoch IS on the descriptor this reader holds, but the reader
|
|
35
|
+
* has no key for it -- never a recipient of that epoch, or removed and the
|
|
36
|
+
* epoch rotated since. Real data, unreadable by this wallet, and never
|
|
37
|
+
* garbage: a caller skips such a row and leaves it in place.
|
|
38
|
+
*
|
|
39
|
+
* @param err {unknown}
|
|
40
|
+
* @returns {boolean}
|
|
41
|
+
*/
|
|
42
|
+
export function isKeyUnwrapError(err) {
|
|
43
|
+
return err?.name === 'KeyUnwrapError';
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/descriptors/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH;;;;;;;;;GASG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAY;IAC3C,OAAQ,GAAiC,EAAE,IAAI,KAAK,gBAAgB,CAAA;AACtE,CAAC"}
|
|
@@ -35,10 +35,15 @@
|
|
|
35
35
|
* cipher that acquires its own descriptor and, on an unknown-epoch decrypt,
|
|
36
36
|
* re-reads the description, swaps itself, and retries exactly once per
|
|
37
37
|
* instance.
|
|
38
|
+
* - `isKeyUnwrapError` -- how a host scanning rows tells "not a recipient of
|
|
39
|
+
* this epoch" from corruption, matched by `err.name` because the cipher is
|
|
40
|
+
* an injected seam. Its sibling `isUnknownEpochError` ships from
|
|
41
|
+
* `@interop/wallet-core/sync`.
|
|
38
42
|
*/
|
|
39
43
|
export { acquireDescriptor, acquireDescriptors, wasDescriptorSource } from './acquire.js';
|
|
40
44
|
export type { EncryptionDescriptorCache, EncryptionDescriptorSource } from './acquire.js';
|
|
41
45
|
export { EPOCH_CONFIGURATION_STATE_TYPE, logGovernedDescriptorSource, readGovernedEpochConfiguration } from './logSource.js';
|
|
42
46
|
export { DescriptorRefreshPolicy } from './refresh.js';
|
|
43
47
|
export { createRefreshingEdvDocCipher } from './cipher.js';
|
|
48
|
+
export { isKeyUnwrapError } from './errors.js';
|
|
44
49
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/descriptors/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/descriptors/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,cAAc,CAAA;AACrB,YAAY,EACV,yBAAyB,EACzB,0BAA0B,EAC3B,MAAM,cAAc,CAAA;AAErB,OAAO,EACL,8BAA8B,EAC9B,2BAA2B,EAC3B,8BAA8B,EAC/B,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAEtD,OAAO,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAA;AAE1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -35,9 +35,14 @@
|
|
|
35
35
|
* cipher that acquires its own descriptor and, on an unknown-epoch decrypt,
|
|
36
36
|
* re-reads the description, swaps itself, and retries exactly once per
|
|
37
37
|
* instance.
|
|
38
|
+
* - `isKeyUnwrapError` -- how a host scanning rows tells "not a recipient of
|
|
39
|
+
* this epoch" from corruption, matched by `err.name` because the cipher is
|
|
40
|
+
* an injected seam. Its sibling `isUnknownEpochError` ships from
|
|
41
|
+
* `@interop/wallet-core/sync`.
|
|
38
42
|
*/
|
|
39
43
|
export { acquireDescriptor, acquireDescriptors, wasDescriptorSource } from './acquire.js';
|
|
40
44
|
export { EPOCH_CONFIGURATION_STATE_TYPE, logGovernedDescriptorSource, readGovernedEpochConfiguration } from './logSource.js';
|
|
41
45
|
export { DescriptorRefreshPolicy } from './refresh.js';
|
|
42
46
|
export { createRefreshingEdvDocCipher } from './cipher.js';
|
|
47
|
+
export { isKeyUnwrapError } from './errors.js';
|
|
43
48
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/descriptors/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/descriptors/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,cAAc,CAAA;AAMrB,OAAO,EACL,8BAA8B,EAC9B,2BAA2B,EAC3B,8BAA8B,EAC/B,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAEtD,OAAO,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAA;AAE1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
*/
|
|
30
30
|
import type { IKeyAgreementKey } from '@interop/data-integrity-core';
|
|
31
31
|
import type { EncryptionDescriptorStore } from '@interop/was-client/edv';
|
|
32
|
+
import type { AccountLogSigner } from '../webvh/accountEntry.js';
|
|
32
33
|
import type { ClientWebvhUpdateKeys, WebvhEnrollmentKeys, WebvhIdStore } from '../webvh/didWebvh.js';
|
|
33
34
|
import { type ResourceLogPinStore } from '@interop/vh-resource-log';
|
|
34
35
|
import type { UserKey } from '../keys/userKey.js';
|
|
@@ -140,21 +141,47 @@ export declare function mintEnrollmentRequest(): Promise<{
|
|
|
140
141
|
clientDid: string;
|
|
141
142
|
}>;
|
|
142
143
|
/**
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
* client's own update key signs both entries. Idempotent at every stage, so
|
|
144
|
+
* THE APPROVING SIDE: the whole approval -- the user key wrapped into the
|
|
145
|
+
* roster (escrow: every epoch, so the new client reads pre-enrollment
|
|
146
|
+
* history) and the two log entries. Idempotent at every stage, so
|
|
147
147
|
* re-approving the same code after any tear converges. A request whose
|
|
148
148
|
* key-agreement key is not its signing key's canonical twin is refused before
|
|
149
149
|
* anything is written ({@link assertCanonicalEnrollmentKeys}).
|
|
150
150
|
*
|
|
151
|
+
* The escrow is placed by signer kind (`decisions/0018`). A CLIENT signer
|
|
152
|
+
* keeps the push order, the escrow first: an enrolled client's roster append
|
|
153
|
+
* needs no license, so it may precede the entries, and no enrolled client is
|
|
154
|
+
* ever authorized but blind. Quorum-of-one there: any single enrolled
|
|
155
|
+
* client's own update key signs both entries.
|
|
156
|
+
*
|
|
157
|
+
* A LADDER signer runs commit, add, then escrow, because a ladder-signed
|
|
158
|
+
* append is licensed only at an inventory-changing version its own ladder
|
|
159
|
+
* signed, which the add entry is what mints. The one-request window between
|
|
160
|
+
* the add entry and the append is the ladder branch's stated cost: a client
|
|
161
|
+
* the add entry published holds `assertionMethod` and its own update key
|
|
162
|
+
* while holding no wrap. It is bounded three ways -- one request wide on the
|
|
163
|
+
* happy path, mended by a re-run with the same connect code and by the
|
|
164
|
+
* escrow-direction convergence of any later ladder-branch ceremony (the
|
|
165
|
+
* document carries the client's key verbatim), and visible as a row in the
|
|
166
|
+
* connected-wallets listing, where a disconnect removes it.
|
|
167
|
+
*
|
|
168
|
+
* On that branch the escrow must ANCHOR at the add entry's version, and the
|
|
169
|
+
* ceremony does not leave that to the roster store's own controller wiring:
|
|
170
|
+
* a store resolving its controller view through a document cached before
|
|
171
|
+
* the entries (an app's session-verified log) would anchor the append at the
|
|
172
|
+
* pre-add head, and the license would refuse it after the ceremony's pivot.
|
|
173
|
+
* So, on a sealable roster store, the view built from the add entry's own
|
|
174
|
+
* post-add log is set as the store's minimum controller version before the
|
|
175
|
+
* escrow runs -- the same guarantee `revokeAccountClient` gives its rotation
|
|
176
|
+
* from its post-edit log. A fresher resolved view still wins.
|
|
177
|
+
*
|
|
151
178
|
* @param options {object}
|
|
152
179
|
* @param options.request {EnrollmentRequest} the parsed connect code
|
|
153
|
-
* @param options.
|
|
154
|
-
* client's own did:webvh update-key seeds
|
|
180
|
+
* @param options.signer {AccountLogSigner} who signs the two entries: the
|
|
181
|
+
* approving client's own did:webvh update-key seeds, or the acting
|
|
182
|
+
* credential's ladder seed
|
|
155
183
|
* @param options.clientKeyAgreementKey {IKeyAgreementKey} the approving
|
|
156
|
-
*
|
|
157
|
-
* re-wrapping
|
|
184
|
+
* party's own key-agreement key, unwrapping each epoch for re-wrapping
|
|
158
185
|
* @param options.userKeyRosterStore {EncryptionDescriptorStore} the account's
|
|
159
186
|
* `key-map/user-key.jsonl` descriptor store
|
|
160
187
|
* @param options.idStore {WebvhIdStore} the account's `id` collection
|
|
@@ -163,9 +190,9 @@ export declare function mintEnrollmentRequest(): Promise<{
|
|
|
163
190
|
* multibase (the key a label or a listing row is filed under), so the caller
|
|
164
191
|
* needs no second parse of the connect code
|
|
165
192
|
*/
|
|
166
|
-
export declare function approveEnrollment({ request,
|
|
193
|
+
export declare function approveEnrollment({ request, signer, clientKeyAgreementKey, userKeyRosterStore, idStore }: {
|
|
167
194
|
request: EnrollmentRequest;
|
|
168
|
-
|
|
195
|
+
signer: AccountLogSigner;
|
|
169
196
|
clientKeyAgreementKey: IKeyAgreementKey;
|
|
170
197
|
userKeyRosterStore: EncryptionDescriptorStore;
|
|
171
198
|
idStore: WebvhIdStore;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enrollment.d.ts","sourceRoot":"","sources":["../../src/enrollment/enrollment.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAA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ACvB,kBAAkB,CAAC,EAAE,mBAAmB,CAAA;CACzC,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC,CAyEvD"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { decodeMultikey, MultikeyCodec } from '@interop/data-integrity-core/multihash';
|
|
2
2
|
import { base64urlnopad } from '@scure/base';
|
|
3
3
|
import { agentsFromSeed } from '../identity/agents.js';
|
|
4
|
-
import {
|
|
4
|
+
import { keyAgreementTwinMultibase, mintClientWebvhUpdateKeys, updateKeyMultibase } from '../webvh/didWebvh.js';
|
|
5
|
+
import { enrollWebvhClient } from '../webvh/enrollClient.js';
|
|
5
6
|
import { clientSigningKeyMultibase, isWebvhDid, webvhZcapClient } from '../webvh/zcap.js';
|
|
6
7
|
import { AccountLogMissingError, verifyAccountLog } from '../webvh/verifyLog.js';
|
|
7
8
|
import { addUserKeyRosterRecipient } from '../keys/userKeyRoster.js';
|
|
8
9
|
import { readUserKeyRoster, rosterRecipientKid, userKeyRosterLogSigner } from '../keys/userKeyRoster.js';
|
|
9
10
|
import { userKeyRosterDescriptorStore } from '../keys/rosterStore.js';
|
|
11
|
+
import { isSealableDescriptorStore } from '../keys/rosterLogStore.js';
|
|
10
12
|
import { memoryResourceLogPinStore } from '@interop/vh-resource-log';
|
|
11
13
|
import { webvhResourceLogController } from '../resourceLog/index.js';
|
|
12
14
|
import { CONNECT_CODE_PREFIX } from './connectCode.js';
|
|
@@ -231,21 +233,47 @@ export async function mintEnrollmentRequest() {
|
|
|
231
233
|
};
|
|
232
234
|
}
|
|
233
235
|
/**
|
|
234
|
-
*
|
|
235
|
-
*
|
|
236
|
-
*
|
|
237
|
-
* client's own update key signs both entries. Idempotent at every stage, so
|
|
236
|
+
* THE APPROVING SIDE: the whole approval -- the user key wrapped into the
|
|
237
|
+
* roster (escrow: every epoch, so the new client reads pre-enrollment
|
|
238
|
+
* history) and the two log entries. Idempotent at every stage, so
|
|
238
239
|
* re-approving the same code after any tear converges. A request whose
|
|
239
240
|
* key-agreement key is not its signing key's canonical twin is refused before
|
|
240
241
|
* anything is written ({@link assertCanonicalEnrollmentKeys}).
|
|
241
242
|
*
|
|
243
|
+
* The escrow is placed by signer kind (`decisions/0018`). A CLIENT signer
|
|
244
|
+
* keeps the push order, the escrow first: an enrolled client's roster append
|
|
245
|
+
* needs no license, so it may precede the entries, and no enrolled client is
|
|
246
|
+
* ever authorized but blind. Quorum-of-one there: any single enrolled
|
|
247
|
+
* client's own update key signs both entries.
|
|
248
|
+
*
|
|
249
|
+
* A LADDER signer runs commit, add, then escrow, because a ladder-signed
|
|
250
|
+
* append is licensed only at an inventory-changing version its own ladder
|
|
251
|
+
* signed, which the add entry is what mints. The one-request window between
|
|
252
|
+
* the add entry and the append is the ladder branch's stated cost: a client
|
|
253
|
+
* the add entry published holds `assertionMethod` and its own update key
|
|
254
|
+
* while holding no wrap. It is bounded three ways -- one request wide on the
|
|
255
|
+
* happy path, mended by a re-run with the same connect code and by the
|
|
256
|
+
* escrow-direction convergence of any later ladder-branch ceremony (the
|
|
257
|
+
* document carries the client's key verbatim), and visible as a row in the
|
|
258
|
+
* connected-wallets listing, where a disconnect removes it.
|
|
259
|
+
*
|
|
260
|
+
* On that branch the escrow must ANCHOR at the add entry's version, and the
|
|
261
|
+
* ceremony does not leave that to the roster store's own controller wiring:
|
|
262
|
+
* a store resolving its controller view through a document cached before
|
|
263
|
+
* the entries (an app's session-verified log) would anchor the append at the
|
|
264
|
+
* pre-add head, and the license would refuse it after the ceremony's pivot.
|
|
265
|
+
* So, on a sealable roster store, the view built from the add entry's own
|
|
266
|
+
* post-add log is set as the store's minimum controller version before the
|
|
267
|
+
* escrow runs -- the same guarantee `revokeAccountClient` gives its rotation
|
|
268
|
+
* from its post-edit log. A fresher resolved view still wins.
|
|
269
|
+
*
|
|
242
270
|
* @param options {object}
|
|
243
271
|
* @param options.request {EnrollmentRequest} the parsed connect code
|
|
244
|
-
* @param options.
|
|
245
|
-
* client's own did:webvh update-key seeds
|
|
272
|
+
* @param options.signer {AccountLogSigner} who signs the two entries: the
|
|
273
|
+
* approving client's own did:webvh update-key seeds, or the acting
|
|
274
|
+
* credential's ladder seed
|
|
246
275
|
* @param options.clientKeyAgreementKey {IKeyAgreementKey} the approving
|
|
247
|
-
*
|
|
248
|
-
* re-wrapping
|
|
276
|
+
* party's own key-agreement key, unwrapping each epoch for re-wrapping
|
|
249
277
|
* @param options.userKeyRosterStore {EncryptionDescriptorStore} the account's
|
|
250
278
|
* `key-map/user-key.jsonl` descriptor store
|
|
251
279
|
* @param options.idStore {WebvhIdStore} the account's `id` collection
|
|
@@ -254,14 +282,12 @@ export async function mintEnrollmentRequest() {
|
|
|
254
282
|
* multibase (the key a label or a listing row is filed under), so the caller
|
|
255
283
|
* needs no second parse of the connect code
|
|
256
284
|
*/
|
|
257
|
-
export async function approveEnrollment({ request,
|
|
285
|
+
export async function approveEnrollment({ request, signer, clientKeyAgreementKey, userKeyRosterStore, idStore }) {
|
|
258
286
|
// Re-checked here rather than trusted from the parse: this is the one seam
|
|
259
287
|
// every approval path runs through, and it is what publishes the key under
|
|
260
288
|
// the controller marker.
|
|
261
289
|
assertCanonicalEnrollmentKeys({ request });
|
|
262
|
-
|
|
263
|
-
// enrolled client is ever authorized but blind.
|
|
264
|
-
await addUserKeyRosterRecipient({
|
|
290
|
+
const escrow = async () => addUserKeyRosterRecipient({
|
|
265
291
|
store: userKeyRosterStore,
|
|
266
292
|
recipient: {
|
|
267
293
|
id: enrollmentRecipientKid({ request }),
|
|
@@ -269,11 +295,22 @@ export async function approveEnrollment({ request, clientWebvhKeys, clientKeyAgr
|
|
|
269
295
|
},
|
|
270
296
|
ownerKeyAgreementKey: clientKeyAgreementKey
|
|
271
297
|
});
|
|
272
|
-
|
|
298
|
+
if (signer.kind === 'client') {
|
|
299
|
+
await escrow();
|
|
300
|
+
}
|
|
301
|
+
const { did, log } = await enrollWebvhClient({
|
|
273
302
|
idStore,
|
|
274
|
-
|
|
303
|
+
signer,
|
|
275
304
|
newClient: request
|
|
276
305
|
});
|
|
306
|
+
if (signer.kind === 'ladder') {
|
|
307
|
+
if (isSealableDescriptorStore(userKeyRosterStore)) {
|
|
308
|
+
userKeyRosterStore.setMinimumControllerVersion({
|
|
309
|
+
controller: webvhResourceLogController({ did, log })
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
await escrow();
|
|
313
|
+
}
|
|
277
314
|
return {
|
|
278
315
|
did,
|
|
279
316
|
clientDid: enrollmentClientDid({ request }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enrollment.js","sourceRoot":"","sources":["../../src/enrollment/enrollment.ts"],"names":[],"mappings":"AA+BA,OAAO,EACL,cAAc,EACd,aAAa,EACd,MAAM,wCAAwC,CAAA;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"enrollment.js","sourceRoot":"","sources":["../../src/enrollment/enrollment.ts"],"names":[],"mappings":"AA+BA,OAAO,EACL,cAAc,EACd,aAAa,EACd,MAAM,wCAAwC,CAAA;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB,kBAAkB,EACnB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAO5D,OAAO,EACL,yBAAyB,EACzB,UAAU,EACV,eAAe,EAChB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAChF,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA;AACpE,OAAO,E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,IAAI,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAA;IAC9C,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,sBAAsB,EAAE,CAAA;IACpC,CAAC;IAED,yEAAyE;IACzE,6EAA6E;IAC7E,oEAAoE;IACpE,qEAAqE;IACrE,0EAA0E;IAC1E,uEAAuE;IACvE,oEAAoE;IACpE,mEAAmE;IACnE,2CAA2C;IAC3C,MAAM,UAAU,GAAG,eAAe,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAA;IACrD,MAAM,KAAK,GAAG,4BAA4B,CAAC;QACzC,gBAAgB,EAAE,OAAO,CAAC,IAAI;QAC9B,UAAU;QACV,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,iBAAiB,EAAE,KAAK,IAAI,EAAE,CAC5B,0BAA0B,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,CAAC,GAAG,EAAE,CAAC;QACxD,QAAQ,EAAE,yBAAyB,EAAE;QACrC,MAAM,EAAE,sBAAsB,CAAC,EAAE,QAAQ,EAAE,CAAC;KAC7C,CAAC,CAAA;IACF,MAAM,IAAI,GAAG,MAAM,iBAAiB,CAAC;QACnC,KAAK;QACL,qBAAqB,EAAE,eAAe;KACvC,CAAC,CAAA;IACF,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,IAAI,KAAK,CACb,yEAAyE;YACvE,2BAA2B,CAC9B,CAAA;IACH,CAAC;IACD,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,aAAa,EAAE,IAAI,CAAC,aAAa,EAAE,CAAA;AACrE,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { CollectionEncryption, WasClient } from '@interop/was-client';
|
|
2
2
|
import type { EncryptionDescriptorStore } from '@interop/was-client/edv';
|
|
3
3
|
import type { IKeyAgreementKey } from '@interop/data-integrity-core';
|
|
4
|
-
import { type ClientWebvhUpdateKeys, type
|
|
4
|
+
import { type ClientWebvhUpdateKeys, type ICapabilityAgent, type KmsAuthenticationBinding, type PublishedWebvhLog, type WebvhIdStore } from '../webvh/index.js';
|
|
5
5
|
import { type UserKey, type WalletSpaceEpochsResult } from '../keys/index.js';
|
|
6
6
|
import type { ResourceLogPinStore } from '@interop/vh-resource-log';
|
|
7
|
+
import { type StageNotifier } from '../log.js';
|
|
7
8
|
/**
|
|
8
9
|
* The complete key set a brand-new account mints locally before anything
|
|
9
10
|
* touches the network: the data Space id, this founding client's identity
|
|
@@ -102,7 +103,7 @@ export declare class AccountGenesisSpaceError extends Error {
|
|
|
102
103
|
* The stages whose failures the ceremony collects instead of throwing (see
|
|
103
104
|
* the module doc for the split).
|
|
104
105
|
*/
|
|
105
|
-
export type AccountGenesisStage = '
|
|
106
|
+
export type AccountGenesisStage = 'kmsAuthentication' | 'roster' | 'epochs' | 'promotion';
|
|
106
107
|
/**
|
|
107
108
|
* What a completed ceremony reports: the account DID, each collected stage's
|
|
108
109
|
* outcome where it ran (the roster descriptor, the per-collection epoch
|
|
@@ -113,6 +114,23 @@ export type AccountGenesisStage = 'didWebKeys' | 'roster' | 'epochs' | 'promotio
|
|
|
113
114
|
*/
|
|
114
115
|
export interface AccountGenesisResult {
|
|
115
116
|
did: string;
|
|
117
|
+
/**
|
|
118
|
+
* The account log's verified head as the did:webvh stage left it -- the
|
|
119
|
+
* served head it adopted, or the one it minted paired with its create PUT's
|
|
120
|
+
* ETag -- for the stage after the ceremony to build on rather than re-read.
|
|
121
|
+
* Set by the credential-anchored ceremony alone; the plain genesis's
|
|
122
|
+
* did:webvh stage hands no head back.
|
|
123
|
+
*/
|
|
124
|
+
published?: PublishedWebvhLog;
|
|
125
|
+
/**
|
|
126
|
+
* Whether the did:webvh stage MINTED that head (a fresh signup) rather than
|
|
127
|
+
* adopting a served one (a heal re-run). A later stage may reuse a minted
|
|
128
|
+
* head freely -- the account did not exist a moment ago, so no other writer
|
|
129
|
+
* holds it -- but an adopted head is only a snapshot: its document's
|
|
130
|
+
* completion tests are unprotected by any ETag and another client may have
|
|
131
|
+
* moved past them by the time a later stage reads them.
|
|
132
|
+
*/
|
|
133
|
+
logMinted?: boolean;
|
|
116
134
|
rosterDescriptor?: CollectionEncryption;
|
|
117
135
|
epochs?: WalletSpaceEpochsResult;
|
|
118
136
|
/**
|
|
@@ -170,13 +188,19 @@ export interface AccountGenesisResult {
|
|
|
170
188
|
* EncryptionDescriptorStore` -- builds the user-key roster's descriptor
|
|
171
189
|
* store once the account DID is known (the log-governed store's controller
|
|
172
190
|
* view and chain-head pin are the app's wiring)
|
|
173
|
-
* @param [options.
|
|
174
|
-
* Promise<
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
*
|
|
191
|
+
* @param [options.provideKmsAuthentication] {Function} `({ spaceReady }) =>
|
|
192
|
+
* Promise<KmsAuthenticationBinding | undefined>` -- the KMS authentication
|
|
193
|
+
* binding's acquisition; absent or resolving `undefined`, the genesis is
|
|
194
|
+
* client-keys-only and no `keys.json` is ever written. It is started before
|
|
195
|
+
* the Space is awaited and joined before the genesis entry, so its
|
|
196
|
+
* `spaceReady` argument is what its own `keys.json` write waits on. A throw
|
|
197
|
+
* is collected, not fatal: the genesis proceeds client-keys-only, and the
|
|
198
|
+
* document it publishes never gains the key. The thunk's own obligation,
|
|
199
|
+
* since this ceremony takes `authentication.vmId` VERBATIM into the
|
|
200
|
+
* world-readable genesis entry: a served `keys.json` may be adopted only
|
|
201
|
+
* after the multibase in its `vmId` is checked against the session's own
|
|
202
|
+
* keystore listing; on a mismatch, or when the keystore cannot be listed,
|
|
203
|
+
* the thunk mints instead of adopting
|
|
180
204
|
* @param [options.expectedDid] {string} the account's did:webvh from the
|
|
181
205
|
* caller's stored account pointer, when it already names one; the genesis
|
|
182
206
|
* read then refuses a published log resolving to any other account
|
|
@@ -192,9 +216,13 @@ export interface AccountGenesisResult {
|
|
|
192
216
|
* pointer write lives outside this call (freewallet's keyring re-bind) --
|
|
193
217
|
* passes `false` and runs {@link ensurePromotedSpaceController} itself
|
|
194
218
|
* after that write
|
|
219
|
+
* @param [options.onStage] {StageNotifier} observational: called at the
|
|
220
|
+
* KMS-authentication join, with {@link KMS_AUTHENTICATION_STAGE} -- the one
|
|
221
|
+
* boundary this ceremony names, and the same token the credential-anchored
|
|
222
|
+
* genesis emits at the same point
|
|
195
223
|
* @returns {Promise<AccountGenesisResult>}
|
|
196
224
|
*/
|
|
197
|
-
export declare function ensureAccountGenesis({ was, wasAsClient, wasServerUrl, spaceId, keyAgent, clientKeyAgreementKey, userKey, updateKeys, idStore, rosterStoreFor,
|
|
225
|
+
export declare function ensureAccountGenesis({ was, wasAsClient, wasServerUrl, spaceId, keyAgent, clientKeyAgreementKey, userKey, updateKeys, idStore, rosterStoreFor, provideKmsAuthentication, expectedDid, accountLogPinStore, onDidPublished, promoteController, onStage }: {
|
|
198
226
|
was: WasClient;
|
|
199
227
|
wasAsClient?: WasClient;
|
|
200
228
|
wasServerUrl: string;
|
|
@@ -207,12 +235,15 @@ export declare function ensureAccountGenesis({ was, wasAsClient, wasServerUrl, s
|
|
|
207
235
|
rosterStoreFor: (options: {
|
|
208
236
|
did: string;
|
|
209
237
|
}) => EncryptionDescriptorStore;
|
|
210
|
-
|
|
238
|
+
provideKmsAuthentication?: (options: {
|
|
239
|
+
spaceReady: Promise<unknown>;
|
|
240
|
+
}) => Promise<KmsAuthenticationBinding | undefined>;
|
|
211
241
|
expectedDid?: string;
|
|
212
242
|
accountLogPinStore?: ResourceLogPinStore;
|
|
213
243
|
onDidPublished?: (published: {
|
|
214
244
|
did: string;
|
|
215
245
|
}) => Promise<void>;
|
|
216
246
|
promoteController?: boolean;
|
|
247
|
+
onStage?: StageNotifier;
|
|
217
248
|
}): Promise<AccountGenesisResult>;
|
|
218
249
|
//# sourceMappingURL=accountGenesis.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accountGenesis.d.ts","sourceRoot":"","sources":["../../src/genesis/accountGenesis.ts"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC1E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAA;AACxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAGpE,OAAO,EAIL,KAAK,qBAAqB,EAC1B,KAAK,
|
|
1
|
+
{"version":3,"file":"accountGenesis.d.ts","sourceRoot":"","sources":["../../src/genesis/accountGenesis.ts"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC1E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAA;AACxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAGpE,OAAO,EAIL,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,YAAY,EAClB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAIL,KAAK,OAAO,EACZ,KAAK,uBAAuB,EAC7B,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACnE,OAAO,EAAiB,KAAK,aAAa,EAAE,MAAM,WAAW,CAAA;AAQ7D;;;;;;;;GAQG;AACH,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;IAC1B,UAAU,EAAE,qBAAqB,CAAA;CAClC;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAIpC;AAED;;;;;;;GAOG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,aAAa,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