@interop/wallet-core 0.49.0 → 0.51.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 +5 -2
- package/dist/clientAnnex/credentialAnchoredGenesis.d.ts +127 -0
- package/dist/clientAnnex/credentialAnchoredGenesis.d.ts.map +1 -0
- package/dist/clientAnnex/credentialAnchoredGenesis.js +195 -0
- package/dist/clientAnnex/credentialAnchoredGenesis.js.map +1 -0
- package/dist/clientAnnex/forget.d.ts +138 -0
- package/dist/clientAnnex/forget.d.ts.map +1 -0
- package/dist/clientAnnex/forget.js +133 -0
- package/dist/clientAnnex/forget.js.map +1 -0
- package/dist/clientAnnex/forgetLast.d.ts +291 -0
- package/dist/clientAnnex/forgetLast.d.ts.map +1 -0
- package/dist/clientAnnex/forgetLast.js +408 -0
- package/dist/clientAnnex/forgetLast.js.map +1 -0
- package/dist/{webvh/companionGc.d.ts → clientAnnex/gc.d.ts} +50 -16
- package/dist/clientAnnex/gc.d.ts.map +1 -0
- package/dist/{webvh/companionGc.js → clientAnnex/gc.js} +103 -71
- package/dist/clientAnnex/gc.js.map +1 -0
- package/dist/clientAnnex/index.d.ts +60 -0
- package/dist/clientAnnex/index.d.ts.map +1 -0
- package/dist/clientAnnex/index.js +60 -0
- package/dist/clientAnnex/index.js.map +1 -0
- package/dist/{unlock → clientAnnex}/ladder.d.ts +89 -15
- package/dist/clientAnnex/ladder.d.ts.map +1 -0
- package/dist/clientAnnex/ladder.js +474 -0
- package/dist/clientAnnex/ladder.js.map +1 -0
- package/dist/clientAnnex/ladderAnchored.d.ts +276 -0
- package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -0
- package/dist/clientAnnex/ladderAnchored.js +631 -0
- package/dist/clientAnnex/ladderAnchored.js.map +1 -0
- package/dist/{webvh/companion.d.ts → clientAnnex/log.d.ts} +333 -119
- package/dist/clientAnnex/log.d.ts.map +1 -0
- package/dist/{webvh/companion.js → clientAnnex/log.js} +583 -199
- package/dist/clientAnnex/log.js.map +1 -0
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts +103 -0
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts.map +1 -0
- package/dist/clientAnnex/recoveryLadderAnchored.js +263 -0
- package/dist/clientAnnex/recoveryLadderAnchored.js.map +1 -0
- package/dist/{unlock → clientAnnex}/selfEnroll.d.ts +1 -1
- package/dist/clientAnnex/selfEnroll.d.ts.map +1 -0
- package/dist/{unlock → clientAnnex}/selfEnroll.js +1 -1
- package/dist/clientAnnex/selfEnroll.js.map +1 -0
- package/dist/clientAnnex/zcap.d.ts +49 -0
- package/dist/clientAnnex/zcap.d.ts.map +1 -0
- package/dist/clientAnnex/zcap.js +101 -0
- package/dist/clientAnnex/zcap.js.map +1 -0
- package/dist/clients/index.d.ts +9 -6
- package/dist/clients/index.d.ts.map +1 -1
- package/dist/clients/index.js +8 -5
- package/dist/clients/index.js.map +1 -1
- package/dist/clients/listing.d.ts +32 -0
- package/dist/clients/listing.d.ts.map +1 -1
- package/dist/clients/listing.js +47 -1
- package/dist/clients/listing.js.map +1 -1
- package/dist/clients/revocation.d.ts +33 -1
- package/dist/clients/revocation.d.ts.map +1 -1
- package/dist/clients/revocation.js +16 -4
- package/dist/clients/revocation.js.map +1 -1
- package/dist/enrollment/index.d.ts +6 -4
- package/dist/enrollment/index.d.ts.map +1 -1
- package/dist/enrollment/index.js +6 -4
- package/dist/enrollment/index.js.map +1 -1
- package/dist/enrollment/onboardingInvite.d.ts +5 -88
- package/dist/enrollment/onboardingInvite.d.ts.map +1 -1
- package/dist/enrollment/onboardingInvite.js +5 -168
- package/dist/enrollment/onboardingInvite.js.map +1 -1
- package/dist/genesis/accountGenesis.d.ts +12 -0
- package/dist/genesis/accountGenesis.d.ts.map +1 -1
- package/dist/genesis/accountGenesis.js.map +1 -1
- package/dist/genesis/index.d.ts +5 -0
- package/dist/genesis/index.d.ts.map +1 -1
- package/dist/genesis/index.js +5 -0
- package/dist/genesis/index.js.map +1 -1
- package/dist/keys/index.d.ts +1 -1
- package/dist/keys/index.d.ts.map +1 -1
- package/dist/keys/index.js +1 -1
- package/dist/keys/index.js.map +1 -1
- package/dist/keys/spaceEpochs.d.ts +7 -2
- package/dist/keys/spaceEpochs.d.ts.map +1 -1
- package/dist/keys/spaceEpochs.js +8 -2
- package/dist/keys/spaceEpochs.js.map +1 -1
- package/dist/keys/userKeyRoster.d.ts +39 -0
- package/dist/keys/userKeyRoster.d.ts.map +1 -1
- package/dist/keys/userKeyRoster.js +43 -1
- package/dist/keys/userKeyRoster.js.map +1 -1
- package/dist/recovery/index.d.ts +5 -3
- package/dist/recovery/index.d.ts.map +1 -1
- package/dist/recovery/index.js +4 -2
- package/dist/recovery/index.js.map +1 -1
- package/dist/recovery/recoveryDelegation.d.ts +35 -12
- package/dist/recovery/recoveryDelegation.d.ts.map +1 -1
- package/dist/recovery/recoveryDelegation.js +84 -86
- package/dist/recovery/recoveryDelegation.js.map +1 -1
- package/dist/recovery/recoveryWebvh.d.ts +32 -1
- package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
- package/dist/recovery/recoveryWebvh.js +2 -2
- package/dist/recovery/recoveryWebvh.js.map +1 -1
- package/dist/request/capabilityRequest.d.ts +33 -0
- package/dist/request/capabilityRequest.d.ts.map +1 -0
- package/dist/request/capabilityRequest.js +35 -0
- package/dist/request/capabilityRequest.js.map +1 -0
- package/dist/request/ephemeralExchange.d.ts +118 -0
- package/dist/request/ephemeralExchange.d.ts.map +1 -0
- package/dist/request/ephemeralExchange.js +224 -0
- package/dist/request/ephemeralExchange.js.map +1 -0
- package/dist/request/index.d.ts +6 -0
- package/dist/request/index.d.ts.map +1 -1
- package/dist/request/index.js +6 -0
- package/dist/request/index.js.map +1 -1
- package/dist/space/activity.d.ts +2 -2
- package/dist/space/activity.js +3 -3
- package/dist/space/activity.js.map +1 -1
- package/dist/unlock/index.d.ts +11 -23
- package/dist/unlock/index.d.ts.map +1 -1
- package/dist/unlock/index.js +10 -21
- package/dist/unlock/index.js.map +1 -1
- package/dist/unlock/retire.d.ts +47 -3
- package/dist/unlock/retire.d.ts.map +1 -1
- package/dist/unlock/retire.js +21 -5
- package/dist/unlock/retire.js.map +1 -1
- package/dist/unlock/standingWebvh.d.ts +37 -82
- package/dist/unlock/standingWebvh.d.ts.map +1 -1
- package/dist/unlock/standingWebvh.js +64 -247
- package/dist/unlock/standingWebvh.js.map +1 -1
- package/dist/unlock/unlockRecord.d.ts +13 -6
- package/dist/unlock/unlockRecord.d.ts.map +1 -1
- package/dist/unlock/unlockRecord.js +14 -8
- package/dist/unlock/unlockRecord.js.map +1 -1
- package/dist/webvh/delegatedLogStore.d.ts +5 -5
- package/dist/webvh/delegatedLogStore.js +1 -1
- package/dist/webvh/didWebvh.d.ts +19 -9
- package/dist/webvh/didWebvh.d.ts.map +1 -1
- package/dist/webvh/didWebvh.js +16 -16
- package/dist/webvh/didWebvh.js.map +1 -1
- package/dist/webvh/index.d.ts +9 -25
- package/dist/webvh/index.d.ts.map +1 -1
- package/dist/webvh/index.js +9 -23
- package/dist/webvh/index.js.map +1 -1
- package/dist/webvh/revokeClient.d.ts +77 -5
- package/dist/webvh/revokeClient.d.ts.map +1 -1
- package/dist/webvh/revokeClient.js +154 -61
- package/dist/webvh/revokeClient.js.map +1 -1
- package/dist/webvh/standingZcap.d.ts +11 -1
- package/dist/webvh/standingZcap.d.ts.map +1 -1
- package/dist/webvh/standingZcap.js +13 -14
- package/dist/webvh/standingZcap.js.map +1 -1
- package/dist/webvh/wasIdStore.d.ts +13 -7
- package/dist/webvh/wasIdStore.d.ts.map +1 -1
- package/dist/webvh/wasIdStore.js +8 -4
- package/dist/webvh/wasIdStore.js.map +1 -1
- package/dist/webvh/zcap.d.ts +0 -24
- package/dist/webvh/zcap.d.ts.map +1 -1
- package/dist/webvh/zcap.js +0 -42
- package/dist/webvh/zcap.js.map +1 -1
- package/package.json +41 -35
- package/dist/unlock/ladder.d.ts.map +0 -1
- package/dist/unlock/ladder.js +0 -258
- package/dist/unlock/ladder.js.map +0 -1
- package/dist/unlock/selfEnroll.d.ts.map +0 -1
- package/dist/unlock/selfEnroll.js.map +0 -1
- package/dist/webvh/companion.d.ts.map +0 -1
- package/dist/webvh/companion.js.map +0 -1
- package/dist/webvh/companionGc.d.ts.map +0 -1
- package/dist/webvh/companionGc.js.map +0 -1
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
import type { DIDDoc, DIDLog } from '@interop/did-method-webvh';
|
|
2
|
+
import type { ClientWebvhUpdateKeys, WebvhEnrollmentKeys, WebvhIdStore } from '../webvh/didWebvh.js';
|
|
3
|
+
import type { ResourceLogPinStore } from '../resourceLog/index.js';
|
|
4
|
+
import { type RevokedClientKeys } from '../webvh/revokeClient.js';
|
|
5
|
+
import { type UnlockKeyAgreementPublication, type UnlockLogStore } from '../unlock/standingWebvh.js';
|
|
6
|
+
/**
|
|
7
|
+
* LADDER-ANCHORED GENESIS: assembles the one-entry did:webvh log of an account
|
|
8
|
+
* with zero enrolled durable clients, anchored on the minting credential's
|
|
9
|
+
* ladder alone. Everything derives from the ladder seed: rung 0 is the sole
|
|
10
|
+
* `updateKeys` member and signs the entry, `nextKeyHashes` commits rung 0's
|
|
11
|
+
* own carry-over hash plus rung 1 (the staged rung) -- the carry-over hash is
|
|
12
|
+
* what the first durable self-enrollment's reveal-and-commit entry,
|
|
13
|
+
* re-stating `updateKeys` containing rung 0, requires --
|
|
14
|
+
* and the ladder VM (the stable sibling) is published under `assertionMethod`
|
|
15
|
+
* and `capabilityDelegation` only. The credential's `keyAgreement` posture
|
|
16
|
+
* entry is FOLDED INTO GENESIS -- no enrolled client exists to run the
|
|
17
|
+
* separate bind entry ({@link publishUnlockKey}) -- so the genesis
|
|
18
|
+
* `keyAgreement` array holds only the credential's entry.
|
|
19
|
+
*
|
|
20
|
+
* The ladder-anchored window this opens is closed by the credential's first
|
|
21
|
+
* durable self-enrollment ({@link selfEnrollWebvhClient}), whose add entry
|
|
22
|
+
* atomically publishes the client, retires rung 0, and removes the ladder VM.
|
|
23
|
+
*
|
|
24
|
+
* The caller owns publication (conditional, create-only) and the pointer
|
|
25
|
+
* write that follows; this assembles and signs the log only.
|
|
26
|
+
*
|
|
27
|
+
* @param options {object}
|
|
28
|
+
* @param options.wasServerUrl {string}
|
|
29
|
+
* @param options.spaceId {string}
|
|
30
|
+
* @param options.ladderSeed {Uint8Array} the credential's ladder seed
|
|
31
|
+
* @param options.keyAgreement {UnlockKeyAgreementPublication} the
|
|
32
|
+
* credential's key-agreement publication (commitment or verbatim)
|
|
33
|
+
* @returns {Promise<{ log: DIDLog, webDoc: object, did: string }>}
|
|
34
|
+
*/
|
|
35
|
+
export declare function createLadderAnchoredAccountLog({ wasServerUrl, spaceId, ladderSeed, keyAgreement }: {
|
|
36
|
+
wasServerUrl: string;
|
|
37
|
+
spaceId: string;
|
|
38
|
+
ladderSeed: Uint8Array;
|
|
39
|
+
keyAgreement: UnlockKeyAgreementPublication;
|
|
40
|
+
}): Promise<{
|
|
41
|
+
log: DIDLog;
|
|
42
|
+
webDoc: object;
|
|
43
|
+
did: string;
|
|
44
|
+
}>;
|
|
45
|
+
/**
|
|
46
|
+
* LADDER-ANCHORED GENESIS AS AN ENSURE: probe, adopt, or create-and-publish --
|
|
47
|
+
* {@link createLadderAnchoredAccountLog} with the durable-flow `ensureDidWebvh`
|
|
48
|
+
* convention wrapped around it. The convergence rule is what makes signup a
|
|
49
|
+
* ceremony rather than a bare create: `createDID` timestamps the genesis
|
|
50
|
+
* entry, so a naive re-run of a torn signup mints a DIFFERENT SCID and its
|
|
51
|
+
* create-if-absent PUT can never land. So a published log is ADOPTED instead
|
|
52
|
+
* -- iff `attributeLadderRung` attributes its update parameters to this
|
|
53
|
+
* credential's ladder (rung revealed or committed; a foreign log fails
|
|
54
|
+
* closed with `LadderAttributionError` and is never built on).
|
|
55
|
+
*
|
|
56
|
+
* The publish is a conditional create-if-absent, so a concurrent signup's
|
|
57
|
+
* winner is adopted on the conflict re-run rather than erased. On the create
|
|
58
|
+
* path a supplied `pinStore` is written from the log this run minted (the
|
|
59
|
+
* account-log trust-on-first-use convention: the creator knows the true
|
|
60
|
+
* genesis); on the probe path the read itself carries the pin check.
|
|
61
|
+
*
|
|
62
|
+
* @param options {object}
|
|
63
|
+
* @param options.idStore {WebvhIdStore}
|
|
64
|
+
* @param options.wasServerUrl {string}
|
|
65
|
+
* @param options.spaceId {string}
|
|
66
|
+
* @param options.ladderSeed {Uint8Array} the credential's ladder seed
|
|
67
|
+
* @param options.keyAgreement {UnlockKeyAgreementPublication} the
|
|
68
|
+
* credential's key-agreement publication (commitment or verbatim)
|
|
69
|
+
* @param [options.expectedDid] {string} the DID the published log must
|
|
70
|
+
* resolve to, when the caller holds the account pointer; a heal login on a
|
|
71
|
+
* fresh terminal legitimately holds none
|
|
72
|
+
* @param [options.pinStore] {ResourceLogPinStore} this client's chain-head
|
|
73
|
+
* pins; the account log's slot is keyed by `accountLogPinId` over the
|
|
74
|
+
* `spaceId` above
|
|
75
|
+
* @returns {Promise<{ did: string }>}
|
|
76
|
+
*/
|
|
77
|
+
export declare function ensureLadderAnchoredDidWebvh(options: {
|
|
78
|
+
idStore: WebvhIdStore;
|
|
79
|
+
wasServerUrl: string;
|
|
80
|
+
spaceId: string;
|
|
81
|
+
ladderSeed: Uint8Array;
|
|
82
|
+
keyAgreement: UnlockKeyAgreementPublication;
|
|
83
|
+
expectedDid?: string;
|
|
84
|
+
pinStore?: ResourceLogPinStore;
|
|
85
|
+
}): Promise<{
|
|
86
|
+
did: string;
|
|
87
|
+
}>;
|
|
88
|
+
/**
|
|
89
|
+
* SELF-ENROLLMENT (run by the credential-derived client through the delegated
|
|
90
|
+
* `did.jsonl` PUT): writes the standing continuation described in the module
|
|
91
|
+
* doc -- the reveal-and-commit entry signed by the attributed ladder rung,
|
|
92
|
+
* then the add entry signed by the new ordinary client's update key, which
|
|
93
|
+
* also retires the spent rung. Resumable from durable state alone: a
|
|
94
|
+
* completed continuation is detected by the new client's update key already
|
|
95
|
+
* being authorized (no-op), a torn one by the attribution finding the rung
|
|
96
|
+
* already revealed. Both entries publish conditionally on the read they were
|
|
97
|
+
* built on, and a race lost to a concurrent ceremony re-runs from the top --
|
|
98
|
+
* re-attributing, which is exactly the retry-up-the-ladder resolution.
|
|
99
|
+
*
|
|
100
|
+
* @param options {object}
|
|
101
|
+
* @param options.store {UnlockLogStore} public log read + delegated PUT
|
|
102
|
+
* @param options.ladderSeed {Uint8Array} the credential's ladder seed, from
|
|
103
|
+
* its unlock record
|
|
104
|
+
* @param options.newClientKeys {WebvhEnrollmentKeys} the new ordinary
|
|
105
|
+
* client's public halves
|
|
106
|
+
* @param options.newClientUpdateSeeds {ClientWebvhUpdateKeys} the new
|
|
107
|
+
* client's update-key seeds (minted by the self-enrolling flow, which
|
|
108
|
+
* therefore holds them and can sign the add entry)
|
|
109
|
+
* @param [options.expectedDid] {string} the account DID the log must resolve
|
|
110
|
+
* to, from the credential-authenticated pointer
|
|
111
|
+
* @returns {Promise<{ did: string, webDoc?: object }>} the account DID and,
|
|
112
|
+
* when the add entry ran here, the final `did.json` projection for the
|
|
113
|
+
* enrolled session to republish
|
|
114
|
+
*/
|
|
115
|
+
export declare function selfEnrollWebvhClient(options: {
|
|
116
|
+
store: UnlockLogStore;
|
|
117
|
+
ladderSeed: Uint8Array;
|
|
118
|
+
newClientKeys: WebvhEnrollmentKeys;
|
|
119
|
+
newClientUpdateSeeds: ClientWebvhUpdateKeys;
|
|
120
|
+
expectedDid?: string;
|
|
121
|
+
}): Promise<{
|
|
122
|
+
did: string;
|
|
123
|
+
webDoc?: object;
|
|
124
|
+
}>;
|
|
125
|
+
/**
|
|
126
|
+
* Thrown when the client being forgotten is the account's LAST enrolled
|
|
127
|
+
* durable client. Removing it through this entry would leave the document
|
|
128
|
+
* with no client and no ladder verification method -- an account nothing can
|
|
129
|
+
* invoke for -- so that case is its own ceremony (the two-entry
|
|
130
|
+
* ladder-VM-install shape), and this primitive refuses rather than
|
|
131
|
+
* transitioning the account by accident.
|
|
132
|
+
*
|
|
133
|
+
* **`name` is a stable contract.** It is always the string
|
|
134
|
+
* `'LastDurableClientForgetError'`, and a consumer should match on that
|
|
135
|
+
* rather than on `instanceof`: a wallet app that links this package (or holds
|
|
136
|
+
* two copies of it through a dependency tree) gets a different class object
|
|
137
|
+
* for the same error, so `instanceof` silently fails there while the name
|
|
138
|
+
* does not.
|
|
139
|
+
*/
|
|
140
|
+
export declare class LastDurableClientForgetError extends Error {
|
|
141
|
+
constructor();
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* FORGET (run by the forgetting client itself, through the standing
|
|
145
|
+
* credential's bridge): removes THIS browser's enrolled client from the
|
|
146
|
+
* published document in ONE atomic ladder-signed entry -- self-enrollment in
|
|
147
|
+
* reverse, collapsed to a single entry because a removal reveals no new key.
|
|
148
|
+
* The signer is the credential's current ladder rung, recovered from the log
|
|
149
|
+
* itself ({@link attributeLadderRung}): its hash stands committed by the
|
|
150
|
+
* credential's posture (or the rung is already revealed), which is exactly
|
|
151
|
+
* what lets it reveal itself in the entry it signs under prerotation. The
|
|
152
|
+
* entry's members are the revocation removal's, verbatim
|
|
153
|
+
* (`clientRemovalTarget` / `clientRemovalFields`, shared with
|
|
154
|
+
* `revokeWebvhClient` so the two removal shapes cannot drift): the client's
|
|
155
|
+
* verification methods out of the document and all five relations, its update
|
|
156
|
+
* key out of `updateKeys`, and its carry-over and staged hashes out of
|
|
157
|
+
* `nextKeyHashes` -- plus the acting rung into `updateKeys` with its own hash
|
|
158
|
+
* kept committed (the carry-over convention).
|
|
159
|
+
*
|
|
160
|
+
* Atomicity is the point of the one-entry shape: no torn state exists where
|
|
161
|
+
* the rung is revealed and the client still stands. The honest residue is the
|
|
162
|
+
* acting rung itself -- no entry can remove its own signing key, so the rung
|
|
163
|
+
* stands REVEALED in `updateKeys` afterwards (the same standing state the
|
|
164
|
+
* ladder-anchored postures live in). That is credential-held authority, not
|
|
165
|
+
* the forgotten client's: only the ladder seed derives it, the credential's
|
|
166
|
+
* next self-enrollment consumes and retires it, and retiring the credential
|
|
167
|
+
* itself strikes it (`attributeLadderPosture`).
|
|
168
|
+
*
|
|
169
|
+
* Forgetting the LAST enrolled durable client is refused
|
|
170
|
+
* ({@link LastDurableClientForgetError}): that transition -- to the
|
|
171
|
+
* client-less, ladder-anchored state -- is its own two-entry ceremony.
|
|
172
|
+
*
|
|
173
|
+
* Idempotent: a client with no remaining presence is a no-op that returns the
|
|
174
|
+
* published state unchanged, so a naive re-run after a torn ceremony
|
|
175
|
+
* converges. The entry publishes conditionally on the log this call read; a
|
|
176
|
+
* lost race re-runs, re-attributes, and rebases on the winner's head.
|
|
177
|
+
*
|
|
178
|
+
* @param options {object}
|
|
179
|
+
* @param options.store {UnlockLogStore} the credential's delegated
|
|
180
|
+
* `did.jsonl` bridge store
|
|
181
|
+
* @param options.ladderSeed {Uint8Array} the credential's ladder seed
|
|
182
|
+
* @param options.forgottenClient {RevokedClientKeys} this client's public
|
|
183
|
+
* halves; an `updateKeyMultibase` the log does not authorize (stale, or the
|
|
184
|
+
* staged key) is re-derived from the log
|
|
185
|
+
* @param [options.knownLatentHashes] {string[]} standing latent commitments
|
|
186
|
+
* the caller vouches for (the recovery registry's update-key hashes),
|
|
187
|
+
* excluded from the staged-hash attribution
|
|
188
|
+
* @param [options.expectedDid] {string} the account DID the log must resolve
|
|
189
|
+
* to, from the caller's stored account pointer
|
|
190
|
+
* @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog }>} the account
|
|
191
|
+
* DID and the document and log as the removal entry leaves them (unchanged
|
|
192
|
+
* on the idempotent no-op path)
|
|
193
|
+
*/
|
|
194
|
+
export declare function forgetWebvhClient(options: {
|
|
195
|
+
store: UnlockLogStore;
|
|
196
|
+
ladderSeed: Uint8Array;
|
|
197
|
+
forgottenClient: RevokedClientKeys;
|
|
198
|
+
knownLatentHashes?: string[];
|
|
199
|
+
expectedDid?: string;
|
|
200
|
+
}): Promise<{
|
|
201
|
+
did: string;
|
|
202
|
+
doc: DIDDoc;
|
|
203
|
+
log: DIDLog;
|
|
204
|
+
}>;
|
|
205
|
+
/**
|
|
206
|
+
* THE LAST-CLIENT REMOVAL ENTRY (the two-entry transition ceremony's second
|
|
207
|
+
* entry): {@link forgetWebvhClient}'s removal shape with the last-client
|
|
208
|
+
* refusal inverted -- the forgotten client IS the last enrolled durable
|
|
209
|
+
* client, and the account stays invocable because the ladder VM the install
|
|
210
|
+
* entry published ({@link installLadderVmWebvh}) remains in the document. A
|
|
211
|
+
* document NOT carrying this credential's ladder VM refuses: publishing the
|
|
212
|
+
* entry would strand the account with neither a durable client nor the
|
|
213
|
+
* ladder anchor. Run only from the composed ceremony
|
|
214
|
+
* (`forgetLastDurableClient`), which sequences the install entry and the
|
|
215
|
+
* delegation revocations before it.
|
|
216
|
+
*
|
|
217
|
+
* @param options {object} see {@link forgetWebvhClient}
|
|
218
|
+
* @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog }>}
|
|
219
|
+
*/
|
|
220
|
+
export declare function forgetLastWebvhClient(options: {
|
|
221
|
+
store: UnlockLogStore;
|
|
222
|
+
ladderSeed: Uint8Array;
|
|
223
|
+
forgottenClient: RevokedClientKeys;
|
|
224
|
+
knownLatentHashes?: string[];
|
|
225
|
+
expectedDid?: string;
|
|
226
|
+
}): Promise<{
|
|
227
|
+
did: string;
|
|
228
|
+
doc: DIDDoc;
|
|
229
|
+
log: DIDLog;
|
|
230
|
+
}>;
|
|
231
|
+
/**
|
|
232
|
+
* THE LADDER-VM INSTALL ENTRY (the two-entry transition ceremony's first
|
|
233
|
+
* entry): publishes the credential's ladder VM -- the stable sibling, under
|
|
234
|
+
* `assertionMethod` and `capabilityDelegation` only -- while the last durable
|
|
235
|
+
* client's whole footprint stays untouched: the both-present transitional
|
|
236
|
+
* state the no-neither invariant permits. The entry is ladder-signed by the
|
|
237
|
+
* attributed rung, which reveals itself into `updateKeys` with its own hash
|
|
238
|
+
* kept committed (the carry-over convention), exactly the removal entry's
|
|
239
|
+
* rung math -- so a torn ceremony's re-run re-attributes the now-revealed
|
|
240
|
+
* rung and carries on.
|
|
241
|
+
*
|
|
242
|
+
* This entry is what makes the transition's document version POSTURE-CHANGING
|
|
243
|
+
* under the ceremony-tail license (the ladder-VM set gains a member), so the
|
|
244
|
+
* ceremony's ONE ladder-signed roster append anchors here -- and it is what
|
|
245
|
+
* lets the delegation revocations that follow verify their ladder-signed
|
|
246
|
+
* chains against the currently resolved document while the still-standing
|
|
247
|
+
* client signs the invocations.
|
|
248
|
+
*
|
|
249
|
+
* Idempotent: a document already carrying this credential's ladder VM (by
|
|
250
|
+
* the relation-asymmetry recognition) returns unchanged with
|
|
251
|
+
* `installed: false`. The entry publishes conditionally on the log this call
|
|
252
|
+
* read; a lost race re-runs, re-attributes, and rebases on the winner's
|
|
253
|
+
* head.
|
|
254
|
+
*
|
|
255
|
+
* @param options {object}
|
|
256
|
+
* @param options.store {UnlockLogStore} the credential's delegated
|
|
257
|
+
* `did.jsonl` bridge store
|
|
258
|
+
* @param options.ladderSeed {Uint8Array} the credential's ladder seed
|
|
259
|
+
* @param [options.expectedDid] {string} the account DID the log must resolve
|
|
260
|
+
* to, from the caller's stored account pointer
|
|
261
|
+
* @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog, installed: boolean }>}
|
|
262
|
+
* the account DID and the document and log as the install entry leaves them
|
|
263
|
+
* (unchanged on the idempotent no-op path); `installed` says whether the
|
|
264
|
+
* entry ran on this call
|
|
265
|
+
*/
|
|
266
|
+
export declare function installLadderVmWebvh(options: {
|
|
267
|
+
store: UnlockLogStore;
|
|
268
|
+
ladderSeed: Uint8Array;
|
|
269
|
+
expectedDid?: string;
|
|
270
|
+
}): Promise<{
|
|
271
|
+
did: string;
|
|
272
|
+
doc: DIDDoc;
|
|
273
|
+
log: DIDLog;
|
|
274
|
+
installed: boolean;
|
|
275
|
+
}>;
|
|
276
|
+
//# sourceMappingURL=ladderAnchored.d.ts.map
|
|
@@ -0,0 +1 @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