@interop/wallet-core 0.61.0 → 0.65.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 +55 -34
- package/dist/clientAnnex/establish.d.ts.map +1 -1
- package/dist/clientAnnex/establish.js +102 -56
- package/dist/clientAnnex/establish.js.map +1 -1
- package/dist/clientAnnex/forget.d.ts +16 -2
- package/dist/clientAnnex/forget.d.ts.map +1 -1
- package/dist/clientAnnex/forget.js +11 -9
- package/dist/clientAnnex/forget.js.map +1 -1
- package/dist/clientAnnex/forgetLast.d.ts +126 -35
- package/dist/clientAnnex/forgetLast.d.ts.map +1 -1
- package/dist/clientAnnex/forgetLast.js +208 -60
- 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 +7 -7
- package/dist/clientAnnex/gc.js.map +1 -1
- package/dist/clientAnnex/heal.d.ts +101 -33
- package/dist/clientAnnex/heal.d.ts.map +1 -1
- package/dist/clientAnnex/heal.js +559 -212
- package/dist/clientAnnex/heal.js.map +1 -1
- package/dist/clientAnnex/index.d.ts +21 -5
- package/dist/clientAnnex/index.d.ts.map +1 -1
- package/dist/clientAnnex/index.js +24 -5
- package/dist/clientAnnex/index.js.map +1 -1
- package/dist/clientAnnex/ladder.d.ts +304 -18
- package/dist/clientAnnex/ladder.d.ts.map +1 -1
- package/dist/clientAnnex/ladder.js +942 -64
- package/dist/clientAnnex/ladder.js.map +1 -1
- package/dist/clientAnnex/ladderAnchored.d.ts +261 -28
- package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -1
- package/dist/clientAnnex/ladderAnchored.js +521 -295
- package/dist/clientAnnex/ladderAnchored.js.map +1 -1
- package/dist/clientAnnex/log.d.ts +193 -38
- package/dist/clientAnnex/log.d.ts.map +1 -1
- package/dist/clientAnnex/log.js +445 -190
- 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 +26 -12
- package/dist/clientAnnex/mend.js.map +1 -1
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts +38 -11
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts.map +1 -1
- package/dist/clientAnnex/recoveryLadderAnchored.js +177 -55
- 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 +24 -8
- 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 +10 -6
- package/dist/keys/index.d.ts.map +1 -1
- package/dist/keys/index.js +9 -5
- package/dist/keys/index.js.map +1 -1
- package/dist/keys/rosterLogStore.d.ts +12 -11
- package/dist/keys/rosterLogStore.d.ts.map +1 -1
- package/dist/keys/rosterLogStore.js +15 -13
- 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/userKeyRoster.d.ts +89 -9
- package/dist/keys/userKeyRoster.d.ts.map +1 -1
- package/dist/keys/userKeyRoster.js +262 -19
- package/dist/keys/userKeyRoster.js.map +1 -1
- package/dist/keys/userKeyRosterCascade.d.ts +7 -6
- package/dist/keys/userKeyRosterCascade.d.ts.map +1 -1
- package/dist/keys/userKeyRosterCascade.js +7 -6
- 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 +12 -8
- package/dist/recovery/index.d.ts.map +1 -1
- package/dist/recovery/index.js +11 -7
- 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 +4 -1
- package/dist/recovery/recoveryDelegation.d.ts.map +1 -1
- package/dist/recovery/recoveryDelegation.js +25 -36
- package/dist/recovery/recoveryDelegation.js.map +1 -1
- package/dist/recovery/recoveryWebvh.d.ts +117 -65
- package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
- package/dist/recovery/recoveryWebvh.js +279 -126
- package/dist/recovery/recoveryWebvh.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 +6 -2
- 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 +95 -14
- package/dist/unlock/retire.d.ts.map +1 -1
- package/dist/unlock/retire.js +102 -10
- 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 +341 -49
- package/dist/unlock/standingWebvh.d.ts.map +1 -1
- package/dist/unlock/standingWebvh.js +608 -164
- 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 +278 -138
- package/dist/webvh/didWebvh.d.ts.map +1 -1
- package/dist/webvh/didWebvh.js +314 -345
- 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 -33
- package/dist/webvh/listClients.d.ts.map +1 -1
- package/dist/webvh/listClients.js +2 -28
- package/dist/webvh/listClients.js.map +1 -1
- package/dist/webvh/revokeClient.d.ts +89 -11
- package/dist/webvh/revokeClient.d.ts.map +1 -1
- package/dist/webvh/revokeClient.js +182 -47
- 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 +5 -5
- package/dist/webvh/keyAgreement.d.ts +0 -72
- package/dist/webvh/keyAgreement.d.ts.map +0 -1
- package/dist/webvh/keyAgreement.js +0 -47
- package/dist/webvh/keyAgreement.js.map +0 -1
|
@@ -1,6 +1,40 @@
|
|
|
1
1
|
import type { DIDDoc, DIDLog } from '@interop/did-method-webvh';
|
|
2
|
-
import type { ClientWebvhUpdateKeys,
|
|
2
|
+
import type { ClientWebvhUpdateKeys, WebvhEnrollmentKeys, WebvhIdStore } from '../webvh/didWebvh.js';
|
|
3
3
|
import type { ResourceLogPinStore } from '@interop/vh-resource-log';
|
|
4
|
+
import type { UnlockInventoryPart } from '../unlock/standingWebvh.js';
|
|
5
|
+
import type { AccountLogSigner } from '../webvh/accountEntry.js';
|
|
6
|
+
/**
|
|
7
|
+
* What the add-and-retire entry retired, read back OFF THE LOG -- the resumed
|
|
8
|
+
* spend's answer to the same question the live run answers from the document
|
|
9
|
+
* it is editing. A run torn after that entry but before the caller's registry
|
|
10
|
+
* and unlock-Space teardown resumes into the already-complete branch, and
|
|
11
|
+
* without this it would be told nothing was retired and leave every other
|
|
12
|
+
* credential's registry entry standing.
|
|
13
|
+
*
|
|
14
|
+
* The entry is located by its own signature on the log: it is the first entry
|
|
15
|
+
* whose effective `updateKeys` authorize the successor key (the fresh
|
|
16
|
+
* ladder's rung 0 on the transient continuation, the new client's update key
|
|
17
|
+
* on the remembered one), which only that entry writes. What it retired is
|
|
18
|
+
* then the credential-class `keyAgreement` ids its predecessor published and
|
|
19
|
+
* it does not, less the spent code's own id -- the same exclusion the live
|
|
20
|
+
* branch makes, since the caller retires that one by name.
|
|
21
|
+
*
|
|
22
|
+
* @param options {object}
|
|
23
|
+
* @param options.log {DIDLog} the verified account log
|
|
24
|
+
* @param options.did {string} the account DID the log resolves to
|
|
25
|
+
* @param options.successorKeyMultibase {string} the update key only the
|
|
26
|
+
* add-and-retire entry authorizes
|
|
27
|
+
* @param options.spentVmId {string} the spent code's key-agreement
|
|
28
|
+
* verification-method id, excluded from the result
|
|
29
|
+
* @returns {string[]} the retired credentials' key-agreement ids, empty
|
|
30
|
+
* when no entry authorizes the successor key or it is the genesis entry
|
|
31
|
+
*/
|
|
32
|
+
export declare function retiredCredentialVmIdsFromLog({ log, did, successorKeyMultibase, spentVmId }: {
|
|
33
|
+
log: DIDLog;
|
|
34
|
+
did: string;
|
|
35
|
+
successorKeyMultibase: string;
|
|
36
|
+
spentVmId: string;
|
|
37
|
+
}): string[];
|
|
4
38
|
/**
|
|
5
39
|
* The verification-method id a code's key-agreement key publishes under --
|
|
6
40
|
* the ordinary `<did>#<multibase>` form, indistinguishable by id from any
|
|
@@ -26,6 +60,18 @@ export interface RecoveryPublicKeys {
|
|
|
26
60
|
keyAgreementKeyMultibase: string;
|
|
27
61
|
updateKeyMultibase: string;
|
|
28
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* The public halves a SPEND needs of the replacement code it publishes: the
|
|
65
|
+
* two above plus the code's ladder VM key, which the add-and-retire entry
|
|
66
|
+
* installs under `assertionMethod` and `capabilityDelegation`. A code is a
|
|
67
|
+
* standing unlock credential with a ladder (`decisions/0020`) and its bridge
|
|
68
|
+
* delegation is signed by that ladder's VM (`decisions/0019`), so a
|
|
69
|
+
* replacement published without the VM could neither sign its own bridge nor
|
|
70
|
+
* spend. `recoveryClientFromCode` produces all three.
|
|
71
|
+
*/
|
|
72
|
+
export interface ReplacementRecoveryPublicKeys extends RecoveryPublicKeys {
|
|
73
|
+
ladderVmKeyMultibase: string;
|
|
74
|
+
}
|
|
29
75
|
/**
|
|
30
76
|
* Thrown by the recovery continuation when the log carries neither the code's
|
|
31
77
|
* update key nor its committed hash -- the code was revoked (or never
|
|
@@ -41,59 +87,33 @@ export declare class RecoveryKeyNotCommittedError extends Error {
|
|
|
41
87
|
*/
|
|
42
88
|
export type RecoveryLogStore = Pick<WebvhIdStore, 'getIdResourceRaw' | 'putIdResource'>;
|
|
43
89
|
/**
|
|
44
|
-
*
|
|
90
|
+
* ISSUANCE: publishes a recovery code's split configuration into the
|
|
91
|
+
* document -- the code's `keyAgreement` verification method (an ordinary,
|
|
92
|
+
* unmarked Multikey entry, the key published verbatim: a code is
|
|
93
|
+
* high-entropy, so no commitment is needed), its rung-0 hash committed in
|
|
94
|
+
* `nextKeyHashes`, and its ladder VM. The code's update key joins
|
|
95
|
+
* `updateKeys` nowhere. A thin wrapper over the
|
|
96
|
+
* standing unlock-key inventory core ({@link publishUnlockKey}), which owns
|
|
97
|
+
* idempotence and the conditional publish.
|
|
45
98
|
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* pins; a served log that is a rollback, a fork, or an identity switch
|
|
52
|
-
* against the pinned head is refused (`ResourceLogContinuityError`)
|
|
53
|
-
* @param [options.logId] {string} the account log's pin slot
|
|
54
|
-
* (`accountLogPinId({ spaceId })`); required whenever a `pinStore` is
|
|
55
|
-
* supplied
|
|
56
|
-
* @returns {Promise<PublishedWebvhLog>}
|
|
57
|
-
*/
|
|
58
|
-
export declare function readLogOrThrow({ store, expectedDid, pinStore, logId }: {
|
|
59
|
-
store: RecoveryLogStore;
|
|
60
|
-
expectedDid?: string;
|
|
61
|
-
pinStore?: ResourceLogPinStore;
|
|
62
|
-
logId?: string;
|
|
63
|
-
}): Promise<PublishedWebvhLog>;
|
|
64
|
-
/**
|
|
65
|
-
* Publishes `did.jsonl` through the narrow recovery seam -- the log only,
|
|
66
|
-
* never `did.json` (the delegation covers nothing else; the recovered
|
|
67
|
-
* session republishes the projection once it is the controller). The write is
|
|
68
|
-
* conditional on the read the entry was built on, and a lost race surfaces as
|
|
69
|
-
* a `WebvhLogConflictError` (the mapping lives in `putLogResource`).
|
|
70
|
-
*
|
|
71
|
-
* @param options {object}
|
|
72
|
-
* @param options.store {RecoveryLogStore}
|
|
73
|
-
* @param options.log {DIDLog}
|
|
74
|
-
* @param [options.ifMatch] {string} publish only if `did.jsonl` is unchanged
|
|
75
|
-
* @returns {Promise<void>}
|
|
76
|
-
*/
|
|
77
|
-
export declare function publishLogOnly({ store, log, ifMatch }: {
|
|
78
|
-
store: RecoveryLogStore;
|
|
79
|
-
log: DIDLog;
|
|
80
|
-
ifMatch?: string;
|
|
81
|
-
}): Promise<void>;
|
|
82
|
-
/**
|
|
83
|
-
* ISSUANCE (run by an enrolled client, root authority): publishes a recovery
|
|
84
|
-
* code's split configuration into the document -- one entry adding the code's
|
|
85
|
-
* `keyAgreement` verification method (an ordinary, unmarked Multikey entry,
|
|
86
|
-
* the key published verbatim: a code is high-entropy, so no commitment is
|
|
87
|
-
* needed) and committing its update-key hash in `nextKeyHashes`. The code's
|
|
88
|
-
* update key joins `updateKeys` nowhere. A thin wrapper over the standing
|
|
89
|
-
* unlock-key inventory core ({@link publishUnlockKey}), which owns idempotence
|
|
90
|
-
* and the conditional publish.
|
|
99
|
+
* `part` is how the ladder branch splits the entry so the code's decryption
|
|
100
|
+
* material precedes its authority: a key entry (`'key'`), then the escrow,
|
|
101
|
+
* then an authority entry (`'authority'`) carrying the ladder VM and the
|
|
102
|
+
* rung-0 commitment. An enrolled client's issuance escrows before the entry
|
|
103
|
+
* and writes the merged `'all'` entry.
|
|
91
104
|
*
|
|
92
105
|
* @param options {object}
|
|
93
106
|
* @param options.idStore {WebvhIdStore}
|
|
94
|
-
* @param options.
|
|
95
|
-
* own did:webvh update-key seeds
|
|
107
|
+
* @param options.signer {AccountLogSigner} who signs the entry: the ISSUING
|
|
108
|
+
* client's own did:webvh update-key seeds, or the acting credential's
|
|
109
|
+
* ladder seed
|
|
96
110
|
* @param options.recovery {RecoveryPublicKeys} the code's public halves
|
|
111
|
+
* @param options.ladderSeed {Uint8Array} the code's OWN ladder seed,
|
|
112
|
+
* derived from the code bytes (`recoveryClientFromCode`). The entry
|
|
113
|
+
* installs that ladder's VM, and `recovery.updateKeyMultibase` is its
|
|
114
|
+
* rung 0
|
|
115
|
+
* @param [options.part] {string} `'all'` (the default), `'key'`, or
|
|
116
|
+
* `'authority'` -- see above
|
|
97
117
|
* @param [options.expectedDid] {string} the account DID the log must
|
|
98
118
|
* resolve to, from the caller's stored account pointer
|
|
99
119
|
* @param [options.pinStore] {ResourceLogPinStore} the caller's chain-head
|
|
@@ -105,10 +125,12 @@ export declare function publishLogOnly({ store, log, ifMatch }: {
|
|
|
105
125
|
* @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog }>} the account
|
|
106
126
|
* DID and the document and log as this call leaves them
|
|
107
127
|
*/
|
|
108
|
-
export declare function publishRecoveryKey({ idStore,
|
|
128
|
+
export declare function publishRecoveryKey({ idStore, signer, recovery, ladderSeed, part, expectedDid, pinStore, logId }: {
|
|
109
129
|
idStore: WebvhIdStore;
|
|
110
|
-
|
|
130
|
+
signer: AccountLogSigner;
|
|
111
131
|
recovery: RecoveryPublicKeys;
|
|
132
|
+
ladderSeed: Uint8Array;
|
|
133
|
+
part?: UnlockInventoryPart;
|
|
112
134
|
expectedDid?: string;
|
|
113
135
|
pinStore?: ResourceLogPinStore;
|
|
114
136
|
logId?: string;
|
|
@@ -118,21 +140,41 @@ export declare function publishRecoveryKey({ idStore, updateKeys, recovery, expe
|
|
|
118
140
|
log: DIDLog;
|
|
119
141
|
}>;
|
|
120
142
|
/**
|
|
121
|
-
* REVOCATION
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
143
|
+
* REVOCATION: removes a recovery code's whole inventory from the document --
|
|
144
|
+
* its `keyAgreement` verification method, its committed rung-0 hash, and its
|
|
145
|
+
* ladder VM -- in one entry, through the same shared inventory core
|
|
146
|
+
* ({@link removeUnlockKey}). The roster-side half (rotating the user key
|
|
147
|
+
* epoch off the code's wrap) is the caller's, and runs after this so the
|
|
148
|
+
* resolver's document no longer backs the removed entry.
|
|
149
|
+
*
|
|
150
|
+
* The revoker holds neither the code bytes nor its ladder seed, so the VM
|
|
151
|
+
* claim is seedless: the removal attributes it from the log, anchored on the
|
|
152
|
+
* rung-0 update-key multibase the registry recorded at issuance
|
|
153
|
+
* (`recovery.updateKeyMultibase`). The claim is required rather than
|
|
154
|
+
* best-effort. A VM no attribution arm claims refuses the whole revocation
|
|
155
|
+
* with `UnclaimedLadderVmRetirementError` before anything is written, since a
|
|
156
|
+
* standing ladder VM whose credential is otherwise retired keeps its
|
|
157
|
+
* delegation authority -- including the DELETE-only capability on the account
|
|
158
|
+
* Space that the account-deletion ceremony mints.
|
|
127
159
|
*
|
|
128
|
-
* @param options {object} see {@link publishRecoveryKey}
|
|
160
|
+
* @param options {object} see {@link publishRecoveryKey}, except that
|
|
161
|
+
* `ladderSeed` is optional here: a revoking client does not hold it, and
|
|
162
|
+
* the code's own holder is the only party who can supply it
|
|
163
|
+
* @param [options.projectionStore] {object} an `id`-collection store the
|
|
164
|
+
* caller may write through, passed straight to the inventory edit: the
|
|
165
|
+
* post-strike `did:web` projection is PUT through it immediately before
|
|
166
|
+
* that entry publishes, so a ladder-signed revocation does not leave
|
|
167
|
+
* `did.json` naming the revoked code. Best-effort, and omitted the
|
|
168
|
+
* behavior is unchanged (see `removeUnlockKey`)
|
|
129
169
|
* @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog }>} see
|
|
130
170
|
* {@link publishRecoveryKey}
|
|
131
171
|
*/
|
|
132
|
-
export declare function removeRecoveryKey({ idStore,
|
|
172
|
+
export declare function removeRecoveryKey({ idStore, signer, recovery, ladderSeed, projectionStore, expectedDid, pinStore, logId }: {
|
|
133
173
|
idStore: WebvhIdStore;
|
|
134
|
-
|
|
174
|
+
signer: AccountLogSigner;
|
|
135
175
|
recovery: RecoveryPublicKeys;
|
|
176
|
+
ladderSeed?: Uint8Array;
|
|
177
|
+
projectionStore?: Pick<WebvhIdStore, 'getIdResourceRaw' | 'putIdResource'>;
|
|
136
178
|
expectedDid?: string;
|
|
137
179
|
pinStore?: ResourceLogPinStore;
|
|
138
180
|
logId?: string;
|
|
@@ -167,8 +209,10 @@ export declare function removeRecoveryKey({ idStore, updateKeys, recovery, expec
|
|
|
167
209
|
* @param options.newClientUpdateSeeds {ClientWebvhUpdateKeys} the new
|
|
168
210
|
* client's update-key seeds (minted by the recovery flow, which therefore
|
|
169
211
|
* holds them and can sign the add entry)
|
|
170
|
-
* @param options.replacement {
|
|
171
|
-
* public halves
|
|
212
|
+
* @param options.replacement {ReplacementRecoveryPublicKeys} the
|
|
213
|
+
* replacement code's public halves -- its key-agreement key, its rung-0
|
|
214
|
+
* update key, and its ladder VM key -- committed and published in the same
|
|
215
|
+
* continuation
|
|
172
216
|
* @param options.onCommitted {function}
|
|
173
217
|
* `(committed: { builtOnHead: { scid, versionId } }) => Promise<void>` --
|
|
174
218
|
* the REQUIRED persist-before-publish seam. It runs once per attempt, after
|
|
@@ -206,7 +250,7 @@ export declare function removeRecoveryKey({ idStore, updateKeys, recovery, expec
|
|
|
206
250
|
* @param [options.logId] {string} the account log's pin slot
|
|
207
251
|
* (`accountLogPinId({ spaceId })`); required whenever a `pinStore` is
|
|
208
252
|
* supplied
|
|
209
|
-
* @returns {Promise<
|
|
253
|
+
* @returns {Promise<object>}
|
|
210
254
|
* the account DID, the final `did.json` projection when the add-and-retire
|
|
211
255
|
* entry ran here, and `committed` -- whether THIS call published the pivot
|
|
212
256
|
* entry (`false` exactly on the idempotent completed branch, where a torn
|
|
@@ -214,7 +258,12 @@ export declare function removeRecoveryKey({ idStore, updateKeys, recovery, expec
|
|
|
214
258
|
* a success flag: a returning call means the continuation stands either
|
|
215
259
|
* way, so a caller clears its pending state on the RETURN, whatever
|
|
216
260
|
* `committed` says. Its absence from a return value is a build skew, which
|
|
217
|
-
* is why it is stated rather than inferred
|
|
261
|
+
* is why it is stated rather than inferred.
|
|
262
|
+
* `retiredCredentialVmIds` lists the `keyAgreement` verification-method ids
|
|
263
|
+
* this entry struck for pre-recovery credentials OTHER than the spent code
|
|
264
|
+
* -- what the caller drops registry entries and deletes unlock Spaces for.
|
|
265
|
+
* On the completed branch, whose entry already landed, it is derived from
|
|
266
|
+
* the log, so a resume reports the same list the first run did
|
|
218
267
|
*/
|
|
219
268
|
export declare function recoverWebvhClient(options: {
|
|
220
269
|
store: RecoveryLogStore;
|
|
@@ -223,7 +272,7 @@ export declare function recoverWebvhClient(options: {
|
|
|
223
272
|
};
|
|
224
273
|
newClientKeys: WebvhEnrollmentKeys;
|
|
225
274
|
newClientUpdateSeeds: ClientWebvhUpdateKeys;
|
|
226
|
-
replacement:
|
|
275
|
+
replacement: ReplacementRecoveryPublicKeys;
|
|
227
276
|
onCommitted: (committed: {
|
|
228
277
|
builtOnHead: {
|
|
229
278
|
scid: string;
|
|
@@ -237,5 +286,8 @@ export declare function recoverWebvhClient(options: {
|
|
|
237
286
|
did: string;
|
|
238
287
|
webDoc?: object;
|
|
239
288
|
committed: boolean;
|
|
289
|
+
retiredCredentialVmIds: string[];
|
|
290
|
+
struckRungHashes: string[];
|
|
291
|
+
unclaimedCredentialVmIds: string[];
|
|
240
292
|
}>;
|
|
241
293
|
//# sourceMappingURL=recoveryWebvh.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recoveryWebvh.d.ts","sourceRoot":"","sources":["../../src/recovery/recoveryWebvh.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"recoveryWebvh.d.ts","sourceRoot":"","sources":["../../src/recovery/recoveryWebvh.ts"],"names":[],"mappings":"AAwCA,OAAO,KAAK,EACV,MAAM,EACN,MAAM,EAEP,MAAM,2BAA2B,CAAA;AAclC,OAAO,KAAK,EACV,qBAAqB,EACrB,mBAAmB,EACnB,YAAY,EACb,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAEnE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAehE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,6BAA6B,CAAC,EAC5C,GAAG,EACH,GAAG,EACH,qBAAqB,EACrB,SAAS,EACV,EAAE;IACD,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,qBAAqB,EAAE,MAAM,CAAA;IAC7B,SAAS,EAAE,MAAM,CAAA;CAClB,GAAG,MAAM,EAAE,CAmBX;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,EAC3B,GAAG,EACH,wBAAwB,EACzB,EAAE;IACD,GAAG,EAAE,MAAM,CAAA;IACX,wBAAwB,EAAE,MAAM,CAAA;CACjC,GAAG,MAAM,CAET;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,wBAAwB,EAAE,MAAM,CAAA;IAChC,kBAAkB,EAAE,MAAM,CAAA;CAC3B;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,6BAA8B,SAAQ,kBAAkB;IACvE,oBAAoB,EAAE,MAAM,CAAA;CAC7B;AAED;;;;GAIG;AACH,qBAAa,4BAA6B,SAAQ,KAAK;gBAEnD,OAAO,SACuC;CAKjD;AAED;;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