@interop/wallet-core 0.66.0 → 0.67.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 +5 -4
- package/dist/clientAnnex/credentialAnchoredGenesis.d.ts.map +1 -1
- package/dist/clientAnnex/credentialAnchoredGenesis.js +32 -50
- package/dist/clientAnnex/credentialAnchoredGenesis.js.map +1 -1
- package/dist/clientAnnex/establish.d.ts +46 -18
- package/dist/clientAnnex/establish.d.ts.map +1 -1
- package/dist/clientAnnex/establish.js +112 -65
- package/dist/clientAnnex/establish.js.map +1 -1
- package/dist/clientAnnex/forget.d.ts.map +1 -1
- package/dist/clientAnnex/forget.js +5 -6
- package/dist/clientAnnex/forget.js.map +1 -1
- package/dist/clientAnnex/forgetLast.d.ts +26 -113
- package/dist/clientAnnex/forgetLast.d.ts.map +1 -1
- package/dist/clientAnnex/forgetLast.js +26 -150
- package/dist/clientAnnex/forgetLast.js.map +1 -1
- package/dist/clientAnnex/heal.d.ts +79 -13
- package/dist/clientAnnex/heal.d.ts.map +1 -1
- package/dist/clientAnnex/heal.js +67 -122
- package/dist/clientAnnex/heal.js.map +1 -1
- package/dist/clientAnnex/index.d.ts +6 -6
- package/dist/clientAnnex/index.d.ts.map +1 -1
- package/dist/clientAnnex/index.js +4 -4
- 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 +37 -3
- package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -1
- package/dist/clientAnnex/ladderAnchored.js +69 -34
- package/dist/clientAnnex/ladderAnchored.js.map +1 -1
- package/dist/clientAnnex/log.d.ts +68 -57
- package/dist/clientAnnex/log.d.ts.map +1 -1
- package/dist/clientAnnex/log.js +96 -126
- package/dist/clientAnnex/log.js.map +1 -1
- package/dist/clientAnnex/mend.js +44 -20
- package/dist/clientAnnex/mend.js.map +1 -1
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts +20 -1
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts.map +1 -1
- package/dist/clientAnnex/recoveryLadderAnchored.js +77 -294
- 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.js +1 -1
- 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 +8 -10
- package/dist/genesis/accountGenesis.d.ts.map +1 -1
- package/dist/genesis/accountGenesis.js +39 -41
- 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 +255 -0
- package/dist/recovery/continuation.d.ts.map +1 -0
- package/dist/recovery/continuation.js +471 -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 +42 -83
- package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
- package/dist/recovery/recoveryWebvh.js +44 -380
- 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/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 -56
- package/dist/unlock/retire.d.ts.map +1 -1
- package/dist/unlock/retire.js +7 -76
- package/dist/unlock/retire.js.map +1 -1
- package/dist/unlock/standingWebvh.d.ts +20 -40
- package/dist/unlock/standingWebvh.d.ts.map +1 -1
- package/dist/unlock/standingWebvh.js +35 -76
- 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 +63 -7
- package/dist/webvh/accountEntry.d.ts.map +1 -1
- package/dist/webvh/accountEntry.js +110 -19
- package/dist/webvh/accountEntry.js.map +1 -1
- package/dist/webvh/delegatedLogStore.d.ts +18 -12
- package/dist/webvh/delegatedLogStore.d.ts.map +1 -1
- package/dist/webvh/delegatedLogStore.js +32 -11
- package/dist/webvh/delegatedLogStore.js.map +1 -1
- package/dist/webvh/didWebvh.d.ts +39 -23
- package/dist/webvh/didWebvh.d.ts.map +1 -1
- package/dist/webvh/didWebvh.js +63 -45
- package/dist/webvh/didWebvh.js.map +1 -1
- package/dist/webvh/enrollClient.d.ts.map +1 -1
- package/dist/webvh/enrollClient.js +19 -23
- package/dist/webvh/enrollClient.js.map +1 -1
- package/dist/webvh/index.d.ts +11 -7
- package/dist/webvh/index.d.ts.map +1 -1
- package/dist/webvh/index.js +9 -6
- 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 +12 -2
- package/dist/webvh/revokeClient.d.ts.map +1 -1
- package/dist/webvh/revokeClient.js +126 -48
- package/dist/webvh/revokeClient.js.map +1 -1
- package/dist/webvh/verifyLog.d.ts +21 -0
- package/dist/webvh/verifyLog.d.ts.map +1 -1
- package/dist/webvh/verifyLog.js +36 -14
- package/dist/webvh/verifyLog.js.map +1 -1
- package/package.json +11 -11
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* extends `did.jsonl` writes through, so a ceremony body describes its
|
|
7
7
|
* document delta once and the signing arm is a parameter.
|
|
8
8
|
*
|
|
9
|
-
* Two arms, discriminated by {@link AccountLogSigner}
|
|
9
|
+
* Two arms, discriminated by {@link AccountLogSigner}, are what a ceremony
|
|
10
|
+
* body accepts:
|
|
10
11
|
*
|
|
11
12
|
* - **client** -- an enrolled client's did:webvh update keys. The active key
|
|
12
13
|
* is derived from the seed, the published log must authorize it, the
|
|
@@ -21,15 +22,27 @@
|
|
|
21
22
|
* publishes `did.jsonl` alone -- the bridge's whole reach. The projection is
|
|
22
23
|
* the ceremony's own pre-entry PUT, or the next visit's ensure.
|
|
23
24
|
*
|
|
25
|
+
* A third arm is the seam's alone ({@link AccountEntrySigner}):
|
|
26
|
+
*
|
|
27
|
+
* - **committed** -- one bare update-key seed whose key stands committed in
|
|
28
|
+
* `nextKeyHashes` (or already revealed in `updateKeys`), revealing itself:
|
|
29
|
+
* the prerotation reveal with no attribution in front of it. The recovery
|
|
30
|
+
* continuation's two entries are this arm -- the spent code's rung 0 signs
|
|
31
|
+
* the reveal-and-commit entry, and the successor key the reveal committed
|
|
32
|
+
* signs the add-and-retire entry. The reveal union and the carry-over
|
|
33
|
+
* union are the ladder arm's. No ceremony body takes this arm as a
|
|
34
|
+
* parameter, since a committed key carries no ceremony authority of its
|
|
35
|
+
* own beyond the continuation that reveals it.
|
|
36
|
+
*
|
|
24
37
|
* Four of those steps are load-bearing conventions rather than plumbing:
|
|
25
38
|
* omitting the reveal union publishes a log whose next entry cannot resolve,
|
|
26
39
|
* omitting the carry-over hash switches prerotation off, omitting the
|
|
27
40
|
* carry-over precondition publishes an entry no resolver accepts, and omitting
|
|
28
41
|
* the pin advance leaves a pin behind an entry this client itself published.
|
|
29
42
|
*
|
|
30
|
-
* One property
|
|
31
|
-
*
|
|
32
|
-
* no entry can remove the key that signed it. A ceremony that must retire a
|
|
43
|
+
* One property every arm rests on: an entry keeps its own signer. The ladder
|
|
44
|
+
* and committed arms union the acting key back into `updateKeys` after the
|
|
45
|
+
* build runs, so no entry can remove the key that signed it. A ceremony that must retire a
|
|
33
46
|
* rung therefore needs a second entry, signed by the successor (the
|
|
34
47
|
* two-entry passphrase change, and the recovery spend's reveal-then-retire
|
|
35
48
|
* pair). The same rule is why a rung is not consumed per ceremony: rung
|
|
@@ -44,7 +57,7 @@
|
|
|
44
57
|
*/
|
|
45
58
|
import { updateDID } from '@interop/did-method-webvh';
|
|
46
59
|
import { deriveNextKeyHash } from '@interop/did-method-webvh';
|
|
47
|
-
import { assertCarryOverCommitments, assertPublishedLogDid,
|
|
60
|
+
import { advanceLogPin, assertCarryOverCommitments, assertPublishedLogDid, concludeWithPublishedLog, putLogResource, readPublishedLogOrThrow, updateKeyMultibase, updateKeySigner } from './didWebvh.js';
|
|
48
61
|
import { putDidWebProjection } from './didWebProjection.js';
|
|
49
62
|
// The one deliberate dependency on the annex subpath, pinned as an exception
|
|
50
63
|
// in the lint rule (beside `unlock/standingWebvh.ts` and
|
|
@@ -52,6 +65,35 @@ import { putDidWebProjection } from './didWebProjection.js';
|
|
|
52
65
|
// the log through the shared attribution helper, and touches no annex log
|
|
53
66
|
// machinery.
|
|
54
67
|
import { attributeLadderRung } from '../clientAnnex/ladder.js';
|
|
68
|
+
/**
|
|
69
|
+
* The head an entry leaves standing, assembled from what the entry's own
|
|
70
|
+
* `updateDID` already resolved plus the publish's validator when an entry was
|
|
71
|
+
* published, and the read the entry was built on verbatim when the build
|
|
72
|
+
* declined (the head is then provably unchanged by this call). No second read
|
|
73
|
+
* and no second resolve: the update-key parameters are the ones the entry
|
|
74
|
+
* itself stated, so a caller building its next entry on this head signs
|
|
75
|
+
* against exactly what it published.
|
|
76
|
+
*
|
|
77
|
+
* @param options {object}
|
|
78
|
+
* @param options.outcome {AccountEntryOutcome}
|
|
79
|
+
* @returns {PublishedWebvhLog}
|
|
80
|
+
*/
|
|
81
|
+
export function accountEntryHead({ outcome }) {
|
|
82
|
+
const { updated } = outcome;
|
|
83
|
+
if (!updated) {
|
|
84
|
+
return outcome.published;
|
|
85
|
+
}
|
|
86
|
+
return {
|
|
87
|
+
log: updated.log,
|
|
88
|
+
did: updated.did,
|
|
89
|
+
// Detached from the entry's own `state`, as every other producer of this
|
|
90
|
+
// type is, so a consumer editing the document cannot edit the log.
|
|
91
|
+
doc: structuredClone(updated.doc),
|
|
92
|
+
updateKeys: updated.meta.updateKeys,
|
|
93
|
+
nextKeyHashes: updated.meta.nextKeyHashes,
|
|
94
|
+
...(outcome.etag !== undefined ? { etag: outcome.etag } : {})
|
|
95
|
+
};
|
|
96
|
+
}
|
|
55
97
|
/**
|
|
56
98
|
* Signs and publishes one account-log entry, preamble and postamble
|
|
57
99
|
* included -- the pinned read, the signer arm's own preconditions, the
|
|
@@ -70,7 +112,7 @@ import { attributeLadderRung } from '../clientAnnex/ladder.js';
|
|
|
70
112
|
* @param options {object}
|
|
71
113
|
* @param options.idStore {AccountLogStore} the log read and the
|
|
72
114
|
* `did.jsonl` PUT
|
|
73
|
-
* @param options.signer {
|
|
115
|
+
* @param options.signer {AccountEntrySigner} who signs this entry
|
|
74
116
|
* @param options.build {function}
|
|
75
117
|
* `({ published, rung, state }) => AccountEntryFields | undefined` -- the
|
|
76
118
|
* entry's own members, or `undefined` to decline
|
|
@@ -94,8 +136,12 @@ import { attributeLadderRung } from '../clientAnnex/ladder.js';
|
|
|
94
136
|
* @param [options.verb] {string} what the caller is doing, for the client
|
|
95
137
|
* arm's pending-rotation refusal message (e.g. `'revoking a client'`)
|
|
96
138
|
* @param [options.logOnly] {boolean} publish `did.jsonl` without its
|
|
97
|
-
* `did:web` projection.
|
|
98
|
-
* `did.jsonl` alone
|
|
139
|
+
* `did:web` projection. Defaults per arm: `true` on the ladder arm, whose
|
|
140
|
+
* bridge reaches `did.jsonl` alone, and `false` on the client arm, which
|
|
141
|
+
* invokes as the controller. A ladder-signed entry written through a
|
|
142
|
+
* root-invoking store (the establishment's stage 3) passes `false` to
|
|
143
|
+
* republish the projection beside the entry; the committed arm states it,
|
|
144
|
+
* since which store it signs through is the caller's
|
|
99
145
|
* @param [options.beforePublish] {function} `({ updated }) => Promise<void>`
|
|
100
146
|
* -- run on the built entry, AFTER `updateDID` and BEFORE the conditional
|
|
101
147
|
* publish. The seam exists for the `did:web` projection: a ladder-signed
|
|
@@ -106,7 +152,7 @@ import { attributeLadderRung } from '../clientAnnex/ladder.js';
|
|
|
106
152
|
* and it must be idempotent
|
|
107
153
|
* @returns {Promise<AccountEntryOutcome>}
|
|
108
154
|
*/
|
|
109
|
-
export async function signAccountEntry({ idStore, signer, build, skip, published: alreadyRead, expectedDid, pinStore, logId, missingMessage, verb = 'extending the account log', logOnly =
|
|
155
|
+
export async function signAccountEntry({ idStore, signer, build, skip, published: alreadyRead, expectedDid, pinStore, logId, missingMessage, verb = 'extending the account log', logOnly = signer.kind === 'ladder', beforePublish }) {
|
|
110
156
|
// THE PREAMBLE: each attempt reads for itself unless the caller threaded a
|
|
111
157
|
// read in, so the continuity check runs on the read the compare-and-swap
|
|
112
158
|
// publish is conditioned on rather than only on an orchestrator's pre-read.
|
|
@@ -165,14 +211,36 @@ export async function signAccountEntry({ idStore, signer, build, skip, published
|
|
|
165
211
|
signedHashes = [...new Set([...statedHashes, ...commitHashes])];
|
|
166
212
|
}
|
|
167
213
|
else {
|
|
168
|
-
|
|
169
|
-
//
|
|
170
|
-
//
|
|
214
|
+
// The revealing key: the attributed rung on the ladder arm, the bare seed's
|
|
215
|
+
// key on the committed arm, which must stand committed or already
|
|
216
|
+
// revealed -- the one precondition the ladder arm's attribution already
|
|
217
|
+
// proved.
|
|
218
|
+
let revealing;
|
|
219
|
+
if (signer.kind === 'ladder') {
|
|
220
|
+
revealing = {
|
|
221
|
+
seed: attributed.rung.seed,
|
|
222
|
+
keyMultibase: attributed.rung.keyMultibase,
|
|
223
|
+
hash: rungHash
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
const keyMultibase = await updateKeyMultibase({ seed: signer.updateSeed });
|
|
228
|
+
const hash = await deriveNextKeyHash(keyMultibase);
|
|
229
|
+
if (!published.updateKeys.includes(keyMultibase) &&
|
|
230
|
+
!published.nextKeyHashes.includes(hash)) {
|
|
231
|
+
throw new Error('did:webvh: the published log neither authorizes this update key ' +
|
|
232
|
+
`nor commits its hash; nothing licenses it to sign while ${verb}.`);
|
|
233
|
+
}
|
|
234
|
+
revealing = { seed: signer.updateSeed, keyMultibase, hash };
|
|
235
|
+
}
|
|
236
|
+
entrySigner = await updateKeySigner({ seed: revealing.seed });
|
|
237
|
+
// The acting key reveals itself in the entry it signs (its hash stands
|
|
238
|
+
// committed, or the key is already revealed), and its own hash is kept
|
|
171
239
|
// committed so the carry-over convention holds for the next entry.
|
|
172
|
-
signedUpdateKeys = [
|
|
173
|
-
|
|
240
|
+
signedUpdateKeys = [...new Set([...statedKeys, revealing.keyMultibase])];
|
|
241
|
+
signedHashes = [
|
|
242
|
+
...new Set([...statedHashes, revealing.hash, ...commitHashes])
|
|
174
243
|
];
|
|
175
|
-
signedHashes = [...new Set([...statedHashes, rungHash, ...commitHashes])];
|
|
176
244
|
}
|
|
177
245
|
await assertCarryOverCommitments({ published });
|
|
178
246
|
const updated = await updateDID({
|
|
@@ -188,7 +256,7 @@ export async function signAccountEntry({ idStore, signer, build, skip, published
|
|
|
188
256
|
idStore,
|
|
189
257
|
updated,
|
|
190
258
|
ifMatch: published.etag,
|
|
191
|
-
logOnly
|
|
259
|
+
logOnly,
|
|
192
260
|
pinStore,
|
|
193
261
|
logId
|
|
194
262
|
});
|
|
@@ -231,9 +299,32 @@ async function publishAccountEntry({ idStore, updated, ifMatch, logOnly, pinStor
|
|
|
231
299
|
webDoc: updated.webDoc
|
|
232
300
|
});
|
|
233
301
|
}
|
|
234
|
-
|
|
235
|
-
await pinStore.write({ logId, pin: pinOfLog(updated.log) });
|
|
236
|
-
}
|
|
302
|
+
await advanceLogPin({ pinStore, logId, log: updated.log });
|
|
237
303
|
return written;
|
|
238
304
|
}
|
|
305
|
+
/**
|
|
306
|
+
* The head a ceremony concludes on when its entry turns out to be
|
|
307
|
+
* unnecessary -- the client is already enrolled, the removal already landed.
|
|
308
|
+
* There is nothing to publish either way; what differs is the `did:web`
|
|
309
|
+
* projection. The client arm invokes as the account's controller, so it
|
|
310
|
+
* republishes the projection and heals a lag a torn earlier run of the same
|
|
311
|
+
* ceremony left behind. The ladder arm's bridge reaches `did.jsonl` alone, so
|
|
312
|
+
* it takes the read verbatim and leaves the projection to
|
|
313
|
+
* `ensureDidWebProjection`.
|
|
314
|
+
*
|
|
315
|
+
* @param options {object}
|
|
316
|
+
* @param options.idStore {WebvhIdStore}
|
|
317
|
+
* @param options.signer {AccountLogSigner} the arm the ceremony acts as
|
|
318
|
+
* @param options.published {PublishedWebvhLog} the read the build stood on
|
|
319
|
+
* @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog }>}
|
|
320
|
+
*/
|
|
321
|
+
export async function concludeUnchangedAccountEntry({ idStore, signer, published }) {
|
|
322
|
+
if (signer.kind === 'client') {
|
|
323
|
+
return {
|
|
324
|
+
...(await concludeWithPublishedLog({ idStore, published })),
|
|
325
|
+
log: published.log
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
return { did: published.did, doc: published.doc, log: published.log };
|
|
329
|
+
}
|
|
239
330
|
//# sourceMappingURL=accountEntry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accountEntry.js","sourceRoot":"","sources":["../../src/webvh/accountEntry.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"accountEntry.js","sourceRoot":"","sources":["../../src/webvh/accountEntry.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAQrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CA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;QAChB,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC9C,CAAC,CAAA;IACF,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,mBAAmB,CAAC;YACxB,KAAK,EAAE,OAAO;YACd,MAAM,EAAE,OAAO,CAAC,MAAgB;SACjC,CAAC,CAAA;IACJ,CAAC;IACD,MAAM,aAAa,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC,CAAA;IAC1D,OAAO,OAAO,CAAA;AAChB,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,KAAK,UAAU,6BAA6B,CAAC,EAClD,OAAO,EACP,MAAM,EACN,SAAS,EAKV;IACC,IAAI,MAAM,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7B,OAAO;YACL,GAAG,CAAC,MAAM,wBAAwB,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC;YAC3D,GAAG,EAAE,SAAS,CAAC,GAAG;SACnB,CAAA;IACH,CAAC;IACD,OAAO,EAAE,GAAG,EAAE,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,SAAS,CAAC,GAAG,EAAE,CAAA;AACvE,CAAC"}
|
|
@@ -8,7 +8,14 @@
|
|
|
8
8
|
* through it: the unlock record's `did.jsonl` bridge into the account log
|
|
9
9
|
* (world-readable, so its reads stay unauthenticated), and the client
|
|
10
10
|
* annex sibling delegation into a generation's capability-gated `gen-`
|
|
11
|
-
* collection (GET and PUT, so its reads invoke the same delegation).
|
|
11
|
+
* collection (GET and PUT, so its reads invoke the same delegation). Which
|
|
12
|
+
* read a store performs is decided here from the wallet Space layout, never
|
|
13
|
+
* by the caller: a world-readable roster collection (`isPublic` on its
|
|
14
|
+
* provisioning spec) is fetched unauthenticated, and every other collection
|
|
15
|
+
* -- an annex generation included, which the roster never lists -- is read
|
|
16
|
+
* through the delegation. An unauthenticated GET at a capability-gated
|
|
17
|
+
* resource, or a delegated GET under a PUT-only bridge, would each fail only
|
|
18
|
+
* at the server.
|
|
12
19
|
*
|
|
13
20
|
* URLs are built with was-client's paths helpers, so a sub-path deployment
|
|
14
21
|
* addresses exactly the resource the delegation's target names -- the
|
|
@@ -37,31 +44,30 @@ export type DelegatedWebvhLogStore = Pick<WebvhIdStore, 'getIdResourceRaw' | 'pu
|
|
|
37
44
|
/**
|
|
38
45
|
* Builds a delegated log store over one collection of one Space.
|
|
39
46
|
*
|
|
40
|
-
* Reads:
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* delegation allows GET and PUT).
|
|
45
|
-
*
|
|
47
|
+
* Reads: on a world-readable collection (the `id` collection's account log
|
|
48
|
+
* -- the bridge delegation allows PUT only) the GET is an unauthenticated
|
|
49
|
+
* fetch; on every other collection it invokes the same delegation (the annex
|
|
50
|
+
* inventory -- the generation collection is capability-gated and the sibling
|
|
51
|
+
* delegation allows GET and PUT). The choice is read off the wallet Space
|
|
52
|
+
* roster (`isPublic`), so no caller states it. Either way a 404 reads as
|
|
53
|
+
* "not published" and the response's ETag rides back as the compare-and-swap
|
|
54
|
+
* token.
|
|
46
55
|
*
|
|
47
56
|
* @param options {object}
|
|
48
57
|
* @param options.host {string} the storage server's base URL
|
|
49
58
|
* @param options.spaceId {string} the Space holding the collection
|
|
50
59
|
* @param options.collectionId {string} the collection holding the log
|
|
51
60
|
* @param options.delegation {IZcap} the pre-minted delegation the writes
|
|
52
|
-
* (and,
|
|
61
|
+
* (and, on a capability-gated collection, the reads) invoke
|
|
53
62
|
* @param options.zcapClient {ZcapClient} the ezcap client holding the
|
|
54
63
|
* invoking signer
|
|
55
|
-
* @param [options.publicRead] {boolean} read with an unauthenticated fetch
|
|
56
|
-
* instead of invoking the delegation (default `false`)
|
|
57
64
|
* @returns {DelegatedWebvhLogStore}
|
|
58
65
|
*/
|
|
59
|
-
export declare function delegatedWebvhLogStore({ host, spaceId, collectionId, delegation, zcapClient
|
|
66
|
+
export declare function delegatedWebvhLogStore({ host, spaceId, collectionId, delegation, zcapClient }: {
|
|
60
67
|
host: string;
|
|
61
68
|
spaceId: string;
|
|
62
69
|
collectionId: string;
|
|
63
70
|
delegation: IZcap;
|
|
64
71
|
zcapClient: ZcapClient;
|
|
65
|
-
publicRead?: boolean;
|
|
66
72
|
}): DelegatedWebvhLogStore;
|
|
67
73
|
//# sourceMappingURL=delegatedLogStore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delegatedLogStore.d.ts","sourceRoot":"","sources":["../../src/webvh/delegatedLogStore.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"delegatedLogStore.d.ts","sourceRoot":"","sources":["../../src/webvh/delegatedLogStore.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAIhD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEjD;;;;;GAKG;AACH,MAAM,MAAM,sBAAsB,GAAG,IAAI,CACvC,YAAY,EACZ,kBAAkB,GAAG,eAAe,CACrC,CAAA;AAkCD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,IAAI,EACJ,OAAO,EACP,YAAY,EACZ,UAAU,EACV,UAAU,EACX,EAAE;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,MAAM,CAAA;IACpB,UAAU,EAAE,KAAK,CAAA;IACjB,UAAU,EAAE,UAAU,CAAA;CACvB,GAAG,sBAAsB,CAgGzB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PreconditionFailedError, WasClient } from '@interop/was-client';
|
|
2
2
|
import { resourcePath, toUrl } from '@interop/was-client/paths';
|
|
3
|
+
import { WALLET_SPACE_PROVISION_ROSTER } from '../space/collections.js';
|
|
3
4
|
/**
|
|
4
5
|
* The `status` of a raw signed-request error, when it carries one.
|
|
5
6
|
*
|
|
@@ -10,29 +11,42 @@ function statusOf(err) {
|
|
|
10
11
|
const status = err?.status;
|
|
11
12
|
return typeof status === 'number' ? status : undefined;
|
|
12
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* Whether a collection of the wallet Space is world-readable, per its
|
|
16
|
+
* provisioning spec. A collection the roster does not list (an annex
|
|
17
|
+
* generation's `gen-` collection) is capability-gated.
|
|
18
|
+
*
|
|
19
|
+
* @param options {object}
|
|
20
|
+
* @param options.collectionId {string}
|
|
21
|
+
* @returns {boolean}
|
|
22
|
+
*/
|
|
23
|
+
function collectionIsPublic({ collectionId }) {
|
|
24
|
+
return (WALLET_SPACE_PROVISION_ROSTER.find(spec => spec.collectionId === collectionId)?.isPublic ?? false);
|
|
25
|
+
}
|
|
13
26
|
/**
|
|
14
27
|
* Builds a delegated log store over one collection of one Space.
|
|
15
28
|
*
|
|
16
|
-
* Reads:
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* delegation allows GET and PUT).
|
|
21
|
-
*
|
|
29
|
+
* Reads: on a world-readable collection (the `id` collection's account log
|
|
30
|
+
* -- the bridge delegation allows PUT only) the GET is an unauthenticated
|
|
31
|
+
* fetch; on every other collection it invokes the same delegation (the annex
|
|
32
|
+
* inventory -- the generation collection is capability-gated and the sibling
|
|
33
|
+
* delegation allows GET and PUT). The choice is read off the wallet Space
|
|
34
|
+
* roster (`isPublic`), so no caller states it. Either way a 404 reads as
|
|
35
|
+
* "not published" and the response's ETag rides back as the compare-and-swap
|
|
36
|
+
* token.
|
|
22
37
|
*
|
|
23
38
|
* @param options {object}
|
|
24
39
|
* @param options.host {string} the storage server's base URL
|
|
25
40
|
* @param options.spaceId {string} the Space holding the collection
|
|
26
41
|
* @param options.collectionId {string} the collection holding the log
|
|
27
42
|
* @param options.delegation {IZcap} the pre-minted delegation the writes
|
|
28
|
-
* (and,
|
|
43
|
+
* (and, on a capability-gated collection, the reads) invoke
|
|
29
44
|
* @param options.zcapClient {ZcapClient} the ezcap client holding the
|
|
30
45
|
* invoking signer
|
|
31
|
-
* @param [options.publicRead] {boolean} read with an unauthenticated fetch
|
|
32
|
-
* instead of invoking the delegation (default `false`)
|
|
33
46
|
* @returns {DelegatedWebvhLogStore}
|
|
34
47
|
*/
|
|
35
|
-
export function delegatedWebvhLogStore({ host, spaceId, collectionId, delegation, zcapClient
|
|
48
|
+
export function delegatedWebvhLogStore({ host, spaceId, collectionId, delegation, zcapClient }) {
|
|
49
|
+
const publicRead = collectionIsPublic({ collectionId });
|
|
36
50
|
const was = new WasClient({ serverUrl: host, zcapClient });
|
|
37
51
|
const pathOf = (resourceId) => resourcePath(spaceId, collectionId, resourceId);
|
|
38
52
|
return {
|
|
@@ -80,8 +94,9 @@ export function delegatedWebvhLogStore({ host, spaceId, collectionId, delegation
|
|
|
80
94
|
if (ifNoneMatch) {
|
|
81
95
|
headers['if-none-match'] = '*';
|
|
82
96
|
}
|
|
97
|
+
let response;
|
|
83
98
|
try {
|
|
84
|
-
await was.request({
|
|
99
|
+
response = await was.request({
|
|
85
100
|
path: pathOf(resourceId),
|
|
86
101
|
method: 'PUT',
|
|
87
102
|
headers,
|
|
@@ -98,6 +113,12 @@ export function delegatedWebvhLogStore({ host, spaceId, collectionId, delegation
|
|
|
98
113
|
}
|
|
99
114
|
throw err;
|
|
100
115
|
}
|
|
116
|
+
// The PUT's own response carries the stored resource's new validator,
|
|
117
|
+
// handed back as the root store hands it back: a ceremony that
|
|
118
|
+
// publishes through the bridge can then build its next entry on the
|
|
119
|
+
// head it just wrote, under a compare-and-swap, instead of re-reading.
|
|
120
|
+
const etag = response.headers.get('etag') ?? undefined;
|
|
121
|
+
return etag !== undefined ? { etag } : {};
|
|
101
122
|
}
|
|
102
123
|
};
|
|
103
124
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delegatedLogStore.js","sourceRoot":"","sources":["../../src/webvh/delegatedLogStore.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"delegatedLogStore.js","sourceRoot":"","sources":["../../src/webvh/delegatedLogStore.ts"],"names":[],"mappings":"AAmCA,OAAO,EAAE,uBAAuB,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACxE,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAA;AAcvE;;;;;GAKG;AACH,SAAS,QAAQ,CAAC,GAAY;IAC5B,MAAM,MAAM,GAAI,GAA4B,EAAE,MAAM,CAAA;IACpD,OAAO,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAA;AACxD,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,kBAAkB,CAAC,EAC1B,YAAY,EAGb;IACC,OAAO,CACL,6BAA6B,CAAC,IAAI,CAChC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,YAAY,KAAK,YAAY,CAC3C,EAAE,QAAQ,IAAI,KAAK,CACrB,CAAA;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,sBAAsB,CAAC,EACrC,IAAI,EACJ,OAAO,EACP,YAAY,EACZ,UAAU,EACV,UAAU,EAOX;IACC,MAAM,UAAU,GAAG,kBAAkB,CAAC,EAAE,YAAY,EAAE,CAAC,CAAA;IACvD,MAAM,GAAG,GAAG,IAAI,SAAS,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAA;IAC1D,MAA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AuE;YACvE,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,SAAS,CAAA;YACtD,OAAO,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;QAC3C,CAAC;KACF,CAAA;AACH,CAAC"}
|
package/dist/webvh/didWebvh.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { DIDDoc, DIDLog, Signer, VerificationMethod } from '@interop/did-method-webvh';
|
|
2
2
|
import { type ResourceLogHeadPin, type ResourceLogPinStore } from '@interop/vh-resource-log';
|
|
3
3
|
import type { DidWebKeyMap } from './didWeb.js';
|
|
4
|
+
export { assertPublishedLogDid } from './verifyLog.js';
|
|
4
5
|
/**
|
|
5
6
|
* The Space-side seam this module reads and writes through: the world-readable
|
|
6
7
|
* `id` collection (the DID log and document) and the private `key-map`
|
|
@@ -373,9 +374,9 @@ export declare function didWebvhControllerTemplate({ wasServerUrl, spaceId, coll
|
|
|
373
374
|
* only update authority the log will ever accept, so they must be persisted
|
|
374
375
|
* client-local before {@link ensureDidWebvh} publishes anything.
|
|
375
376
|
*
|
|
376
|
-
* @returns {
|
|
377
|
+
* @returns {ClientWebvhUpdateKeys}
|
|
377
378
|
*/
|
|
378
|
-
export declare function mintClientWebvhUpdateKeys():
|
|
379
|
+
export declare function mintClientWebvhUpdateKeys(): ClientWebvhUpdateKeys;
|
|
379
380
|
/**
|
|
380
381
|
* The `publicKeyMultibase` of the Ed25519 update key a seed derives, as it
|
|
381
382
|
* appears in the log's `parameters.updateKeys`.
|
|
@@ -514,6 +515,25 @@ export declare class WebvhLogConflictError extends Error {
|
|
|
514
515
|
* @returns {Promise<*>} whatever the ceremony returns
|
|
515
516
|
*/
|
|
516
517
|
export declare function withLogConflictRetry<T>(run: () => Promise<T>): Promise<T>;
|
|
518
|
+
/**
|
|
519
|
+
* The threaded-head attempt every entry writer that saved a read shares. A caller that
|
|
520
|
+
* already read and verified the head under this same pin slot gets ONE
|
|
521
|
+
* attempt built on it; a lost compare-and-swap there says only that the head
|
|
522
|
+
* is stale, so the conflict retry re-reads under the pin with its whole
|
|
523
|
+
* budget. Every other failure is the caller's. The threaded attempt is EXTRA
|
|
524
|
+
* rather than one of the retry's three, so a caller who saved a read is left
|
|
525
|
+
* with the same conflict budget as one who did not.
|
|
526
|
+
*
|
|
527
|
+
* @param options {object}
|
|
528
|
+
* @param [options.published] {PublishedWebvhLog} the caller's threaded head
|
|
529
|
+
* @param options.attempt {Function} one attempt of the ceremony, taking the
|
|
530
|
+
* head to build on (absent, the attempt reads for itself)
|
|
531
|
+
* @returns {Promise<Result>}
|
|
532
|
+
*/
|
|
533
|
+
export declare function withThreadedHeadOnce<Result>({ published, attempt }: {
|
|
534
|
+
published?: PublishedWebvhLog;
|
|
535
|
+
attempt: (published?: PublishedWebvhLog) => Promise<Result>;
|
|
536
|
+
}): Promise<Result>;
|
|
517
537
|
/**
|
|
518
538
|
* PUTs the serialized log to `did.jsonl`, forwarding the conditional-write
|
|
519
539
|
* preconditions and mapping a failed one to {@link WebvhLogConflictError}. The
|
|
@@ -763,27 +783,6 @@ export declare function readPublishedLog({ idStore, expectedDid, pinStore, logId
|
|
|
763
783
|
pinStore?: ResourceLogPinStore;
|
|
764
784
|
logId?: string;
|
|
765
785
|
}): Promise<PublishedWebvhLog | undefined>;
|
|
766
|
-
/**
|
|
767
|
-
* The substituted-account refusal on its own: a resolved head that is not the
|
|
768
|
-
* DID the caller expected is refused rather than built on. Stated once so a
|
|
769
|
-
* fresh read and a caller-threaded head refuse identically.
|
|
770
|
-
*
|
|
771
|
-
* A ceremony that takes an already-read head from its caller (the transient
|
|
772
|
-
* visit's one-read composition, where the readiness stage hands its verified
|
|
773
|
-
* head to the enrollment) runs this explicitly: the read that would otherwise
|
|
774
|
-
* have run it never happened, and a head resolving to another DID must not
|
|
775
|
-
* become the entry's basis just because it arrived by parameter.
|
|
776
|
-
*
|
|
777
|
-
* @param options {object}
|
|
778
|
-
* @param options.published {PublishedWebvhLog} the resolved head
|
|
779
|
-
* @param [options.expectedDid] {string} the DID it must resolve to; absent,
|
|
780
|
-
* the head is accepted (the caller discovering the DID from the log itself)
|
|
781
|
-
* @returns {PublishedWebvhLog} the head verbatim
|
|
782
|
-
*/
|
|
783
|
-
export declare function assertPublishedLogDid({ published, expectedDid }: {
|
|
784
|
-
published: PublishedWebvhLog;
|
|
785
|
-
expectedDid?: string;
|
|
786
|
-
}): PublishedWebvhLog;
|
|
787
786
|
/**
|
|
788
787
|
* {@link readPublishedLog} for the ceremonies whose premise is a log that
|
|
789
788
|
* already exists: an absent `did.jsonl` is a refusal rather than a state to
|
|
@@ -827,6 +826,23 @@ export declare function readPublishedLogOrThrow({ idStore, expectedDid, pinStore
|
|
|
827
826
|
* @returns {ResourceLogHeadPin}
|
|
828
827
|
*/
|
|
829
828
|
export declare function pinOfLog(log: DIDLog): ResourceLogHeadPin;
|
|
829
|
+
/**
|
|
830
|
+
* Advances a caller's chain-head pin to the log it just published, when it
|
|
831
|
+
* keeps one. The pair is optional together: a caller holding no pin store, or
|
|
832
|
+
* no slot to write it under, keeps one-shot verification, so both halves are
|
|
833
|
+
* checked here rather than at every publish site.
|
|
834
|
+
*
|
|
835
|
+
* @param options {object}
|
|
836
|
+
* @param [options.pinStore] {ResourceLogPinStore}
|
|
837
|
+
* @param [options.logId] {string} the pin slot this log occupies
|
|
838
|
+
* @param options.log {DIDLog} the log as this client just published it
|
|
839
|
+
* @returns {Promise<void>}
|
|
840
|
+
*/
|
|
841
|
+
export declare function advanceLogPin({ pinStore, logId, log }: {
|
|
842
|
+
pinStore?: ResourceLogPinStore;
|
|
843
|
+
logId?: string;
|
|
844
|
+
log: DIDLog;
|
|
845
|
+
}): Promise<void>;
|
|
830
846
|
/**
|
|
831
847
|
* The head of a log snapshot in the pending record's terms: the genesis
|
|
832
848
|
* parameters' SCID plus the latest entry's `versionId`. What a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"didWebvh.d.ts","sourceRoot":"","sources":["../../src/webvh/didWebvh.ts"],"names":[],"mappings":"AA2EA,OAAO,KAAK,EACV,MAAM,EACN,MAAM,EACN,MAAM,EACN,kBAAkB,EACnB,MAAM,2BAA2B,CAAA;AAelC,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACzB,MAAM,0BAA0B,CAAA;AAGjC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"didWebvh.d.ts","sourceRoot":"","sources":["../../src/webvh/didWebvh.ts"],"names":[],"mappings":"AA2EA,OAAO,KAAK,EACV,MAAM,EACN,MAAM,EACN,MAAM,EACN,kBAAkB,EACnB,MAAM,2BAA2B,CAAA;AAelC,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACzB,MAAM,0BAA0B,CAAA;AAGjC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAU/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAA;AAEtD;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;;;OAOG;IACH,gBAAgB,CAAC,OAAO,EAAE;QACxB,UAAU,EAAE,MAAM,CAAA;KACnB,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC,CAAA;IACxD;;;OAGG;IACH,aAAa,CAAC,OAAO,EAAE;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IAChE;;;;;;;;;;;;;;;;;;OAkBG;IACH,aAAa,CAAC,OAAO,EAAE;QACrB,UAAU,EAAE,MAAM,CAAA;QAClB,OAAO,EAAE,MAAM,GAAG,MAAM,CAAA;QACxB,WAAW,CAAC,EAAE,MAAM,CAAA;QACp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