@interop/wallet-core 0.52.1 → 0.54.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/dist/clientAnnex/credentialAnchoredGenesis.d.ts +24 -10
- package/dist/clientAnnex/credentialAnchoredGenesis.d.ts.map +1 -1
- package/dist/clientAnnex/credentialAnchoredGenesis.js +42 -13
- package/dist/clientAnnex/credentialAnchoredGenesis.js.map +1 -1
- package/dist/clientAnnex/forgetLast.d.ts +18 -10
- package/dist/clientAnnex/forgetLast.d.ts.map +1 -1
- package/dist/clientAnnex/forgetLast.js +29 -9
- package/dist/clientAnnex/forgetLast.js.map +1 -1
- package/dist/clientAnnex/index.d.ts +1 -1
- package/dist/clientAnnex/index.d.ts.map +1 -1
- package/dist/clientAnnex/index.js +1 -1
- package/dist/clientAnnex/index.js.map +1 -1
- package/dist/clientAnnex/ladderAnchored.d.ts +125 -5
- package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -1
- package/dist/clientAnnex/ladderAnchored.js +180 -12
- package/dist/clientAnnex/ladderAnchored.js.map +1 -1
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts +11 -0
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts.map +1 -1
- package/dist/clientAnnex/recoveryLadderAnchored.js +45 -5
- package/dist/clientAnnex/recoveryLadderAnchored.js.map +1 -1
- package/dist/clientAnnex/selfEnroll.d.ts +61 -2
- package/dist/clientAnnex/selfEnroll.d.ts.map +1 -1
- package/dist/clientAnnex/selfEnroll.js +72 -8
- package/dist/clientAnnex/selfEnroll.js.map +1 -1
- package/dist/clients/rosterPolicy.d.ts.map +1 -1
- package/dist/clients/rosterPolicy.js +10 -7
- package/dist/clients/rosterPolicy.js.map +1 -1
- package/dist/descriptors/logSource.d.ts +5 -2
- package/dist/descriptors/logSource.d.ts.map +1 -1
- package/dist/descriptors/logSource.js +5 -2
- package/dist/descriptors/logSource.js.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/keys/clientKeyRecord.d.ts +68 -1
- package/dist/keys/clientKeyRecord.d.ts.map +1 -1
- package/dist/keys/clientKeyRecord.js +155 -20
- package/dist/keys/clientKeyRecord.js.map +1 -1
- package/dist/keys/index.d.ts +2 -2
- package/dist/keys/index.d.ts.map +1 -1
- package/dist/keys/index.js +1 -1
- package/dist/keys/index.js.map +1 -1
- package/dist/keys/rosterLogStore.d.ts.map +1 -1
- package/dist/keys/rosterLogStore.js +15 -0
- package/dist/keys/rosterLogStore.js.map +1 -1
- package/dist/log.d.ts +49 -0
- package/dist/log.d.ts.map +1 -0
- package/dist/log.js +53 -0
- package/dist/log.js.map +1 -0
- package/dist/recovery/recoveryDelegation.d.ts +6 -2
- package/dist/recovery/recoveryDelegation.d.ts.map +1 -1
- package/dist/recovery/recoveryDelegation.js +31 -5
- package/dist/recovery/recoveryDelegation.js.map +1 -1
- package/dist/recovery/recoveryWebvh.d.ts +75 -6
- package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
- package/dist/recovery/recoveryWebvh.js +121 -16
- package/dist/recovery/recoveryWebvh.js.map +1 -1
- package/dist/request/capabilityRequest.d.ts +9 -1
- package/dist/request/capabilityRequest.d.ts.map +1 -1
- package/dist/request/capabilityRequest.js +13 -2
- package/dist/request/capabilityRequest.js.map +1 -1
- package/dist/request/classify.d.ts +37 -1
- package/dist/request/classify.d.ts.map +1 -1
- package/dist/request/classify.js +61 -2
- package/dist/request/classify.js.map +1 -1
- package/dist/request/ephemeralExchange.d.ts +0 -18
- package/dist/request/ephemeralExchange.d.ts.map +1 -1
- package/dist/request/ephemeralExchange.js +3 -2
- package/dist/request/ephemeralExchange.js.map +1 -1
- package/dist/request/interactionUrl.d.ts.map +1 -1
- package/dist/request/interactionUrl.js +4 -2
- package/dist/request/interactionUrl.js.map +1 -1
- package/dist/request/parse.d.ts +0 -10
- package/dist/request/parse.d.ts.map +1 -1
- package/dist/request/parse.js +15 -1
- package/dist/request/parse.js.map +1 -1
- package/dist/request/processRequest.d.ts.map +1 -1
- package/dist/request/processRequest.js +2 -1
- package/dist/request/processRequest.js.map +1 -1
- package/dist/request/types.d.ts +23 -2
- package/dist/request/types.d.ts.map +1 -1
- package/dist/resourceLog/controller.d.ts.map +1 -1
- package/dist/resourceLog/controller.js +3 -2
- package/dist/resourceLog/controller.js.map +1 -1
- package/dist/resourceLog/license.d.ts +17 -3
- package/dist/resourceLog/license.d.ts.map +1 -1
- package/dist/resourceLog/license.js +24 -2
- package/dist/resourceLog/license.js.map +1 -1
- package/dist/space/activity.d.ts +48 -1
- package/dist/space/activity.d.ts.map +1 -1
- package/dist/space/activity.js +52 -4
- package/dist/space/activity.js.map +1 -1
- package/dist/space/index.d.ts +1 -1
- package/dist/space/index.d.ts.map +1 -1
- package/dist/space/index.js +1 -1
- package/dist/space/index.js.map +1 -1
- package/dist/sync/pull.d.ts +0 -22
- package/dist/sync/pull.d.ts.map +1 -1
- package/dist/sync/pull.js +30 -2
- package/dist/sync/pull.js.map +1 -1
- package/dist/unlock/index.d.ts +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/standingWebvh.d.ts +10 -0
- package/dist/unlock/standingWebvh.d.ts.map +1 -1
- package/dist/unlock/standingWebvh.js +10 -2
- package/dist/unlock/standingWebvh.js.map +1 -1
- package/dist/unlock/unlockRecord.d.ts +37 -0
- package/dist/unlock/unlockRecord.d.ts.map +1 -1
- package/dist/unlock/unlockRecord.js +53 -0
- package/dist/unlock/unlockRecord.js.map +1 -1
- package/dist/webvh/didWebvh.d.ts +53 -2
- package/dist/webvh/didWebvh.d.ts.map +1 -1
- package/dist/webvh/didWebvh.js +72 -20
- package/dist/webvh/didWebvh.js.map +1 -1
- package/dist/webvh/index.d.ts +1 -1
- package/dist/webvh/index.d.ts.map +1 -1
- package/dist/webvh/index.js +1 -1
- package/dist/webvh/index.js.map +1 -1
- package/package.json +7 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DIDDoc, DIDLog } from '@interop/did-method-webvh';
|
|
2
|
-
import type { ClientWebvhUpdateKeys, WebvhEnrollmentKeys, WebvhIdStore } from '../webvh/didWebvh.js';
|
|
2
|
+
import type { ClientWebvhUpdateKeys, DidWebKeyMapV2, WebvhEnrollmentKeys, WebvhIdStore } from '../webvh/didWebvh.js';
|
|
3
3
|
import type { ResourceLogPinStore } from '@interop/vh-resource-log';
|
|
4
4
|
import { type RevokedClientKeys } from '../webvh/revokeClient.js';
|
|
5
5
|
import { type UnlockKeyAgreementPublication, type UnlockLogStore } from '../unlock/standingWebvh.js';
|
|
@@ -21,20 +21,28 @@ import { type UnlockKeyAgreementPublication, type UnlockLogStore } from '../unlo
|
|
|
21
21
|
* durable self-enrollment ({@link selfEnrollWebvhClient}), whose add entry
|
|
22
22
|
* atomically publishes the client, retires rung 0, and removes the ladder VM.
|
|
23
23
|
*
|
|
24
|
+
* When the wallet keeps a KMS, `didWebKeys` folds the KMS-held
|
|
25
|
+
* authentication key into the entry under `authentication` only -- the
|
|
26
|
+
* durable genesis's server-side convenience, with its exclusions intact (no
|
|
27
|
+
* KMS keyAgreement or assertion key).
|
|
28
|
+
*
|
|
24
29
|
* The caller owns publication (conditional, create-only) and the pointer
|
|
25
30
|
* write that follows; this assembles and signs the log only.
|
|
26
31
|
*
|
|
27
32
|
* @param options {object}
|
|
28
33
|
* @param options.wasServerUrl {string}
|
|
29
34
|
* @param options.spaceId {string}
|
|
35
|
+
* @param [options.didWebKeys] {DidWebKeyMapV2} the parsed keys.json, when
|
|
36
|
+
* the wallet keeps a KMS; absent, the genesis is ladder-and-credential-only
|
|
30
37
|
* @param options.ladderSeed {Uint8Array} the credential's ladder seed
|
|
31
38
|
* @param options.keyAgreement {UnlockKeyAgreementPublication} the
|
|
32
39
|
* credential's key-agreement publication (commitment or verbatim)
|
|
33
40
|
* @returns {Promise<{ log: DIDLog, webDoc: object, did: string }>}
|
|
34
41
|
*/
|
|
35
|
-
export declare function createLadderAnchoredAccountLog({ wasServerUrl, spaceId, ladderSeed, keyAgreement }: {
|
|
42
|
+
export declare function createLadderAnchoredAccountLog({ wasServerUrl, spaceId, didWebKeys, ladderSeed, keyAgreement }: {
|
|
36
43
|
wasServerUrl: string;
|
|
37
44
|
spaceId: string;
|
|
45
|
+
didWebKeys?: DidWebKeyMapV2;
|
|
38
46
|
ladderSeed: Uint8Array;
|
|
39
47
|
keyAgreement: UnlockKeyAgreementPublication;
|
|
40
48
|
}): Promise<{
|
|
@@ -63,6 +71,10 @@ export declare function createLadderAnchoredAccountLog({ wasServerUrl, spaceId,
|
|
|
63
71
|
* @param options.idStore {WebvhIdStore}
|
|
64
72
|
* @param options.wasServerUrl {string}
|
|
65
73
|
* @param options.spaceId {string}
|
|
74
|
+
* @param [options.didWebKeys] {DidWebKeyMapV2} the parsed keys.json, when
|
|
75
|
+
* the wallet keeps a KMS; folded into the CREATE path only (see the
|
|
76
|
+
* adoption note in the body), which also records the minted DID into
|
|
77
|
+
* keys.json's webvh block as the durable ensure does
|
|
66
78
|
* @param options.ladderSeed {Uint8Array} the credential's ladder seed
|
|
67
79
|
* @param options.keyAgreement {UnlockKeyAgreementPublication} the
|
|
68
80
|
* credential's key-agreement publication (commitment or verbatim)
|
|
@@ -78,6 +90,7 @@ export declare function ensureLadderAnchoredDidWebvh(options: {
|
|
|
78
90
|
idStore: WebvhIdStore;
|
|
79
91
|
wasServerUrl: string;
|
|
80
92
|
spaceId: string;
|
|
93
|
+
didWebKeys?: DidWebKeyMapV2;
|
|
81
94
|
ladderSeed: Uint8Array;
|
|
82
95
|
keyAgreement: UnlockKeyAgreementPublication;
|
|
83
96
|
expectedDid?: string;
|
|
@@ -106,6 +119,47 @@ export declare function ensureLadderAnchoredDidWebvh(options: {
|
|
|
106
119
|
* @param options.newClientUpdateSeeds {ClientWebvhUpdateKeys} the new
|
|
107
120
|
* client's update-key seeds (minted by the self-enrolling flow, which
|
|
108
121
|
* therefore holds them and can sign the add entry)
|
|
122
|
+
* @param options.onCommitted {function}
|
|
123
|
+
* `(committed: { builtOnHead: { scid, versionId } }) => Promise<void>` --
|
|
124
|
+
* the REQUIRED persist-before-publish seam. It runs once per attempt, after
|
|
125
|
+
* the reveal-and-commit entry stands (published here, or standing from a
|
|
126
|
+
* torn earlier run) and BEFORE the add entry -- the ceremony's pivot -- is
|
|
127
|
+
* built. The caller durably writes the pending client-key record there (the
|
|
128
|
+
* `pending` codec group of `keys/clientKeyRecord.ts`: ceremony
|
|
129
|
+
* `'self-enrollment'`, the handed-back `builtOnHead`), so the add entry can
|
|
130
|
+
* never publish a client whose seed nothing can re-derive, per the
|
|
131
|
+
* post-pivot derivability rule (`decisions/0010`). A throw propagates and
|
|
132
|
+
* the add entry is withheld. What a throw leaves behind is inert: the
|
|
133
|
+
* standing reveal entry's committed hashes for the unpersisted client stay
|
|
134
|
+
* in `nextKeyHashes` forever as orphans, but they commit keys of a lost
|
|
135
|
+
* random seed -- nothing can reveal them, so they are no re-seizure
|
|
136
|
+
* credential, and the per-entry staged-hash attribution passes over them.
|
|
137
|
+
* The seam must be idempotent: the conflict retry and a resumed run invoke
|
|
138
|
+
* it again. `builtOnHead` is the head of the log snapshot the add entry is
|
|
139
|
+
* about to be built on -- the SCID from the log's parameters and the latest
|
|
140
|
+
* entry's `versionId` -- which a resume hands back as this call's
|
|
141
|
+
* `builtOnHead` marker. The caveat to hold on to: the idempotent COMPLETED
|
|
142
|
+
* branch (the new client's update key already authorized) returns without
|
|
143
|
+
* ever entering the seam, so a caller resuming across processes must be
|
|
144
|
+
* able to treat an already-complete continuation as success on its own
|
|
145
|
+
* @param [options.builtOnHead] {object} `{ scid, versionId }` -- the resume
|
|
146
|
+
* marker a pending record recorded, from an earlier run's `onCommitted`.
|
|
147
|
+
* Supplied, the attempt's first read is refused with
|
|
148
|
+
* {@link BuiltOnHeadNotReachedError} unless the served log carries that
|
|
149
|
+
* SCID and an entry with that `versionId`. The chain-head pin cannot stand
|
|
150
|
+
* in for it: the pin is written non-atomically after the add entry
|
|
151
|
+
* publishes, and the continuity check accepts a log served at exactly the
|
|
152
|
+
* pinned length -- so only this marker stops a resume rebuilding the add
|
|
153
|
+
* entry over a log that never reached the head the pending record was
|
|
154
|
+
* written against. The marker covers the pre-pivot half of that gap only:
|
|
155
|
+
* a served log CONTAINING the recorded head but truncated behind the torn
|
|
156
|
+
* run's own add entry still passes it and is resumed onto, and the menders
|
|
157
|
+
* for that residual half are the ordinary ones -- this client's own
|
|
158
|
+
* chain-head pin once the add publish wrote it, and any other enrolled
|
|
159
|
+
* client's pinned read of the same log. Both members must be non-empty
|
|
160
|
+
* strings; a malformed marker is refused with a `TypeError` before any
|
|
161
|
+
* read, since a resume with an uncomparable marker is a resume with no
|
|
162
|
+
* fork guard
|
|
109
163
|
* @param [options.expectedDid] {string} the account DID the log must resolve
|
|
110
164
|
* to, from the credential-authenticated pointer
|
|
111
165
|
* @param [options.pinStore] {ResourceLogPinStore} this client's chain-head
|
|
@@ -116,22 +170,88 @@ export declare function ensureLadderAnchoredDidWebvh(options: {
|
|
|
116
170
|
* @param [options.logId] {string} the account log's pin slot
|
|
117
171
|
* (`accountLogPinId({ spaceId })`); required whenever a `pinStore` is
|
|
118
172
|
* supplied
|
|
119
|
-
* @returns {Promise<{ did: string, webDoc?: object }>}
|
|
120
|
-
*
|
|
121
|
-
*
|
|
173
|
+
* @returns {Promise<{ did: string, webDoc?: object, committed: boolean }>}
|
|
174
|
+
* the account DID, the final `did.json` projection when the add entry ran
|
|
175
|
+
* here, and `committed` -- whether THIS call published the pivot entry
|
|
176
|
+
* (`false` exactly on the idempotent completed branch, where a torn earlier
|
|
177
|
+
* run had already published it). It is an observability signal, not a
|
|
178
|
+
* success flag: a returning call means the continuation stands either way,
|
|
179
|
+
* so a caller clears its pending record on the RETURN, whatever `committed`
|
|
180
|
+
* says. Its absence from a return value is a build skew, which is why it is
|
|
181
|
+
* stated rather than inferred
|
|
122
182
|
*/
|
|
123
183
|
export declare function selfEnrollWebvhClient(options: {
|
|
124
184
|
store: UnlockLogStore;
|
|
125
185
|
ladderSeed: Uint8Array;
|
|
126
186
|
newClientKeys: WebvhEnrollmentKeys;
|
|
127
187
|
newClientUpdateSeeds: ClientWebvhUpdateKeys;
|
|
188
|
+
onCommitted: (committed: {
|
|
189
|
+
builtOnHead: {
|
|
190
|
+
scid: string;
|
|
191
|
+
versionId: string;
|
|
192
|
+
};
|
|
193
|
+
}) => Promise<void>;
|
|
194
|
+
builtOnHead?: {
|
|
195
|
+
scid: string;
|
|
196
|
+
versionId: string;
|
|
197
|
+
};
|
|
128
198
|
expectedDid?: string;
|
|
129
199
|
pinStore?: ResourceLogPinStore;
|
|
130
200
|
logId?: string;
|
|
131
201
|
}): Promise<{
|
|
132
202
|
did: string;
|
|
133
203
|
webDoc?: object;
|
|
204
|
+
committed: boolean;
|
|
134
205
|
}>;
|
|
206
|
+
/**
|
|
207
|
+
* Refuses a malformed resume marker before any read. A marker whose members
|
|
208
|
+
* are missing or empty could not be compared against anything, so accepting
|
|
209
|
+
* one would hand a resume the mint-skip WITHOUT the fork guard the marker
|
|
210
|
+
* exists to apply -- fail-open exactly where the guard matters.
|
|
211
|
+
*
|
|
212
|
+
* @param options {object}
|
|
213
|
+
* @param options.builtOnHead {unknown} the supplied marker
|
|
214
|
+
* @returns {void}
|
|
215
|
+
*/
|
|
216
|
+
export declare function assertBuiltOnHeadShape({ builtOnHead }: {
|
|
217
|
+
builtOnHead: unknown;
|
|
218
|
+
}): void;
|
|
219
|
+
/**
|
|
220
|
+
* Thrown when a resumed self-enrollment is served an account log that has not
|
|
221
|
+
* reached the head its pending record was written against -- a different SCID,
|
|
222
|
+
* or no entry carrying the recorded `versionId`. Rebuilding the add entry over
|
|
223
|
+
* such a log would fork the account off a head the ceremony already committed
|
|
224
|
+
* to, which the chain-head pin alone does not catch: the pin is written
|
|
225
|
+
* non-atomically after the add entry publishes, so a run torn between the two
|
|
226
|
+
* leaves a pin one entry behind, and the continuity check accepts a served log
|
|
227
|
+
* at exactly the pinned length.
|
|
228
|
+
*
|
|
229
|
+
* **`name` is a stable contract.** It is always the string
|
|
230
|
+
* `'BuiltOnHeadNotReachedError'`, and a consumer should match on that rather
|
|
231
|
+
* than on `instanceof`: a wallet app that links this package (or holds two
|
|
232
|
+
* copies of it through a dependency tree) gets a different class object for
|
|
233
|
+
* the same error, so `instanceof` silently fails there while the name does
|
|
234
|
+
* not.
|
|
235
|
+
*/
|
|
236
|
+
export declare class BuiltOnHeadNotReachedError extends Error {
|
|
237
|
+
/**
|
|
238
|
+
* The head the pending record recorded, which the served log did not reach.
|
|
239
|
+
*/
|
|
240
|
+
builtOnHead: {
|
|
241
|
+
scid: string;
|
|
242
|
+
versionId: string;
|
|
243
|
+
};
|
|
244
|
+
/**
|
|
245
|
+
* @param options {object}
|
|
246
|
+
* @param options.builtOnHead {object} the recorded `{ scid, versionId }`
|
|
247
|
+
*/
|
|
248
|
+
constructor({ builtOnHead }: {
|
|
249
|
+
builtOnHead: {
|
|
250
|
+
scid: string;
|
|
251
|
+
versionId: string;
|
|
252
|
+
};
|
|
253
|
+
});
|
|
254
|
+
}
|
|
135
255
|
/**
|
|
136
256
|
* Thrown when the client being forgotten is the account's LAST enrolled
|
|
137
257
|
* durable client. Removing it through this entry would leave the document
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ladderAnchored.d.ts","sourceRoot":"","sources":["../../src/clientAnnex/ladderAnchored.ts"],"names":[],"mappings":"AAmDA,OAAO,KAAK,EACV,MAAM,EACN,MAAM,EAEP,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"ladderAnchored.d.ts","sourceRoot":"","sources":["../../src/clientAnnex/ladderAnchored.ts"],"names":[],"mappings":"AAmDA,OAAO,KAAK,EACV,MAAM,EACN,MAAM,EAEP,MAAM,2BAA2B,CAAA;AAoBlC,OAAO,KAAK,EACV,qB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C;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAE,CAAC,CAEzE"}
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
* from durable state alone, on the recovery continuation's pattern.
|
|
50
50
|
*/
|
|
51
51
|
import { deriveNextKeyHash, updateDID } from '@interop/did-method-webvh';
|
|
52
|
-
import { assertCarryOverCommitments, concludeWithPublishedLog, createLadderAnchoredWebvhLog, didWebvhControllerTemplate, genesisNextKeyHashes, ladderVerificationMethod, markedVerificationMethodPair, pinOfLog, publishWebvhLog, putLogResource, readPublishedLog, relationIds, updateKeySigner, withLogConflictRetry } from '../webvh/didWebvh.js';
|
|
52
|
+
import { assertCanonicalClientKeys, assertCarryOverCommitments, concludeWithPublishedLog, createLadderAnchoredWebvhLog, didWebvhControllerTemplate, genesisNextKeyHashes, ladderVerificationMethod, markedVerificationMethodPair, pinOfLog, publishWebvhLog, putLogResource, readPublishedLog, relationIds, servedHead, updateKeySigner, withLogConflictRetry, writeKeysJson } from '../webvh/didWebvh.js';
|
|
53
53
|
import { accountLogPinId } from '../webvh/verifyLog.js';
|
|
54
54
|
import { ladderVmIds } from '../webvh/listClients.js';
|
|
55
55
|
import { clientRemovalFields, clientRemovalTarget } from '../webvh/revokeClient.js';
|
|
@@ -73,18 +73,25 @@ import { attributeLadderRung, ladderRung, ladderVmKeyMultibase } from './ladder.
|
|
|
73
73
|
* durable self-enrollment ({@link selfEnrollWebvhClient}), whose add entry
|
|
74
74
|
* atomically publishes the client, retires rung 0, and removes the ladder VM.
|
|
75
75
|
*
|
|
76
|
+
* When the wallet keeps a KMS, `didWebKeys` folds the KMS-held
|
|
77
|
+
* authentication key into the entry under `authentication` only -- the
|
|
78
|
+
* durable genesis's server-side convenience, with its exclusions intact (no
|
|
79
|
+
* KMS keyAgreement or assertion key).
|
|
80
|
+
*
|
|
76
81
|
* The caller owns publication (conditional, create-only) and the pointer
|
|
77
82
|
* write that follows; this assembles and signs the log only.
|
|
78
83
|
*
|
|
79
84
|
* @param options {object}
|
|
80
85
|
* @param options.wasServerUrl {string}
|
|
81
86
|
* @param options.spaceId {string}
|
|
87
|
+
* @param [options.didWebKeys] {DidWebKeyMapV2} the parsed keys.json, when
|
|
88
|
+
* the wallet keeps a KMS; absent, the genesis is ladder-and-credential-only
|
|
82
89
|
* @param options.ladderSeed {Uint8Array} the credential's ladder seed
|
|
83
90
|
* @param options.keyAgreement {UnlockKeyAgreementPublication} the
|
|
84
91
|
* credential's key-agreement publication (commitment or verbatim)
|
|
85
92
|
* @returns {Promise<{ log: DIDLog, webDoc: object, did: string }>}
|
|
86
93
|
*/
|
|
87
|
-
export async function createLadderAnchoredAccountLog({ wasServerUrl, spaceId, ladderSeed, keyAgreement }) {
|
|
94
|
+
export async function createLadderAnchoredAccountLog({ wasServerUrl, spaceId, didWebKeys, ladderSeed, keyAgreement }) {
|
|
88
95
|
const rung0 = await ladderRung({ ladderSeed, index: 0 });
|
|
89
96
|
const rung1 = await ladderRung({ ladderSeed, index: 1 });
|
|
90
97
|
const controllerTemplate = didWebvhControllerTemplate({
|
|
@@ -94,6 +101,7 @@ export async function createLadderAnchoredAccountLog({ wasServerUrl, spaceId, la
|
|
|
94
101
|
return createLadderAnchoredWebvhLog({
|
|
95
102
|
wasServerUrl,
|
|
96
103
|
spaceId,
|
|
104
|
+
...(didWebKeys ? { didWebKeys } : {}),
|
|
97
105
|
ladderVmKeyMultibase: await ladderVmKeyMultibase({ ladderSeed }),
|
|
98
106
|
credentialKeyAgreementMethod: unlockKeyVerificationMethod({
|
|
99
107
|
did: controllerTemplate,
|
|
@@ -128,6 +136,10 @@ export async function createLadderAnchoredAccountLog({ wasServerUrl, spaceId, la
|
|
|
128
136
|
* @param options.idStore {WebvhIdStore}
|
|
129
137
|
* @param options.wasServerUrl {string}
|
|
130
138
|
* @param options.spaceId {string}
|
|
139
|
+
* @param [options.didWebKeys] {DidWebKeyMapV2} the parsed keys.json, when
|
|
140
|
+
* the wallet keeps a KMS; folded into the CREATE path only (see the
|
|
141
|
+
* adoption note in the body), which also records the minted DID into
|
|
142
|
+
* keys.json's webvh block as the durable ensure does
|
|
131
143
|
* @param options.ladderSeed {Uint8Array} the credential's ladder seed
|
|
132
144
|
* @param options.keyAgreement {UnlockKeyAgreementPublication} the
|
|
133
145
|
* credential's key-agreement publication (commitment or verbatim)
|
|
@@ -149,7 +161,7 @@ export async function ensureLadderAnchoredDidWebvh(options) {
|
|
|
149
161
|
* @param options {object} see {@link ensureLadderAnchoredDidWebvh}
|
|
150
162
|
* @returns {Promise<{ did: string }>}
|
|
151
163
|
*/
|
|
152
|
-
async function ensureLadderAnchoredDidWebvhOnce({ idStore, wasServerUrl, spaceId, ladderSeed, keyAgreement, expectedDid, pinStore }) {
|
|
164
|
+
async function ensureLadderAnchoredDidWebvhOnce({ idStore, wasServerUrl, spaceId, didWebKeys, ladderSeed, keyAgreement, expectedDid, pinStore }) {
|
|
153
165
|
const logId = accountLogPinId({ spaceId });
|
|
154
166
|
const published = await readPublishedLog({
|
|
155
167
|
idStore,
|
|
@@ -162,7 +174,10 @@ async function ensureLadderAnchoredDidWebvhOnce({ idStore, wasServerUrl, spaceId
|
|
|
162
174
|
// ladder-anchored analog of the durable path's "authorizes one of this
|
|
163
175
|
// client's seeds" check. The attribution accepts a revealed rung too, so
|
|
164
176
|
// an account that has since self-enrolled a durable client (retiring
|
|
165
|
-
// rung 0) still adopts here rather than hard-failing.
|
|
177
|
+
// rung 0) still adopts here rather than hard-failing. `didWebKeys` is
|
|
178
|
+
// deliberately ignored on this path: adopting a published log never
|
|
179
|
+
// edits it, and a log published without the KMS convenience key is
|
|
180
|
+
// healed by a later login, not here.
|
|
166
181
|
await attributeLadderRung({ ladderSeed, published });
|
|
167
182
|
// Heals a did.json left lagging by a torn earlier publish.
|
|
168
183
|
const { did } = await concludeWithPublishedLog({ idStore, published });
|
|
@@ -171,6 +186,7 @@ async function ensureLadderAnchoredDidWebvhOnce({ idStore, wasServerUrl, spaceId
|
|
|
171
186
|
const created = await createLadderAnchoredAccountLog({
|
|
172
187
|
wasServerUrl,
|
|
173
188
|
spaceId,
|
|
189
|
+
...(didWebKeys ? { didWebKeys } : {}),
|
|
174
190
|
ladderSeed,
|
|
175
191
|
keyAgreement
|
|
176
192
|
});
|
|
@@ -188,6 +204,16 @@ async function ensureLadderAnchoredDidWebvhOnce({ idStore, wasServerUrl, spaceId
|
|
|
188
204
|
if (pinStore) {
|
|
189
205
|
await pinStore.write({ logId, pin: pinOfLog(created.log) });
|
|
190
206
|
}
|
|
207
|
+
// The durable create path's keys.json record, verbatim: the account DID
|
|
208
|
+
// joins the KMS bindings in the webvh block, so keys.json never durably
|
|
209
|
+
// names the bindings without the DID they belong to.
|
|
210
|
+
if (didWebKeys) {
|
|
211
|
+
await writeKeysJson({
|
|
212
|
+
idStore,
|
|
213
|
+
didWebKeys,
|
|
214
|
+
webvh: { did: created.did }
|
|
215
|
+
});
|
|
216
|
+
}
|
|
191
217
|
return { did: created.did };
|
|
192
218
|
}
|
|
193
219
|
/**
|
|
@@ -227,6 +253,47 @@ async function publishLogOnly({ store, log, ifMatch }) {
|
|
|
227
253
|
* @param options.newClientUpdateSeeds {ClientWebvhUpdateKeys} the new
|
|
228
254
|
* client's update-key seeds (minted by the self-enrolling flow, which
|
|
229
255
|
* therefore holds them and can sign the add entry)
|
|
256
|
+
* @param options.onCommitted {function}
|
|
257
|
+
* `(committed: { builtOnHead: { scid, versionId } }) => Promise<void>` --
|
|
258
|
+
* the REQUIRED persist-before-publish seam. It runs once per attempt, after
|
|
259
|
+
* the reveal-and-commit entry stands (published here, or standing from a
|
|
260
|
+
* torn earlier run) and BEFORE the add entry -- the ceremony's pivot -- is
|
|
261
|
+
* built. The caller durably writes the pending client-key record there (the
|
|
262
|
+
* `pending` codec group of `keys/clientKeyRecord.ts`: ceremony
|
|
263
|
+
* `'self-enrollment'`, the handed-back `builtOnHead`), so the add entry can
|
|
264
|
+
* never publish a client whose seed nothing can re-derive, per the
|
|
265
|
+
* post-pivot derivability rule (`decisions/0010`). A throw propagates and
|
|
266
|
+
* the add entry is withheld. What a throw leaves behind is inert: the
|
|
267
|
+
* standing reveal entry's committed hashes for the unpersisted client stay
|
|
268
|
+
* in `nextKeyHashes` forever as orphans, but they commit keys of a lost
|
|
269
|
+
* random seed -- nothing can reveal them, so they are no re-seizure
|
|
270
|
+
* credential, and the per-entry staged-hash attribution passes over them.
|
|
271
|
+
* The seam must be idempotent: the conflict retry and a resumed run invoke
|
|
272
|
+
* it again. `builtOnHead` is the head of the log snapshot the add entry is
|
|
273
|
+
* about to be built on -- the SCID from the log's parameters and the latest
|
|
274
|
+
* entry's `versionId` -- which a resume hands back as this call's
|
|
275
|
+
* `builtOnHead` marker. The caveat to hold on to: the idempotent COMPLETED
|
|
276
|
+
* branch (the new client's update key already authorized) returns without
|
|
277
|
+
* ever entering the seam, so a caller resuming across processes must be
|
|
278
|
+
* able to treat an already-complete continuation as success on its own
|
|
279
|
+
* @param [options.builtOnHead] {object} `{ scid, versionId }` -- the resume
|
|
280
|
+
* marker a pending record recorded, from an earlier run's `onCommitted`.
|
|
281
|
+
* Supplied, the attempt's first read is refused with
|
|
282
|
+
* {@link BuiltOnHeadNotReachedError} unless the served log carries that
|
|
283
|
+
* SCID and an entry with that `versionId`. The chain-head pin cannot stand
|
|
284
|
+
* in for it: the pin is written non-atomically after the add entry
|
|
285
|
+
* publishes, and the continuity check accepts a log served at exactly the
|
|
286
|
+
* pinned length -- so only this marker stops a resume rebuilding the add
|
|
287
|
+
* entry over a log that never reached the head the pending record was
|
|
288
|
+
* written against. The marker covers the pre-pivot half of that gap only:
|
|
289
|
+
* a served log CONTAINING the recorded head but truncated behind the torn
|
|
290
|
+
* run's own add entry still passes it and is resumed onto, and the menders
|
|
291
|
+
* for that residual half are the ordinary ones -- this client's own
|
|
292
|
+
* chain-head pin once the add publish wrote it, and any other enrolled
|
|
293
|
+
* client's pinned read of the same log. Both members must be non-empty
|
|
294
|
+
* strings; a malformed marker is refused with a `TypeError` before any
|
|
295
|
+
* read, since a resume with an uncomparable marker is a resume with no
|
|
296
|
+
* fork guard
|
|
230
297
|
* @param [options.expectedDid] {string} the account DID the log must resolve
|
|
231
298
|
* to, from the credential-authenticated pointer
|
|
232
299
|
* @param [options.pinStore] {ResourceLogPinStore} this client's chain-head
|
|
@@ -237,21 +304,103 @@ async function publishLogOnly({ store, log, ifMatch }) {
|
|
|
237
304
|
* @param [options.logId] {string} the account log's pin slot
|
|
238
305
|
* (`accountLogPinId({ spaceId })`); required whenever a `pinStore` is
|
|
239
306
|
* supplied
|
|
240
|
-
* @returns {Promise<{ did: string, webDoc?: object }>}
|
|
241
|
-
*
|
|
242
|
-
*
|
|
307
|
+
* @returns {Promise<{ did: string, webDoc?: object, committed: boolean }>}
|
|
308
|
+
* the account DID, the final `did.json` projection when the add entry ran
|
|
309
|
+
* here, and `committed` -- whether THIS call published the pivot entry
|
|
310
|
+
* (`false` exactly on the idempotent completed branch, where a torn earlier
|
|
311
|
+
* run had already published it). It is an observability signal, not a
|
|
312
|
+
* success flag: a returning call means the continuation stands either way,
|
|
313
|
+
* so a caller clears its pending record on the RETURN, whatever `committed`
|
|
314
|
+
* says. Its absence from a return value is a build skew, which is why it is
|
|
315
|
+
* stated rather than inferred
|
|
243
316
|
*/
|
|
244
317
|
export async function selfEnrollWebvhClient(options) {
|
|
318
|
+
// The seam is what makes the new client's seed durable before the pivot
|
|
319
|
+
// entry publishes it; a call omitting it would silently keep the window in
|
|
320
|
+
// which the log names a client nothing can re-derive. Refused before any
|
|
321
|
+
// read, so nothing is published.
|
|
322
|
+
if (typeof options.onCommitted !== 'function') {
|
|
323
|
+
throw new TypeError('selfEnrollWebvhClient requires onCommitted: the pending client-key ' +
|
|
324
|
+
'record must be persisted before the add entry publishes the client.');
|
|
325
|
+
}
|
|
326
|
+
if (options.builtOnHead !== undefined) {
|
|
327
|
+
assertBuiltOnHeadShape({ builtOnHead: options.builtOnHead });
|
|
328
|
+
}
|
|
329
|
+
// A non-canonical pair could only ever throw at the add-entry build, AFTER
|
|
330
|
+
// the reveal entry published and the seam persisted; refused here, it costs
|
|
331
|
+
// nothing durable.
|
|
332
|
+
assertCanonicalClientKeys({
|
|
333
|
+
signingKeyMultibase: options.newClientKeys.signingKeyMultibase,
|
|
334
|
+
keyAgreementKeyMultibase: options.newClientKeys.keyAgreementKeyMultibase
|
|
335
|
+
});
|
|
245
336
|
return withLogConflictRetry(() => selfEnrollWebvhClientOnce(options));
|
|
246
337
|
}
|
|
338
|
+
/**
|
|
339
|
+
* Refuses a malformed resume marker before any read. A marker whose members
|
|
340
|
+
* are missing or empty could not be compared against anything, so accepting
|
|
341
|
+
* one would hand a resume the mint-skip WITHOUT the fork guard the marker
|
|
342
|
+
* exists to apply -- fail-open exactly where the guard matters.
|
|
343
|
+
*
|
|
344
|
+
* @param options {object}
|
|
345
|
+
* @param options.builtOnHead {unknown} the supplied marker
|
|
346
|
+
* @returns {void}
|
|
347
|
+
*/
|
|
348
|
+
export function assertBuiltOnHeadShape({ builtOnHead }) {
|
|
349
|
+
const { scid, versionId } = (builtOnHead ?? {});
|
|
350
|
+
if (builtOnHead === null ||
|
|
351
|
+
typeof builtOnHead !== 'object' ||
|
|
352
|
+
typeof scid !== 'string' ||
|
|
353
|
+
scid === '' ||
|
|
354
|
+
typeof versionId !== 'string' ||
|
|
355
|
+
versionId === '') {
|
|
356
|
+
throw new TypeError('The self-enrollment resume marker (builtOnHead) must carry a non-empty ' +
|
|
357
|
+
'scid and versionId; a marker that cannot be compared would resume ' +
|
|
358
|
+
'with no fork guard at all.');
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* Thrown when a resumed self-enrollment is served an account log that has not
|
|
363
|
+
* reached the head its pending record was written against -- a different SCID,
|
|
364
|
+
* or no entry carrying the recorded `versionId`. Rebuilding the add entry over
|
|
365
|
+
* such a log would fork the account off a head the ceremony already committed
|
|
366
|
+
* to, which the chain-head pin alone does not catch: the pin is written
|
|
367
|
+
* non-atomically after the add entry publishes, so a run torn between the two
|
|
368
|
+
* leaves a pin one entry behind, and the continuity check accepts a served log
|
|
369
|
+
* at exactly the pinned length.
|
|
370
|
+
*
|
|
371
|
+
* **`name` is a stable contract.** It is always the string
|
|
372
|
+
* `'BuiltOnHeadNotReachedError'`, and a consumer should match on that rather
|
|
373
|
+
* than on `instanceof`: a wallet app that links this package (or holds two
|
|
374
|
+
* copies of it through a dependency tree) gets a different class object for
|
|
375
|
+
* the same error, so `instanceof` silently fails there while the name does
|
|
376
|
+
* not.
|
|
377
|
+
*/
|
|
378
|
+
export class BuiltOnHeadNotReachedError extends Error {
|
|
379
|
+
/**
|
|
380
|
+
* The head the pending record recorded, which the served log did not reach.
|
|
381
|
+
*/
|
|
382
|
+
builtOnHead;
|
|
383
|
+
/**
|
|
384
|
+
* @param options {object}
|
|
385
|
+
* @param options.builtOnHead {object} the recorded `{ scid, versionId }`
|
|
386
|
+
*/
|
|
387
|
+
constructor({ builtOnHead }) {
|
|
388
|
+
super('did:webvh: the served account log has not reached the head this ' +
|
|
389
|
+
`self-enrollment was built on (scid ${builtOnHead.scid}, version ` +
|
|
390
|
+
`${builtOnHead.versionId}); the resume is refused rather than ` +
|
|
391
|
+
'rebuilt over it.');
|
|
392
|
+
this.name = 'BuiltOnHeadNotReachedError';
|
|
393
|
+
this.builtOnHead = builtOnHead;
|
|
394
|
+
}
|
|
395
|
+
}
|
|
247
396
|
/**
|
|
248
397
|
* One attempt of {@link selfEnrollWebvhClient}, re-invoked by the conflict
|
|
249
398
|
* retry.
|
|
250
399
|
*
|
|
251
400
|
* @param options {object} see {@link selfEnrollWebvhClient}
|
|
252
|
-
* @returns {Promise<{ did: string, webDoc?: object }>}
|
|
401
|
+
* @returns {Promise<{ did: string, webDoc?: object, committed: boolean }>}
|
|
253
402
|
*/
|
|
254
|
-
async function selfEnrollWebvhClientOnce({ store, ladderSeed, newClientKeys, newClientUpdateSeeds, expectedDid, pinStore, logId }) {
|
|
403
|
+
async function selfEnrollWebvhClientOnce({ store, ladderSeed, newClientKeys, newClientUpdateSeeds, onCommitted, builtOnHead, expectedDid, pinStore, logId }) {
|
|
255
404
|
// Each attempt's own read is what the CAS publish is built on, so the
|
|
256
405
|
// continuity check runs here -- and again on the retry-up-the-ladder
|
|
257
406
|
// re-run -- not only on the verify that follows both entries.
|
|
@@ -264,10 +413,22 @@ async function selfEnrollWebvhClientOnce({ store, ladderSeed, newClientKeys, new
|
|
|
264
413
|
...(expectedDid !== undefined ? { expectedDid } : {}),
|
|
265
414
|
...pinned
|
|
266
415
|
});
|
|
416
|
+
// The resume marker, checked before anything else -- the completion check
|
|
417
|
+
// included, so a truncated served log is refused rather than read as "not
|
|
418
|
+
// complete yet" and rebuilt over.
|
|
419
|
+
if (builtOnHead) {
|
|
420
|
+
const genesisScid = published.log[0]?.parameters.scid ?? '';
|
|
421
|
+
const reached = published.log.some(entry => entry.versionId === builtOnHead.versionId);
|
|
422
|
+
if (genesisScid !== builtOnHead.scid || !reached) {
|
|
423
|
+
throw new BuiltOnHeadNotReachedError({ builtOnHead });
|
|
424
|
+
}
|
|
425
|
+
}
|
|
267
426
|
// Already complete (a torn earlier run finished the add entry): the new
|
|
268
|
-
// client's update key is authorized, which only the add entry writes.
|
|
427
|
+
// client's update key is authorized, which only the add entry writes. The
|
|
428
|
+
// seam is deliberately NOT entered here -- nothing is about to be
|
|
429
|
+
// published, so there is no pivot to persist ahead of.
|
|
269
430
|
if (published.updateKeys.includes(newClientKeys.updateKeyMultibase)) {
|
|
270
|
-
return { did: published.did };
|
|
431
|
+
return { did: published.did, committed: false };
|
|
271
432
|
}
|
|
272
433
|
// Which rung is current, recovered from the log itself. Fails closed with
|
|
273
434
|
// `LadderAttributionError` for a revoked (or never-bound) credential and
|
|
@@ -317,6 +478,13 @@ async function selfEnrollWebvhClientOnce({ store, ladderSeed, newClientKeys, new
|
|
|
317
478
|
...pinned
|
|
318
479
|
});
|
|
319
480
|
}
|
|
481
|
+
// The persist-before-publish seam: the pending client-key record becomes
|
|
482
|
+
// durable HERE, on the head the add entry is about to be built on, before
|
|
483
|
+
// that entry -- the ceremony's pivot -- publishes a client whose seed only
|
|
484
|
+
// this caller holds. Reached on both paths into the add entry: the reveal
|
|
485
|
+
// entry just published above, or a torn earlier run's reveal entry standing
|
|
486
|
+
// already.
|
|
487
|
+
await onCommitted({ builtOnHead: servedHead(published.log) });
|
|
320
488
|
// The add entry: the new client's verification methods and update key in;
|
|
321
489
|
// the spent rung's key and hash out. The credential's keyAgreement entry
|
|
322
490
|
// and the next rung's committed hash stand untouched. Signed by the new
|
|
@@ -372,7 +540,7 @@ async function selfEnrollWebvhClientOnce({ store, ladderSeed, newClientKeys, new
|
|
|
372
540
|
if (pinStore && logId !== undefined) {
|
|
373
541
|
await pinStore.write({ logId, pin: pinOfLog(updated.log) });
|
|
374
542
|
}
|
|
375
|
-
return { did: updated.did, webDoc: updated.webDoc };
|
|
543
|
+
return { did: updated.did, webDoc: updated.webDoc, committed: true };
|
|
376
544
|
}
|
|
377
545
|
/**
|
|
378
546
|
* Thrown when the client being forgotten is the account's LAST enrolled
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ladderAnchored.js","sourceRoot":"","sources":["../../src/clientAnnex/ladderAnchored.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAMxE,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,4BAA4B,EAC5B,0BAA0B,EAC1B,oBAAoB,EACpB,wBAAwB,EACxB,4BAA4B,EAC5B,QAAQ,EACR,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,eAAe,EACf,oBAAoB,EACrB,MAAM,sBAA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,eAAe,CAAC;QAC5C,YAAY,EAAE,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC;QAC3C,oBAAoB,EAAE,WAAW,CAAC,GAAG,CAAC,oBAAoB,CAAC;QAC3D,oBAAoB,EAAE,MAAM,CAAC,GAAG,CAAC,oBAAoB,CAAC;KACvD,CAAC,CAAA;IACF,MAAM,cAAc,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,OAAO,EAAE,SAAS,CAAC,IAAI,EAAE,CAAC,CAAA;IAC1E,2EAA2E;IAC3E,4DAA4D;IAC5D,IAAI,QAAQ,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACpC,MAAM,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;IAC7D,CAAC;IACD,OAAO;QACL,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,SAAS,EAAE,IAAI;KAChB,CAAA;AACH,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { DIDDoc, DIDLog } from '@interop/did-method-webvh';
|
|
2
|
+
import type { ResourceLogPinStore } from '@interop/vh-resource-log';
|
|
2
3
|
import { type UnlockKeyAgreementPublication } from '../unlock/standingWebvh.js';
|
|
3
4
|
import { type RecoveryLogStore, type RecoveryPublicKeys } from '../recovery/recoveryWebvh.js';
|
|
4
5
|
/**
|
|
@@ -78,6 +79,14 @@ import { type RecoveryLogStore, type RecoveryPublicKeys } from '../recovery/reco
|
|
|
78
79
|
* REQUIRED: the add entry points the `#DelegatedClients` service entry at
|
|
79
80
|
* it, and a caller that named no generation would republish the stranding
|
|
80
81
|
* this ordering exists to prevent
|
|
82
|
+
* @param [options.pinStore] {ResourceLogPinStore} this caller's chain-head
|
|
83
|
+
* pins; every read both entries are built on is checked against the pinned
|
|
84
|
+
* head (a served prefix is refused before the reveal entry lands, not only
|
|
85
|
+
* by a verify that follows both entries), and the pin advances to each
|
|
86
|
+
* entry as it publishes
|
|
87
|
+
* @param [options.logId] {string} the account log's pin slot
|
|
88
|
+
* (`accountLogPinId({ spaceId })`); required whenever a `pinStore` is
|
|
89
|
+
* supplied
|
|
81
90
|
* @returns {Promise<object>} the account DID, the post-continuation
|
|
82
91
|
* document and log (the rotation's recipient source and anchor), and, when
|
|
83
92
|
* the add entry ran here, the final `did.json` projection
|
|
@@ -94,6 +103,8 @@ export declare function recoverWebvhLadderAnchored(options: {
|
|
|
94
103
|
onCommitted: () => Promise<{
|
|
95
104
|
clientAnnexDid: string;
|
|
96
105
|
}>;
|
|
106
|
+
pinStore?: ResourceLogPinStore;
|
|
107
|
+
logId?: string;
|
|
97
108
|
}): Promise<{
|
|
98
109
|
did: string;
|
|
99
110
|
doc: DIDDoc;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recoveryLadderAnchored.d.ts","sourceRoot":"","sources":["../../src/clientAnnex/recoveryLadderAnchored.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,MAAM,EACN,MAAM,EAEP,MAAM,2BAA2B,CAAA;AAUlC,OAAO,EAGL,KAAK,6BAA6B,EACnC,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAKL,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACxB,MAAM,8BAA8B,CAAA;AAIrC
|
|
1
|
+
{"version":3,"file":"recoveryLadderAnchored.d.ts","sourceRoot":"","sources":["../../src/clientAnnex/recoveryLadderAnchored.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,MAAM,EACN,MAAM,EAEP,MAAM,2BAA2B,CAAA;AAUlC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAEnE,OAAO,EAGL,KAAK,6BAA6B,EACnC,MAAM,4BAA4B,CAAA;AACnC,OAAO,EA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