@interop/wallet-core 0.48.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.
Files changed (163) hide show
  1. package/README.md +5 -2
  2. package/dist/clientAnnex/credentialAnchoredGenesis.d.ts +118 -0
  3. package/dist/clientAnnex/credentialAnchoredGenesis.d.ts.map +1 -0
  4. package/dist/clientAnnex/credentialAnchoredGenesis.js +174 -0
  5. package/dist/clientAnnex/credentialAnchoredGenesis.js.map +1 -0
  6. package/dist/clientAnnex/forget.d.ts +138 -0
  7. package/dist/clientAnnex/forget.d.ts.map +1 -0
  8. package/dist/clientAnnex/forget.js +133 -0
  9. package/dist/clientAnnex/forget.js.map +1 -0
  10. package/dist/clientAnnex/forgetLast.d.ts +267 -0
  11. package/dist/clientAnnex/forgetLast.d.ts.map +1 -0
  12. package/dist/clientAnnex/forgetLast.js +374 -0
  13. package/dist/clientAnnex/forgetLast.js.map +1 -0
  14. package/dist/clientAnnex/gc.d.ts +255 -0
  15. package/dist/clientAnnex/gc.d.ts.map +1 -0
  16. package/dist/clientAnnex/gc.js +445 -0
  17. package/dist/clientAnnex/gc.js.map +1 -0
  18. package/dist/clientAnnex/index.d.ts +60 -0
  19. package/dist/clientAnnex/index.d.ts.map +1 -0
  20. package/dist/clientAnnex/index.js +60 -0
  21. package/dist/clientAnnex/index.js.map +1 -0
  22. package/dist/{unlock → clientAnnex}/ladder.d.ts +99 -23
  23. package/dist/clientAnnex/ladder.d.ts.map +1 -0
  24. package/dist/clientAnnex/ladder.js +474 -0
  25. package/dist/clientAnnex/ladder.js.map +1 -0
  26. package/dist/clientAnnex/ladderAnchored.d.ts +276 -0
  27. package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -0
  28. package/dist/clientAnnex/ladderAnchored.js +631 -0
  29. package/dist/clientAnnex/ladderAnchored.js.map +1 -0
  30. package/dist/{webvh/companion.d.ts → clientAnnex/log.d.ts} +373 -152
  31. package/dist/clientAnnex/log.d.ts.map +1 -0
  32. package/dist/{webvh/companion.js → clientAnnex/log.js} +654 -261
  33. package/dist/clientAnnex/log.js.map +1 -0
  34. package/dist/clientAnnex/recoveryLadderAnchored.d.ts +103 -0
  35. package/dist/clientAnnex/recoveryLadderAnchored.d.ts.map +1 -0
  36. package/dist/clientAnnex/recoveryLadderAnchored.js +263 -0
  37. package/dist/clientAnnex/recoveryLadderAnchored.js.map +1 -0
  38. package/dist/{unlock → clientAnnex}/selfEnroll.d.ts +1 -1
  39. package/dist/clientAnnex/selfEnroll.d.ts.map +1 -0
  40. package/dist/{unlock → clientAnnex}/selfEnroll.js +1 -1
  41. package/dist/clientAnnex/selfEnroll.js.map +1 -0
  42. package/dist/clientAnnex/zcap.d.ts +49 -0
  43. package/dist/clientAnnex/zcap.d.ts.map +1 -0
  44. package/dist/clientAnnex/zcap.js +101 -0
  45. package/dist/clientAnnex/zcap.js.map +1 -0
  46. package/dist/clients/index.d.ts +9 -6
  47. package/dist/clients/index.d.ts.map +1 -1
  48. package/dist/clients/index.js +8 -5
  49. package/dist/clients/index.js.map +1 -1
  50. package/dist/clients/listing.d.ts +32 -0
  51. package/dist/clients/listing.d.ts.map +1 -1
  52. package/dist/clients/listing.js +47 -1
  53. package/dist/clients/listing.js.map +1 -1
  54. package/dist/clients/revocation.d.ts +33 -1
  55. package/dist/clients/revocation.d.ts.map +1 -1
  56. package/dist/clients/revocation.js +16 -4
  57. package/dist/clients/revocation.js.map +1 -1
  58. package/dist/enrollment/index.d.ts +6 -4
  59. package/dist/enrollment/index.d.ts.map +1 -1
  60. package/dist/enrollment/index.js +6 -4
  61. package/dist/enrollment/index.js.map +1 -1
  62. package/dist/enrollment/onboardingInvite.d.ts +5 -88
  63. package/dist/enrollment/onboardingInvite.d.ts.map +1 -1
  64. package/dist/enrollment/onboardingInvite.js +5 -168
  65. package/dist/enrollment/onboardingInvite.js.map +1 -1
  66. package/dist/genesis/index.d.ts +5 -0
  67. package/dist/genesis/index.d.ts.map +1 -1
  68. package/dist/genesis/index.js +5 -0
  69. package/dist/genesis/index.js.map +1 -1
  70. package/dist/keys/index.d.ts +1 -1
  71. package/dist/keys/index.d.ts.map +1 -1
  72. package/dist/keys/index.js +1 -1
  73. package/dist/keys/index.js.map +1 -1
  74. package/dist/keys/spaceEpochs.d.ts +7 -2
  75. package/dist/keys/spaceEpochs.d.ts.map +1 -1
  76. package/dist/keys/spaceEpochs.js +8 -2
  77. package/dist/keys/spaceEpochs.js.map +1 -1
  78. package/dist/keys/userKeyRoster.d.ts +39 -0
  79. package/dist/keys/userKeyRoster.d.ts.map +1 -1
  80. package/dist/keys/userKeyRoster.js +43 -1
  81. package/dist/keys/userKeyRoster.js.map +1 -1
  82. package/dist/recovery/index.d.ts +5 -3
  83. package/dist/recovery/index.d.ts.map +1 -1
  84. package/dist/recovery/index.js +4 -2
  85. package/dist/recovery/index.js.map +1 -1
  86. package/dist/recovery/recoveryDelegation.d.ts +35 -12
  87. package/dist/recovery/recoveryDelegation.d.ts.map +1 -1
  88. package/dist/recovery/recoveryDelegation.js +84 -86
  89. package/dist/recovery/recoveryDelegation.js.map +1 -1
  90. package/dist/recovery/recoveryWebvh.d.ts +32 -1
  91. package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
  92. package/dist/recovery/recoveryWebvh.js +2 -2
  93. package/dist/recovery/recoveryWebvh.js.map +1 -1
  94. package/dist/request/capabilityRequest.d.ts +33 -0
  95. package/dist/request/capabilityRequest.d.ts.map +1 -0
  96. package/dist/request/capabilityRequest.js +35 -0
  97. package/dist/request/capabilityRequest.js.map +1 -0
  98. package/dist/request/ephemeralExchange.d.ts +118 -0
  99. package/dist/request/ephemeralExchange.d.ts.map +1 -0
  100. package/dist/request/ephemeralExchange.js +224 -0
  101. package/dist/request/ephemeralExchange.js.map +1 -0
  102. package/dist/request/index.d.ts +6 -0
  103. package/dist/request/index.d.ts.map +1 -1
  104. package/dist/request/index.js +6 -0
  105. package/dist/request/index.js.map +1 -1
  106. package/dist/space/activity.d.ts +38 -0
  107. package/dist/space/activity.d.ts.map +1 -1
  108. package/dist/space/activity.js +41 -1
  109. package/dist/space/activity.js.map +1 -1
  110. package/dist/space/index.d.ts +1 -1
  111. package/dist/space/index.d.ts.map +1 -1
  112. package/dist/space/index.js +1 -1
  113. package/dist/space/index.js.map +1 -1
  114. package/dist/unlock/index.d.ts +11 -23
  115. package/dist/unlock/index.d.ts.map +1 -1
  116. package/dist/unlock/index.js +10 -21
  117. package/dist/unlock/index.js.map +1 -1
  118. package/dist/unlock/retire.d.ts +47 -3
  119. package/dist/unlock/retire.d.ts.map +1 -1
  120. package/dist/unlock/retire.js +21 -5
  121. package/dist/unlock/retire.js.map +1 -1
  122. package/dist/unlock/standingWebvh.d.ts +37 -82
  123. package/dist/unlock/standingWebvh.d.ts.map +1 -1
  124. package/dist/unlock/standingWebvh.js +64 -247
  125. package/dist/unlock/standingWebvh.js.map +1 -1
  126. package/dist/unlock/unlockRecord.d.ts +13 -6
  127. package/dist/unlock/unlockRecord.d.ts.map +1 -1
  128. package/dist/unlock/unlockRecord.js +14 -8
  129. package/dist/unlock/unlockRecord.js.map +1 -1
  130. package/dist/webvh/delegatedLogStore.d.ts +5 -5
  131. package/dist/webvh/delegatedLogStore.js +1 -1
  132. package/dist/webvh/didWebvh.d.ts +20 -10
  133. package/dist/webvh/didWebvh.d.ts.map +1 -1
  134. package/dist/webvh/didWebvh.js +17 -17
  135. package/dist/webvh/didWebvh.js.map +1 -1
  136. package/dist/webvh/index.d.ts +9 -23
  137. package/dist/webvh/index.d.ts.map +1 -1
  138. package/dist/webvh/index.js +9 -22
  139. package/dist/webvh/index.js.map +1 -1
  140. package/dist/webvh/revokeClient.d.ts +77 -5
  141. package/dist/webvh/revokeClient.d.ts.map +1 -1
  142. package/dist/webvh/revokeClient.js +154 -61
  143. package/dist/webvh/revokeClient.js.map +1 -1
  144. package/dist/webvh/standingZcap.d.ts +11 -1
  145. package/dist/webvh/standingZcap.d.ts.map +1 -1
  146. package/dist/webvh/standingZcap.js +13 -14
  147. package/dist/webvh/standingZcap.js.map +1 -1
  148. package/dist/webvh/wasIdStore.d.ts +13 -7
  149. package/dist/webvh/wasIdStore.d.ts.map +1 -1
  150. package/dist/webvh/wasIdStore.js +8 -4
  151. package/dist/webvh/wasIdStore.js.map +1 -1
  152. package/dist/webvh/zcap.d.ts +0 -24
  153. package/dist/webvh/zcap.d.ts.map +1 -1
  154. package/dist/webvh/zcap.js +0 -42
  155. package/dist/webvh/zcap.js.map +1 -1
  156. package/package.json +40 -34
  157. package/dist/unlock/ladder.d.ts.map +0 -1
  158. package/dist/unlock/ladder.js +0 -254
  159. package/dist/unlock/ladder.js.map +0 -1
  160. package/dist/unlock/selfEnroll.d.ts.map +0 -1
  161. package/dist/unlock/selfEnroll.js.map +0 -1
  162. package/dist/webvh/companion.d.ts.map +0 -1
  163. package/dist/webvh/companion.js.map +0 -1
