@interop/wallet-core 0.67.0 → 0.69.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 +14 -13
- package/dist/clientAnnex/credentialAnchoredGenesis.d.ts +12 -6
- package/dist/clientAnnex/credentialAnchoredGenesis.d.ts.map +1 -1
- package/dist/clientAnnex/credentialAnchoredGenesis.js +10 -7
- package/dist/clientAnnex/credentialAnchoredGenesis.js.map +1 -1
- package/dist/clientAnnex/establish.d.ts +11 -12
- package/dist/clientAnnex/establish.d.ts.map +1 -1
- package/dist/clientAnnex/establish.js +20 -30
- 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 +8 -18
- package/dist/clientAnnex/forget.js.map +1 -1
- package/dist/clientAnnex/forgetLast.d.ts +8 -17
- package/dist/clientAnnex/forgetLast.d.ts.map +1 -1
- package/dist/clientAnnex/forgetLast.js +19 -34
- 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 +3 -12
- package/dist/clientAnnex/heal.d.ts.map +1 -1
- package/dist/clientAnnex/heal.js +19 -32
- package/dist/clientAnnex/heal.js.map +1 -1
- package/dist/clientAnnex/index.d.ts +2 -2
- 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 +25 -70
- package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -1
- package/dist/clientAnnex/ladderAnchored.js +34 -83
- package/dist/clientAnnex/ladderAnchored.js.map +1 -1
- package/dist/clientAnnex/log.d.ts +55 -68
- package/dist/clientAnnex/log.d.ts.map +1 -1
- package/dist/clientAnnex/log.js +82 -111
- package/dist/clientAnnex/log.js.map +1 -1
- package/dist/clientAnnex/mend.d.ts +19 -8
- package/dist/clientAnnex/mend.d.ts.map +1 -1
- package/dist/clientAnnex/mend.js +89 -66
- package/dist/clientAnnex/mend.js.map +1 -1
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts +5 -12
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts.map +1 -1
- package/dist/clientAnnex/recoveryLadderAnchored.js +7 -13
- package/dist/clientAnnex/recoveryLadderAnchored.js.map +1 -1
- package/dist/clientAnnex/rosterDeliveredEpochs.d.ts +13 -14
- package/dist/clientAnnex/rosterDeliveredEpochs.d.ts.map +1 -1
- package/dist/clientAnnex/rosterDeliveredEpochs.js +12 -12
- 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 +12 -17
- package/dist/clientAnnex/selfEnroll.js.map +1 -1
- package/dist/descriptors/index.d.ts +21 -46
- package/dist/descriptors/index.d.ts.map +1 -1
- package/dist/descriptors/index.js +21 -45
- package/dist/descriptors/index.js.map +1 -1
- package/dist/descriptors/logSource.d.ts +45 -56
- package/dist/descriptors/logSource.d.ts.map +1 -1
- package/dist/descriptors/logSource.js +64 -74
- package/dist/descriptors/logSource.js.map +1 -1
- package/dist/genesis/accountGenesis.d.ts +15 -6
- package/dist/genesis/accountGenesis.d.ts.map +1 -1
- package/dist/genesis/accountGenesis.js +14 -7
- package/dist/genesis/accountGenesis.js.map +1 -1
- package/dist/keys/collectionLogStore.d.ts +73 -0
- package/dist/keys/collectionLogStore.d.ts.map +1 -0
- package/dist/keys/collectionLogStore.js +60 -0
- package/dist/keys/collectionLogStore.js.map +1 -0
- package/dist/keys/index.d.ts +18 -6
- package/dist/keys/index.d.ts.map +1 -1
- package/dist/keys/index.js +18 -6
- package/dist/keys/index.js.map +1 -1
- package/dist/keys/rosterLogStore.d.ts +44 -6
- package/dist/keys/rosterLogStore.d.ts.map +1 -1
- package/dist/keys/rosterLogStore.js +51 -238
- package/dist/keys/rosterLogStore.js.map +1 -1
- package/dist/keys/rosterStore.d.ts.map +1 -1
- package/dist/keys/rosterStore.js +2 -1
- package/dist/keys/rosterStore.js.map +1 -1
- package/dist/keys/spaceEpochs.d.ts +67 -34
- package/dist/keys/spaceEpochs.d.ts.map +1 -1
- package/dist/keys/spaceEpochs.js +80 -30
- package/dist/keys/spaceEpochs.js.map +1 -1
- package/dist/keys/userKeyCascade.d.ts +26 -1
- package/dist/keys/userKeyCascade.d.ts.map +1 -1
- package/dist/keys/userKeyCascade.js +29 -2
- package/dist/keys/userKeyCascade.js.map +1 -1
- package/dist/keys/userKeyRoster.d.ts +5 -0
- package/dist/keys/userKeyRoster.d.ts.map +1 -1
- package/dist/keys/userKeyRoster.js +5 -0
- package/dist/keys/userKeyRoster.js.map +1 -1
- package/dist/keys/userKeyRosterCascade.d.ts +54 -16
- package/dist/keys/userKeyRosterCascade.d.ts.map +1 -1
- package/dist/keys/userKeyRosterCascade.js +50 -22
- package/dist/keys/userKeyRosterCascade.js.map +1 -1
- package/dist/recovery/continuation.d.ts +2 -7
- package/dist/recovery/continuation.d.ts.map +1 -1
- package/dist/recovery/continuation.js +2 -6
- package/dist/recovery/continuation.js.map +1 -1
- package/dist/recovery/recoveryWebvh.d.ts +11 -25
- package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
- package/dist/recovery/recoveryWebvh.js +13 -26
- package/dist/recovery/recoveryWebvh.js.map +1 -1
- package/dist/resourceLog/controller.d.ts +18 -6
- package/dist/resourceLog/controller.d.ts.map +1 -1
- package/dist/resourceLog/controller.js +5 -3
- package/dist/resourceLog/controller.js.map +1 -1
- package/dist/resourceLog/errors.d.ts +17 -43
- package/dist/resourceLog/errors.d.ts.map +1 -1
- package/dist/resourceLog/errors.js +17 -50
- package/dist/resourceLog/errors.js.map +1 -1
- package/dist/resourceLog/index.d.ts +6 -3
- package/dist/resourceLog/index.d.ts.map +1 -1
- package/dist/resourceLog/index.js +6 -3
- package/dist/resourceLog/index.js.map +1 -1
- package/dist/resourceLog/logClass.d.ts +69 -0
- package/dist/resourceLog/logClass.d.ts.map +1 -0
- package/dist/resourceLog/logClass.js +43 -0
- package/dist/resourceLog/logClass.js.map +1 -0
- package/dist/space/collections.d.ts +22 -2
- package/dist/space/collections.d.ts.map +1 -1
- package/dist/space/collections.js +18 -0
- package/dist/space/collections.js.map +1 -1
- package/dist/space/index.d.ts +4 -3
- package/dist/space/index.d.ts.map +1 -1
- package/dist/space/index.js +4 -3
- package/dist/space/index.js.map +1 -1
- package/dist/space/provisioning.d.ts +16 -6
- package/dist/space/provisioning.d.ts.map +1 -1
- package/dist/space/provisioning.js +11 -7
- package/dist/space/provisioning.js.map +1 -1
- package/dist/sync/engine.d.ts +4 -2
- package/dist/sync/engine.d.ts.map +1 -1
- package/dist/sync/engine.js.map +1 -1
- package/dist/sync/index.d.ts +9 -6
- package/dist/sync/index.d.ts.map +1 -1
- package/dist/sync/index.js +8 -5
- package/dist/sync/index.js.map +1 -1
- package/dist/sync/push.d.ts +0 -29
- package/dist/sync/push.d.ts.map +1 -1
- package/dist/sync/push.js +30 -28
- package/dist/sync/push.js.map +1 -1
- package/dist/sync/types.d.ts +39 -21
- package/dist/sync/types.d.ts.map +1 -1
- package/dist/sync/types.js +13 -7
- package/dist/sync/types.js.map +1 -1
- package/dist/unlock/retire.d.ts +12 -13
- package/dist/unlock/retire.d.ts.map +1 -1
- package/dist/unlock/retire.js +12 -15
- package/dist/unlock/retire.js.map +1 -1
- package/dist/unlock/standingWebvh.d.ts +8 -22
- package/dist/unlock/standingWebvh.d.ts.map +1 -1
- package/dist/unlock/standingWebvh.js +7 -18
- package/dist/unlock/standingWebvh.js.map +1 -1
- package/dist/webvh/accountEntry.d.ts +5 -12
- package/dist/webvh/accountEntry.d.ts.map +1 -1
- package/dist/webvh/accountEntry.js +11 -22
- package/dist/webvh/accountEntry.js.map +1 -1
- package/dist/webvh/delegatedLogStore.d.ts +7 -2
- package/dist/webvh/delegatedLogStore.d.ts.map +1 -1
- package/dist/webvh/delegatedLogStore.js +9 -1
- package/dist/webvh/delegatedLogStore.js.map +1 -1
- package/dist/webvh/didWebvh.d.ts +69 -80
- package/dist/webvh/didWebvh.d.ts.map +1 -1
- package/dist/webvh/didWebvh.js +74 -117
- 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 +3 -8
- package/dist/webvh/enrollClient.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/dist/webvh/revokeClient.d.ts +3 -9
- package/dist/webvh/revokeClient.d.ts.map +1 -1
- package/dist/webvh/revokeClient.js +4 -9
- package/dist/webvh/revokeClient.js.map +1 -1
- package/dist/webvh/verifyLog.d.ts +24 -4
- package/dist/webvh/verifyLog.d.ts.map +1 -1
- package/dist/webvh/verifyLog.js +26 -7
- 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 +4 -4
- package/dist/descriptors/acquire.d.ts +0 -122
- package/dist/descriptors/acquire.d.ts.map +0 -1
- package/dist/descriptors/acquire.js +0 -100
- package/dist/descriptors/acquire.js.map +0 -1
- package/dist/descriptors/cipher.d.ts +0 -71
- package/dist/descriptors/cipher.d.ts.map +0 -1
- package/dist/descriptors/cipher.js +0 -109
- package/dist/descriptors/cipher.js.map +0 -1
- package/dist/descriptors/errors.d.ts +0 -44
- package/dist/descriptors/errors.d.ts.map +0 -1
- package/dist/descriptors/errors.js +0 -46
- package/dist/descriptors/errors.js.map +0 -1
- package/dist/descriptors/refresh.d.ts +0 -62
- package/dist/descriptors/refresh.d.ts.map +0 -1
- package/dist/descriptors/refresh.js +0 -69
- package/dist/descriptors/refresh.js.map +0 -1
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
* digest), and `decisions/0007` (the reveal entry's hash order).
|
|
48
48
|
*/
|
|
49
49
|
export { attributeLadderInventory, attributeLadderRung, clientAnnexRung, clientAnnexRungSeed, generateLadderSeed, LADDER_MAX_SCAN, LadderAttributionError, ladderRung, ladderRungSeed, ladderVmKeyMultibase, ladderVmSeed } from './ladder.js';
|
|
50
|
-
export { assertGenerationId, clampGrantExpires, CLIENT_ANNEX_SPACE_TYPE, clientAnnexDidParts,
|
|
50
|
+
export { assertGenerationId, clampGrantExpires, CLIENT_ANNEX_SPACE_TYPE, clientAnnexDidParts, clientAnnexLogStore, ClientAnnexRungUncommittedError, commitClientAnnexRung, createClientAnnexLog, DELEGATED_CLIENTS_DELEGATION_ACTIONS, DELEGATED_CLIENTS_DELEGATION_TTL_MS, DELEGATED_CLIENTS_SERVICE_TYPE, delegatedClientsDelegationMinter, delegatedClientsDelegationSpaceId, delegatedClientsPointer, delegatedClientsServiceEntry, delegatedClientsSpaceHistory, embeddedGenerationDelegation, enrollClientAnnexTransientClient, enrollTransientClient, ensureClientAnnexSpace, ensureGenerationDelegationCurrent, GENERATION_DELEGATION_ACTIONS, GENERATION_DELEGATION_SERVICE_TYPE, GENERATION_DELEGATION_TTL_MS, GENERATION_ID_PREFIX, generationDelegationHistory, generationDelegationServiceEntry, mintClientAnnexGeneration, mintCredentialClientAnnexGeneration, mintDelegatedClientsDelegation, mintGenerationDelegation, mintGenerationId, mintPointedClientAnnexGeneration, readClientAnnexLogOrAbsent, retireClientAnnexRung, revokeTreatingAlreadyRevokedAsSuccess, servicesPointedAtClientAnnex, setDelegatedClientsPointer, setDelegatedClientsPointerOnce } from './log.js';
|
|
51
51
|
export { clientAnnexGcDue, delegatedClientsPointerEstablishedAt, GENERATION_GC_PERIOD_MS, GENERATION_QUIET_BOUND_MS, GENERATION_QUIET_GRACE_MS, generationQuiet, runClientAnnexGc, swapClientAnnexGeneration } from './gc.js';
|
|
52
52
|
export { ladderVmAgent, ladderVmSigners, ladderVmZcapClient } from './zcap.js';
|
|
53
53
|
export { DELETION_ZCAP_TTL_MS, ExpiredParentCapabilityError, mintSpaceRootVerbCapability, mintSpaceVerbCapability } from './spaceCapability.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/clientAnnex/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,UAAU,EACV,cAAc,EACd,oBAAoB,EACpB,YAAY,EACb,MAAM,aAAa,CAAA;AAOpB,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,EACvB,mBAAmB,EACnB,mBAAmB,EACnB
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/clientAnnex/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,UAAU,EACV,cAAc,EACd,oBAAoB,EACpB,YAAY,EACb,MAAM,aAAa,CAAA;AAOpB,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,EACvB,mBAAmB,EACnB,mBAAmB,EACnB,+BAA+B,EAC/B,qBAAqB,EACrB,oBAAoB,EACpB,oCAAoC,EACpC,m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,wBAAwB,EACzB,MAAM,aAAa,CAAA;AAOpB,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAA;AAGxE,OAAO,EAAE,6BAA6B,EAAE,MAAM,WAAW,CAAA;AAOzD,OAAO,EACL,0BAA0B,EAC1B,8BAA8B,EAC9B,4BAA4B,EAC5B,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,EACxB,6BAA6B,EAC7B,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,qBAAqB,CAAA;AAM5B,6EAA6E;AAC7E,wEAAwE;AACxE,+CAA+C;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAQ3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AAEtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAGlD,OAAO,EACL,wBAAwB,EACxB,qBAAqB,EACtB,MAAM,iBAAiB,CAAA;AAMxB,OAAO,EACL,sCAAsC,EACtC,mCAAmC,EACpC,MAAM,gCAAgC,CAAA;AAEvC,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAA;AAExE,4EAA4E;AAC5E,qEAAqE;AACrE,6EAA6E;AAC7E,4EAA4E;AAC5E,wBAAwB;AACxB,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,EACzB,MAAM,sBAAsB,CAAA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { DIDDoc, DIDLog, UpdateDIDResult } from '@interop/did-method-webvh';
|
|
2
2
|
import type { ClientWebvhUpdateKeys, CreatedWebvhLog, DidWebKeyMapV2, PublishedWebvhLog, WebvhEnrollmentKeys, WebvhIdStore } from '../webvh/didWebvh.js';
|
|
3
|
-
import type { ResourceLogPinStore } from '@interop/vh-resource-log';
|
|
4
3
|
import { type ClientRemovalTarget, type RevokedClientKeys } from '../webvh/revokeClient.js';
|
|
5
4
|
import { type UnlockKeyAgreementPublication, type UnlockLogStore } from '../unlock/standingWebvh.js';
|
|
6
5
|
import type { AccountEntryFields } from '../webvh/accountEntry.js';
|
|
@@ -62,9 +61,10 @@ export declare function createLadderAnchoredAccountLog({ wasServerUrl, spaceId,
|
|
|
62
61
|
*
|
|
63
62
|
* The publish is a conditional create-if-absent, so a concurrent signup's
|
|
64
63
|
* winner is adopted on the conflict re-run rather than erased. On the create
|
|
65
|
-
* path
|
|
66
|
-
* account-log trust-on-first-use convention: the creator
|
|
67
|
-
* genesis); on the probe path the read itself carries the pin
|
|
64
|
+
* path the publish advances the store's own chain-head pin from the log this
|
|
65
|
+
* run minted (the account-log trust-on-first-use convention: the creator
|
|
66
|
+
* knows the true genesis); on the probe path the read itself carries the pin
|
|
67
|
+
* check.
|
|
68
68
|
*
|
|
69
69
|
* @param options {object}
|
|
70
70
|
* @param options.idStore {WebvhIdStore}
|
|
@@ -83,9 +83,6 @@ export declare function createLadderAnchoredAccountLog({ wasServerUrl, spaceId,
|
|
|
83
83
|
* @param [options.expectedDid] {string} the DID the published log must
|
|
84
84
|
* resolve to, when the caller holds the account pointer; a heal login on a
|
|
85
85
|
* fresh terminal legitimately holds none
|
|
86
|
-
* @param [options.pinStore] {ResourceLogPinStore} this client's chain-head
|
|
87
|
-
* pins; the account log's slot is keyed by `accountLogPinId` over the
|
|
88
|
-
* `spaceId` above
|
|
89
86
|
* @returns {Promise<{ did: string, published: PublishedWebvhLog,
|
|
90
87
|
* logMinted: boolean }>} `published` is the head this stage stands on --
|
|
91
88
|
* the served one on the adopt branch, the minted one paired with its
|
|
@@ -108,7 +105,6 @@ export declare function ensureLadderAnchoredDidWebvh(options: {
|
|
|
108
105
|
ladderSeed: Uint8Array;
|
|
109
106
|
keyAgreement: UnlockKeyAgreementPublication;
|
|
110
107
|
expectedDid?: string;
|
|
111
|
-
pinStore?: ResourceLogPinStore;
|
|
112
108
|
}): Promise<{
|
|
113
109
|
did: string;
|
|
114
110
|
published: PublishedWebvhLog;
|
|
@@ -161,16 +157,12 @@ export type LadderSignedEntryOutcome = {
|
|
|
161
157
|
* committed one (the retry-up-the-ladder resolution).
|
|
162
158
|
*
|
|
163
159
|
* @param options {object}
|
|
164
|
-
* @param options.store {UnlockLogStore} public log read + delegated PUT
|
|
160
|
+
* @param options.store {UnlockLogStore} public log read + delegated PUT,
|
|
161
|
+
* carrying the chain-head pin the read is checked against and the publish
|
|
162
|
+
* advances
|
|
165
163
|
* @param options.ladderSeed {Uint8Array} the credential's ladder seed
|
|
166
164
|
* @param [options.expectedDid] {string} the account DID the log must resolve
|
|
167
165
|
* to, from the caller's stored account pointer
|
|
168
|
-
* @param [options.pinStore] {ResourceLogPinStore} the caller's chain-head
|
|
169
|
-
* pins: the read is checked against the pinned head, and the pin advances
|
|
170
|
-
* to the head this entry publishes
|
|
171
|
-
* @param [options.logId] {string} the account log's pin slot
|
|
172
|
-
* (`accountLogPinId({ spaceId })`); required whenever a `pinStore` is
|
|
173
|
-
* supplied
|
|
174
166
|
* @param [options.skip] {function} `(published) => boolean` -- run on the
|
|
175
167
|
* read, before any attribution; `true` returns `skipped` with nothing
|
|
176
168
|
* published
|
|
@@ -183,12 +175,10 @@ export type LadderSignedEntryOutcome = {
|
|
|
183
175
|
* write it. See {@link signAccountEntry}
|
|
184
176
|
* @returns {Promise<LadderSignedEntryOutcome>}
|
|
185
177
|
*/
|
|
186
|
-
export declare function ladderSignedAccountEntry({ store, ladderSeed, expectedDid,
|
|
178
|
+
export declare function ladderSignedAccountEntry({ store, ladderSeed, expectedDid, skip, build, beforePublish }: {
|
|
187
179
|
store: UnlockLogStore;
|
|
188
180
|
ladderSeed: Uint8Array;
|
|
189
181
|
expectedDid?: string;
|
|
190
|
-
pinStore?: ResourceLogPinStore;
|
|
191
|
-
logId?: string;
|
|
192
182
|
skip?: (published: PublishedWebvhLog) => boolean | Promise<boolean>;
|
|
193
183
|
build: (context: {
|
|
194
184
|
published: PublishedWebvhLog;
|
|
@@ -212,7 +202,11 @@ export declare function ladderSignedAccountEntry({ store, ladderSeed, expectedDi
|
|
|
212
202
|
* re-attributing, which is exactly the retry-up-the-ladder resolution.
|
|
213
203
|
*
|
|
214
204
|
* @param options {object}
|
|
215
|
-
* @param options.store {UnlockLogStore} public log read + delegated PUT
|
|
205
|
+
* @param options.store {UnlockLogStore} public log read + delegated PUT.
|
|
206
|
+
* Every read the two entries are built on is checked against the store's
|
|
207
|
+
* own chain-head pin (a served prefix is refused before the reveal entry
|
|
208
|
+
* lands, not only by a verify that follows both entries), and the pin
|
|
209
|
+
* advances to each entry as it publishes
|
|
216
210
|
* @param options.ladderSeed {Uint8Array} the credential's ladder seed, from
|
|
217
211
|
* its unlock record
|
|
218
212
|
* @param options.newClientKeys {WebvhEnrollmentKeys} the new ordinary
|
|
@@ -263,14 +257,6 @@ export declare function ladderSignedAccountEntry({ store, ladderSeed, expectedDi
|
|
|
263
257
|
* fork guard
|
|
264
258
|
* @param [options.expectedDid] {string} the account DID the log must resolve
|
|
265
259
|
* to, from the credential-authenticated pointer
|
|
266
|
-
* @param [options.pinStore] {ResourceLogPinStore} this client's chain-head
|
|
267
|
-
* pins; every read both entries are built on is checked against the pinned
|
|
268
|
-
* head (a served prefix is refused before the reveal entry lands, not only
|
|
269
|
-
* by a verify that follows both entries), and the pin advances to each
|
|
270
|
-
* entry as it publishes
|
|
271
|
-
* @param [options.logId] {string} the account log's pin slot
|
|
272
|
-
* (`accountLogPinId({ spaceId })`); required whenever a `pinStore` is
|
|
273
|
-
* supplied
|
|
274
260
|
* @returns {Promise<{ did: string, webDoc?: object, committed: boolean }>}
|
|
275
261
|
* the account DID, the final `did.json` projection when the add entry ran
|
|
276
262
|
* here, and `committed` -- whether THIS call published the pivot entry
|
|
@@ -297,8 +283,6 @@ export declare function selfEnrollWebvhClient(options: {
|
|
|
297
283
|
versionId: string;
|
|
298
284
|
};
|
|
299
285
|
expectedDid?: string;
|
|
300
|
-
pinStore?: ResourceLogPinStore;
|
|
301
|
-
logId?: string;
|
|
302
286
|
}): Promise<{
|
|
303
287
|
did: string;
|
|
304
288
|
webDoc?: object;
|
|
@@ -408,7 +392,10 @@ export declare class LastEnrolledClientForgetError extends Error {
|
|
|
408
392
|
*
|
|
409
393
|
* @param options {object}
|
|
410
394
|
* @param options.store {UnlockLogStore} the credential's delegated
|
|
411
|
-
* `did.jsonl` bridge store
|
|
395
|
+
* `did.jsonl` bridge store; the read inside each attempt is checked against
|
|
396
|
+
* its chain-head pin (a served truncated prefix is refused as a `rollback`
|
|
397
|
+
* before anything is built on it), and the pin advances to the head this
|
|
398
|
+
* entry publishes
|
|
412
399
|
* @param [options.projectionStore] {object} an `id`-collection store the
|
|
413
400
|
* FORGETTING client can still write through (its own root-invoking store):
|
|
414
401
|
* the post-removal `did:web` projection is PUT through it immediately
|
|
@@ -425,13 +412,6 @@ export declare class LastEnrolledClientForgetError extends Error {
|
|
|
425
412
|
* excluded from the staged-hash attribution
|
|
426
413
|
* @param [options.expectedDid] {string} the account DID the log must resolve
|
|
427
414
|
* to, from the caller's stored account pointer
|
|
428
|
-
* @param [options.pinStore] {ResourceLogPinStore} the caller's chain-head
|
|
429
|
-
* pins: the read inside each attempt is checked against the pinned head
|
|
430
|
-
* (a served truncated prefix is refused as a `rollback` before anything is
|
|
431
|
-
* built on it), and the pin advances to the head this entry publishes
|
|
432
|
-
* @param [options.logId] {string} the account log's pin slot
|
|
433
|
-
* (`accountLogPinId({ spaceId })`); required whenever a `pinStore` is
|
|
434
|
-
* supplied
|
|
435
415
|
* @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog }>} the account
|
|
436
416
|
* DID and the document and log as the removal entry leaves them (unchanged
|
|
437
417
|
* on the idempotent no-op path)
|
|
@@ -443,8 +423,6 @@ export declare function forgetWebvhClient(options: {
|
|
|
443
423
|
forgottenClient: RevokedClientKeys;
|
|
444
424
|
knownLatentHashes?: string[];
|
|
445
425
|
expectedDid?: string;
|
|
446
|
-
pinStore?: ResourceLogPinStore;
|
|
447
|
-
logId?: string;
|
|
448
426
|
}): Promise<{
|
|
449
427
|
did: string;
|
|
450
428
|
doc: DIDDoc;
|
|
@@ -503,15 +481,13 @@ export declare function isSoleEnrolledClient({ doc, vmId }: {
|
|
|
503
481
|
* built; it throws to refuse the removal
|
|
504
482
|
* @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog }>}
|
|
505
483
|
*/
|
|
506
|
-
export declare function clientForgetEntryOnce({ store, projectionStore, ladderSeed, forgottenClient, knownLatentHashes, expectedDid,
|
|
484
|
+
export declare function clientForgetEntryOnce({ store, projectionStore, ladderSeed, forgottenClient, knownLatentHashes, expectedDid, assertRemovable }: {
|
|
507
485
|
store: UnlockLogStore;
|
|
508
486
|
projectionStore?: Pick<WebvhIdStore, 'getIdResourceRaw' | 'putIdResource'>;
|
|
509
487
|
ladderSeed: Uint8Array;
|
|
510
488
|
forgottenClient: RevokedClientKeys;
|
|
511
489
|
knownLatentHashes?: string[];
|
|
512
490
|
expectedDid?: string;
|
|
513
|
-
pinStore?: ResourceLogPinStore;
|
|
514
|
-
logId?: string;
|
|
515
491
|
assertRemovable: (options: {
|
|
516
492
|
published: PublishedWebvhLog;
|
|
517
493
|
target: ClientRemovalTarget;
|
|
@@ -549,16 +525,11 @@ export declare function clientForgetEntryOnce({ store, projectionStore, ladderSe
|
|
|
549
525
|
*
|
|
550
526
|
* @param options {object}
|
|
551
527
|
* @param options.store {UnlockLogStore} the credential's delegated
|
|
552
|
-
* `did.jsonl` bridge store
|
|
528
|
+
* `did.jsonl` bridge store; the read inside each attempt is checked against
|
|
529
|
+
* its chain-head pin, and the pin advances to the head this entry publishes
|
|
553
530
|
* @param options.ladderSeed {Uint8Array} the credential's ladder seed
|
|
554
531
|
* @param [options.expectedDid] {string} the account DID the log must resolve
|
|
555
532
|
* to, from the caller's stored account pointer
|
|
556
|
-
* @param [options.pinStore] {ResourceLogPinStore} the caller's chain-head
|
|
557
|
-
* pins: the read inside each attempt is checked against the pinned head,
|
|
558
|
-
* and the pin advances to the head this entry publishes
|
|
559
|
-
* @param [options.logId] {string} the account log's pin slot
|
|
560
|
-
* (`accountLogPinId({ spaceId })`); required whenever a `pinStore` is
|
|
561
|
-
* supplied
|
|
562
533
|
* @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog, installed: boolean }>}
|
|
563
534
|
* the account DID and the document and log as the install entry leaves them
|
|
564
535
|
* (unchanged on the idempotent no-op path); `installed` says whether the
|
|
@@ -568,8 +539,6 @@ export declare function installLadderVmWebvh(options: {
|
|
|
568
539
|
store: UnlockLogStore;
|
|
569
540
|
ladderSeed: Uint8Array;
|
|
570
541
|
expectedDid?: string;
|
|
571
|
-
pinStore?: ResourceLogPinStore;
|
|
572
|
-
logId?: string;
|
|
573
542
|
}): Promise<{
|
|
574
543
|
did: string;
|
|
575
544
|
doc: DIDDoc;
|
|
@@ -605,16 +574,11 @@ export declare function installLadderVmWebvh(options: {
|
|
|
605
574
|
*
|
|
606
575
|
* @param options {object}
|
|
607
576
|
* @param options.store {UnlockLogStore} the credential's delegated
|
|
608
|
-
* `did.jsonl` bridge store
|
|
577
|
+
* `did.jsonl` bridge store; the read inside each attempt is checked against
|
|
578
|
+
* its chain-head pin, and the pin advances to the head this entry publishes
|
|
609
579
|
* @param options.ladderSeed {Uint8Array} the credential's ladder seed
|
|
610
580
|
* @param [options.expectedDid] {string} the account DID the log must resolve
|
|
611
581
|
* to, from the caller's stored account pointer
|
|
612
|
-
* @param [options.pinStore] {ResourceLogPinStore} the caller's chain-head
|
|
613
|
-
* pins: the read inside each attempt is checked against the pinned head,
|
|
614
|
-
* and the pin advances to the head this entry publishes
|
|
615
|
-
* @param [options.logId] {string} the account log's pin slot
|
|
616
|
-
* (`accountLogPinId({ spaceId })`); required whenever a `pinStore` is
|
|
617
|
-
* supplied
|
|
618
582
|
* @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog, struck: boolean }>}
|
|
619
583
|
* the account DID and the document and log as the strike entry leaves them
|
|
620
584
|
* (unchanged on the idempotent no-op path); `struck` says whether the entry
|
|
@@ -624,8 +588,6 @@ export declare function strikeLadderVmWebvh(options: {
|
|
|
624
588
|
store: UnlockLogStore;
|
|
625
589
|
ladderSeed: Uint8Array;
|
|
626
590
|
expectedDid?: string;
|
|
627
|
-
pinStore?: ResourceLogPinStore;
|
|
628
|
-
logId?: string;
|
|
629
591
|
}): Promise<{
|
|
630
592
|
did: string;
|
|
631
593
|
doc: DIDDoc;
|
|
@@ -658,16 +620,11 @@ export declare function strikeLadderVmWebvh(options: {
|
|
|
658
620
|
*
|
|
659
621
|
* @param options {object}
|
|
660
622
|
* @param options.store {UnlockLogStore} the credential's delegated
|
|
661
|
-
* `did.jsonl` bridge store
|
|
623
|
+
* `did.jsonl` bridge store; the read is checked against its chain-head pin,
|
|
624
|
+
* and the pin advances to the head this entry publishes
|
|
662
625
|
* @param options.ladderSeed {Uint8Array} the credential's ladder seed
|
|
663
626
|
* @param [options.expectedDid] {string} the account DID the log must
|
|
664
627
|
* resolve to, from the caller's stored account pointer
|
|
665
|
-
* @param [options.pinStore] {ResourceLogPinStore} the caller's chain-head
|
|
666
|
-
* pins: the read is checked against the pinned head, and the pin advances
|
|
667
|
-
* to the head this entry publishes
|
|
668
|
-
* @param [options.logId] {string} the account log's pin slot
|
|
669
|
-
* (`accountLogPinId({ spaceId })`); required whenever a `pinStore` is
|
|
670
|
-
* supplied
|
|
671
628
|
* @returns {Promise<{ revealed: boolean, rung: LadderRung,
|
|
672
629
|
* published: PublishedWebvhLog }>} whether this call published the
|
|
673
630
|
* entry; the rung the attribution resolved, which stands REVEALED in
|
|
@@ -678,12 +635,10 @@ export declare function strikeLadderVmWebvh(options: {
|
|
|
678
635
|
* builds on this head instead of re-reading and re-attributing a log that
|
|
679
636
|
* provably did not change in between
|
|
680
637
|
*/
|
|
681
|
-
export declare function revealLadderRungWebvh({ store, ladderSeed, expectedDid
|
|
638
|
+
export declare function revealLadderRungWebvh({ store, ladderSeed, expectedDid }: {
|
|
682
639
|
store: UnlockLogStore;
|
|
683
640
|
ladderSeed: Uint8Array;
|
|
684
641
|
expectedDid?: string;
|
|
685
|
-
pinStore?: ResourceLogPinStore;
|
|
686
|
-
logId?: string;
|
|
687
642
|
}): Promise<{
|
|
688
643
|
revealed: boolean;
|
|
689
644
|
rung: LadderRung;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ladderAnchored.d.ts","sourceRoot":"","sources":["../../src/clientAnnex/ladderAnchored.ts"],"names":[],"mappings":"AAuDA,OAAO,KAAK,EACV,MAAM,EACN,MAAM,EACN,eAAe,EAEhB,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"ladderAnchored.d.ts","sourceRoot":"","sources":["../../src/clientAnnex/ladderAnchored.ts"],"names":[],"mappings":"AAuDA,OAAO,KAAK,EACV,MAAM,EACN,MAAM,EACN,eAAe,EAEhB,MAAM,2BAA2B,CAAA;AAmBlC,OAAO,KAAK,EACV,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,YAAY,EACb,MAAM,sBAAsB,CAAA;AAI7B,OAAO,EAGL,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACvB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAEL,KAAK,6BAA6B,EAClC,KAAK,cAAc,EACpB,MAAM,4BAA4B,CAAA;AAOnC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAsB,8BAA8B,CAAC,EACnD,YAAY,EACZ,OAAO,EACP,UAAU,EACV,UAAU,EACV,YAAY,EACb,EAAE;IACD,YAAY,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,cAAc,CAAA;IAC3B,UAAU,EAAE,UAAU,CAAA;IACtB,YAAY,E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E,CAAC,CAEzE;AA+GD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAsB,mBAAmB,CAAC,OAAO,EAAE;IACjD,KAAK,EAAE,cAAc,CAAA;IACrB,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,GAAG,OAAO,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,CAAC,CAEtE;AAqBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAsB,qBAAqB,CAAC,EAC1C,KAAK,EACL,UAAU,EACV,WAAW,EACZ,EAAE;IACD,KAAK,EAAE,cAAc,CAAA;IACrB,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,GAAG,OAAO,CAAC;IACV,QAAQ,EAAE,OAAO,CAAA;IACjB,IAAI,EAAE,UAAU,CAAA;IAChB,SAAS,EAAE,iBAAiB,CAAA;CAC7B,CAAC,CA2BD"}
|
|
@@ -53,10 +53,9 @@
|
|
|
53
53
|
* from durable state alone, on the recovery continuation's pattern.
|
|
54
54
|
*/
|
|
55
55
|
import { deriveNextKeyHash, updateDID } from '@interop/did-method-webvh';
|
|
56
|
-
import { assertCanonicalClientKeys, backfillKeyMapWebvhBlock, concludeWithPublishedLog, createLadderAnchoredWebvhLog, didWebvhControllerTemplate, genesisNextKeyHashes, ladderVerificationMethod, markedVerificationMethodPair,
|
|
56
|
+
import { assertCanonicalClientKeys, backfillKeyMapWebvhBlock, concludeWithPublishedLog, createLadderAnchoredWebvhLog, didWebvhControllerTemplate, genesisNextKeyHashes, ladderVerificationMethod, markedVerificationMethodPair, publishEntryPinned, publishWebvhLog, readPublishedLog, readPublishedLogOrThrow, servedHead, updateKeySigner, withLogConflictRetry, writeKeysJson } from '../webvh/didWebvh.js';
|
|
57
57
|
import { mergeVerificationMethods } from '../webvh/mergeMethods.js';
|
|
58
58
|
import { putDidWebProjection } from '../webvh/didWebProjection.js';
|
|
59
|
-
import { accountLogPinId } from '../webvh/verifyLog.js';
|
|
60
59
|
import { ladderVmIds, relationIds } from '../resourceLog/document.js';
|
|
61
60
|
import { clientRemovalFields, clientRemovalTarget } from '../webvh/revokeClient.js';
|
|
62
61
|
import { unlockKeyVerificationMethod } from '../unlock/standingWebvh.js';
|
|
@@ -136,9 +135,10 @@ export async function createLadderAnchoredAccountLog({ wasServerUrl, spaceId, di
|
|
|
136
135
|
*
|
|
137
136
|
* The publish is a conditional create-if-absent, so a concurrent signup's
|
|
138
137
|
* winner is adopted on the conflict re-run rather than erased. On the create
|
|
139
|
-
* path
|
|
140
|
-
* account-log trust-on-first-use convention: the creator
|
|
141
|
-
* genesis); on the probe path the read itself carries the pin
|
|
138
|
+
* path the publish advances the store's own chain-head pin from the log this
|
|
139
|
+
* run minted (the account-log trust-on-first-use convention: the creator
|
|
140
|
+
* knows the true genesis); on the probe path the read itself carries the pin
|
|
141
|
+
* check.
|
|
142
142
|
*
|
|
143
143
|
* @param options {object}
|
|
144
144
|
* @param options.idStore {WebvhIdStore}
|
|
@@ -157,9 +157,6 @@ export async function createLadderAnchoredAccountLog({ wasServerUrl, spaceId, di
|
|
|
157
157
|
* @param [options.expectedDid] {string} the DID the published log must
|
|
158
158
|
* resolve to, when the caller holds the account pointer; a heal login on a
|
|
159
159
|
* fresh terminal legitimately holds none
|
|
160
|
-
* @param [options.pinStore] {ResourceLogPinStore} this client's chain-head
|
|
161
|
-
* pins; the account log's slot is keyed by `accountLogPinId` over the
|
|
162
|
-
* `spaceId` above
|
|
163
160
|
* @returns {Promise<{ did: string, published: PublishedWebvhLog,
|
|
164
161
|
* logMinted: boolean }>} `published` is the head this stage stands on --
|
|
165
162
|
* the served one on the adopt branch, the minted one paired with its
|
|
@@ -184,12 +181,10 @@ export async function ensureLadderAnchoredDidWebvh(options) {
|
|
|
184
181
|
* @returns {Promise<{ did: string, published: PublishedWebvhLog,
|
|
185
182
|
* logMinted: boolean }>}
|
|
186
183
|
*/
|
|
187
|
-
async function ensureLadderAnchoredDidWebvhOnce({ idStore, wasServerUrl, spaceId, didWebKeys, keysJsonEtag, ladderSeed, keyAgreement, expectedDid
|
|
188
|
-
const logId = accountLogPinId({ spaceId });
|
|
184
|
+
async function ensureLadderAnchoredDidWebvhOnce({ idStore, wasServerUrl, spaceId, didWebKeys, keysJsonEtag, ladderSeed, keyAgreement, expectedDid }) {
|
|
189
185
|
const published = await readPublishedLog({
|
|
190
186
|
idStore,
|
|
191
|
-
...(expectedDid !== undefined ? { expectedDid } : {})
|
|
192
|
-
...(pinStore ? { pinStore, logId } : {})
|
|
187
|
+
...(expectedDid !== undefined ? { expectedDid } : {})
|
|
193
188
|
});
|
|
194
189
|
if (published) {
|
|
195
190
|
// Adoption: a torn earlier signup (or a concurrent one) already published
|
|
@@ -231,14 +226,11 @@ async function ensureLadderAnchoredDidWebvhOnce({ idStore, wasServerUrl, spaceId
|
|
|
231
226
|
webDoc: created.webDoc,
|
|
232
227
|
// Create-if-absent: a concurrent signup that already published its own
|
|
233
228
|
// log wins, and this run re-reads and adopts (or refuses) instead of
|
|
234
|
-
// erasing it.
|
|
229
|
+
// erasing it. The publish advances the store's own chain-head pin to the
|
|
230
|
+
// genesis this run minted -- trust-on-first-use established by the
|
|
231
|
+
// creator itself, which needs no served log to be believed.
|
|
235
232
|
ifNoneMatch: true
|
|
236
233
|
});
|
|
237
|
-
// Trust-on-first-use, established by the creator itself: this run minted the
|
|
238
|
-
// genesis, so the pin it writes needs no served log to be believed.
|
|
239
|
-
if (pinStore) {
|
|
240
|
-
await pinStore.write({ logId, pin: pinOfLog(created.log) });
|
|
241
|
-
}
|
|
242
234
|
// The enrolled-client create path's keys.json record, verbatim: the
|
|
243
235
|
// account DID joins the KMS bindings in the webvh block, so keys.json never
|
|
244
236
|
// durably names the bindings without the DID they belong to.
|
|
@@ -281,16 +273,12 @@ async function ensureLadderAnchoredDidWebvhOnce({ idStore, wasServerUrl, spaceId
|
|
|
281
273
|
* committed one (the retry-up-the-ladder resolution).
|
|
282
274
|
*
|
|
283
275
|
* @param options {object}
|
|
284
|
-
* @param options.store {UnlockLogStore} public log read + delegated PUT
|
|
276
|
+
* @param options.store {UnlockLogStore} public log read + delegated PUT,
|
|
277
|
+
* carrying the chain-head pin the read is checked against and the publish
|
|
278
|
+
* advances
|
|
285
279
|
* @param options.ladderSeed {Uint8Array} the credential's ladder seed
|
|
286
280
|
* @param [options.expectedDid] {string} the account DID the log must resolve
|
|
287
281
|
* to, from the caller's stored account pointer
|
|
288
|
-
* @param [options.pinStore] {ResourceLogPinStore} the caller's chain-head
|
|
289
|
-
* pins: the read is checked against the pinned head, and the pin advances
|
|
290
|
-
* to the head this entry publishes
|
|
291
|
-
* @param [options.logId] {string} the account log's pin slot
|
|
292
|
-
* (`accountLogPinId({ spaceId })`); required whenever a `pinStore` is
|
|
293
|
-
* supplied
|
|
294
282
|
* @param [options.skip] {function} `(published) => boolean` -- run on the
|
|
295
283
|
* read, before any attribution; `true` returns `skipped` with nothing
|
|
296
284
|
* published
|
|
@@ -303,15 +291,13 @@ async function ensureLadderAnchoredDidWebvhOnce({ idStore, wasServerUrl, spaceId
|
|
|
303
291
|
* write it. See {@link signAccountEntry}
|
|
304
292
|
* @returns {Promise<LadderSignedEntryOutcome>}
|
|
305
293
|
*/
|
|
306
|
-
export async function ladderSignedAccountEntry({ store, ladderSeed, expectedDid,
|
|
294
|
+
export async function ladderSignedAccountEntry({ store, ladderSeed, expectedDid, skip, build, beforePublish }) {
|
|
307
295
|
const outcome = await signAccountEntry({
|
|
308
296
|
idStore: store,
|
|
309
297
|
signer: { kind: 'ladder', ladderSeed },
|
|
310
298
|
build: ({ published, rung, state }) => build({ published, rung: rung, state: state }),
|
|
311
299
|
...(skip ? { skip } : {}),
|
|
312
300
|
...(expectedDid !== undefined ? { expectedDid } : {}),
|
|
313
|
-
...(pinStore ? { pinStore } : {}),
|
|
314
|
-
...(logId !== undefined ? { logId } : {}),
|
|
315
301
|
missingMessage: 'did:webvh: did.jsonl is missing; nothing to enroll into.',
|
|
316
302
|
...(beforePublish ? { beforePublish } : {})
|
|
317
303
|
});
|
|
@@ -341,7 +327,11 @@ export async function ladderSignedAccountEntry({ store, ladderSeed, expectedDid,
|
|
|
341
327
|
* re-attributing, which is exactly the retry-up-the-ladder resolution.
|
|
342
328
|
*
|
|
343
329
|
* @param options {object}
|
|
344
|
-
* @param options.store {UnlockLogStore} public log read + delegated PUT
|
|
330
|
+
* @param options.store {UnlockLogStore} public log read + delegated PUT.
|
|
331
|
+
* Every read the two entries are built on is checked against the store's
|
|
332
|
+
* own chain-head pin (a served prefix is refused before the reveal entry
|
|
333
|
+
* lands, not only by a verify that follows both entries), and the pin
|
|
334
|
+
* advances to each entry as it publishes
|
|
345
335
|
* @param options.ladderSeed {Uint8Array} the credential's ladder seed, from
|
|
346
336
|
* its unlock record
|
|
347
337
|
* @param options.newClientKeys {WebvhEnrollmentKeys} the new ordinary
|
|
@@ -392,14 +382,6 @@ export async function ladderSignedAccountEntry({ store, ladderSeed, expectedDid,
|
|
|
392
382
|
* fork guard
|
|
393
383
|
* @param [options.expectedDid] {string} the account DID the log must resolve
|
|
394
384
|
* to, from the credential-authenticated pointer
|
|
395
|
-
* @param [options.pinStore] {ResourceLogPinStore} this client's chain-head
|
|
396
|
-
* pins; every read both entries are built on is checked against the pinned
|
|
397
|
-
* head (a served prefix is refused before the reveal entry lands, not only
|
|
398
|
-
* by a verify that follows both entries), and the pin advances to each
|
|
399
|
-
* entry as it publishes
|
|
400
|
-
* @param [options.logId] {string} the account log's pin slot
|
|
401
|
-
* (`accountLogPinId({ spaceId })`); required whenever a `pinStore` is
|
|
402
|
-
* supplied
|
|
403
385
|
* @returns {Promise<{ did: string, webDoc?: object, committed: boolean }>}
|
|
404
386
|
* the account DID, the final `did.json` projection when the add entry ran
|
|
405
387
|
* here, and `committed` -- whether THIS call published the pivot entry
|
|
@@ -496,7 +478,7 @@ export class BuiltOnHeadNotReachedError extends Error {
|
|
|
496
478
|
* @param options {object} see {@link selfEnrollWebvhClient}
|
|
497
479
|
* @returns {Promise<{ did: string, webDoc?: object, committed: boolean }>}
|
|
498
480
|
*/
|
|
499
|
-
async function selfEnrollWebvhClientOnce({ store, ladderSeed, newClientKeys, newClientUpdateSeeds, onCommitted, builtOnHead, expectedDid
|
|
481
|
+
async function selfEnrollWebvhClientOnce({ store, ladderSeed, newClientKeys, newClientUpdateSeeds, onCommitted, builtOnHead, expectedDid }) {
|
|
500
482
|
// The reveal-and-commit entry, through the shared preamble and postamble.
|
|
501
483
|
// It is skipped when a torn earlier run already published it (the rung
|
|
502
484
|
// revealed AND every needed hash committed).
|
|
@@ -504,8 +486,6 @@ async function selfEnrollWebvhClientOnce({ store, ladderSeed, newClientKeys, new
|
|
|
504
486
|
store,
|
|
505
487
|
ladderSeed,
|
|
506
488
|
expectedDid,
|
|
507
|
-
pinStore,
|
|
508
|
-
logId,
|
|
509
489
|
skip: read => {
|
|
510
490
|
// The resume marker, checked before anything else -- the completion
|
|
511
491
|
// check included, so a truncated served log is refused rather than read
|
|
@@ -556,8 +536,6 @@ async function selfEnrollWebvhClientOnce({ store, ladderSeed, newClientKeys, new
|
|
|
556
536
|
: await readPublishedLogOrThrow({
|
|
557
537
|
idStore: store,
|
|
558
538
|
expectedDid: reveal.published.did,
|
|
559
|
-
pinStore,
|
|
560
|
-
logId,
|
|
561
539
|
missingMessage: 'did:webvh: did.jsonl is missing; nothing to enroll into.'
|
|
562
540
|
});
|
|
563
541
|
// The persist-before-publish seam: the pending client-key record is
|
|
@@ -616,9 +594,7 @@ async function selfEnrollWebvhClientOnce({ store, ladderSeed, newClientKeys, new
|
|
|
616
594
|
await publishEntryPinned({
|
|
617
595
|
store,
|
|
618
596
|
log: updated.log,
|
|
619
|
-
ifMatch: published.etag
|
|
620
|
-
pinStore,
|
|
621
|
-
logId
|
|
597
|
+
ifMatch: published.etag
|
|
622
598
|
});
|
|
623
599
|
return { did: updated.did, webDoc: updated.webDoc, committed: true };
|
|
624
600
|
}
|
|
@@ -682,7 +658,10 @@ export class LastEnrolledClientForgetError extends Error {
|
|
|
682
658
|
*
|
|
683
659
|
* @param options {object}
|
|
684
660
|
* @param options.store {UnlockLogStore} the credential's delegated
|
|
685
|
-
* `did.jsonl` bridge store
|
|
661
|
+
* `did.jsonl` bridge store; the read inside each attempt is checked against
|
|
662
|
+
* its chain-head pin (a served truncated prefix is refused as a `rollback`
|
|
663
|
+
* before anything is built on it), and the pin advances to the head this
|
|
664
|
+
* entry publishes
|
|
686
665
|
* @param [options.projectionStore] {object} an `id`-collection store the
|
|
687
666
|
* FORGETTING client can still write through (its own root-invoking store):
|
|
688
667
|
* the post-removal `did:web` projection is PUT through it immediately
|
|
@@ -699,13 +678,6 @@ export class LastEnrolledClientForgetError extends Error {
|
|
|
699
678
|
* excluded from the staged-hash attribution
|
|
700
679
|
* @param [options.expectedDid] {string} the account DID the log must resolve
|
|
701
680
|
* to, from the caller's stored account pointer
|
|
702
|
-
* @param [options.pinStore] {ResourceLogPinStore} the caller's chain-head
|
|
703
|
-
* pins: the read inside each attempt is checked against the pinned head
|
|
704
|
-
* (a served truncated prefix is refused as a `rollback` before anything is
|
|
705
|
-
* built on it), and the pin advances to the head this entry publishes
|
|
706
|
-
* @param [options.logId] {string} the account log's pin slot
|
|
707
|
-
* (`accountLogPinId({ spaceId })`); required whenever a `pinStore` is
|
|
708
|
-
* supplied
|
|
709
681
|
* @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog }>} the account
|
|
710
682
|
* DID and the document and log as the removal entry leaves them (unchanged
|
|
711
683
|
* on the idempotent no-op path)
|
|
@@ -779,7 +751,7 @@ function assertNotLastClient({ published, target }) {
|
|
|
779
751
|
* built; it throws to refuse the removal
|
|
780
752
|
* @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog }>}
|
|
781
753
|
*/
|
|
782
|
-
export async function clientForgetEntryOnce({ store, projectionStore, ladderSeed, forgottenClient, knownLatentHashes = [], expectedDid,
|
|
754
|
+
export async function clientForgetEntryOnce({ store, projectionStore, ladderSeed, forgottenClient, knownLatentHashes = [], expectedDid, assertRemovable }) {
|
|
783
755
|
// Resolved by the skip hook on the read the entry is built on, and used by
|
|
784
756
|
// the build below -- the same snapshot, never a second read.
|
|
785
757
|
let target;
|
|
@@ -787,8 +759,6 @@ export async function clientForgetEntryOnce({ store, projectionStore, ladderSeed
|
|
|
787
759
|
store,
|
|
788
760
|
ladderSeed,
|
|
789
761
|
expectedDid,
|
|
790
|
-
pinStore,
|
|
791
|
-
logId,
|
|
792
762
|
skip: async (published) => {
|
|
793
763
|
target = await clientRemovalTarget({
|
|
794
764
|
published,
|
|
@@ -878,16 +848,11 @@ export async function clientForgetEntryOnce({ store, projectionStore, ladderSeed
|
|
|
878
848
|
*
|
|
879
849
|
* @param options {object}
|
|
880
850
|
* @param options.store {UnlockLogStore} the credential's delegated
|
|
881
|
-
* `did.jsonl` bridge store
|
|
851
|
+
* `did.jsonl` bridge store; the read inside each attempt is checked against
|
|
852
|
+
* its chain-head pin, and the pin advances to the head this entry publishes
|
|
882
853
|
* @param options.ladderSeed {Uint8Array} the credential's ladder seed
|
|
883
854
|
* @param [options.expectedDid] {string} the account DID the log must resolve
|
|
884
855
|
* to, from the caller's stored account pointer
|
|
885
|
-
* @param [options.pinStore] {ResourceLogPinStore} the caller's chain-head
|
|
886
|
-
* pins: the read inside each attempt is checked against the pinned head,
|
|
887
|
-
* and the pin advances to the head this entry publishes
|
|
888
|
-
* @param [options.logId] {string} the account log's pin slot
|
|
889
|
-
* (`accountLogPinId({ spaceId })`); required whenever a `pinStore` is
|
|
890
|
-
* supplied
|
|
891
856
|
* @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog, installed: boolean }>}
|
|
892
857
|
* the account DID and the document and log as the install entry leaves them
|
|
893
858
|
* (unchanged on the idempotent no-op path); `installed` says whether the
|
|
@@ -934,14 +899,12 @@ async function installLadderVmWebvhOnce(options) {
|
|
|
934
899
|
* in
|
|
935
900
|
* @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog, changed: boolean }>}
|
|
936
901
|
*/
|
|
937
|
-
async function setLadderVmPresenceOnce({ store, ladderSeed, expectedDid,
|
|
902
|
+
async function setLadderVmPresenceOnce({ store, ladderSeed, expectedDid, present }) {
|
|
938
903
|
const ladderVmKey = await ladderVmKeyMultibase({ ladderSeed });
|
|
939
904
|
const entry = await ladderSignedAccountEntry({
|
|
940
905
|
store,
|
|
941
906
|
ladderSeed,
|
|
942
907
|
expectedDid,
|
|
943
|
-
pinStore,
|
|
944
|
-
logId,
|
|
945
908
|
// Already in the asked-for state: a torn earlier run published the entry,
|
|
946
909
|
// the account is mid-transition, or the credential never bound a VM here.
|
|
947
910
|
skip: published => ladderVmIds({ doc: published.doc }).includes(`${published.did}#${ladderVmKey}`) === present,
|
|
@@ -1011,16 +974,11 @@ async function setLadderVmPresenceOnce({ store, ladderSeed, expectedDid, pinStor
|
|
|
1011
974
|
*
|
|
1012
975
|
* @param options {object}
|
|
1013
976
|
* @param options.store {UnlockLogStore} the credential's delegated
|
|
1014
|
-
* `did.jsonl` bridge store
|
|
977
|
+
* `did.jsonl` bridge store; the read inside each attempt is checked against
|
|
978
|
+
* its chain-head pin, and the pin advances to the head this entry publishes
|
|
1015
979
|
* @param options.ladderSeed {Uint8Array} the credential's ladder seed
|
|
1016
980
|
* @param [options.expectedDid] {string} the account DID the log must resolve
|
|
1017
981
|
* to, from the caller's stored account pointer
|
|
1018
|
-
* @param [options.pinStore] {ResourceLogPinStore} the caller's chain-head
|
|
1019
|
-
* pins: the read inside each attempt is checked against the pinned head,
|
|
1020
|
-
* and the pin advances to the head this entry publishes
|
|
1021
|
-
* @param [options.logId] {string} the account log's pin slot
|
|
1022
|
-
* (`accountLogPinId({ spaceId })`); required whenever a `pinStore` is
|
|
1023
|
-
* supplied
|
|
1024
982
|
* @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog, struck: boolean }>}
|
|
1025
983
|
* the account DID and the document and log as the strike entry leaves them
|
|
1026
984
|
* (unchanged on the idempotent no-op path); `struck` says whether the entry
|
|
@@ -1069,16 +1027,11 @@ async function strikeLadderVmWebvhOnce(options) {
|
|
|
1069
1027
|
*
|
|
1070
1028
|
* @param options {object}
|
|
1071
1029
|
* @param options.store {UnlockLogStore} the credential's delegated
|
|
1072
|
-
* `did.jsonl` bridge store
|
|
1030
|
+
* `did.jsonl` bridge store; the read is checked against its chain-head pin,
|
|
1031
|
+
* and the pin advances to the head this entry publishes
|
|
1073
1032
|
* @param options.ladderSeed {Uint8Array} the credential's ladder seed
|
|
1074
1033
|
* @param [options.expectedDid] {string} the account DID the log must
|
|
1075
1034
|
* resolve to, from the caller's stored account pointer
|
|
1076
|
-
* @param [options.pinStore] {ResourceLogPinStore} the caller's chain-head
|
|
1077
|
-
* pins: the read is checked against the pinned head, and the pin advances
|
|
1078
|
-
* to the head this entry publishes
|
|
1079
|
-
* @param [options.logId] {string} the account log's pin slot
|
|
1080
|
-
* (`accountLogPinId({ spaceId })`); required whenever a `pinStore` is
|
|
1081
|
-
* supplied
|
|
1082
1035
|
* @returns {Promise<{ revealed: boolean, rung: LadderRung,
|
|
1083
1036
|
* published: PublishedWebvhLog }>} whether this call published the
|
|
1084
1037
|
* entry; the rung the attribution resolved, which stands REVEALED in
|
|
@@ -1089,13 +1042,11 @@ async function strikeLadderVmWebvhOnce(options) {
|
|
|
1089
1042
|
* builds on this head instead of re-reading and re-attributing a log that
|
|
1090
1043
|
* provably did not change in between
|
|
1091
1044
|
*/
|
|
1092
|
-
export async function revealLadderRungWebvh({ store, ladderSeed, expectedDid
|
|
1045
|
+
export async function revealLadderRungWebvh({ store, ladderSeed, expectedDid }) {
|
|
1093
1046
|
const entry = await ladderSignedAccountEntry({
|
|
1094
1047
|
store,
|
|
1095
1048
|
ladderSeed,
|
|
1096
1049
|
expectedDid,
|
|
1097
|
-
pinStore,
|
|
1098
|
-
logId,
|
|
1099
1050
|
build: async ({ rung, state }) => {
|
|
1100
1051
|
// A rung already revealed (a torn earlier run, or a racing ceremony
|
|
1101
1052
|
// that got there first) leaves nothing to publish. The decline sits
|