@interop/wallet-core 0.49.0 → 0.50.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 +118 -0
- package/dist/clientAnnex/credentialAnchoredGenesis.d.ts.map +1 -0
- package/dist/clientAnnex/credentialAnchoredGenesis.js +174 -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 +267 -0
- package/dist/clientAnnex/forgetLast.d.ts.map +1 -0
- package/dist/clientAnnex/forgetLast.js +374 -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/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 +40 -34
- 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,60 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2026 Interop Alliance. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* The `@interop/wallet-core/clientAnnex` subpath: the client annex -- the
|
|
6
|
+
* authoring and maintenance surface of everything anchored on a standing
|
|
7
|
+
* credential's ladder rather than on an enrolled durable client. One boundary
|
|
8
|
+
* rule holds throughout: this subpath imports from the base subpaths;
|
|
9
|
+
* nothing in the base imports from it (enforced in the lint pass, with one
|
|
10
|
+
* pinned exception -- `unlock/standingWebvh.ts` uses the shared ladder
|
|
11
|
+
* attribution helpers here, never the annex log machinery). The verify-side
|
|
12
|
+
* halves every wallet needs regardless of posture stay in the base: the
|
|
13
|
+
* resource-log ladder-append license and `ControllerPosture` ladder-key
|
|
14
|
+
* computation (`resourceLog`), `ladderVmIds` recognition (`webvh`), the
|
|
15
|
+
* unlock-record codec with its `ladder` and `delegatedClients` members
|
|
16
|
+
* (`unlock`), the standing-zcap staleness policy and the generalized log
|
|
17
|
+
* store seams (`webvh`), and the `GenerationCollect` activity builder
|
|
18
|
+
* (`space`).
|
|
19
|
+
*
|
|
20
|
+
* - The ladder (`ladder.ts`): rung and ladder-VM derivation from the record's
|
|
21
|
+
* random seed, and the shared attribution walks (`attributeLadderRung`,
|
|
22
|
+
* `attributeLadderPosture`) that recover the ladder's state from the
|
|
23
|
+
* published log itself.
|
|
24
|
+
* - The annex log (`log.ts`) and its GC (`gc.ts`): the disposable sidecar
|
|
25
|
+
* did:webvh of GC'd generations holding transient per-visit verification
|
|
26
|
+
* methods, the generation delegation, the account document's
|
|
27
|
+
* `#DelegatedClients` pointer, and the quarterly swap-and-collect.
|
|
28
|
+
* - ZCap signing as the ladder VM (`zcap.ts`): `ladderVmZcapClient` and the
|
|
29
|
+
* bootstrap `ladderVmAgent`.
|
|
30
|
+
* - The ladder-anchored account-log ceremonies (`ladderAnchored.ts`):
|
|
31
|
+
* ladder-anchored genesis, the self-enrolling continuation, the one-entry
|
|
32
|
+
* forget -- plus the composed flows around them (`selfEnroll.ts`,
|
|
33
|
+
* `forget.ts`), the credential-anchored account genesis
|
|
34
|
+
* (`credentialAnchoredGenesis.ts`), and the transient-recovery
|
|
35
|
+
* continuation (`recoveryLadderAnchored.ts`).
|
|
36
|
+
*
|
|
37
|
+
* The subsystem's decision records are the subpath's reading list:
|
|
38
|
+
* `decisions/0002` (annex log update authority is static rung 0),
|
|
39
|
+
* `decisions/0003` (generation identity and the ladder HKDF label family),
|
|
40
|
+
* `decisions/0005` (the `delegatedClients` sealed record member),
|
|
41
|
+
* `decisions/0006` (generation GC observables and the `GenerationCollect`
|
|
42
|
+
* digest), and `decisions/0007` (the reveal entry's hash order).
|
|
43
|
+
*/
|
|
44
|
+
export { attributeLadderPosture, attributeLadderRung, clientAnnexRung, clientAnnexRungSeed, generateLadderSeed, LADDER_MAX_SCAN, LadderAttributionError, ladderRung, ladderRungSeed, ladderVmKeyMultibase, ladderVmSeed } from './ladder.js';
|
|
45
|
+
export { assertGenerationId, clampGrantExpires, CLIENT_ANNEX_SPACE_TYPE, clientAnnexDidParts, clientAnnexLogPinId, clientAnnexLogStore, ClientAnnexRungUncommittedError, commitClientAnnexRung, createClientAnnexLog, DELEGATED_CLIENTS_DELEGATION_ACTIONS, DELEGATED_CLIENTS_DELEGATION_TTL_MS, DELEGATED_CLIENTS_SERVICE_TYPE, delegatedClientsDelegationMinter, delegatedClientsDelegationSpaceId, delegatedClientsPointer, delegatedClientsServiceEntry, 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, retireClientAnnexRung, revokeTreatingAlreadyRevokedAsSuccess, servicesPointedAtClientAnnex, setDelegatedClientsPointer } from './log.js';
|
|
46
|
+
export { clientAnnexGcDue, delegatedClientsPointerEstablishedAt, GENERATION_GC_PERIOD_MS, GENERATION_QUIET_BOUND_MS, GENERATION_QUIET_GRACE_MS, generationQuiet, runClientAnnexGc, swapClientAnnexGeneration } from './gc.js';
|
|
47
|
+
export { ladderVmAgent, ladderVmZcapClient } from './zcap.js';
|
|
48
|
+
export { createLadderAnchoredAccountLog, ensureLadderAnchoredDidWebvh, forgetLastWebvhClient, forgetWebvhClient, installLadderVmWebvh, LastDurableClientForgetError, selfEnrollWebvhClient } from './ladderAnchored.js';
|
|
49
|
+
export { selfEnrollClientCore } from './selfEnroll.js';
|
|
50
|
+
export { forgetDurableClient } from './forget.js';
|
|
51
|
+
export { forgetLastDurableClient } from './forgetLast.js';
|
|
52
|
+
export { ensureCredentialAnchoredAccountGenesis, mintCredentialAnchoredAccountKeySet } from './credentialAnchoredGenesis.js';
|
|
53
|
+
export { recoverWebvhLadderAnchored } from './recoveryLadderAnchored.js';
|
|
54
|
+
// The ladder VM's pure document builder and the ladder-anchored genesis log
|
|
55
|
+
// assembly stay defined in `webvh/didWebvh.ts` (the genesis document
|
|
56
|
+
// builder's two-armed clientKeys XOR ladderVm signature is base API, and the
|
|
57
|
+
// ladder arm calls `ladderVerificationMethod` internally), but this subpath
|
|
58
|
+
// is their public home.
|
|
59
|
+
export { createLadderAnchoredWebvhLog, ladderVerificationMethod } from '../webvh/didWebvh.js';
|
|
60
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/clientAnnex/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;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,MAAM,aAAa,CAAA;AAGjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA;AAOzD,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,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* The byte length of a ladder seed: 32 random bytes, minted at bind time and
|
|
3
|
-
* carried only inside the unlock record's sealed ladder member.
|
|
4
|
-
*/
|
|
5
|
-
export declare const LADDER_SEED_BYTES = 32;
|
|
1
|
+
import type { DIDLog } from '@interop/did-method-webvh';
|
|
6
2
|
/**
|
|
7
3
|
* How many rungs {@link attributeLadderRung} derives before concluding the
|
|
8
4
|
* log commits none of them. Generous: one rung is consumed per
|
|
@@ -65,7 +61,7 @@ export declare function ladderRung({ ladderSeed, index }: {
|
|
|
65
61
|
* published verbatim in the account document (the seed is random, so the
|
|
66
62
|
* hash-commitment rule permits it) and stable across rung spends, so a
|
|
67
63
|
* delegation it signed survives every ladder advance. It carries the
|
|
68
|
-
*
|
|
64
|
+
* ladder-anchored window's document-visible authority (`assertionMethod` and
|
|
69
65
|
* `capabilityDelegation`), while update authority stays on the rungs -- the
|
|
70
66
|
* two roles never share a key.
|
|
71
67
|
*
|
|
@@ -94,17 +90,17 @@ export declare function ladderVmKeyMultibase({ ladderSeed }: {
|
|
|
94
90
|
ladderSeed: Uint8Array;
|
|
95
91
|
}): Promise<string>;
|
|
96
92
|
/**
|
|
97
|
-
* Derives the 32-byte update-key seed of
|
|
98
|
-
* the credential's STATIC update key on that generation's
|
|
93
|
+
* Derives the 32-byte update-key seed of an annex generation's rung 0 --
|
|
94
|
+
* the credential's STATIC update key on that generation's annex log. The
|
|
99
95
|
* sequence is domain-separated per generation by the generation id
|
|
100
96
|
* (`<generationId>/rung/0` under the one {@link LADDER_SALT}): one shared
|
|
101
97
|
* sequence
|
|
102
|
-
* would hand the storage host, a legitimate reader of the private
|
|
98
|
+
* would hand the storage host, a legitimate reader of the private annex,
|
|
103
99
|
* a revealed key matching the ACCOUNT log's standing commitment, and a fresh
|
|
104
100
|
* per-generation sequence is what makes GC replacement self-healing (no rung
|
|
105
101
|
* index survives the deleted log, and none is needed).
|
|
106
102
|
*
|
|
107
|
-
* The generation id is trusted here rather than re-validated -- the
|
|
103
|
+
* The generation id is trusted here rather than re-validated -- the annex
|
|
108
104
|
* ceremonies assert the `gen-<random>` shape (`assertGenerationId`)
|
|
109
105
|
* before any derivation, and the label families stay disjoint for any
|
|
110
106
|
* generation id regardless (an account-rung label carries exactly one
|
|
@@ -115,22 +111,22 @@ export declare function ladderVmKeyMultibase({ ladderSeed }: {
|
|
|
115
111
|
* @param options.generationId {string} the generation collection's name
|
|
116
112
|
* @returns {Uint8Array}
|
|
117
113
|
*/
|
|
118
|
-
export declare function
|
|
114
|
+
export declare function clientAnnexRungSeed({ ladderSeed, generationId }: {
|
|
119
115
|
ladderSeed: Uint8Array;
|
|
120
116
|
generationId: string;
|
|
121
117
|
}): Uint8Array;
|
|
122
118
|
/**
|
|
123
|
-
* Derives
|
|
124
|
-
* Deliberately index-free -- the
|
|
119
|
+
* Derives an annex generation's rung 0 in full: seed and public multibase.
|
|
120
|
+
* Deliberately index-free -- the annex chain has length one, so there is
|
|
125
121
|
* no rung to advance to and no attribution scan to run (see
|
|
126
|
-
* {@link
|
|
122
|
+
* {@link clientAnnexRungSeed}).
|
|
127
123
|
*
|
|
128
124
|
* @param options {object}
|
|
129
125
|
* @param options.ladderSeed {Uint8Array}
|
|
130
126
|
* @param options.generationId {string} the generation collection's name
|
|
131
127
|
* @returns {Promise<{ seed: Uint8Array, keyMultibase: string }>}
|
|
132
128
|
*/
|
|
133
|
-
export declare function
|
|
129
|
+
export declare function clientAnnexRung({ ladderSeed, generationId }: {
|
|
134
130
|
ladderSeed: Uint8Array;
|
|
135
131
|
generationId: string;
|
|
136
132
|
}): Promise<{
|
|
@@ -175,4 +171,82 @@ export declare function attributeLadderRung({ ladderSeed, published, maxScan }:
|
|
|
175
171
|
rung: LadderRung;
|
|
176
172
|
state: LadderRungState;
|
|
177
173
|
}>;
|
|
174
|
+
/**
|
|
175
|
+
* Everything of one ladder that currently stands in the published log's
|
|
176
|
+
* parameters: the revealed rung keys still authorized in `updateKeys` and the
|
|
177
|
+
* committed hashes the ladder accounts for in `nextKeyHashes` -- including,
|
|
178
|
+
* for a torn self-enrollment, the hashes the reveal entry committed under the
|
|
179
|
+
* rung's authority for a client that was never published (its update- and
|
|
180
|
+
* staged-key hashes), which are as much a latent re-seizure credential as the
|
|
181
|
+
* rung's own commitment.
|
|
182
|
+
*/
|
|
183
|
+
export interface LadderStandingPosture {
|
|
184
|
+
revealedKeys: string[];
|
|
185
|
+
committedHashes: string[];
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Attributes a ladder's FULL standing posture from the log -- the retirement
|
|
189
|
+
* counterpart of {@link attributeLadderRung}, which recovers only the single
|
|
190
|
+
* current rung. Retiring a credential must strike every standing artifact its
|
|
191
|
+
* ladder accounts for, so this walks the log's effective parameters forward
|
|
192
|
+
* from an anchor (the recorded bind-time rung, however stale) and tracks the
|
|
193
|
+
* ladder's footprint entry by entry:
|
|
194
|
+
*
|
|
195
|
+
* - a newly authorized key whose hash was a known ladder commitment is a rung
|
|
196
|
+
* REVEAL; the hashes that entry newly commits are claimed by the ladder,
|
|
197
|
+
* as are those of any later entry the ladder itself signed, since the
|
|
198
|
+
* rung's authority stood behind them. Hashes an entry signed by some other
|
|
199
|
+
* key commits stay OUT, even while the rung sits in `updateKeys`: a rung
|
|
200
|
+
* stands revealed indefinitely after a forget (and after a torn
|
|
201
|
+
* self-enrollment), and the account's enrolled clients go on extending the
|
|
202
|
+
* log the whole time;
|
|
203
|
+
* - the entry that retires the revealed rung while authorizing a key whose
|
|
204
|
+
* hash sits among those claims is the enrollment's COMPLETION: the new
|
|
205
|
+
* client's update-key hash and the claim committed immediately after it
|
|
206
|
+
* (its staged hash -- a reveal-and-commit entry appends the credential's
|
|
207
|
+
* own next commitment LAST among its newly committed hashes, the ordering
|
|
208
|
+
* convention in `decisions/0007-ladder-reveal-hash-order.md`) transfer to
|
|
209
|
+
* the client and stop being ladder-owned. What the completion did not
|
|
210
|
+
* transfer stays ladder-owned only where the ladder can say so POSITIVELY:
|
|
211
|
+
* the hash derives from the ladder's own seed (or is the recorded key's),
|
|
212
|
+
* or the credential itself survives the completing entry, which is what
|
|
213
|
+
* makes the residue its next standing commitment. A SPEND -- the recovery
|
|
214
|
+
* continuation, whose one entry retires the code's own posture and
|
|
215
|
+
* publishes its successor's -- leaves the replacement credential's
|
|
216
|
+
* commitment in that position instead, and striking that would leave the
|
|
217
|
+
* replacement unusable and unhealable;
|
|
218
|
+
* - a claim or revealed key that later leaves the parameters without a
|
|
219
|
+
* completion was struck by some other edit and simply stops standing.
|
|
220
|
+
*
|
|
221
|
+
* With the ladder seed in hand (`ladderSeed`), every rung's key and hash are
|
|
222
|
+
* additionally known a priori, so the attribution does not depend on the
|
|
223
|
+
* anchor being current; without it, the walk is anchored on
|
|
224
|
+
* `anchorKeyMultibase` and on `credentialVmId` alone, and a residue neither
|
|
225
|
+
* can attribute is released -- the retirement then strikes what the recorded
|
|
226
|
+
* posture names and nothing more. More than one ladder reveal standing or
|
|
227
|
+
* arriving at once matches no legitimate history and fails closed
|
|
228
|
+
* ({@link LadderAttributionError}).
|
|
229
|
+
*
|
|
230
|
+
* @param options {object}
|
|
231
|
+
* @param options.log {DIDLog} a resolved, caller-verified log
|
|
232
|
+
* @param options.anchorKeyMultibase {string} the credential's recorded
|
|
233
|
+
* update-key multibase (bind-time rung 0, or a refreshed later rung)
|
|
234
|
+
* @param [options.ladderSeed] {Uint8Array} the credential's ladder seed,
|
|
235
|
+
* when the caller holds it
|
|
236
|
+
* @param [options.credentialVmId] {string} the credential's own
|
|
237
|
+
* `keyAgreement` verification-method id, which tells a climb (the
|
|
238
|
+
* credential stands afterwards) from a spend (its posture goes in the same
|
|
239
|
+
* entry)
|
|
240
|
+
* @param [options.maxScan] {number} seeded pre-derivation bound; defaults to
|
|
241
|
+
* {@link LADDER_MAX_SCAN}
|
|
242
|
+
* @returns {Promise<LadderStandingPosture>} what currently stands; both
|
|
243
|
+
* arrays empty when the log carries nothing of the ladder any more
|
|
244
|
+
*/
|
|
245
|
+
export declare function attributeLadderPosture({ log, anchorKeyMultibase, ladderSeed, credentialVmId, maxScan }: {
|
|
246
|
+
log: DIDLog;
|
|
247
|
+
anchorKeyMultibase: string;
|
|
248
|
+
ladderSeed?: Uint8Array;
|
|
249
|
+
credentialVmId?: string;
|
|
250
|
+
maxScan?: number;
|
|
251
|
+
}): Promise<LadderStandingPosture>;
|
|
178
252
|
//# sourceMappingURL=ladder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ladder.d.ts","sourceRoot":"","sources":["../../src/clientAnnex/ladder.ts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,MAAM,EAAe,MAAM,2BAA2B,CAAA;AAwCpE;;;;;GAKG;AACH,eAAO,MAAM,eAAe,MAAM,CAAA;AAElC;;;;;;GAMG;AACH,qBAAa,sBAAuB,SAAQ,KAAK;gBACnC,OAAO,EAAE,MAAM;CAI5B;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,UAAU,CAE/C;AA6BD;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,UAAU,CAAA;IAChB,YAAY,EAAE,MAAM,CAAA;CACrB;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,EAC7B,UAAU,EACV,KAAK,EACN,EAAE;IACD,UAAU,EAAE,UAAU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