@@ -1,61 +1,62 @@
1
1
  import type { DIDDoc, DIDLog, ServiceEndpoint, Signer } from '@interop/did-method-webvh';
2
2
  import type { IZcap } from '@interop/data-integrity-core';
3
3
  import type { ZcapClient } from '@interop/ezcap';
4
- import type { WasClient } from '@interop/was-client';
4
+ import type { IDelegatedZcap, WasClient } from '@interop/was-client';
5
5
  import type { ResourceLogPinStore } from '../resourceLog/pin.js';
6
- import type { ClientWebvhUpdateKeys, WebvhIdStore } from './didWebvh.js';
7
- import type { WebvhLogResourceStore } from './wasIdStore.js';
6
+ import type { ClientWebvhUpdateKeys, WebvhIdStore } from '../webvh/didWebvh.js';
7
+ import type { PublishedKeyDocument } from '../webvh/listClients.js';
8
+ import type { WebvhLogResourceStore } from '../webvh/wasIdStore.js';
8
9
  /**
9
- * The Space Description `type` array of the auxiliary companion Space, set at
10
+ * The Space Description `type` array of the auxiliary annex Space, set at
10
11
  * creation (the server treats a Space's `type` as immutable afterwards).
11
12
  * Wire-level and permanent: the server's inspector clause recognizes the
12
13
  * `DelegatedClientsSpace` member, and user-data surfaces exclude auxiliary
13
14
  * Spaces by it.
14
15
  */
15
- export declare const COMPANION_SPACE_TYPE: string[];
16
+ export declare const CLIENT_ANNEX_SPACE_TYPE: string[];
16
17
  /**
17
18
  * The literal prefix of every generation collection's name. Wire-level and
18
19
  * permanent: orphan discovery is a plain prefix match over the auxiliary
19
- * Space's collection listing, and the segment embeds in every companion DID
20
- * string ever published.
20
+ * Space's collection listing, and the generation id embeds in every annex
21
+ * DID string ever published.
21
22
  */
22
- export declare const GENERATION_SEGMENT_PREFIX = "gen-";
23
+ export declare const GENERATION_ID_PREFIX = "gen-";
23
24
  /**
24
- * Mints a fresh generation segment -- the generation collection's name, e.g.
25
+ * Mints a fresh generation id -- the generation collection's name, e.g.
25
26
  * `gen-Ux3v0kQf9aPmB2hZ`. Random rather than a counter on purpose: never-reuse
26
27
  * is structural (nothing durable survives GC to carry a counter), at the same
27
28
  * probabilistic order as every other random-id convention in the system.
28
29
  *
29
30
  * @returns {string}
30
31
  */
31
- export declare function mintGenerationSegment(): string;
32
+ export declare function mintGenerationId(): string;
32
33
  /**
33
- * Refuses anything that is not a well-formed generation segment. Run by every
34
- * companion builder that takes a segment, so a malformed one is refused
34
+ * Refuses anything that is not a well-formed generation id. Run by every
35
+ * annex builder that takes a generation id, so a malformed one is refused
35
36
  * before it can reach a DID string, an HKDF label, or a collection id.
36
37
  *
37
- * @param segment {string}
38
+ * @param generationId {string}
38
39
  */
39
- export declare function assertGenerationSegment(segment: string): void;
40
+ export declare function assertGenerationId(generationId: string): void;
40
41
  /**
41
- * The pin-slot key for one companion generation's log -- host-free like every
42
- * pin-slot key, keyed by the auxiliary Space id and the generation segment.
42
+ * The pin-slot key for one annex generation's log -- host-free like every
43
+ * pin-slot key, keyed by the auxiliary Space id and the generation id.
43
44
  * A transient session keeps this slot in an in-memory pin store (a durable
44
45
  * pin is the wrong lifetime for a disposable log, and a transient session
45
46
  * must not durably create the pin store on a read); a durable client's store
46
- * clears companion slots when the generation is collected.
47
+ * clears annex slots when the generation is collected.
47
48
  *
48
49
  * @param options {object}
49
- * @param options.spaceId {string} the auxiliary companion Space's id
50
- * @param options.segment {string} the generation collection's name
50
+ * @param options.spaceId {string} the auxiliary annex Space's id
51
+ * @param options.generationId {string} the generation collection's name
51
52
  * @returns {string}
52
53
  */
