@interop/wallet-core 0.66.0 → 0.68.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 +12 -8
- package/dist/clientAnnex/credentialAnchoredGenesis.d.ts +6 -10
- package/dist/clientAnnex/credentialAnchoredGenesis.d.ts.map +1 -1
- package/dist/clientAnnex/credentialAnchoredGenesis.js +34 -56
- package/dist/clientAnnex/credentialAnchoredGenesis.js.map +1 -1
- package/dist/clientAnnex/establish.d.ts +46 -29
- package/dist/clientAnnex/establish.d.ts.map +1 -1
- package/dist/clientAnnex/establish.js +111 -86
- package/dist/clientAnnex/establish.js.map +1 -1
- package/dist/clientAnnex/forget.d.ts +7 -16
- package/dist/clientAnnex/forget.d.ts.map +1 -1
- package/dist/clientAnnex/forget.js +13 -24
- package/dist/clientAnnex/forget.js.map +1 -1
- package/dist/clientAnnex/forgetLast.d.ts +33 -129
- package/dist/clientAnnex/forgetLast.d.ts.map +1 -1
- package/dist/clientAnnex/forgetLast.js +43 -182
- package/dist/clientAnnex/forgetLast.js.map +1 -1
- package/dist/clientAnnex/gc.d.ts +26 -12
- package/dist/clientAnnex/gc.d.ts.map +1 -1
- package/dist/clientAnnex/gc.js +60 -57
- package/dist/clientAnnex/gc.js.map +1 -1
- package/dist/clientAnnex/heal.d.ts +75 -18
- package/dist/clientAnnex/heal.d.ts.map +1 -1
- package/dist/clientAnnex/heal.js +79 -147
- package/dist/clientAnnex/heal.js.map +1 -1
- package/dist/clientAnnex/index.d.ts +8 -8
- package/dist/clientAnnex/index.d.ts.map +1 -1
- package/dist/clientAnnex/index.js +5 -5
- package/dist/clientAnnex/index.js.map +1 -1
- package/dist/clientAnnex/ladder.d.ts +51 -4
- package/dist/clientAnnex/ladder.d.ts.map +1 -1
- package/dist/clientAnnex/ladder.js +283 -47
- package/dist/clientAnnex/ladder.js.map +1 -1
- package/dist/clientAnnex/ladderAnchored.d.ts +62 -73
- package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -1
- package/dist/clientAnnex/ladderAnchored.js +103 -117
- package/dist/clientAnnex/ladderAnchored.js.map +1 -1
- package/dist/clientAnnex/log.d.ts +123 -125
- package/dist/clientAnnex/log.d.ts.map +1 -1
- package/dist/clientAnnex/log.js +174 -233
- package/dist/clientAnnex/log.js.map +1 -1
- package/dist/clientAnnex/mend.d.ts +0 -4
- package/dist/clientAnnex/mend.d.ts.map +1 -1
- package/dist/clientAnnex/mend.js +50 -51
- package/dist/clientAnnex/mend.js.map +1 -1
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts +25 -13
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts.map +1 -1
- package/dist/clientAnnex/recoveryLadderAnchored.js +80 -303
- package/dist/clientAnnex/recoveryLadderAnchored.js.map +1 -1
- package/dist/clientAnnex/rosterDeliveredEpochs.d.ts +13 -5
- package/dist/clientAnnex/rosterDeliveredEpochs.d.ts.map +1 -1
- package/dist/clientAnnex/rosterDeliveredEpochs.js +18 -9
- package/dist/clientAnnex/rosterDeliveredEpochs.js.map +1 -1
- package/dist/clientAnnex/selfEnroll.d.ts +6 -10
- package/dist/clientAnnex/selfEnroll.d.ts.map +1 -1
- package/dist/clientAnnex/selfEnroll.js +13 -18
- package/dist/clientAnnex/selfEnroll.js.map +1 -1
- package/dist/clientAnnex/zcap.d.ts +19 -0
- package/dist/clientAnnex/zcap.d.ts.map +1 -1
- package/dist/clientAnnex/zcap.js +80 -12
- package/dist/clientAnnex/zcap.js.map +1 -1
- package/dist/clients/index.d.ts +3 -2
- package/dist/clients/index.d.ts.map +1 -1
- package/dist/clients/index.js +3 -2
- package/dist/clients/index.js.map +1 -1
- package/dist/clients/listing.d.ts.map +1 -1
- package/dist/clients/listing.js +33 -15
- package/dist/clients/listing.js.map +1 -1
- package/dist/clients/policy.d.ts +18 -0
- package/dist/clients/policy.d.ts.map +1 -1
- package/dist/clients/policy.js +22 -8
- package/dist/clients/policy.js.map +1 -1
- package/dist/clients/revocation.d.ts +18 -30
- package/dist/clients/revocation.d.ts.map +1 -1
- package/dist/clients/revocation.js +12 -27
- package/dist/clients/revocation.js.map +1 -1
- package/dist/clients/rosterPolicy.d.ts +6 -1
- package/dist/clients/rosterPolicy.d.ts.map +1 -1
- package/dist/clients/rosterPolicy.js +27 -30
- package/dist/clients/rosterPolicy.js.map +1 -1
- package/dist/descriptors/errors.d.ts +6 -5
- package/dist/descriptors/errors.d.ts.map +1 -1
- package/dist/descriptors/errors.js +6 -5
- package/dist/descriptors/errors.js.map +1 -1
- package/dist/descriptors/index.d.ts +7 -3
- package/dist/descriptors/index.d.ts.map +1 -1
- package/dist/descriptors/index.js +7 -3
- package/dist/descriptors/index.js.map +1 -1
- package/dist/descriptors/logSource.d.ts +28 -6
- package/dist/descriptors/logSource.d.ts.map +1 -1
- package/dist/descriptors/logSource.js +33 -7
- package/dist/descriptors/logSource.js.map +1 -1
- package/dist/enrollment/enrollment.d.ts.map +1 -1
- package/dist/enrollment/enrollment.js +3 -7
- package/dist/enrollment/enrollment.js.map +1 -1
- package/dist/genesis/accountGenesis.d.ts +11 -16
- package/dist/genesis/accountGenesis.d.ts.map +1 -1
- package/dist/genesis/accountGenesis.js +43 -47
- package/dist/genesis/accountGenesis.js.map +1 -1
- package/dist/genesis/kmsAuthentication.d.ts +50 -0
- package/dist/genesis/kmsAuthentication.d.ts.map +1 -0
- package/dist/genesis/kmsAuthentication.js +49 -0
- package/dist/genesis/kmsAuthentication.js.map +1 -0
- package/dist/keyring/kdf.d.ts +16 -20
- package/dist/keyring/kdf.d.ts.map +1 -1
- package/dist/keyring/kdf.js +2 -2
- package/dist/keyring/kdf.js.map +1 -1
- package/dist/keyring/unlockSpace.d.ts +8 -30
- package/dist/keyring/unlockSpace.d.ts.map +1 -1
- package/dist/keyring/unlockSpace.js +8 -31
- package/dist/keyring/unlockSpace.js.map +1 -1
- package/dist/keys/clientKeyRecord.d.ts +2 -1
- package/dist/keys/clientKeyRecord.d.ts.map +1 -1
- package/dist/keys/clientKeyRecord.js +28 -11
- package/dist/keys/clientKeyRecord.js.map +1 -1
- package/dist/keys/index.d.ts +6 -2
- package/dist/keys/index.d.ts.map +1 -1
- package/dist/keys/index.js +5 -1
- package/dist/keys/index.js.map +1 -1
- package/dist/keys/rosterLogStore.d.ts.map +1 -1
- package/dist/keys/rosterLogStore.js +14 -5
- package/dist/keys/rosterLogStore.js.map +1 -1
- package/dist/keys/spaceEpochs.d.ts +92 -3
- package/dist/keys/spaceEpochs.d.ts.map +1 -1
- package/dist/keys/spaceEpochs.js +110 -4
- package/dist/keys/spaceEpochs.js.map +1 -1
- package/dist/keys/userKeyRoster.d.ts +30 -3
- package/dist/keys/userKeyRoster.d.ts.map +1 -1
- package/dist/keys/userKeyRoster.js +90 -15
- package/dist/keys/userKeyRoster.js.map +1 -1
- package/dist/keys/userKeyRosterCascade.d.ts.map +1 -1
- package/dist/keys/userKeyRosterCascade.js +5 -1
- package/dist/keys/userKeyRosterCascade.js.map +1 -1
- package/dist/recovery/continuation.d.ts +250 -0
- package/dist/recovery/continuation.d.ts.map +1 -0
- package/dist/recovery/continuation.js +467 -0
- package/dist/recovery/continuation.js.map +1 -0
- 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/recoveryDelegation.d.ts +23 -126
- package/dist/recovery/recoveryDelegation.d.ts.map +1 -1
- package/dist/recovery/recoveryDelegation.js +1 -266
- package/dist/recovery/recoveryDelegation.js.map +1 -1
- package/dist/recovery/recoveryWebvh.d.ts +52 -107
- package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
- package/dist/recovery/recoveryWebvh.js +54 -403
- package/dist/recovery/recoveryWebvh.js.map +1 -1
- package/dist/request/classify.d.ts +3 -14
- package/dist/request/classify.d.ts.map +1 -1
- package/dist/request/classify.js +19 -40
- package/dist/request/classify.js.map +1 -1
- package/dist/request/index.d.ts +1 -0
- package/dist/request/index.d.ts.map +1 -1
- package/dist/request/index.js +1 -0
- package/dist/request/index.js.map +1 -1
- package/dist/request/onboarding.d.ts.map +1 -1
- package/dist/request/onboarding.js +19 -27
- package/dist/request/onboarding.js.map +1 -1
- package/dist/request/parse.d.ts +5 -3
- package/dist/request/parse.d.ts.map +1 -1
- package/dist/request/parse.js +7 -6
- package/dist/request/parse.js.map +1 -1
- package/dist/request/processRequest.d.ts.map +1 -1
- package/dist/request/processRequest.js +2 -1
- package/dist/request/processRequest.js.map +1 -1
- package/dist/request/queryPredicates.d.ts +98 -0
- package/dist/request/queryPredicates.d.ts.map +1 -0
- package/dist/request/queryPredicates.js +107 -0
- package/dist/request/queryPredicates.js.map +1 -0
- package/dist/resourceLog/document.d.ts +39 -0
- package/dist/resourceLog/document.d.ts.map +1 -1
- package/dist/resourceLog/document.js +41 -0
- package/dist/resourceLog/document.js.map +1 -1
- package/dist/resourceLog/index.d.ts +2 -2
- package/dist/resourceLog/index.js +2 -2
- package/dist/resourceLog/ladderRungs.d.ts.map +1 -1
- package/dist/resourceLog/ladderRungs.js +3 -2
- package/dist/resourceLog/ladderRungs.js.map +1 -1
- package/dist/sync/contactsConflict.d.ts.map +1 -1
- package/dist/sync/contactsConflict.js +8 -2
- package/dist/sync/contactsConflict.js.map +1 -1
- package/dist/sync/engine.d.ts +38 -23
- package/dist/sync/engine.d.ts.map +1 -1
- package/dist/sync/engine.js +36 -5
- package/dist/sync/engine.js.map +1 -1
- package/dist/sync/index.d.ts +9 -12
- package/dist/sync/index.d.ts.map +1 -1
- package/dist/sync/index.js +8 -11
- package/dist/sync/index.js.map +1 -1
- package/dist/sync/push.d.ts.map +1 -1
- package/dist/sync/push.js +1 -2
- package/dist/sync/push.js.map +1 -1
- package/dist/sync/remint.d.ts +0 -31
- package/dist/sync/remint.d.ts.map +1 -1
- package/dist/sync/remint.js +32 -1
- package/dist/sync/remint.js.map +1 -1
- package/dist/sync/types.d.ts +4 -41
- package/dist/sync/types.d.ts.map +1 -1
- package/dist/sync/types.js +4 -47
- package/dist/sync/types.js.map +1 -1
- package/dist/unlock/index.d.ts +1 -1
- package/dist/unlock/index.d.ts.map +1 -1
- package/dist/unlock/index.js +1 -1
- package/dist/unlock/index.js.map +1 -1
- package/dist/unlock/retire.d.ts +16 -64
- package/dist/unlock/retire.d.ts.map +1 -1
- package/dist/unlock/retire.js +7 -86
- package/dist/unlock/retire.js.map +1 -1
- package/dist/unlock/standingWebvh.d.ts +27 -61
- package/dist/unlock/standingWebvh.d.ts.map +1 -1
- package/dist/unlock/standingWebvh.js +40 -92
- package/dist/unlock/standingWebvh.js.map +1 -1
- package/dist/unlock/unlockRecord.d.ts.map +1 -1
- package/dist/unlock/unlockRecord.js +69 -44
- package/dist/unlock/unlockRecord.js.map +1 -1
- package/dist/webvh/accountEntry.d.ts +68 -19
- package/dist/webvh/accountEntry.d.ts.map +1 -1
- package/dist/webvh/accountEntry.js +117 -37
- package/dist/webvh/accountEntry.js.map +1 -1
- package/dist/webvh/delegatedLogStore.d.ts +24 -13
- package/dist/webvh/delegatedLogStore.d.ts.map +1 -1
- package/dist/webvh/delegatedLogStore.js +40 -11
- package/dist/webvh/delegatedLogStore.js.map +1 -1
- package/dist/webvh/didWebvh.d.ts +91 -86
- package/dist/webvh/didWebvh.d.ts.map +1 -1
- package/dist/webvh/didWebvh.js +117 -142
- package/dist/webvh/didWebvh.js.map +1 -1
- package/dist/webvh/enrollClient.d.ts +2 -8
- package/dist/webvh/enrollClient.d.ts.map +1 -1
- package/dist/webvh/enrollClient.js +22 -31
- package/dist/webvh/enrollClient.js.map +1 -1
- package/dist/webvh/index.d.ts +12 -8
- package/dist/webvh/index.d.ts.map +1 -1
- package/dist/webvh/index.js +10 -7
- package/dist/webvh/index.js.map +1 -1
- package/dist/webvh/listClients.d.ts.map +1 -1
- package/dist/webvh/listClients.js +102 -65
- package/dist/webvh/listClients.js.map +1 -1
- package/dist/webvh/mergeMethods.d.ts +84 -0
- package/dist/webvh/mergeMethods.d.ts.map +1 -0
- package/dist/webvh/mergeMethods.js +46 -0
- package/dist/webvh/mergeMethods.js.map +1 -0
- package/dist/webvh/revokeClient.d.ts +15 -11
- package/dist/webvh/revokeClient.d.ts.map +1 -1
- package/dist/webvh/revokeClient.js +130 -57
- package/dist/webvh/revokeClient.js.map +1 -1
- package/dist/webvh/verifyLog.d.ts +45 -4
- package/dist/webvh/verifyLog.d.ts.map +1 -1
- package/dist/webvh/verifyLog.js +62 -21
- package/dist/webvh/verifyLog.js.map +1 -1
- package/dist/webvh/wasIdStore.d.ts +16 -3
- package/dist/webvh/wasIdStore.d.ts.map +1 -1
- package/dist/webvh/wasIdStore.js +18 -3
- package/dist/webvh/wasIdStore.js.map +1 -1
- package/package.json +11 -11
|
@@ -0,0 +1,467 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2026 Interop Alliance. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* The shared core of the two recovery continuations: the control flow a
|
|
6
|
+
* spent code's two entries share whether the successor is an enrolled client
|
|
7
|
+
* (`recoverWebvhClient`, the remembered variant in `recoveryWebvh.ts`) or a
|
|
8
|
+
* fresh credential's ladder (`recoverWebvhLadderAnchored`, the transient
|
|
9
|
+
* variant in `clientAnnex/`). The two differ in exactly three things: the
|
|
10
|
+
* successor key the add-and-retire entry authorizes and signs with, the
|
|
11
|
+
* verification methods and relation memberships that entry adds, and what the
|
|
12
|
+
* `onCommitted` seam hands back into it. Everything else -- the resume
|
|
13
|
+
* detection, the reveal-and-commit entry, the seam's placement, the
|
|
14
|
+
* structural retirement of every pre-recovery credential, the rung strike,
|
|
15
|
+
* and the entry assembly -- is here once, so a change to the mechanics is
|
|
16
|
+
* made once and the two variants publish byte-identical entries for the
|
|
17
|
+
* parts they share.
|
|
18
|
+
*
|
|
19
|
+
* Lives in `recovery/` rather than beside the transient variant because the
|
|
20
|
+
* layer rule lets the annex import from the base and not the reverse.
|
|
21
|
+
*/
|
|
22
|
+
import { deriveNextKeyHash } from '@interop/did-method-webvh';
|
|
23
|
+
import { effectiveParameters, ladderVerificationMethod, MULTIKEY_VM_TYPE, readPublishedLogOrThrow, servedHead } from '../webvh/didWebvh.js';
|
|
24
|
+
import { accountEntryHead, signAccountEntry } from '../webvh/accountEntry.js';
|
|
25
|
+
import { mergeVerificationMethods } from '../webvh/mergeMethods.js';
|
|
26
|
+
import { credentialKeyAgreementMethods, ladderVmIds, retiredCredentialKeys } from '../resourceLog/document.js';
|
|
27
|
+
// The base-side dependency the lint config pins: the ladder ATTRIBUTION
|
|
28
|
+
// helpers only, never the annex log machinery. The add-and-retire entry
|
|
29
|
+
// resolves each retired credential's standing rungs from the log with them.
|
|
30
|
+
import { assertNextKeyHashesRemain, attributeRetiredCredentialRungs, retiredCredentialRungsBeforeKey } from '../clientAnnex/ladder.js';
|
|
31
|
+
/**
|
|
32
|
+
* What the add-and-retire entry retired, read back OFF THE LOG -- the resumed
|
|
33
|
+
* spend's answer to the same question the live run answers from the document
|
|
34
|
+
* it is editing. A run torn after that entry but before the caller's registry
|
|
35
|
+
* and unlock-Space teardown resumes into the already-complete branch, and
|
|
36
|
+
* without this it would be told nothing was retired and leave every other
|
|
37
|
+
* credential's registry entry standing.
|
|
38
|
+
*
|
|
39
|
+
* The entry is located by its own signature on the log: it is the first entry
|
|
40
|
+
* whose effective `updateKeys` authorize the successor key (the fresh
|
|
41
|
+
* ladder's rung 0 on the transient continuation, the new client's update key
|
|
42
|
+
* on the remembered one), which only that entry writes. What it retired is
|
|
43
|
+
* then the credential-class `keyAgreement` ids its predecessor published and
|
|
44
|
+
* it does not, less the spent code's own id -- the same exclusion the live
|
|
45
|
+
* branch makes, since the caller retires that one by name.
|
|
46
|
+
*
|
|
47
|
+
* @param options {object}
|
|
48
|
+
* @param options.log {DIDLog} the verified account log
|
|
49
|
+
* @param options.did {string} the account DID the log resolves to
|
|
50
|
+
* @param options.successorKeyMultibase {string} the update key only the
|
|
51
|
+
* add-and-retire entry authorizes
|
|
52
|
+
* @param options.spentVmId {string} the spent code's key-agreement
|
|
53
|
+
* verification-method id, excluded from the result
|
|
54
|
+
* @returns {string[]} the retired credentials' key-agreement ids, empty
|
|
55
|
+
* when no entry authorizes the successor key or it is the genesis entry
|
|
56
|
+
*/
|
|
57
|
+
export function retiredCredentialVmIdsFromLog({ log, did, successorKeyMultibase, spentVmId }) {
|
|
58
|
+
const params = effectiveParameters(log);
|
|
59
|
+
const index = params.findIndex(entry => (entry.updateKeys ?? []).includes(successorKeyMultibase));
|
|
60
|
+
const previous = index > 0 ? log[index - 1]?.state : undefined;
|
|
61
|
+
const entryDoc = index > 0 ? log[index]?.state : undefined;
|
|
62
|
+
if (previous === undefined || entryDoc === undefined) {
|
|
63
|
+
return [];
|
|
64
|
+
}
|
|
65
|
+
return retiredCredentialKeys({
|
|
66
|
+
doc: entryDoc,
|
|
67
|
+
prevDoc: previous,
|
|
68
|
+
did
|
|
69
|
+
}).filter(id => id !== spentVmId);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* The retirement report of a spend whose add-and-retire entry already
|
|
73
|
+
* stands, read back off the log: the same three members the continuation
|
|
74
|
+
* returns, derived the way its completed branch derives them, so a resume
|
|
75
|
+
* that holds only the successor's public halves (a remembered spend's pending
|
|
76
|
+
* client-key record, say) reports exactly what the first run reported rather
|
|
77
|
+
* than a second definition of the same question.
|
|
78
|
+
*
|
|
79
|
+
* The entry is located by the successor key it authorized
|
|
80
|
+
* ({@link retiredCredentialVmIdsFromLog}), and the strike is recomputed over
|
|
81
|
+
* the log as it stood just before that entry with the same protected sets the
|
|
82
|
+
* first run used: the successor key and its staged partner, and the
|
|
83
|
+
* replacement code's rung 0. A log that does not authorize the successor key
|
|
84
|
+
* (the entry never landed) reports nothing retired, since there is no entry to
|
|
85
|
+
* read back.
|
|
86
|
+
*
|
|
87
|
+
* @param options {object}
|
|
88
|
+
* @param options.log {DIDLog} the verified account log
|
|
89
|
+
* @param options.did {string} the account DID the log resolves to
|
|
90
|
+
* @param options.successor {object} the public halves of the key the entry
|
|
91
|
+
* authorized (`updateKeyMultibase`) and the staged partner whose hash the
|
|
92
|
+
* reveal entry committed after it (`stagedKeyMultibase`)
|
|
93
|
+
* @param options.replacementUpdateKeyMultibase {string} the replacement
|
|
94
|
+
* code's rung-0 update key
|
|
95
|
+
* @param options.spentKeyAgreementKeyMultibase {string} the spent code's
|
|
96
|
+
* key-agreement key, excluded from the retired set
|
|
97
|
+
* @returns {Promise<RecoverySpendRetirement>}
|
|
98
|
+
*/
|
|
99
|
+
export async function recoverySpendRetirementFromLog({ log, did, successor, replacementUpdateKeyMultibase, spentKeyAgreementKeyMultibase }) {
|
|
100
|
+
const authorized = effectiveParameters(log).some(entry => (entry.updateKeys ?? []).includes(successor.updateKeyMultibase));
|
|
101
|
+
if (!authorized) {
|
|
102
|
+
return {
|
|
103
|
+
retiredCredentialVmIds: [],
|
|
104
|
+
struckRungHashes: [],
|
|
105
|
+
unclaimedCredentialVmIds: []
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
const retiredCredentialVmIds = retiredCredentialVmIdsFromLog({
|
|
109
|
+
log,
|
|
110
|
+
did,
|
|
111
|
+
successorKeyMultibase: successor.updateKeyMultibase,
|
|
112
|
+
spentVmId: recoveryVmId({
|
|
113
|
+
did,
|
|
114
|
+
keyAgreementKeyMultibase: spentKeyAgreementKeyMultibase
|
|
115
|
+
})
|
|
116
|
+
});
|
|
117
|
+
const protectedHashes = await Promise.all([
|
|
118
|
+
deriveNextKeyHash(successor.updateKeyMultibase),
|
|
119
|
+
deriveNextKeyHash(successor.stagedKeyMultibase),
|
|
120
|
+
deriveNextKeyHash(replacementUpdateKeyMultibase)
|
|
121
|
+
]);
|
|
122
|
+
const strike = await retiredCredentialRungsBeforeKey({
|
|
123
|
+
log,
|
|
124
|
+
authorizedKeyMultibase: successor.updateKeyMultibase,
|
|
125
|
+
credentialVmIds: retiredCredentialVmIds,
|
|
126
|
+
protectedHashes,
|
|
127
|
+
protectedKeys: [successor.updateKeyMultibase]
|
|
128
|
+
});
|
|
129
|
+
return {
|
|
130
|
+
retiredCredentialVmIds,
|
|
131
|
+
struckRungHashes: strike.struckHashes,
|
|
132
|
+
unclaimedCredentialVmIds: strike.unclaimedCredentialVmIds
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* The verification-method id a code's key-agreement key publishes under --
|
|
137
|
+
* the ordinary `<did>#<multibase>` form, indistinguishable by id from any
|
|
138
|
+
* other keyAgreement entry. Consumers that must exclude recovery entries do
|
|
139
|
+
* it structurally (an enrolled client is a `capabilityInvocation` entry; a
|
|
140
|
+
* recovery key never has one) or by the registry's recorded multibase.
|
|
141
|
+
*
|
|
142
|
+
* @param options {object}
|
|
143
|
+
* @param options.did {string} the account's did:webvh
|
|
144
|
+
* @param options.keyAgreementKeyMultibase {string}
|
|
145
|
+
* @returns {string}
|
|
146
|
+
*/
|
|
147
|
+
export function recoveryVmId({ did, keyAgreementKeyMultibase }) {
|
|
148
|
+
return `${did}#${keyAgreementKeyMultibase}`;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Thrown by the recovery continuation when the log carries neither the code's
|
|
152
|
+
* update key nor its committed hash -- the code was revoked (or never
|
|
153
|
+
* issued), so no continuation can verify.
|
|
154
|
+
*/
|
|
155
|
+
export class RecoveryKeyNotCommittedError extends Error {
|
|
156
|
+
constructor(message = 'The account log no longer commits this recovery code; the ' +
|
|
157
|
+
'code has been revoked or was never issued.') {
|
|
158
|
+
super(message);
|
|
159
|
+
this.name = 'RecoveryKeyNotCommittedError';
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Thrown by the recovery continuation, before its reveal entry, when a
|
|
164
|
+
* credential-class `keyAgreement` id the add-and-retire entry would introduce
|
|
165
|
+
* already stands in the document -- the user re-typed a passphrase the
|
|
166
|
+
* account already stands on. The recovery exists to retire that credential,
|
|
167
|
+
* and an entry that re-binds it would strike its old ladder VM while leaving
|
|
168
|
+
* its old rung commitments standing, one member backed by two ladders. The
|
|
169
|
+
* app maps the refusal to "choose a passphrase you have not used". Nothing
|
|
170
|
+
* is published.
|
|
171
|
+
*/
|
|
172
|
+
export class RecoveryCredentialStandingError extends Error {
|
|
173
|
+
credentialVmIds;
|
|
174
|
+
constructor({ credentialVmIds }) {
|
|
175
|
+
super('The recovery would re-bind a credential the account already stands ' +
|
|
176
|
+
`on (${credentialVmIds.join(', ')}); choose a credential the account ` +
|
|
177
|
+
'has not used.');
|
|
178
|
+
this.name = 'RecoveryCredentialStandingError';
|
|
179
|
+
this.credentialVmIds = credentialVmIds;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* One attempt of a recovery continuation, the shared control flow of
|
|
184
|
+
* `recoverWebvhClient` and `recoverWebvhLadderAnchored`; each wraps it in the
|
|
185
|
+
* conflict retry under its own preconditions. Both entries go through the
|
|
186
|
+
* account-entry seam ({@link signAccountEntry}) on its committed-key arm: the
|
|
187
|
+
* spent code's rung 0 signs the reveal-and-commit entry, and the successor
|
|
188
|
+
* key that entry committed signs the add-and-retire entry, so the pinned
|
|
189
|
+
* read, the carry-over precondition, the self-reveal union, the conditional
|
|
190
|
+
* publish, and the pin advance are the seam's. The body detects a completed
|
|
191
|
+
* run by the successor key standing authorized (reporting what the entry
|
|
192
|
+
* retired off the log), publishes the reveal-and-commit entry unless a torn
|
|
193
|
+
* earlier run left it standing, enters the `onCommitted` seam, and builds the
|
|
194
|
+
* add-and-retire entry from what the variant's `added` callback hands in.
|
|
195
|
+
*
|
|
196
|
+
* The reveal-and-commit entry commits, in this order, the successor key's
|
|
197
|
+
* hash, its staged partner's hash, and the replacement code's rung-0 hash --
|
|
198
|
+
* the ratified append order of `decisions/0007` (the replacement's comes
|
|
199
|
+
* LAST) and the anchor rule of `decisions/0014` both read that order. The
|
|
200
|
+
* add-and-retire entry is built on the head the reveal entry's own publish
|
|
201
|
+
* leaves standing, with no read in between; against a store whose PUT serves
|
|
202
|
+
* no ETag it is re-read under the same pin instead, so its compare-and-swap
|
|
203
|
+
* never degrades to an unconditional write.
|
|
204
|
+
*
|
|
205
|
+
* @param options {object}
|
|
206
|
+
* @param options.store {RecoveryLogStore}
|
|
207
|
+
* @param options.recovery {object} the spent code's update seed and public
|
|
208
|
+
* halves
|
|
209
|
+
* @param options.successor {object} the key the add-and-retire entry
|
|
210
|
+
* authorizes and signs with (`updateKeyMultibase`, from `updateSeed`) and
|
|
211
|
+
* the staged partner whose hash the reveal entry commits right after it
|
|
212
|
+
* (`stagedKeyMultibase`: the new client's staged key, or the fresh ladder's
|
|
213
|
+
* rung 1)
|
|
214
|
+
* @param options.replacement {ReplacementRecoveryPublicKeys}
|
|
215
|
+
* @param options.onCommitted {function} the persist-before-publish seam,
|
|
216
|
+
* entered once per attempt after the reveal entry stands and before the
|
|
217
|
+
* pivot is built; what it resolves to is handed to `added`
|
|
218
|
+
* @param options.added {function} builds the variant's additions to the
|
|
219
|
+
* add-and-retire entry from the account DID, the document the entry edits,
|
|
220
|
+
* and what the seam persisted
|
|
221
|
+
* @param [options.credentialVmIds] {function} `(did) => string[]` -- the
|
|
222
|
+
* credential-class `keyAgreement` ids `added` will introduce, checked
|
|
223
|
+
* against the read document before the reveal entry: one already standing
|
|
224
|
+
* is refused with {@link RecoveryCredentialStandingError}. The transient
|
|
225
|
+
* variant supplies its fresh credential's; the remembered variant's new
|
|
226
|
+
* client publishes a marked pair, which is never credential-class
|
|
227
|
+
* @param [options.expectedDid] {string}
|
|
228
|
+
* @returns {Promise<RecoveryContinuationOutcome>}
|
|
229
|
+
*/
|
|
230
|
+
export async function recoveryContinuationOnce({ store, recovery, successor, replacement, onCommitted, added, credentialVmIds, expectedDid }) {
|
|
231
|
+
const pinned = {
|
|
232
|
+
...(expectedDid !== undefined ? { expectedDid } : {})
|
|
233
|
+
};
|
|
234
|
+
const missingMessage = 'did:webvh: did.jsonl is missing; nothing to recover.';
|
|
235
|
+
// The successor's own hashes, which the reveal entry commits and the strike
|
|
236
|
+
// never touches; {@link recoverySpendRetirementFromLog} re-derives the same
|
|
237
|
+
// sets for a resumed run.
|
|
238
|
+
const [recoveryHash, successorHash, stagedHash, replacementHash] = await Promise.all([
|
|
239
|
+
deriveNextKeyHash(recovery.updateKeyMultibase),
|
|
240
|
+
deriveNextKeyHash(successor.updateKeyMultibase),
|
|
241
|
+
deriveNextKeyHash(successor.stagedKeyMultibase),
|
|
242
|
+
deriveNextKeyHash(replacement.updateKeyMultibase)
|
|
243
|
+
]);
|
|
244
|
+
const protectedHashes = [successorHash, stagedHash, replacementHash];
|
|
245
|
+
const protectedKeys = [successor.updateKeyMultibase];
|
|
246
|
+
const spentVmIdOf = (did) => recoveryVmId({
|
|
247
|
+
did,
|
|
248
|
+
keyAgreementKeyMultibase: recovery.keyAgreementKeyMultibase
|
|
249
|
+
});
|
|
250
|
+
const complete = (read) => read.updateKeys.includes(successor.updateKeyMultibase);
|
|
251
|
+
// The reveal-and-commit entry, signed by the spent code's rung 0. Each
|
|
252
|
+
// attempt's own read is what the CAS publish is built on, so the continuity
|
|
253
|
+
// check runs here -- and again on a conflict-retry re-run -- not only on
|
|
254
|
+
// the verify that follows both entries.
|
|
255
|
+
const reveal = await signAccountEntry({
|
|
256
|
+
idStore: store,
|
|
257
|
+
signer: { kind: 'committed', updateSeed: recovery.updateSeed },
|
|
258
|
+
...pinned,
|
|
259
|
+
missingMessage,
|
|
260
|
+
verb: 'spending a recovery code',
|
|
261
|
+
logOnly: true,
|
|
262
|
+
skip: read => {
|
|
263
|
+
// Already complete (a torn earlier run finished the add entry): the
|
|
264
|
+
// successor key is authorized, which only the add entry writes.
|
|
265
|
+
if (complete(read)) {
|
|
266
|
+
return true;
|
|
267
|
+
}
|
|
268
|
+
// A member this continuation would re-bind: refused before anything
|
|
269
|
+
// publishes, on the first attempt and on a resume alike.
|
|
270
|
+
const standing = (credentialVmIds?.(read.did) ?? []).filter(id => credentialKeyAgreementMethods({ doc: read.doc, did: read.did }).some(method => method.id === id));
|
|
271
|
+
if (standing.length > 0) {
|
|
272
|
+
throw new RecoveryCredentialStandingError({ credentialVmIds: standing });
|
|
273
|
+
}
|
|
274
|
+
// Skipped when a torn earlier run already published it (the revealed
|
|
275
|
+
// key authorized AND every needed hash committed).
|
|
276
|
+
const revealed = read.updateKeys.includes(recovery.updateKeyMultibase);
|
|
277
|
+
if (!revealed && !read.nextKeyHashes.includes(recoveryHash)) {
|
|
278
|
+
throw new RecoveryKeyNotCommittedError();
|
|
279
|
+
}
|
|
280
|
+
return (revealed &&
|
|
281
|
+
protectedHashes.every(hash => read.nextKeyHashes.includes(hash)));
|
|
282
|
+
},
|
|
283
|
+
// The spent code's own hash is kept through this entry by the arm's
|
|
284
|
+
// carry-over union (so a resumed commit can re-state the revealed key);
|
|
285
|
+
// the add entry drops it. The three new hashes follow in the ratified
|
|
286
|
+
// order, the replacement code's last.
|
|
287
|
+
build: () => ({ commitHashes: protectedHashes })
|
|
288
|
+
});
|
|
289
|
+
let published = accountEntryHead({ outcome: reveal });
|
|
290
|
+
// The seam is deliberately NOT entered on the completed branch -- nothing
|
|
291
|
+
// is about to be published, so there is no pivot to persist ahead of.
|
|
292
|
+
if (complete(published)) {
|
|
293
|
+
// The add entry already struck the pre-recovery credentials, so the
|
|
294
|
+
// document names none of them any more. The report is read back off the
|
|
295
|
+
// log instead ({@link recoverySpendRetirementFromLog}, the same entry
|
|
296
|
+
// point an app's own resume calls), so a resume tells the caller exactly
|
|
297
|
+
// what the first run told it.
|
|
298
|
+
const retirement = await recoverySpendRetirementFromLog({
|
|
299
|
+
log: published.log,
|
|
300
|
+
did: published.did,
|
|
301
|
+
successor: {
|
|
302
|
+
updateKeyMultibase: successor.updateKeyMultibase,
|
|
303
|
+
stagedKeyMultibase: successor.stagedKeyMultibase
|
|
304
|
+
},
|
|
305
|
+
replacementUpdateKeyMultibase: replacement.updateKeyMultibase,
|
|
306
|
+
spentKeyAgreementKeyMultibase: recovery.keyAgreementKeyMultibase
|
|
307
|
+
});
|
|
308
|
+
return {
|
|
309
|
+
did: published.did,
|
|
310
|
+
doc: published.doc,
|
|
311
|
+
log: published.log,
|
|
312
|
+
committed: false,
|
|
313
|
+
...retirement
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
if (reveal.updated && published.etag === undefined) {
|
|
317
|
+
// The same account the reveal entry just extended, under the same pin.
|
|
318
|
+
published = await readPublishedLogOrThrow({
|
|
319
|
+
idStore: store,
|
|
320
|
+
...pinned,
|
|
321
|
+
expectedDid: published.did,
|
|
322
|
+
missingMessage
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
// The persist-before-publish seam: the successor material is persisted
|
|
326
|
+
// HERE, on the head the add-and-retire entry is about to be built on,
|
|
327
|
+
// before that entry -- the ceremony's pivot -- retires the spent code.
|
|
328
|
+
// Reached on both paths into the add entry: the reveal entry just published
|
|
329
|
+
// above, or a torn earlier run's reveal entry standing already.
|
|
330
|
+
const persisted = await onCommitted({
|
|
331
|
+
builtOnHead: servedHead(published.log)
|
|
332
|
+
});
|
|
333
|
+
// The add-and-retire entry: the variant's successor inventory in, the
|
|
334
|
+
// replacement code's inventory in after it, every pre-recovery standing
|
|
335
|
+
// credential fully retired -- the spent code by name, and every other one
|
|
336
|
+
// structurally (its ladder VM by the relation asymmetry, its keyAgreement
|
|
337
|
+
// member by the account-DID controller). Signed by the successor key, whose
|
|
338
|
+
// hash the commit entry just committed.
|
|
339
|
+
let retiredCredentialVmIds = [];
|
|
340
|
+
let strike = {
|
|
341
|
+
struckHashes: [],
|
|
342
|
+
struckKeys: [],
|
|
343
|
+
unclaimedCredentialVmIds: []
|
|
344
|
+
};
|
|
345
|
+
const add = await signAccountEntry({
|
|
346
|
+
idStore: store,
|
|
347
|
+
signer: { kind: 'committed', updateSeed: successor.updateSeed },
|
|
348
|
+
published,
|
|
349
|
+
...pinned,
|
|
350
|
+
expectedDid: published.did,
|
|
351
|
+
verb: 'spending a recovery code',
|
|
352
|
+
logOnly: true,
|
|
353
|
+
build: async ({ published: read }) => {
|
|
354
|
+
const { did, doc } = read;
|
|
355
|
+
const spentVmId = spentVmIdOf(did);
|
|
356
|
+
const replacementVmId = recoveryVmId({
|
|
357
|
+
did,
|
|
358
|
+
keyAgreementKeyMultibase: replacement.keyAgreementKeyMultibase
|
|
359
|
+
});
|
|
360
|
+
// The replacement code's ladder VM, published in the same entry as its
|
|
361
|
+
// key-agreement member: a code is a standing credential with a ladder,
|
|
362
|
+
// and its own bridge delegation is signed by this VM, so a replacement
|
|
363
|
+
// without it could never spend (`decisions/0019`, `decisions/0020`).
|
|
364
|
+
// Its rung-0 hash needs nothing here -- the reveal-and-commit entry
|
|
365
|
+
// committed it, and this entry carries it through.
|
|
366
|
+
const replacementLadderVmId = `${did}#${replacement.ladderVmKeyMultibase}`;
|
|
367
|
+
const variant = added({ did, doc, persisted });
|
|
368
|
+
const addedMethods = [
|
|
369
|
+
...variant.methods,
|
|
370
|
+
{
|
|
371
|
+
id: replacementVmId,
|
|
372
|
+
type: MULTIKEY_VM_TYPE,
|
|
373
|
+
controller: did,
|
|
374
|
+
publicKeyMultibase: replacement.keyAgreementKeyMultibase
|
|
375
|
+
},
|
|
376
|
+
ladderVerificationMethod({
|
|
377
|
+
controller: did,
|
|
378
|
+
publicKeyMultibase: replacement.ladderVmKeyMultibase
|
|
379
|
+
})
|
|
380
|
+
];
|
|
381
|
+
// The full retirement, recognized structurally rather than from a list
|
|
382
|
+
// the caller supplies: every standing ladder VM, and every keyAgreement
|
|
383
|
+
// member the account DID controls, less the ids this entry itself adds.
|
|
384
|
+
// Other unspent recovery codes retire with the rest -- a code's member
|
|
385
|
+
// is unmarked and verbatim, indistinguishable from a passkey's. The
|
|
386
|
+
// enrolled clients' marked pairs and the KMS convenience key are
|
|
387
|
+
// untouched -- neither is account-DID-controlled keyAgreement.
|
|
388
|
+
const ladderVms = ladderVmIds({ doc });
|
|
389
|
+
const addedVmIds = addedMethods
|
|
390
|
+
.map(method => method.id)
|
|
391
|
+
.filter((id) => typeof id === 'string');
|
|
392
|
+
const struckCredentialVmIds = credentialKeyAgreementMethods({ doc, did })
|
|
393
|
+
.map(method => method.id)
|
|
394
|
+
.filter((id) => typeof id === 'string')
|
|
395
|
+
.filter(id => !addedVmIds.includes(id));
|
|
396
|
+
retiredCredentialVmIds = struckCredentialVmIds.filter(id => id !== spentVmId);
|
|
397
|
+
// Each retired credential's committed rungs and any revealed rung of its
|
|
398
|
+
// own go in the SAME entry. Striking the ladder VM rots only a
|
|
399
|
+
// ladder-signed bridge; a bridge an enrolled client minted outlives the
|
|
400
|
+
// strike, and that client survives this entry, so a committed rung left
|
|
401
|
+
// standing is a reveal the retired credential could still perform
|
|
402
|
+
// (`decisions/0014`). Anchored from the log alone, and an unanchorable
|
|
403
|
+
// credential is reported rather than struck.
|
|
404
|
+
strike = await attributeRetiredCredentialRungs({
|
|
405
|
+
log: read.log,
|
|
406
|
+
credentialVmIds: retiredCredentialVmIds,
|
|
407
|
+
protectedHashes,
|
|
408
|
+
protectedKeys
|
|
409
|
+
});
|
|
410
|
+
const struck = (id) => id === spentVmId ||
|
|
411
|
+
ladderVms.includes(id) ||
|
|
412
|
+
struckCredentialVmIds.includes(id);
|
|
413
|
+
return {
|
|
414
|
+
// The spent code's revealed rung and every struck rung leave; the
|
|
415
|
+
// arm unions the successor key in after this.
|
|
416
|
+
updateKeys: read.updateKeys.filter(key => key !== recovery.updateKeyMultibase &&
|
|
417
|
+
!strike.struckKeys.includes(key)),
|
|
418
|
+
nextKeyHashes: assertNextKeyHashesRemain({
|
|
419
|
+
nextKeyHashes: read.nextKeyHashes.filter(hash => hash !== recoveryHash && !strike.struckHashes.includes(hash)),
|
|
420
|
+
ceremony: 'the recovery add-and-retire entry'
|
|
421
|
+
}),
|
|
422
|
+
// The retirement runs over the EXISTING document only, and the added
|
|
423
|
+
// ids join afterwards: a ladder VM this entry publishes may already
|
|
424
|
+
// stand in `doc.capabilityDelegation`, and filtering the union would
|
|
425
|
+
// strike the very method this entry is publishing.
|
|
426
|
+
...mergeVerificationMethods({
|
|
427
|
+
doc,
|
|
428
|
+
methods: addedMethods,
|
|
429
|
+
retire: struck,
|
|
430
|
+
relations: {
|
|
431
|
+
authentication: variant.authentication,
|
|
432
|
+
// The ladder VMs' relation asymmetry: `assertionMethod` and
|
|
433
|
+
// `capabilityDelegation` only, so neither reads as an enrolled
|
|
434
|
+
// client.
|
|
435
|
+
assertionMethod: [
|
|
436
|
+
...(variant.assertionMethod ?? []),
|
|
437
|
+
replacementLadderVmId
|
|
438
|
+
],
|
|
439
|
+
// The variant's own key-agreement member precedes the replacement
|
|
440
|
+
// code's: the position `decisions/0014`'s anchor rule reads the
|
|
441
|
+
// pair by.
|
|
442
|
+
keyAgreement: [...(variant.keyAgreement ?? []), replacementVmId],
|
|
443
|
+
capabilityInvocation: variant.capabilityInvocation,
|
|
444
|
+
capabilityDelegation: [
|
|
445
|
+
...(variant.capabilityDelegation ?? []),
|
|
446
|
+
replacementLadderVmId
|
|
447
|
+
]
|
|
448
|
+
}
|
|
449
|
+
}),
|
|
450
|
+
...(variant.services ? { services: variant.services } : {})
|
|
451
|
+
};
|
|
452
|
+
}
|
|
453
|
+
});
|
|
454
|
+
// The build never declines, so the seam published.
|
|
455
|
+
const updated = add.updated;
|
|
456
|
+
return {
|
|
457
|
+
did: updated.did,
|
|
458
|
+
doc: updated.doc,
|
|
459
|
+
log: updated.log,
|
|
460
|
+
webDoc: updated.webDoc,
|
|
461
|
+
committed: true,
|
|
462
|
+
retiredCredentialVmIds,
|
|
463
|
+
struckRungHashes: strike.struckHashes,
|
|
464
|
+
unclaimedCredentialVmIds: strike.unclaimedCredentialVmIds
|
|
465
|
+
};
|
|
466
|
+
}
|
|
467
|
+
//# sourceMappingURL=continuation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"continuation.js","sourceRoot":"","sources":["../../src/recovery/continuation.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;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;QAChB,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,SAAS,EAAE,IAAI;QACf,sBAAsB;QACtB,gBAAgB,EAAE,MAAM,CAAC,YAAY;QACrC,wBAAwB,EAAE,MAAM,CAAC,wBAAwB;KAC1D,CAAA;AACH,CAAC"}
|
package/dist/recovery/index.d.ts
CHANGED
|
@@ -31,12 +31,15 @@
|
|
|
31
31
|
* self-enrolling recovery continuation. Its ladder-anchored variant (the
|
|
32
32
|
* transient-recovery continuation, `recoverWebvhLadderAnchored`) lives in
|
|
33
33
|
* `@interop/wallet-core/clientAnnex`.
|
|
34
|
+
* - `recoverySpendRetirementFromLog` -- the retirement report of a spend
|
|
35
|
+
* whose add-and-retire entry already stands, read back off the log: what a
|
|
36
|
+
* resume that never re-enters the continuation drops registry entries and
|
|
37
|
+
* deletes unlock Spaces for, and which retired credentials kept a rung.
|
|
34
38
|
* - `delegateLogWrite` / `delegationProofKeyId` /
|
|
35
|
-
* `
|
|
36
|
-
* PUT-on-`did.jsonl` delegation builder and the
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* read/record).
|
|
39
|
+
* `recordedDelegationFields` -- the authorization bridge: the pre-minted
|
|
40
|
+
* PUT-on-`did.jsonl` delegation builder, and the registry fields a record's
|
|
41
|
+
* delegations stand for. A bridge is signed by its own credential's ladder
|
|
42
|
+
* VM, so no ceremony re-mints another credential's.
|
|
40
43
|
*
|
|
41
44
|
* Kept out of the root export: this subpath pulls the webkms-client / ezcap /
|
|
42
45
|
* was-client dependency graph (the same isolation pattern as `./keyring`).
|
|
@@ -45,8 +48,9 @@ export { decodeRecoveryCode, formatRecoveryCode, generateRecoveryCode, normalize
|
|
|
45
48
|
export type { RecoveryClient } from './recoveryCode.js';
|
|
46
49
|
export { computeUnlockBinding, remintUnlockRecordDelegations, UnlockBindingError, unlockRecordBinding, unwrapUnlockRecord, wrapUnlockRecord } from '../unlock/unlockRecord.js';
|
|
47
50
|
export type { SignedUnlockRecord, UnlockRecordContents, UnlockRecordProofState } from '../unlock/unlockRecord.js';
|
|
48
|
-
export { delegateLogWrite, delegationProofKeyId, RECOVERY_DELEGATION_TTL_MS, recordedDelegationFields,
|
|
49
|
-
export
|
|
50
|
-
export {
|
|
51
|
+
export { delegateLogWrite, delegationProofKeyId, RECOVERY_DELEGATION_TTL_MS, recordedDelegationFields, ZCAP_RENEWAL_WINDOW_MS, zcapExpiring } from './recoveryDelegation.js';
|
|
52
|
+
export { recoverySpendRetirementFromLog } from './continuation.js';
|
|
53
|
+
export type { RecoverySpendRetirement } from './continuation.js';
|
|
54
|
+
export { publishRecoveryKey, recoverWebvhClient, RecoveryCredentialStandingError, RecoveryKeyNotCommittedError, recoveryVmId, removeRecoveryKey } from './recoveryWebvh.js';
|
|
51
55
|
export type { RecoveryLogStore, RecoveryPublicKeys, ReplacementRecoveryPublicKeys } from './recoveryWebvh.js';
|
|
52
56
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/recovery/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/recovery/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,YAAY,EACZ,wBAAwB,EACxB,sBAAsB,EACvB,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAEvD,OAAO,EACL,oBAAoB,EACpB,6BAA6B,EAC7B,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,2BAA2B,CAAA;AAClC,YAAY,EACV,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,2BAA2B,CAAA;AAElC,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,0BAA0B,EAC1B,wBAAwB,EACxB,sBAAsB,EACtB,YAAY,EACb,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAA;AAClE,YAAY,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAA;AAEhE,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,+BAA+B,EAC/B,4BAA4B,EAC5B,YAAY,EACZ,iBAAiB,EAClB,MAAM,oBAAoB,CAAA;AAC3B,YAAY,EACV,gBAAgB,EAChB,kBAAkB,EAClB,6BAA6B,EAC9B,MAAM,oBAAoB,CAAA"}
|
package/dist/recovery/index.js
CHANGED
|
@@ -31,18 +31,22 @@
|
|
|
31
31
|
* self-enrolling recovery continuation. Its ladder-anchored variant (the
|
|
32
32
|
* transient-recovery continuation, `recoverWebvhLadderAnchored`) lives in
|
|
33
33
|
* `@interop/wallet-core/clientAnnex`.
|
|
34
|
+
* - `recoverySpendRetirementFromLog` -- the retirement report of a spend
|
|
35
|
+
* whose add-and-retire entry already stands, read back off the log: what a
|
|
36
|
+
* resume that never re-enters the continuation drops registry entries and
|
|
37
|
+
* deletes unlock Spaces for, and which retired credentials kept a rung.
|
|
34
38
|
* - `delegateLogWrite` / `delegationProofKeyId` /
|
|
35
|
-
* `
|
|
36
|
-
* PUT-on-`did.jsonl` delegation builder and the
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* read/record).
|
|
39
|
+
* `recordedDelegationFields` -- the authorization bridge: the pre-minted
|
|
40
|
+
* PUT-on-`did.jsonl` delegation builder, and the registry fields a record's
|
|
41
|
+
* delegations stand for. A bridge is signed by its own credential's ladder
|
|
42
|
+
* VM, so no ceremony re-mints another credential's.
|
|
40
43
|
*
|
|
41
44
|
* Kept out of the root export: this subpath pulls the webkms-client / ezcap /
|
|
42
45
|
* was-client dependency graph (the same isolation pattern as `./keyring`).
|
|
43
46
|
*/
|
|
44
47
|
export { decodeRecoveryCode, formatRecoveryCode, generateRecoveryCode, normalizeRecoveryCode, RECOVERY_CODE_BYTES, RECOVERY_KDF, RecoveryCodeInvalidError, recoveryClientFromCode } from './recoveryCode.js';
|
|
45
48
|
export { computeUnlockBinding, remintUnlockRecordDelegations, UnlockBindingError, unlockRecordBinding, unwrapUnlockRecord, wrapUnlockRecord } from '../unlock/unlockRecord.js';
|
|
46
|
-
export { delegateLogWrite, delegationProofKeyId, RECOVERY_DELEGATION_TTL_MS, recordedDelegationFields,
|
|
47
|
-
export {
|
|
49
|
+
export { delegateLogWrite, delegationProofKeyId, RECOVERY_DELEGATION_TTL_MS, recordedDelegationFields, ZCAP_RENEWAL_WINDOW_MS, zcapExpiring } from './recoveryDelegation.js';
|
|
50
|
+
export { recoverySpendRetirementFromLog } from './continuation.js';
|
|
51
|
+
export { publishRecoveryKey, recoverWebvhClient, RecoveryCredentialStandingError, RecoveryKeyNotCommittedError, recoveryVmId, removeRecoveryKey } from './recoveryWebvh.js';
|
|
48
52
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/recovery/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/recovery/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,YAAY,EACZ,wBAAwB,EACxB,sBAAsB,EACvB,MAAM,mBAAmB,CAAA;AAG1B,OAAO,EACL,oBAAoB,EACpB,6BAA6B,EAC7B,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,2BAA2B,CAAA;AAOlC,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,0BAA0B,EAC1B,wBAAwB,EACxB,sBAAsB,EACtB,YAAY,EACb,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAA;AAGlE,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,+BAA+B,EAC/B,4BAA4B,EAC5B,YAAY,EACZ,iBAAiB,EAClB,MAAM,oBAAoB,CAAA"}
|