53
- export declare function companionLogPinId({ spaceId, segment }: {
54
+ export declare function clientAnnexLogPinId({ spaceId, generationId }: {
54
55
  spaceId: string;
55
- segment: string;
56
+ generationId: string;
56
57
  }): string;
57
58
  /**
58
- * The WAS-backed store a companion generation's ceremonies read and publish
59
+ * The WAS-backed store an annex generation's ceremonies read and publish
59
60
  * through with controller-tier signing (an enrolled client). A transient
60
61
  * session writes through the delegated store instead
61
62
  * (`delegatedWebvhLogStore`, invoking the credential's sibling delegation);
@@ -63,27 +64,31 @@ export declare function companionLogPinId({ spaceId, segment }: {
63
64
  *
64
65
  * @param options {object}
65
66
  * @param options.was {WasClient}
66
- * @param options.spaceId {string} the auxiliary companion Space's id
67
- * @param options.segment {string} the generation collection's name
67
+ * @param options.spaceId {string} the auxiliary annex Space's id
68
+ * @param options.generationId {string} the generation collection's name
69
+ * @param [options.capability] {IZcap} an invocation capability every request
70
+ * rides (the sibling delegation, where the caller is not an enrolled
71
+ * invoker); absent, requests invoke the root capability
68
72
  * @returns {WebvhLogResourceStore}
69
73
  */
70
- export declare function companionLogStore({ was, spaceId, segment }: {
74
+ export declare function clientAnnexLogStore({ was, spaceId, generationId, capability }: {
71
75
  was: WasClient;
72
76
  spaceId: string;
73
- segment: string;
77
+ generationId: string;
78
+ capability?: IZcap;
74
79
  }): WebvhLogResourceStore;
75
80
  /**
76
- * Creates the one-entry companion generation log. The genesis parameters are
77
- * the companion posture (see the module doc): prerotation on via the rung-0
81
+ * Creates the one-entry annex generation log. The genesis parameters are
82
+ * the annex posture (see the module doc): prerotation on via the rung-0
78
83
  * hash commitments, no witnesses, portability off (the library's default,
79
84
  * stated explicitly in the emitted entry), and a bare document -- id and the
80
85
  * DID core context, nothing else.
81
86
  *
82
87
  * The caller supplies the update authority: the minting credential's
83
- * companion rung-0 key as the sole `updateKeys` member, `nextKeyHashes` as
88
+ * annex rung-0 key as the sole `updateKeys` member, `nextKeyHashes` as
84
89
  * every standing credential's rung-0 hash (restated explicitly on every later
85
90
  * entry, never inherited), and rung 0's signer. The minting key's own
86
- * carry-over hash MUST be among the commitments -- every companion entry
91
+ * carry-over hash MUST be among the commitments -- every annex entry
87
92
  * re-states `updateKeys` containing the revealed rung-0 keys, and the
88
93
  * resolver checks the re-statement against the previous entry's commitments
89
94
  * -- so a `nextKeyHashes` that omits it is refused here rather than
@@ -91,19 +96,19 @@ export declare function companionLogStore({ was, spaceId, segment }: {
91
96
  *
92
97
  * @param options {object}
93
98
  * @param options.wasServerUrl {string}
94
- * @param options.spaceId {string} the auxiliary companion Space's id
95
- * @param options.segment {string} the generation collection's name
99
+ * @param options.spaceId {string} the auxiliary annex Space's id
100
+ * @param options.generationId {string} the generation collection's name
96
101
  * @param options.updateKeyPublicKeyMultibase {string} the minting
97
- * credential's companion rung-0 key
102
+ * credential's annex rung-0 key
98
103
  * @param options.nextKeyHashes {string[]} every standing credential's
99
104
  * rung-0 hash, the minting credential's included
100
105
  * @param options.signer {Signer} the minting credential's rung-0 signer
101
106
  * @returns {Promise<{ log: DIDLog; did: string; doc: DIDDoc }>}
102
107
  */
103
- export declare function createCompanionLog({ wasServerUrl, spaceId, segment, updateKeyPublicKeyMultibase, nextKeyHashes, signer }: {
108
+ export declare function createClientAnnexLog({ wasServerUrl, spaceId, generationId, updateKeyPublicKeyMultibase, nextKeyHashes, signer }: {
104
109
  wasServerUrl: string;
105
110
  spaceId: string;
106
- segment: string;
111
+ generationId: string;
107
112
  updateKeyPublicKeyMultibase: string;
108
113
  nextKeyHashes: string[];
109
114
  signer: Signer;
@@ -113,8 +118,8 @@ export declare function createCompanionLog({ wasServerUrl, spaceId, segment, upd
113
118
  doc: DIDDoc;
114
119
  }>;
115
120
  /**
116
- * Ensures the auxiliary companion Space exists: created with the typed
117
- * Description ({@link COMPANION_SPACE_TYPE}) under the given controller when
121
+ * Ensures the auxiliary annex Space exists: created with the typed
122
+ * Description ({@link CLIENT_ANNEX_SPACE_TYPE}) under the given controller when
118
123
  * absent, verified when present. The `type` array must ride the create -- the
119
124
  * server accepts it at creation only and treats it as immutable afterwards --
120
125
  * which is also why an existing Space at this id that is NOT typed as the
@@ -130,26 +135,27 @@ export declare function createCompanionLog({ wasServerUrl, spaceId, segment, upd
130
135
  *
131
136
  * @param options {object}
132
137
  * @param options.was {WasClient}
133
- * @param options.spaceId {string} the auxiliary companion Space's id
138
+ * @param options.spaceId {string} the auxiliary annex Space's id
134
139
  * @param options.controller {string} the Space controller (the account
135
- * did:webvh where it exists; a bootstrap did:key on a client-less signup,
140
+ * did:webvh where it exists; a bootstrap did:key on a ladder-anchored signup,
136
141
  * promoted the same way the account Space's controller is)
137
142
  * @returns {Promise<void>}
138
143
  */
139
- export declare function ensureCompanionSpace({ was, spaceId, controller }: {
144
+ export declare function ensureClientAnnexSpace({ was, spaceId, controller }: {
140
145
  was: WasClient;
141
146
  spaceId: string;
142
147
  controller: string;
143
148
  }): Promise<void>;
144
149
  /**
145
- * Mints a fresh companion generation with controller-tier signing: ensures
146
- * the typed auxiliary Space, mints a fresh random segment, creates the
150
+ * Mints a fresh annex generation with controller-tier signing: ensures
151
+ * the typed auxiliary Space, mints a fresh random generation id, creates the
147
152
  * generation collection, and publishes the genesis `did.jsonl` as a
148
153
  * create-if-absent -- the same conditional-publish discipline as every log
149
- * write, though a fresh random segment makes a create collision negligible.
154
+ * write, though a fresh random generation id makes a create collision
155
+ * negligible.
150
156
  *
151
157
  * The account document's `#DelegatedClients` service entry is deliberately
152
- * NOT written here: the companion log publishes first, and the caller
158
+ * NOT written here: the annex log publishes first, and the caller
153
159
  * re-points the account document at the returned DID afterwards. A run torn
154
160
  * between the two leaves an unpointed generation -- authorization-inert (no
155
161
  * delegation names it), collected by the standing `gen-` prefix orphan
@@ -162,20 +168,20 @@ export declare function ensureCompanionSpace({ was, spaceId, controller }: {
162
168
  *
163
169
  * @param options {object}
164
170
  * @param options.was {WasClient} the storage client, signing as an enrolled
165
- * client (or the bootstrap controller on a client-less signup)
171
+ * client (or the bootstrap controller on a ladder-anchored signup)
166
172
  * @param options.wasServerUrl {string}
167
- * @param options.spaceId {string} the auxiliary companion Space's id
173
+ * @param options.spaceId {string} the auxiliary annex Space's id
168
174
  * @param options.controller {string} the auxiliary Space's controller, used
169
175
  * only when the Space does not exist yet
170
176
  * @param options.updateKeyPublicKeyMultibase {string} the minting
171
- * credential's companion rung-0 key
177
+ * credential's annex rung-0 key
172
178
  * @param options.nextKeyHashes {string[]} every standing credential's
173
179
  * rung-0 hash, the minting credential's included
174
180
  * @param options.signer {Signer} the minting credential's rung-0 signer
175
- * @returns {Promise<{ did: string; segment: string; log: DIDLog;
181
+ * @returns {Promise<{ did: string; generationId: string; log: DIDLog;
176
182
  * doc: DIDDoc }>}
177
183
  */
178
- export declare function mintCompanionGeneration({ was, wasServerUrl, spaceId, controller, updateKeyPublicKeyMultibase, nextKeyHashes, signer }: {
184
+ export declare function mintClientAnnexGeneration({ was, wasServerUrl, spaceId, controller, updateKeyPublicKeyMultibase, nextKeyHashes, signer }: {
179
185
  was: WasClient;
180
186
  wasServerUrl: string;
181
187
  spaceId: string;
@@ -185,76 +191,85 @@ export declare function mintCompanionGeneration({ was, wasServerUrl, spaceId, co
185
191
  signer: Signer;
186
192
  }): Promise<{
187
193
  did: string;
188
- segment: string;
194
+ generationId: string;
189
195
  log: DIDLog;
190
196
  doc: DIDDoc;
191
197
  }>;
192
198
  /**
193
- * Mints a fresh companion generation signed by a standing CREDENTIAL's
194
- * companion rung 0 -- the mint a ladder-seed holder runs (a credential-in-hand
195
- * login, or a test harness standing in for one). The segment must exist
199
+ * Mints a fresh annex generation signed by a standing CREDENTIAL's
200
+ * annex rung 0 -- the mint a ladder-seed holder runs (a credential-in-hand
201
+ * login, or a test harness standing in for one). The generation id must exist
196
202
  * before the update authority can: the rung-0 key derives from the ladder
197
- * seed AND the segment (`companionRung`), so this helper mints the segment
203
+ * seed AND the generation id (`clientAnnexRung`), so this helper mints the
204
+ * generation id
198
205
  * first, derives the rung, and states its own carry-over hash in
199
- * `nextKeyHashes` -- {@link mintCompanionGeneration}'s caller-supplied-key
206
+ * `nextKeyHashes` -- {@link mintClientAnnexGeneration}'s caller-supplied-key
200
207
  * shape cannot express that ordering. Everything else matches it: the typed
201
208
  * Space ensure, the collection create, the create-if-absent genesis publish,
202
209
  * and the pointer deliberately left to the caller.
203
210
  *
204
211
  * @param options {object}
205
212
  * @param options.was {WasClient} the storage client, signing as an enrolled
206
- * client (or the bootstrap controller on a client-less signup)
213
+ * client (or the bootstrap controller on a ladder-anchored signup)
207
214
  * @param options.wasServerUrl {string}
208
- * @param options.spaceId {string} the auxiliary companion Space's id
215
+ * @param options.spaceId {string} the auxiliary annex Space's id
209
216
  * @param options.controller {string} the auxiliary Space's controller, used
210
217
  * only when the Space does not exist yet
211
218
  * @param options.ladderSeed {Uint8Array} the minting credential's ladder
212
219
  * seed, from its unlock record
213
220
  * @param [options.extraNextKeyHashes] {string[]} the OTHER standing
214
- * credentials' rung-0 hashes for this segment, when the account has more
221
+ * credentials' rung-0 hashes for this generation id, when the account has
222
+ * more
215
223
  * than one; the minting credential's own carry-over hash is always included
216
- * @returns {Promise<{ did: string; segment: string; log: DIDLog;
224
+ * @param [options.capability] {IZcap} an invocation capability the mint
225
+ * rides -- the transient-recovery continuation minting its fresh generation
226
+ * through the credential's sibling delegation (the auxiliary Space's items
227
+ * subtree). The typed-Space ensure is then skipped: the delegation's target
228
+ * covers the collections beneath the Space, never the Space Description,
229
+ * and a standing sibling delegation presupposes the auxiliary Space
230
+ * @returns {Promise<{ did: string; generationId: string; log: DIDLog;
217
231
  * doc: DIDDoc }>}
218
232
  */
219
- export declare function mintCredentialCompanionGeneration({ was, wasServerUrl, spaceId, controller, ladderSeed, extraNextKeyHashes }: {
233
+ export declare function mintCredentialClientAnnexGeneration({ was, wasServerUrl, spaceId, controller, ladderSeed, extraNextKeyHashes, capability }: {
220
234
  was: WasClient;
221
235
  wasServerUrl: string;
222
236
  spaceId: string;
223
237
  controller: string;
224
238
  ladderSeed: Uint8Array;
225
239
  extraNextKeyHashes?: string[];
240
+ capability?: IZcap;
226
241
  }): Promise<{
227
242
  did: string;
228
- segment: string;
243
+ generationId: string;
229
244
  log: DIDLog;
230
245
  doc: DIDDoc;
231
246
  }>;
232
247
  /**
233
248
  * The type IRI of the account document's delegated-clients service entry --
234
- * the pointer at the current companion generation's DID. Wire-level and
249
+ * the pointer at the current annex generation's DID. Wire-level and
235
250
  * permanent: readers (this module's {@link delegatedClientsPointer}, the
236
- * server's companion-chain inspector clause) dispatch on this IRI, never on
251
+ * server's annex-chain inspector clause) dispatch on this IRI, never on
237
252
  * the entry's fragment id, which is non-semantic by convention.
238
253
  */
239
254
  export declare const DELEGATED_CLIENTS_SERVICE_TYPE = "https://w3id.org/byoe#DelegatedClients";
240
255
  /**
241
256
  * Builds a fresh delegated-clients service entry for the account document.
242
- * The `serviceEndpoint` is the companion DID STRING, deliberately not a URL:
257
+ * The `serviceEndpoint` is the annex DID STRING, deliberately not a URL:
243
258
  * the DID is self-certifying and host-independent, and the account pointer
244
259
  * already carries the host.
245
260
  *
246
261
  * @param options {object}
247
262
  * @param options.accountDid {string} the account did:webvh
248
- * @param options.companionDid {string} the current generation's companion
263
+ * @param options.clientAnnexDid {string} the current generation's annex
249
264
  * DID
250
265
  * @returns {ServiceEndpoint}
251
266
  */
252
- export declare function delegatedClientsServiceEntry({ accountDid, companionDid }: {
267
+ export declare function delegatedClientsServiceEntry({ accountDid, clientAnnexDid }: {
253
268
  accountDid: string;
254
- companionDid: string;
269
+ clientAnnexDid: string;
255
270
  }): ServiceEndpoint;
256
271
  /**
257
- * The companion DID the account document currently points at: the
272
+ * The annex DID the account document currently points at: the
258
273
  * `serviceEndpoint` of the service entry whose `type` names (or includes)
259
274
  * {@link DELEGATED_CLIENTS_SERVICE_TYPE}. Only a bare DID-string endpoint
260
275
  * counts -- the same predicate the server's inspector clause evaluates, so
@@ -267,9 +282,32 @@ export declare function delegatedClientsServiceEntry({ accountDid, companionDid
267
282
  export declare function delegatedClientsPointer({ doc }: {
268
283
  doc: DIDDoc;
269
284
  }): string | undefined;
285
+ /**
286
+ * The account document's `service` array with the delegated-clients pointer
287
+ * set to `clientAnnexDid`. An existing pointer entry is re-pointed in place,
288
+ * its fragment id preserved verbatim (the id is non-semantic and stable);
289
+ * absent one, a fresh entry is appended. Every other service entry is carried
290
+ * through untouched.
291
+ *
292
+ * Shared by the two writers of the pointer: the standalone
293
+ * {@link setDelegatedClientsPointer} entry, and the transient-recovery
294
+ * continuation, which folds the pointer into its own add-and-retire entry so
295
+ * the pointer can never lag the entry that retires the standing ladder VMs.
296
+ *
297
+ * @param options {object}
298
+ * @param options.doc {DIDDoc} the current account document
299
+ * @param options.accountDid {string} the account did:webvh
300
+ * @param options.clientAnnexDid {string} the generation to point at
301
+ * @returns {ServiceEndpoint[]}
302
+ */
303
+ export declare function servicesPointedAtClientAnnex({ doc, accountDid, clientAnnexDid }: {
304
+ doc: DIDDoc;
305
+ accountDid: string;
306
+ clientAnnexDid: string;
307
+ }): ServiceEndpoint[];
270
308
  /**
271
309
  * The unlock-record sibling delegation's `allowedAction` set: GET beside PUT,
272
- * so an enrolling transient client can read the companion head it appends to.
310
+ * so an enrolling transient client can read the annex head it appends to.
273
311
  * Wire-level and permanent (wallet-core decision 0005): the server's
274
312
  * inspector clause admits a delegated-clients delegation with `allowedAction`
275
313
  * a subset of exactly this pair.
@@ -283,16 +321,17 @@ export declare const DELEGATED_CLIENTS_DELEGATION_ACTIONS: string[];
283
321
  */
284
322
  export declare const DELEGATED_CLIENTS_DELEGATION_TTL_MS: number;
285
323
  /**
286
- * Mints one delegated-clients (companion-Space) delegation: the pre-minted
324
+ * Mints one delegated-clients (annex Space) delegation: the pre-minted
287
325
  * zcap sealed into a standing credential's unlock record beside the account
288
- * bridge, which is what lets a transient login reach the companion log with
326
+ * bridge, which is what lets a transient login reach the annex log with
289
327
  * nothing but the credential. The shape is a permanent wire artifact
290
328
  * (wallet-core decision 0005):
291
329
  *
292
- * - `invocationTarget` is the AUXILIARY companion Space's items subtree --
330
+ * - `invocationTarget` is the AUXILIARY annex Space's items subtree --
293
331
  * the Space URL with a trailing slash, built with was-client's paths
294
332
  * helpers so the bytes match the server's target check on a sub-path
295
- * deployment. Generation coverage comes from segment-bounded attenuation
333
+ * deployment. Generation coverage comes from generation-id-bounded
334
+ * attenuation
296
335
  * over the flat `gen-` collection names, so no GC cycle rewrites the
297
336
  * record or the registry.
298
337
  * - `controller` is the credential-derived signing DID (the same grantee
@@ -306,23 +345,49 @@ export declare const DELEGATED_CLIENTS_DELEGATION_TTL_MS: number;
306
345
  * enrolled client's promoted signer, or the account ladder VM)
307
346
  * @param options.wasServerUrl {string} the auxiliary Space's storage
308
347
  * server (the account pointer's host)
309
- * @param options.companionSpaceId {string} the auxiliary companion
348
+ * @param options.clientAnnexSpaceId {string} the auxiliary annex
310
349
  * Space's id
311
350
  * @param options.controller {string} the credential-derived signing DID
312
351
  * @param [options.now] {number} epoch milliseconds, for tests
313
352
  * @returns {Promise<IZcap>}
314
353
  */
315
- export declare function mintDelegatedClientsDelegation({ zcapClient, wasServerUrl, companionSpaceId, controller, now }: {
354
+ export declare function mintDelegatedClientsDelegation({ zcapClient, wasServerUrl, clientAnnexSpaceId, controller, now }: {
316
355
  zcapClient: ZcapClient;
317
356
  wasServerUrl: string;
318
- companionSpaceId: string;
357
+ clientAnnexSpaceId: string;
319
358
  controller: string;
320
359
  now?: number;
321
360
  }): Promise<IZcap>;
322
361
  /**
323
- * The auxiliary companion Space id a delegated-clients delegation targets,
362
+ * Builds the annex-side sibling-delegation minter the durable record re-mint
363
+ * orchestrator (`recovery/remintRecoveryDelegations`) takes as an injected
364
+ * closure -- the boundary keeping that base orchestrator free of annex
365
+ * imports. The returned closure reads the auxiliary annex Space id off the
366
+ * verified document's delegated-clients service entry (the annex DID string
367
+ * embeds it) and mints a fresh {@link mintDelegatedClientsDelegation} to the
368
+ * named controller; it resolves `undefined` while the document points at no
369
+ * generation, which the orchestrator reads as "carry the old sealed member
370
+ * verbatim".
371
+ *
372
+ * @param options {object}
373
+ * @param options.doc {object} the locally verified account document
374
+ * @param options.zcapClient {ZcapClient} the acting client's promoted
375
+ * signer, which mints the fresh delegations
376
+ * @param options.wasServerUrl {string} the auxiliary Space's storage
377
+ * server (the account pointer's host)
378
+ * @returns {Function} `({ controller }) => Promise<IZcap | undefined>`
379
+ */
380
+ export declare function delegatedClientsDelegationMinter({ doc, zcapClient, wasServerUrl }: {
381
+ doc: object;
382
+ zcapClient: ZcapClient;
383
+ wasServerUrl: string;
384
+ }): (options: {
385
+ controller: string;
386
+ }) => Promise<IZcap | undefined>;
387
+ /**
388
+ * The auxiliary annex Space id a delegated-clients delegation targets,
324
389
  * read out of its `invocationTarget` (the items-subtree URL,
325
- * `.../space/<companionSpaceId>/`). The id has no other home -- a transient
390
+ * `.../space/<clientAnnexSpaceId>/`). The id has no other home -- a transient
326
391
  * login learns the Space from the delegation it unwraps, and a refresh pass
327
392
  * that holds the old delegation rebuilds the target from it -- so this parse
328
393
  * is the one reader. Returns `undefined` on anything that is not an
@@ -336,7 +401,7 @@ export declare function delegatedClientsDelegationSpaceId({ delegation }: {
336
401
  delegation: IZcap;
337
402
  }): string | undefined;
338
403
  /**
339
- * The type IRI of the companion document's generation-delegation service
404
+ * The type IRI of the annex document's generation-delegation service
340
405
  * entry -- the generation's standing Space-scoped zcap, embedded where an
341
406
  * enrolling transient client can reach it before it holds any other
342
407
  * authority. Wire-level and permanent: readers (this module's
@@ -375,8 +440,8 @@ export declare const GENERATION_DELEGATION_TTL_MS: number;
375
440
  * bytes match the server's target check on a sub-path deployment. The
376
441
  * bare Space URL sits outside the capability bytes (see
377
442
  * {@link GENERATION_DELEGATION_ACTIONS} for what that excludes).
378
- * - `controller` is the bare companion DID string. Transient keys invoke as
379
- * `<companionDid>#<vm>`, and the server's inspector clause compares this
443
+ * - `controller` is the bare annex DID string. Transient keys invoke as
444
+ * `<clientAnnexDid>#<vm>`, and the server's inspector clause compares this
380
445
  * string against the account document's delegated-clients pointer.
381
446
  * - The chain is rooted directly in the account Space's root zcap, so an
382
447
  * App Connect grant delegated under it forms the depth-3 chain
@@ -392,15 +457,15 @@ export declare const GENERATION_DELEGATION_TTL_MS: number;
392
457
  * or a durable client's promoted signer)
393
458
  * @param options.wasServerUrl {string} the ACCOUNT Space's storage server
394
459
  * @param options.spaceId {string} the ACCOUNT Space's id
395
- * @param options.companionDid {string} the generation's companion DID
460
+ * @param options.clientAnnexDid {string} the generation's annex DID
396
461
  * @param [options.now] {number} epoch milliseconds, for tests
397
462
  * @returns {Promise<IZcap>}
398
463
  */
399
- export declare function mintGenerationDelegation({ zcapClient, wasServerUrl, spaceId, companionDid, now }: {
464
+ export declare function mintGenerationDelegation({ zcapClient, wasServerUrl, spaceId, clientAnnexDid, now }: {
400
465
  zcapClient: ZcapClient;
401
466
  wasServerUrl: string;
402
467
  spaceId: string;
403
- companionDid: string;
468
+ clientAnnexDid: string;
404
469
  now?: number;
405
470
  }): Promise<IZcap>;
406
471
  /**
@@ -425,30 +490,30 @@ export declare function clampGrantExpires({ ttlMs, delegation, now }: {
425
490
  now?: number;
426
491
  }): Date;
427
492
  /**
428
- * Builds a fresh generation-delegation service entry for a companion
493
+ * Builds a fresh generation-delegation service entry for an annex
429
494
  * document. The `serviceEndpoint` is the full delegated-zcap JSON as a
430
495
  * single map, byte-identical to what `zcapClient.delegate` produced -- the
431
- * companion entry proof (JCS canonicalization) then covers it byte for byte,
496
+ * annex entry proof (JCS canonicalization) then covers it byte for byte,
432
497
  * so host tampering with the stored delegation is client-visible.
433
498
  *
434
499
  * @param options {object}
435
- * @param options.companionDid {string} the generation's companion DID
500
+ * @param options.clientAnnexDid {string} the generation's annex DID
436
501
  * @param options.delegation {IZcap} the minted generation delegation
437
502
  * @returns {ServiceEndpoint}
438
503
  */
439
- export declare function generationDelegationServiceEntry({ companionDid, delegation }: {
440
- companionDid: string;
504
+ export declare function generationDelegationServiceEntry({ clientAnnexDid, delegation }: {
505
+ clientAnnexDid: string;
441
506
  delegation: IZcap;
442
507
  }): ServiceEndpoint;
443
508
  /**
444
- * The generation delegation a companion document carries: the
509
+ * The generation delegation an annex document carries: the
445
510
  * `serviceEndpoint` map of the service entry whose `type` names (or
446
511
  * includes) {@link GENERATION_DELEGATION_SERVICE_TYPE}. Only a map-form
447
512
  * endpoint counts (the delegation is embedded as the zcap JSON itself,
448
513
  * never as a URL or an encoded string).
449
514
  *
450
515
  * @param options {object}
451
- * @param options.doc {DIDDoc} the resolved (and verified) companion
516
+ * @param options.doc {DIDDoc} the resolved (and verified) annex
452
517
  * document
453
518
  * @returns {IZcap | undefined}
454
519
  */
@@ -456,51 +521,89 @@ export declare function embeddedGenerationDelegation({ doc }: {
456
521
  doc: DIDDoc;
457
522
  }): IZcap | undefined;
458
523
  /**
459
- * Parses the auxiliary Space id and generation segment out of a companion DID
460
- * string. Both are permanent substrings of every companion DID by
461
- * construction (`did:webvh:<scid>:<host>:...:space:<spaceId>:<segment>`), and
462
- * the segment is the generation-identifying half of the companion rung HKDF
524
+ * Every generation delegation a generation's log has ever embedded, in log
525
+ * order and deduplicated by zcap id -- the annex-log HISTORY WALK the
526
+ * last-durable-client forget revokes from (decision 0004's 2026-08-19
527
+ * amendment): a renewal replaces the head service entry's endpoint in place,
528
+ * so a superseded delegation's bytes survive only in earlier entries'
529
+ * re-stated full state, and a renewal inside the 30-day window can leave TWO
530
+ * still-unexpired ladder-signed delegations. The caller filters (signer,
531
+ * expiry) and revokes; this walk only recovers the bytes.
532
+ *
533
+ * @param options {object}
534
+ * @param options.log {DIDLog} the generation's VERIFIED log
535
+ * @returns {IZcap[]}
536
+ */
537
+ export declare function generationDelegationHistory({ log }: {
538
+ log: DIDLog;
539
+ }): IZcap[];
540
+ /**
541
+ * Submits the revocation of a generation delegation, reading the server's
542
+ * 400 answer as success: an already-revoked chain (a resumed ceremony's
543
+ * blind re-POST) and an expired delegation (which no longer needs revoking)
544
+ * both land there, and the revocation protocol exposes no read endpoint to
545
+ * distinguish them beforehand. Matched on `err.name` -- error classes do not
546
+ * survive crossing package copies. The `revoke` seam is was-client's
547
+ * `WasClient#revoke`, bound by the caller.
548
+ *
549
+ * @param options {object}
550
+ * @param options.revoke {Function} `(delegation) => Promise<void>` --
551
+ * POSTs the revocation (`was.revoke`)
552
+ * @param options.delegation {IZcap}
553
+ * @returns {Promise<void>}
554
+ */
555
+ export declare function revokeTreatingAlreadyRevokedAsSuccess({ revoke, delegation }: {
556
+ revoke: (delegation: IDelegatedZcap) => Promise<void>;
557
+ delegation: IZcap;
558
+ }): Promise<void>;
559
+ /**
560
+ * Parses the auxiliary Space id and generation id out of an annex DID
561
+ * string. Both are permanent substrings of every annex DID by
562
+ * construction: the generation id is the final path segment of the annex
563
+ * DID (`did:webvh:<scid>:<host>:...:space:<spaceId>:<generationId>`), and it
564
+ * is the generation-identifying half of the annex rung HKDF
463
565
  * labels, so this parse is what lets an enrollee derive its writing key from
464
566
  * the pointer alone -- no log read, no registry.
465
567
  *
466
568
  * @param options {object}
467
- * @param options.did {string} a companion did:webvh string
468
- * @returns {{ spaceId: string, segment: string }}
569
+ * @param options.did {string} an annex did:webvh string
570
+ * @returns {{ spaceId: string, generationId: string }}
469
571
  */
470
- export declare function companionDidParts({ did }: {
572
+ export declare function clientAnnexDidParts({ did }: {
471
573
  did: string;
472
574
  }): {
473
575
  spaceId: string;
474
- segment: string;
576
+ generationId: string;
475
577
  };
476
578
  /**
477
- * Thrown when the published companion log commits neither the writing
579
+ * Thrown when the published annex log commits neither the writing
478
580
  * credential's rung-0 key nor its hash -- the mid-generation lockout: a
479
- * credential bound after the generation's genesis cannot write the companion
581
+ * credential bound after the generation's genesis cannot write the annex
480
582
  * until an existing writer commits its rung-0 hash or the next GC swap's
481
583
  * genesis does. Typed so callers can map it to the fresh-generation path
482
584
  * where one is licensed (the transient-recovery continuation) or to honest
483
585
  * copy where none is.
484
586
  */
485
- export declare class CompanionRungUncommittedError extends Error {
587
+ export declare class ClientAnnexRungUncommittedError extends Error {
486
588
  constructor(message: string);
487
589
  }
488
590
  /**
489
- * The narrow store seam a companion entry is read and published through: the
490
- * log read and the conditional `did.jsonl` PUT, nothing else (a companion has
591
+ * The narrow store seam an annex entry is read and published through: the
592
+ * log read and the conditional `did.jsonl` PUT, nothing else (an annex has
491
593
  * no `did.json` projection and no key map). Satisfied by
492
- * {@link companionLogStore} (controller-tier signing) and by the delegated
594
+ * {@link clientAnnexLogStore} (controller-tier signing) and by the delegated
493
595
  * store a transient session writes through (`delegatedWebvhLogStore`,
494
596
  * invoking the credential's sibling delegation).
495
597
  */
496
- export type CompanionWriteStore = Pick<WebvhIdStore, 'getIdResourceRaw' | 'putIdResource'>;
598
+ export type ClientAnnexWriteStore = Pick<WebvhIdStore, 'getIdResourceRaw' | 'putIdResource'>;
497
599
  /**
498
600
  * TRANSIENT ENROLLMENT: publishes one per-visit verification method into a
499
- * companion generation's log -- one atomic entry, signed by the writing
500
- * credential's static rung 0 (derived from the ladder seed and the segment;
501
- * see `companionRung`). The entry:
601
+ * annex generation's log -- one atomic entry, signed by the writing
602
+ * credential's static rung 0 (derived from the ladder seed and the generation
603
+ * id;
604
+ * see `clientAnnexRung`). The entry:
502
605
  *
503
- * - reveals the writer's rung-0 key into `updateKeys` at its first companion
606
+ * - reveals the writer's rung-0 key into `updateKeys` at its first annex
504
607
  * write (later writes re-state it unchanged);
505
608
  * - re-states `nextKeyHashes` verbatim -- every standing credential's rung-0
506
609
  * hash, the writer's own carry-over hash included -- explicitly on the
@@ -509,7 +612,7 @@ export type CompanionWriteStore = Pick<WebvhIdStore, 'getIdResourceRaw' | 'putId
509
612
  * relationship arrays stated explicitly (no `authentication`, no
510
613
  * `assertionMethod`, no `keyAgreement` twin -- the DIDAuth path signs as
511
614
  * the bare did:key, and the controller-marker convention does not arise in
512
- * the companion at all).
615
+ * the annex at all).
513
616
  *
514
617
  * The transient key set carries no update key, and nothing here touches the
515
618
  * ACCOUNT log's `updateKeys` or `nextKeyHashes`. There is no two-entry
@@ -518,48 +621,48 @@ export type CompanionWriteStore = Pick<WebvhIdStore, 'getIdResourceRaw' | 'putId
518
621
  * published document's own state -- a VM already present is a no-op.
519
622
  *
520
623
  * A writer whose rung-0 key is neither revealed nor committed is refused
521
- * ({@link CompanionRungUncommittedError}): companion entries verify against
624
+ * ({@link ClientAnnexRungUncommittedError}): annex entries verify against
522
625
  * the log's own hash-commitment chain, so no admission rule can make an
523
626
  * uncommitted key verify mid-log.
524
627
  *
525
628
  * @param options {object}
526
- * @param options.store {CompanionWriteStore} the generation's log store
629
+ * @param options.store {ClientAnnexWriteStore} the generation's log store
527
630
  * (delegated through the credential's sibling delegation, or
528
631
  * controller-tier)
529
632
  * @param options.ladderSeed {Uint8Array} the credential's ladder seed, from
530
633
  * its unlock record
531
- * @param options.segment {string} the generation collection's name
634
+ * @param options.generationId {string} the generation collection's name
532
635
  * @param options.transientKeyMultibase {string} the visit's in-memory
533
636
  * Ed25519 signing key, public multibase
534
- * @param [options.services] {ServiceEndpoint[]} the companion document's
637
+ * @param [options.services] {ServiceEndpoint[]} the annex document's
535
638
  * full service-entry list, replacing the published one wholesale; omitted,
536
639
  * the prior entries are preserved verbatim (or extended by
537
640
  * `mintGenerationDelegation` below). Supplying both is refused in favor of
538
641
  * the explicit list
539
642
  * @param [options.mintGenerationDelegation] {Function}
540
- * `({ companionDid }) => Promise<IZcap>` -- mints the generation
643
+ * `({ clientAnnexDid }) => Promise<IZcap>` -- mints the generation
541
644
  * delegation this entry installs when it publishes the generation's FIRST
542
645
  * transient verification method (and the document carries no delegation
543
646
  * entry yet). Never invoked otherwise: the delegation is installed with
544
647
  * the first transient VM or by the GC ceremony's own install stage, never
545
648
  * by genesis (a genesis-embedded signed zcap can never verify -- its
546
649
  * `controller` embeds the SCID the genesis hash derives from)
547
- * @param [options.expectedDid] {string} the companion DID the log must
650
+ * @param [options.expectedDid] {string} the annex DID the log must
548
651
  * resolve to, from the account document's pointer
549
652
  * @param [options.pinStore] {ResourceLogPinStore} chain-head pins (a
550
653
  * transient session passes an in-memory store)
551
654
  * @param [options.logId] {string} the generation's pin-slot key, from
552
- * {@link companionLogPinId}; required whenever a `pinStore` is supplied
655
+ * {@link clientAnnexLogPinId}; required whenever a `pinStore` is supplied
553
656
  * @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog }>}
554
657
  */
555
- export declare function enrollCompanionTransientClient(options: {
556
- store: CompanionWriteStore;
658
+ export declare function enrollClientAnnexTransientClient(options: {
659
+ store: ClientAnnexWriteStore;
557
660
  ladderSeed: Uint8Array;
558
- segment: string;
661
+ generationId: string;
559
662
  transientKeyMultibase: string;
560
663
  services?: ServiceEndpoint[];
561
664
  mintGenerationDelegation?: (options: {
562
- companionDid: string;
665
+ clientAnnexDid: string;
563
666
  }) => Promise<IZcap>;
564
667
  expectedDid?: string;
565
668
  pinStore?: ResourceLogPinStore;
@@ -571,10 +674,10 @@ export declare function enrollCompanionTransientClient(options: {
571
674
  }>;
572
675
  /**
573
676
  * Points the account document's delegated-clients service entry at a
574
- * companion DID -- the first install after a generation's genesis, and the GC
677
+ * annex DID -- the first install after a generation's genesis, and the GC
575
678
  * swap's re-point alike. One ordinary document-update entry, signed by an
576
- * enrolled durable client's active update key; the companion log always
577
- * publishes FIRST (see {@link mintCompanionGeneration}), so a tear leaves an
679
+ * enrolled durable client's active update key; the annex log always
680
+ * publishes FIRST (see {@link mintClientAnnexGeneration}), so a tear leaves an
578
681
  * unpointed, authorization-inert generation, never a dangling pointer.
579
682
  *
580
683
  * An existing delegated-clients entry is re-pointed in place, its fragment id
@@ -585,10 +688,14 @@ export declare function enrollCompanionTransientClient(options: {
585
688
  * a no-op on the log (it still heals a lagging `did.json`).
586
689
  *
587
690
  * @param options {object}
588
- * @param options.idStore {WebvhIdStore} the ACCOUNT log's store
691
+ * @param options.idStore {WebvhIdStore} the ACCOUNT log's store; with
692
+ * `logOnly`, only its log read and `did.jsonl` PUT are used, so the narrow
693
+ * delegated seam satisfies it
589
694
  * @param options.updateKeys {ClientWebvhUpdateKeys} this durable client's
590
- * update-key seeds
591
- * @param options.companionDid {string} the generation to point at
695
+ * update-key seeds -- or the ladder-rung idiom on a ladder-anchored
696
+ * account (`{ updateSeed: rung0.seed, stagedSeed: rung1.seed }`), as the
697
+ * credential-anchored genesis and the transient-recovery continuation pass
698
+ * @param options.clientAnnexDid {string} the generation to point at
592
699
  * @param [options.expectedDid] {string} the account DID the log must
593
700
  * resolve to, from the account pointer
594
701
  * @param [options.pinStore] {ResourceLogPinStore} this client's chain-head
@@ -596,15 +703,21 @@ export declare function enrollCompanionTransientClient(options: {
596
703
  * @param [options.logId] {string} the account log's pin-slot key, from
597
704
  * `accountLogPinId({ spaceId })`; required whenever a `pinStore` is
598
705
  * supplied
706
+ * @param [options.logOnly] {boolean} publish `did.jsonl` only, never the
707
+ * `did.json` projection -- the transient-recovery continuation writing
708
+ * through the record's bridge delegation, whose narrow scope covers nothing
709
+ * but the log. The projection heals at the next authorized write (the log
710
+ * is the source of truth)
599
711
  * @returns {Promise<{ did: string, doc: DIDDoc }>}
600
712
  */
601
713
  export declare function setDelegatedClientsPointer(options: {
602
714
  idStore: WebvhIdStore;
603
715
  updateKeys: ClientWebvhUpdateKeys;
604
- companionDid: string;
716
+ clientAnnexDid: string;
605
717
  expectedDid?: string;
606
718
  pinStore?: ResourceLogPinStore;
607
719
  logId?: string;
720
+ logOnly?: boolean;
608
721
  }): Promise<{
609
722
  did: string;
610
723
  doc: DIDDoc;
@@ -624,58 +737,68 @@ export declare function setDelegatedClientsPointer(options: {
624
737
  * @param options.readAccountDocument {Function} reads the VERIFIED account
625
738
  * document (the caller's `verifyAccountLog` read, pins and `expectedDid`
626
739
  * applied there); called once per round
627
- * @param options.storeForSegment {Function} builds the generation's log
628
- * store for a segment (the delegated store over the credential's sibling
740
+ * @param options.storeForGenerationId {Function} builds the generation's log
741
+ * store for a generation id (the delegated store over the credential's
742
+ * sibling
629
743
  * delegation, or a controller-tier store)
630
744
  * @param options.ladderSeed {Uint8Array} the credential's ladder seed
631
745
  * @param options.transientKeyMultibase {string} the visit's in-memory
632
746
  * signing key, public multibase
633
747
  * @param [options.mintGenerationDelegation] {Function}
634
- * `({ companionDid }) => Promise<IZcap>` -- forwarded to the enrollment
748
+ * `({ clientAnnexDid }) => Promise<IZcap>` -- forwarded to the enrollment
635
749
  * entry, which installs the minted delegation when it publishes the
636
750
  * generation's first transient VM (see
637
- * {@link enrollCompanionTransientClient}). The closure receives whichever
638
- * companion DID the round enrolls into, so a GC-race re-enroll mints for
751
+ * {@link enrollClientAnnexTransientClient}). The closure receives whichever
752
+ * annex DID the round enrolls into, so a GC-race re-enroll mints for
639
753
  * the fresh generation
640
754
  * @param [options.pinStore] {ResourceLogPinStore} chain-head pins for the
641
755
  * generation logs (a transient session passes an in-memory store); slot
642
- * keys are derived per generation with {@link companionLogPinId}
756
+ * keys are derived per generation with {@link clientAnnexLogPinId}
643
757
  * @param [options.maxRounds] {number} how many pointer moves to chase
644
758
  * before giving up (a GC pass is quarterly, so more than one mid-ceremony
645
759
  * move means something else is wrong)
646
- * @returns {Promise<{ companionDid: string, doc: DIDDoc, log: DIDLog }>}
760
+ * @returns {Promise<{ clientAnnexDid: string, doc: DIDDoc, log: DIDLog }>}
647
761
  */
648
- export declare function enrollTransientClient({ readAccountDocument, storeForSegment, ladderSeed, transientKeyMultibase, mintGenerationDelegation: mintDelegation, pinStore, maxRounds }: {
762
+ export declare function enrollTransientClient({ readAccountDocument, storeForGenerationId, ladderSeed, transientKeyMultibase, mintGenerationDelegation: mintDelegation, pinStore, maxRounds }: {
649
763
  readAccountDocument: () => Promise<DIDDoc>;
650
- storeForSegment: (segment: string) => CompanionWriteStore;
764
+ storeForGenerationId: (generationId: string) => ClientAnnexWriteStore;
651
765
  ladderSeed: Uint8Array;
652
766
  transientKeyMultibase: string;
653
767
  mintGenerationDelegation?: (options: {
654
- companionDid: string;
768
+ clientAnnexDid: string;
655
769
  }) => Promise<IZcap>;
656
770
  pinStore?: ResourceLogPinStore;
657
771
  maxRounds?: number;
658
772
  }): Promise<{
659
- companionDid: string;
773
+ clientAnnexDid: string;
660
774
  doc: DIDDoc;
661
775
  log: DIDLog;
662
776
  }>;
663
777
  /**
664
778
  * RENEW PRECEDES MINT: the blocking pre-mint stage a transient App Connect
665
- * approval runs before delegating any grant. Reads the companion document
779
+ * approval runs before delegating any grant. Reads the annex document
666
780
  * and hands back its embedded generation delegation -- renewing it first
667
781
  * when it is expired or inside the 30-day renewal window ({@link
668
782
  * zcapExpiring}): a fresh delegation is minted through the caller's closure
669
783
  * (ladder-signed -- the renewal must not depend on the very delegation it
670
784
  * replaces; published through the store, which in a transient session is
671
785
  * the credential's sibling delegation, so even a hard-expired delegation is
672
- * recoverable), and one companion entry replaces the service entry's
786
+ * recoverable), and one annex entry replaces the service entry's
673
787
  * endpoint in place, signed by the writing credential's static rung 0.
674
788
  *
675
- * A companion document carrying no delegation entry at all installs one the
789
+ * An annex document carrying no delegation entry at all installs one the
676
790
  * same way (the GC ceremony's own install stage and the first-VM install
677
791
  * make this rare; a heal, not a policy).
678
792
  *
793
+ * Beside the expiry axis, an `accountDoc` adds the SIGNER-DEATH axis: a
794
+ * standing delegation whose proof key is no longer in the supplied verified
795
+ * account document has rotted under the current-key-set rule (the durable
796
+ * client that minted it was revoked, or the ladder VM that signed it left
797
+ * with the first durable self-enrollment) and is replaced the same way. No
798
+ * revocation POST accompanies the replacement: a rotted chain no longer
799
+ * verifies at the revocation endpoint, and the expiry-renewal path never
800
+ * revoked either.
801
+ *
679
802
  * Failure is the caller's failure: a renewal that cannot complete throws,
680
803
  * and the App Connect approval fails with the standard retryable-ceremony
681
804
  * posture -- deliberately no clamp-on-failure fallback, which would deliver
@@ -685,37 +808,135 @@ export declare function enrollTransientClient({ readAccountDocument, storeForSeg
685
808
  * 30 or more days remaining ({@link clampGrantExpires}).
686
809
  *
687
810
  * @param options {object}
688
- * @param options.store {CompanionWriteStore} the generation's log store
811
+ * @param options.store {ClientAnnexWriteStore} the generation's log store
689
812
  * (delegated through the credential's sibling delegation, or
690
813
  * controller-tier)
691
814
  * @param options.ladderSeed {Uint8Array} the credential's ladder seed, from
692
815
  * its unlock record
693
- * @param options.segment {string} the generation collection's name
816
+ * @param options.generationId {string} the generation collection's name
694
817
  * @param options.mintGenerationDelegation {Function}
695
- * `({ companionDid }) => Promise<IZcap>` -- mints the replacement
818
+ * `({ clientAnnexDid }) => Promise<IZcap>` -- mints the replacement
696
819
  * delegation (ladder-signed in a transient session)
697
- * @param [options.expectedDid] {string} the companion DID the log must
820
+ * @param [options.expectedDid] {string} the annex DID the log must
698
821
  * resolve to, from the account document's pointer
699
822
  * @param [options.pinStore] {ResourceLogPinStore} chain-head pins (a
700
823
  * transient session passes an in-memory store)
701
824
  * @param [options.logId] {string} the generation's pin-slot key, from
702
- * {@link companionLogPinId}; required whenever a `pinStore` is supplied
825
+ * {@link clientAnnexLogPinId}; required whenever a `pinStore` is supplied
826
+ * @param [options.accountDoc] {PublishedKeyDocument} the locally VERIFIED
827
+ * account document; supplied, a standing delegation whose proof key it no
828
+ * longer lists is replaced (the signer-death axis above)
829
+ * @param [options.force] {boolean} replace the embedded delegation
830
+ * unconditionally, however healthy it looks -- the last-durable-client
831
+ * forget's replacement stage, where the standing delegation has just been
832
+ * revoked server-side (a state no client-side predicate can read)
703
833
  * @param [options.now] {number} epoch milliseconds, for tests
704
834
  * @returns {Promise<{ delegation: IZcap, renewed: boolean }>}
705
835
  */
706
836
  export declare function ensureGenerationDelegationCurrent(options: {
707
- store: CompanionWriteStore;
837
+ store: ClientAnnexWriteStore;
708
838
  ladderSeed: Uint8Array;
709
- segment: string;
839
+ generationId: string;
710
840
  mintGenerationDelegation: (options: {
711
- companionDid: string;
841
+ clientAnnexDid: string;
712
842
  }) => Promise<IZcap>;
713
843
  expectedDid?: string;
714
844
  pinStore?: ResourceLogPinStore;
715
845
  logId?: string;
846
+ accountDoc?: PublishedKeyDocument;
847
+ force?: boolean;
716
848
  now?: number;
717
849
  }): Promise<{
718
850
  delegation: IZcap;
719
851
  renewed: boolean;
720
852
  }>;
721
- //# sourceMappingURL=companion.d.ts.map
853
+ /**
854
+ * THE CLIENT-ANNEX RUNG STRIKE: drops a retired credential's annex posture
855
+ * from a generation's log -- its revealed rung-0 key out of `updateKeys` and
856
+ * its standing rung-0 hash out of `nextKeyHashes` -- in one atomic entry
857
+ * signed by ANOTHER credential's committed rung 0 (an annex entry cannot
858
+ * remove its own signing key: the entry verifies against its own re-stated
859
+ * `updateKeys`). The credential-rotation ceremony's annex reach.
860
+ *
861
+ * A log committing neither the retired rung's key nor its hash is already
862
+ * clean and the strike no-ops (`struck: false`) -- the resumable shape, and
863
+ * the common one: a credential that never minted or wrote this generation
864
+ * has no posture in it. An acting rung the log does not commit (after the
865
+ * retired members are excluded -- so the retired credential can never sign
866
+ * its own strike) is refused with {@link ClientAnnexRungUncommittedError},
867
+ * which the caller maps to the generation-swap fallback: a fresh generation
868
+ * minted from a surviving credential's seed retires the rung with the whole
869
+ * generation.
870
+ *
871
+ * @param options {object}
872
+ * @param options.store {ClientAnnexWriteStore} the pointed generation's log
873
+ * store (controller-tier, or delegated through a sibling delegation)
874
+ * @param options.retiredLadderSeed {Uint8Array} the RETIRED credential's
875
+ * ladder seed (its rung is derived per generation, so the seed is the only
876
+ * way to name what to strike)
877
+ * @param options.actingLadderSeed {Uint8Array} a surviving credential's
878
+ * ladder seed, whose committed rung 0 signs the strike entry
879
+ * @param options.generationId {string} the generation collection's name
880
+ * @param [options.expectedDid] {string} the annex DID the log must
881
+ * resolve to, from the account document's pointer
882
+ * @param [options.pinStore] {ResourceLogPinStore}
883
+ * @param [options.logId] {string} the generation's pin-slot key, from
884
+ * {@link clientAnnexLogPinId}; required whenever a `pinStore` is supplied
885
+ * @returns {Promise<{ struck: boolean }>}
886
+ */
887
+ export declare function retireClientAnnexRung(options: {
888
+ store: ClientAnnexWriteStore;
889
+ retiredLadderSeed: Uint8Array;
890
+ actingLadderSeed: Uint8Array;
891
+ generationId: string;
892
+ expectedDid?: string;
893
+ pinStore?: ResourceLogPinStore;
894
+ logId?: string;
895
+ }): Promise<{
896
+ struck: boolean;
897
+ }>;
898
+ /**
899
+ * THE CLIENT-ANNEX RUNG COMMIT: adds a freshly bound credential's rung-0
900
+ * hash to a generation's `nextKeyHashes` -- one atomic hash-restating entry
901
+ * signed by an already-committed credential's rung 0. The bind ceremonies'
902
+ * annex reach (passkey add, passphrase change): a bind runs from a logged-in
903
+ * session whose own login credential's rung 0 is committed, so committing the
904
+ * new credential's hash here is what keeps it out of the mid-generation
905
+ * lockout ({@link ClientAnnexRungUncommittedError} at its first transient
906
+ * login, otherwise standing until the next GC swap's genesis).
907
+ *
908
+ * A log already committing the bound rung's hash (or carrying its revealed
909
+ * key) is a no-op (`committed: false`) -- the resumable shape. An acting rung
910
+ * the log does not commit is refused with
911
+ * {@link ClientAnnexRungUncommittedError}: the bind ceremony maps that to an
912
+ * honest skip (nothing licenses it to mint a generation), and the lockout
913
+ * consequence stands as documented.
914
+ *
915
+ * @param options {object}
916
+ * @param options.store {ClientAnnexWriteStore} the pointed generation's log
917
+ * store (controller-tier, or delegated through a sibling delegation)
918
+ * @param options.boundLadderSeed {Uint8Array} the freshly bound
919
+ * credential's ladder seed (its rung is derived per generation, so the seed
920
+ * is the only way to name what to commit)
921
+ * @param options.actingLadderSeed {Uint8Array} the logged-in session's
922
+ * login credential's ladder seed, whose committed rung 0 signs the entry
923
+ * @param options.generationId {string} the generation collection's name
924
+ * @param [options.expectedDid] {string} the annex DID the log must
925
+ * resolve to, from the account document's pointer
926
+ * @param [options.pinStore] {ResourceLogPinStore}
927
+ * @param [options.logId] {string} the generation's pin-slot key, from
928
+ * {@link clientAnnexLogPinId}; required whenever a `pinStore` is supplied
929
+ * @returns {Promise<{ committed: boolean }>}
930
+ */
931
+ export declare function commitClientAnnexRung(options: {
932
+ store: ClientAnnexWriteStore;
933
+ boundLadderSeed: Uint8Array;
934
+ actingLadderSeed: Uint8Array;
935
+ generationId: string;
936
+ expectedDid?: string;
937
+ pinStore?: ResourceLogPinStore;
938
+ logId?: string;
939
+ }): Promise<{
940
+ committed: boolean;
941
+ }>;
942
+ //# sourceMappingURL=log.d.ts.map