@openvtc/trust-tasks 0.17.4 → 0.17.6

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 (33) hide show
  1. package/CHANGELOG.md +86 -0
  2. package/dist/_shared/components.d.ts +17 -0
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/auth/step-up/approve-response/0.3/payload.d.ts +887 -0
  5. package/dist/auth/step-up/approve-response/0.3/payload.d.ts.map +1 -0
  6. package/dist/auth/step-up/approve-response/0.3/payload.js +505 -0
  7. package/dist/auth/step-up/approve-response/0.3/payload.js.map +1 -0
  8. package/dist/index.d.ts +3 -0
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +3 -0
  11. package/dist/index.js.map +1 -1
  12. package/dist/persona/claim-types/list/1.0/payload.d.ts +772 -0
  13. package/dist/persona/claim-types/list/1.0/payload.d.ts.map +1 -0
  14. package/dist/persona/claim-types/list/1.0/payload.js +389 -0
  15. package/dist/persona/claim-types/list/1.0/payload.js.map +1 -0
  16. package/dist/rooms/_shared/0.1/room.d.ts +1 -1
  17. package/dist/rooms/_shared/0.1/room.d.ts.map +1 -1
  18. package/dist/rooms/epoch/chain/0.1/payload.d.ts +490 -0
  19. package/dist/rooms/epoch/chain/0.1/payload.d.ts.map +1 -0
  20. package/dist/rooms/epoch/chain/0.1/payload.js +272 -0
  21. package/dist/rooms/epoch/chain/0.1/payload.js.map +1 -0
  22. package/dist/rooms/epoch/mint/0.1/payload.d.ts +104 -2
  23. package/dist/rooms/epoch/mint/0.1/payload.d.ts.map +1 -1
  24. package/dist/rooms/epoch/mint/0.1/payload.js +57 -0
  25. package/dist/rooms/epoch/mint/0.1/payload.js.map +1 -1
  26. package/package.json +1 -1
  27. package/src/_shared/components.ts +17 -0
  28. package/src/auth/step-up/approve-response/0.3/payload.ts +594 -0
  29. package/src/index.ts +3 -0
  30. package/src/persona/claim-types/list/1.0/payload.ts +590 -0
  31. package/src/rooms/_shared/0.1/room.ts +1 -1
  32. package/src/rooms/epoch/chain/0.1/payload.ts +323 -0
  33. package/src/rooms/epoch/mint/0.1/payload.ts +63 -2
@@ -0,0 +1,490 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/rooms/epoch/chain/0.1/payload.schema.json
4
+ */
5
+ import type { AuthorityPresentation, EpochLink, Ext } from "../../../../_shared/components.js";
6
+ export interface RoomsEpochChainPayload {
7
+ /**
8
+ * The room whose epoch key chain is being fetched.
9
+ */
10
+ roomId: string;
11
+ /**
12
+ * Must confer the `read` action at this room's scope. Reading the room and reading the parts of it written earlier are the same act, so they take the same grant; a separate one would be a grant nobody could explain.
13
+ */
14
+ presentation: AuthorityPresentation;
15
+ /**
16
+ * Return only links whose `epoch` is at or below this. The chain is walked downwards, so this is how a member who already holds the top of it asks for the rest. Absent means from the room's current epoch down.
17
+ */
18
+ fromEpoch?: number;
19
+ /**
20
+ * Maximum links to return, highest `epoch` first. A host MAY return fewer.
21
+ */
22
+ limit?: number;
23
+ /**
24
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
25
+ */
26
+ ext?: Ext;
27
+ }
28
+ /**
29
+ * Success response to rooms/epoch/chain. Type https://trusttasks.org/spec/rooms/epoch/chain/0.1#response. Carries ciphertext a host cannot read: the key that opens a link is a storage key no host ever holds, so a response served to a party holding no epoch key discloses nothing but the number of epochs, which the room's epoch number already told them.
30
+ */
31
+ export interface RoomsEpochChainResponsePayload {
32
+ roomId: string;
33
+ /**
34
+ * The links, highest `epoch` first. Contiguous within the range returned: a host MUST NOT omit a rung it holds while returning a lower one, because a member cannot walk past a gap and would read the omission as history that had been severed.
35
+ */
36
+ links: EpochLink[];
37
+ ext?: Ext;
38
+ }
39
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
40
+ export type { AuthorityPresentation, EpochLink, Ext };
41
+ /** Trust Task type URI. */
42
+ export declare const TYPE_URI: "https://trusttasks.org/spec/rooms/epoch/chain/0.1";
43
+ /** Stable alias for this specification's request payload shape. */
44
+ export type Payload = RoomsEpochChainPayload;
45
+ /** Trust Task response type URI (request type URI + "#response"). */
46
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/rooms/epoch/chain/0.1#response";
47
+ /** Stable alias for this specification's success-response payload shape. */
48
+ export type Response = RoomsEpochChainResponsePayload;
49
+ /**
50
+ * This specification's payload schema, as a value.
51
+ *
52
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
53
+ * rather than only as a `.json` file because TypeScript types are erased
54
+ * at runtime: without a schema a consumer has nothing to validate, and
55
+ * every REQUIRED payload member is optional in practice. Cross-file
56
+ * `$ref`s are already inlined, so it needs no resolver.
57
+ */
58
+ export declare const PAYLOAD_SCHEMA: {
59
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
60
+ readonly $id: "https://trusttasks.org/spec/rooms/epoch/chain/0.1";
61
+ readonly title: "Rooms Epoch Chain — payload";
62
+ readonly type: "object";
63
+ readonly additionalProperties: false;
64
+ readonly required: readonly ["roomId", "presentation"];
65
+ readonly properties: {
66
+ readonly roomId: {
67
+ readonly type: "string";
68
+ readonly description: "The room whose epoch key chain is being fetched.";
69
+ };
70
+ readonly presentation: {
71
+ readonly $ref: "#/$defs/AuthorityPresentation";
72
+ readonly description: "Must confer the `read` action at this room's scope. Reading the room and reading the parts of it written earlier are the same act, so they take the same grant; a separate one would be a grant nobody could explain.";
73
+ };
74
+ readonly fromEpoch: {
75
+ readonly type: "integer";
76
+ readonly minimum: 2;
77
+ readonly description: "Return only links whose `epoch` is at or below this. The chain is walked downwards, so this is how a member who already holds the top of it asks for the rest. Absent means from the room's current epoch down.";
78
+ };
79
+ readonly limit: {
80
+ readonly type: "integer";
81
+ readonly minimum: 1;
82
+ readonly maximum: 500;
83
+ readonly description: "Maximum links to return, highest `epoch` first. A host MAY return fewer.";
84
+ };
85
+ readonly ext: {
86
+ readonly $ref: "#/$defs/Ext";
87
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
88
+ };
89
+ };
90
+ readonly $defs: {
91
+ readonly Response: {
92
+ readonly $anchor: "response";
93
+ readonly title: "Rooms Epoch Chain — response payload";
94
+ readonly description: "Success response to rooms/epoch/chain. Type https://trusttasks.org/spec/rooms/epoch/chain/0.1#response. Carries ciphertext a host cannot read: the key that opens a link is a storage key no host ever holds, so a response served to a party holding no epoch key discloses nothing but the number of epochs, which the room's epoch number already told them.";
95
+ readonly type: "object";
96
+ readonly additionalProperties: false;
97
+ readonly required: readonly ["roomId", "links"];
98
+ readonly properties: {
99
+ readonly roomId: {
100
+ readonly type: "string";
101
+ };
102
+ readonly links: {
103
+ readonly type: "array";
104
+ readonly description: "The links, highest `epoch` first. Contiguous within the range returned: a host MUST NOT omit a rung it holds while returning a lower one, because a member cannot walk past a gap and would read the omission as history that had been severed.";
105
+ readonly items: {
106
+ readonly $ref: "#/$defs/EpochLink";
107
+ };
108
+ };
109
+ readonly ext: {
110
+ readonly $ref: "#/$defs/Ext";
111
+ };
112
+ };
113
+ };
114
+ readonly Ext: {
115
+ readonly title: "Ext";
116
+ readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
117
+ readonly type: "object";
118
+ readonly minProperties: 1;
119
+ readonly additionalProperties: true;
120
+ readonly propertyNames: {
121
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
122
+ };
123
+ };
124
+ readonly EpochLink: {
125
+ readonly title: "EpochLink";
126
+ readonly type: "object";
127
+ readonly additionalProperties: false;
128
+ readonly required: readonly ["epoch", "wrapped", "nonce"];
129
+ readonly description: "One rung of a room's epoch key chain: the storage key of epoch `epoch - 1`, sealed under the storage key of `epoch`. A group key schedule offers no way to derive an earlier epoch's key from a later one — that property is what makes removing a member mean something — so without a chain the first membership change makes every record already in the room unopenable by everyone, including whoever wrote it. The chain is the one-way street run deliberately the other way: a member holding the current key walks it backwards to any retained epoch, and a member holding an earlier key still derives nothing later. Removal stays forward-only; reading stays possible. What a chain costs is stated where it is chosen, in the room's retention policy.";
130
+ readonly properties: {
131
+ readonly epoch: {
132
+ readonly type: "integer";
133
+ readonly minimum: 2;
134
+ readonly description: "The epoch whose storage key opens this link; it wraps the storage key of `epoch - 1`. Never 1: a room's first epoch has no predecessor, so a link claiming one wraps something that is not an earlier epoch's key.";
135
+ };
136
+ readonly wrapped: {
137
+ readonly type: "string";
138
+ readonly description: "The wrapped predecessor key, base64url. Bound by AEAD associated data to `roomId` and to this link's own position in the chain, so a link lifted to another rung, or served under another room, fails to open rather than yielding a key that is wrong. The binding is load-bearing rather than decorative: every rung is a fixed-length key sealed under a fixed-length key, so nothing about the ciphertext itself says where it belongs.";
139
+ };
140
+ readonly nonce: {
141
+ readonly type: "string";
142
+ readonly description: "AEAD nonce, base64url.";
143
+ };
144
+ };
145
+ };
146
+ readonly AuthorityPresentation: {
147
+ readonly title: "AuthorityPresentation";
148
+ readonly type: "object";
149
+ readonly additionalProperties: false;
150
+ readonly required: readonly ["membership", "authority"];
151
+ readonly description: "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier.";
152
+ readonly properties: {
153
+ readonly membership: {
154
+ readonly type: "string";
155
+ readonly description: "The presenter's membership credential for this room, or — on a `private` room — a zero-knowledge presentation of it. Serialized per the governing profile.";
156
+ };
157
+ readonly authority: {
158
+ readonly type: "array";
159
+ readonly minItems: 1;
160
+ readonly maxItems: 8;
161
+ readonly items: {
162
+ readonly type: "string";
163
+ };
164
+ readonly description: "The authority chain, LEAF FIRST: the first element is the credential being relied on and the last MUST be one issued by the room itself. Every link the presenter relies on is present, because the host will not fetch one. Capped at 8: verification is linear in chain length and runs on every operation, so an unbounded chain is a denial-of-service surface against the host. The known uses need 2 to 3 — a person attenuating to an agent, and that agent to a sub-agent.";
165
+ };
166
+ readonly subjectBinding: {
167
+ readonly type: "string";
168
+ readonly description: "REQUIRED on a `private` room, where the subject identifier is withheld: a proof that the membership credential and the authority chain's leaf describe the SAME subject. Without it two parties pool credentials — one contributes membership, the other authority — and the combination verifies as a single party holding both. A host MUST refuse a private-room presentation that omits this.";
169
+ };
170
+ };
171
+ };
172
+ };
173
+ };
174
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
175
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
176
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
177
+ readonly $ref: "#/$defs/Response";
178
+ readonly $defs: {
179
+ readonly Response: {
180
+ readonly $anchor: "response";
181
+ readonly title: "Rooms Epoch Chain — response payload";
182
+ readonly description: "Success response to rooms/epoch/chain. Type https://trusttasks.org/spec/rooms/epoch/chain/0.1#response. Carries ciphertext a host cannot read: the key that opens a link is a storage key no host ever holds, so a response served to a party holding no epoch key discloses nothing but the number of epochs, which the room's epoch number already told them.";
183
+ readonly type: "object";
184
+ readonly additionalProperties: false;
185
+ readonly required: readonly ["roomId", "links"];
186
+ readonly properties: {
187
+ readonly roomId: {
188
+ readonly type: "string";
189
+ };
190
+ readonly links: {
191
+ readonly type: "array";
192
+ readonly description: "The links, highest `epoch` first. Contiguous within the range returned: a host MUST NOT omit a rung it holds while returning a lower one, because a member cannot walk past a gap and would read the omission as history that had been severed.";
193
+ readonly items: {
194
+ readonly $ref: "#/$defs/EpochLink";
195
+ };
196
+ };
197
+ readonly ext: {
198
+ readonly $ref: "#/$defs/Ext";
199
+ };
200
+ };
201
+ };
202
+ readonly Ext: {
203
+ readonly title: "Ext";
204
+ readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
205
+ readonly type: "object";
206
+ readonly minProperties: 1;
207
+ readonly additionalProperties: true;
208
+ readonly propertyNames: {
209
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
210
+ };
211
+ };
212
+ readonly EpochLink: {
213
+ readonly title: "EpochLink";
214
+ readonly type: "object";
215
+ readonly additionalProperties: false;
216
+ readonly required: readonly ["epoch", "wrapped", "nonce"];
217
+ readonly description: "One rung of a room's epoch key chain: the storage key of epoch `epoch - 1`, sealed under the storage key of `epoch`. A group key schedule offers no way to derive an earlier epoch's key from a later one — that property is what makes removing a member mean something — so without a chain the first membership change makes every record already in the room unopenable by everyone, including whoever wrote it. The chain is the one-way street run deliberately the other way: a member holding the current key walks it backwards to any retained epoch, and a member holding an earlier key still derives nothing later. Removal stays forward-only; reading stays possible. What a chain costs is stated where it is chosen, in the room's retention policy.";
218
+ readonly properties: {
219
+ readonly epoch: {
220
+ readonly type: "integer";
221
+ readonly minimum: 2;
222
+ readonly description: "The epoch whose storage key opens this link; it wraps the storage key of `epoch - 1`. Never 1: a room's first epoch has no predecessor, so a link claiming one wraps something that is not an earlier epoch's key.";
223
+ };
224
+ readonly wrapped: {
225
+ readonly type: "string";
226
+ readonly description: "The wrapped predecessor key, base64url. Bound by AEAD associated data to `roomId` and to this link's own position in the chain, so a link lifted to another rung, or served under another room, fails to open rather than yielding a key that is wrong. The binding is load-bearing rather than decorative: every rung is a fixed-length key sealed under a fixed-length key, so nothing about the ciphertext itself says where it belongs.";
227
+ };
228
+ readonly nonce: {
229
+ readonly type: "string";
230
+ readonly description: "AEAD nonce, base64url.";
231
+ };
232
+ };
233
+ };
234
+ readonly AuthorityPresentation: {
235
+ readonly title: "AuthorityPresentation";
236
+ readonly type: "object";
237
+ readonly additionalProperties: false;
238
+ readonly required: readonly ["membership", "authority"];
239
+ readonly description: "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier.";
240
+ readonly properties: {
241
+ readonly membership: {
242
+ readonly type: "string";
243
+ readonly description: "The presenter's membership credential for this room, or — on a `private` room — a zero-knowledge presentation of it. Serialized per the governing profile.";
244
+ };
245
+ readonly authority: {
246
+ readonly type: "array";
247
+ readonly minItems: 1;
248
+ readonly maxItems: 8;
249
+ readonly items: {
250
+ readonly type: "string";
251
+ };
252
+ readonly description: "The authority chain, LEAF FIRST: the first element is the credential being relied on and the last MUST be one issued by the room itself. Every link the presenter relies on is present, because the host will not fetch one. Capped at 8: verification is linear in chain length and runs on every operation, so an unbounded chain is a denial-of-service surface against the host. The known uses need 2 to 3 — a person attenuating to an agent, and that agent to a sub-agent.";
253
+ };
254
+ readonly subjectBinding: {
255
+ readonly type: "string";
256
+ readonly description: "REQUIRED on a `private` room, where the subject identifier is withheld: a proof that the membership credential and the authority chain's leaf describe the SAME subject. Without it two parties pool credentials — one contributes membership, the other authority — and the combination verifies as a single party holding both. A host MUST refuse a private-room presentation that omits this.";
257
+ };
258
+ };
259
+ };
260
+ };
261
+ };
262
+ /**
263
+ * SPEC.md §7.2 policy for the request variant, from this specification's
264
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
265
+ * per-specification and cannot be derived from the document alone, and
266
+ * item 2 needs the schema this carries.
267
+ */
268
+ export declare const SPEC: {
269
+ readonly typeUri: "https://trusttasks.org/spec/rooms/epoch/chain/0.1";
270
+ readonly isBearer: false;
271
+ readonly isProofRequired: true;
272
+ readonly isRecipientRequired: true;
273
+ readonly isIssuedAtRequired: true;
274
+ readonly payloadSchema: {
275
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
276
+ readonly $id: "https://trusttasks.org/spec/rooms/epoch/chain/0.1";
277
+ readonly title: "Rooms Epoch Chain — payload";
278
+ readonly type: "object";
279
+ readonly additionalProperties: false;
280
+ readonly required: readonly ["roomId", "presentation"];
281
+ readonly properties: {
282
+ readonly roomId: {
283
+ readonly type: "string";
284
+ readonly description: "The room whose epoch key chain is being fetched.";
285
+ };
286
+ readonly presentation: {
287
+ readonly $ref: "#/$defs/AuthorityPresentation";
288
+ readonly description: "Must confer the `read` action at this room's scope. Reading the room and reading the parts of it written earlier are the same act, so they take the same grant; a separate one would be a grant nobody could explain.";
289
+ };
290
+ readonly fromEpoch: {
291
+ readonly type: "integer";
292
+ readonly minimum: 2;
293
+ readonly description: "Return only links whose `epoch` is at or below this. The chain is walked downwards, so this is how a member who already holds the top of it asks for the rest. Absent means from the room's current epoch down.";
294
+ };
295
+ readonly limit: {
296
+ readonly type: "integer";
297
+ readonly minimum: 1;
298
+ readonly maximum: 500;
299
+ readonly description: "Maximum links to return, highest `epoch` first. A host MAY return fewer.";
300
+ };
301
+ readonly ext: {
302
+ readonly $ref: "#/$defs/Ext";
303
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
304
+ };
305
+ };
306
+ readonly $defs: {
307
+ readonly Response: {
308
+ readonly $anchor: "response";
309
+ readonly title: "Rooms Epoch Chain — response payload";
310
+ readonly description: "Success response to rooms/epoch/chain. Type https://trusttasks.org/spec/rooms/epoch/chain/0.1#response. Carries ciphertext a host cannot read: the key that opens a link is a storage key no host ever holds, so a response served to a party holding no epoch key discloses nothing but the number of epochs, which the room's epoch number already told them.";
311
+ readonly type: "object";
312
+ readonly additionalProperties: false;
313
+ readonly required: readonly ["roomId", "links"];
314
+ readonly properties: {
315
+ readonly roomId: {
316
+ readonly type: "string";
317
+ };
318
+ readonly links: {
319
+ readonly type: "array";
320
+ readonly description: "The links, highest `epoch` first. Contiguous within the range returned: a host MUST NOT omit a rung it holds while returning a lower one, because a member cannot walk past a gap and would read the omission as history that had been severed.";
321
+ readonly items: {
322
+ readonly $ref: "#/$defs/EpochLink";
323
+ };
324
+ };
325
+ readonly ext: {
326
+ readonly $ref: "#/$defs/Ext";
327
+ };
328
+ };
329
+ };
330
+ readonly Ext: {
331
+ readonly title: "Ext";
332
+ readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
333
+ readonly type: "object";
334
+ readonly minProperties: 1;
335
+ readonly additionalProperties: true;
336
+ readonly propertyNames: {
337
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
338
+ };
339
+ };
340
+ readonly EpochLink: {
341
+ readonly title: "EpochLink";
342
+ readonly type: "object";
343
+ readonly additionalProperties: false;
344
+ readonly required: readonly ["epoch", "wrapped", "nonce"];
345
+ readonly description: "One rung of a room's epoch key chain: the storage key of epoch `epoch - 1`, sealed under the storage key of `epoch`. A group key schedule offers no way to derive an earlier epoch's key from a later one — that property is what makes removing a member mean something — so without a chain the first membership change makes every record already in the room unopenable by everyone, including whoever wrote it. The chain is the one-way street run deliberately the other way: a member holding the current key walks it backwards to any retained epoch, and a member holding an earlier key still derives nothing later. Removal stays forward-only; reading stays possible. What a chain costs is stated where it is chosen, in the room's retention policy.";
346
+ readonly properties: {
347
+ readonly epoch: {
348
+ readonly type: "integer";
349
+ readonly minimum: 2;
350
+ readonly description: "The epoch whose storage key opens this link; it wraps the storage key of `epoch - 1`. Never 1: a room's first epoch has no predecessor, so a link claiming one wraps something that is not an earlier epoch's key.";
351
+ };
352
+ readonly wrapped: {
353
+ readonly type: "string";
354
+ readonly description: "The wrapped predecessor key, base64url. Bound by AEAD associated data to `roomId` and to this link's own position in the chain, so a link lifted to another rung, or served under another room, fails to open rather than yielding a key that is wrong. The binding is load-bearing rather than decorative: every rung is a fixed-length key sealed under a fixed-length key, so nothing about the ciphertext itself says where it belongs.";
355
+ };
356
+ readonly nonce: {
357
+ readonly type: "string";
358
+ readonly description: "AEAD nonce, base64url.";
359
+ };
360
+ };
361
+ };
362
+ readonly AuthorityPresentation: {
363
+ readonly title: "AuthorityPresentation";
364
+ readonly type: "object";
365
+ readonly additionalProperties: false;
366
+ readonly required: readonly ["membership", "authority"];
367
+ readonly description: "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier.";
368
+ readonly properties: {
369
+ readonly membership: {
370
+ readonly type: "string";
371
+ readonly description: "The presenter's membership credential for this room, or — on a `private` room — a zero-knowledge presentation of it. Serialized per the governing profile.";
372
+ };
373
+ readonly authority: {
374
+ readonly type: "array";
375
+ readonly minItems: 1;
376
+ readonly maxItems: 8;
377
+ readonly items: {
378
+ readonly type: "string";
379
+ };
380
+ readonly description: "The authority chain, LEAF FIRST: the first element is the credential being relied on and the last MUST be one issued by the room itself. Every link the presenter relies on is present, because the host will not fetch one. Capped at 8: verification is linear in chain length and runs on every operation, so an unbounded chain is a denial-of-service surface against the host. The known uses need 2 to 3 — a person attenuating to an agent, and that agent to a sub-agent.";
381
+ };
382
+ readonly subjectBinding: {
383
+ readonly type: "string";
384
+ readonly description: "REQUIRED on a `private` room, where the subject identifier is withheld: a proof that the membership credential and the authority chain's leaf describe the SAME subject. Without it two parties pool credentials — one contributes membership, the other authority — and the combination verifies as a single party holding both. A host MUST refuse a private-room presentation that omits this.";
385
+ };
386
+ };
387
+ };
388
+ };
389
+ };
390
+ };
391
+ /**
392
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
393
+ * tracks the *issuer* party's requirement because a response swaps the
394
+ * parties (§7.3 item 5).
395
+ */
396
+ export declare const RESPONSE_SPEC: {
397
+ readonly typeUri: "https://trusttasks.org/spec/rooms/epoch/chain/0.1#response";
398
+ readonly isBearer: false;
399
+ readonly isProofRequired: true;
400
+ readonly isRecipientRequired: true;
401
+ readonly isIssuedAtRequired: true;
402
+ readonly payloadSchema: {
403
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
404
+ readonly $ref: "#/$defs/Response";
405
+ readonly $defs: {
406
+ readonly Response: {
407
+ readonly $anchor: "response";
408
+ readonly title: "Rooms Epoch Chain — response payload";
409
+ readonly description: "Success response to rooms/epoch/chain. Type https://trusttasks.org/spec/rooms/epoch/chain/0.1#response. Carries ciphertext a host cannot read: the key that opens a link is a storage key no host ever holds, so a response served to a party holding no epoch key discloses nothing but the number of epochs, which the room's epoch number already told them.";
410
+ readonly type: "object";
411
+ readonly additionalProperties: false;
412
+ readonly required: readonly ["roomId", "links"];
413
+ readonly properties: {
414
+ readonly roomId: {
415
+ readonly type: "string";
416
+ };
417
+ readonly links: {
418
+ readonly type: "array";
419
+ readonly description: "The links, highest `epoch` first. Contiguous within the range returned: a host MUST NOT omit a rung it holds while returning a lower one, because a member cannot walk past a gap and would read the omission as history that had been severed.";
420
+ readonly items: {
421
+ readonly $ref: "#/$defs/EpochLink";
422
+ };
423
+ };
424
+ readonly ext: {
425
+ readonly $ref: "#/$defs/Ext";
426
+ };
427
+ };
428
+ };
429
+ readonly Ext: {
430
+ readonly title: "Ext";
431
+ readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
432
+ readonly type: "object";
433
+ readonly minProperties: 1;
434
+ readonly additionalProperties: true;
435
+ readonly propertyNames: {
436
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
437
+ };
438
+ };
439
+ readonly EpochLink: {
440
+ readonly title: "EpochLink";
441
+ readonly type: "object";
442
+ readonly additionalProperties: false;
443
+ readonly required: readonly ["epoch", "wrapped", "nonce"];
444
+ readonly description: "One rung of a room's epoch key chain: the storage key of epoch `epoch - 1`, sealed under the storage key of `epoch`. A group key schedule offers no way to derive an earlier epoch's key from a later one — that property is what makes removing a member mean something — so without a chain the first membership change makes every record already in the room unopenable by everyone, including whoever wrote it. The chain is the one-way street run deliberately the other way: a member holding the current key walks it backwards to any retained epoch, and a member holding an earlier key still derives nothing later. Removal stays forward-only; reading stays possible. What a chain costs is stated where it is chosen, in the room's retention policy.";
445
+ readonly properties: {
446
+ readonly epoch: {
447
+ readonly type: "integer";
448
+ readonly minimum: 2;
449
+ readonly description: "The epoch whose storage key opens this link; it wraps the storage key of `epoch - 1`. Never 1: a room's first epoch has no predecessor, so a link claiming one wraps something that is not an earlier epoch's key.";
450
+ };
451
+ readonly wrapped: {
452
+ readonly type: "string";
453
+ readonly description: "The wrapped predecessor key, base64url. Bound by AEAD associated data to `roomId` and to this link's own position in the chain, so a link lifted to another rung, or served under another room, fails to open rather than yielding a key that is wrong. The binding is load-bearing rather than decorative: every rung is a fixed-length key sealed under a fixed-length key, so nothing about the ciphertext itself says where it belongs.";
454
+ };
455
+ readonly nonce: {
456
+ readonly type: "string";
457
+ readonly description: "AEAD nonce, base64url.";
458
+ };
459
+ };
460
+ };
461
+ readonly AuthorityPresentation: {
462
+ readonly title: "AuthorityPresentation";
463
+ readonly type: "object";
464
+ readonly additionalProperties: false;
465
+ readonly required: readonly ["membership", "authority"];
466
+ readonly description: "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier.";
467
+ readonly properties: {
468
+ readonly membership: {
469
+ readonly type: "string";
470
+ readonly description: "The presenter's membership credential for this room, or — on a `private` room — a zero-knowledge presentation of it. Serialized per the governing profile.";
471
+ };
472
+ readonly authority: {
473
+ readonly type: "array";
474
+ readonly minItems: 1;
475
+ readonly maxItems: 8;
476
+ readonly items: {
477
+ readonly type: "string";
478
+ };
479
+ readonly description: "The authority chain, LEAF FIRST: the first element is the credential being relied on and the last MUST be one issued by the room itself. Every link the presenter relies on is present, because the host will not fetch one. Capped at 8: verification is linear in chain length and runs on every operation, so an unbounded chain is a denial-of-service surface against the host. The known uses need 2 to 3 — a person attenuating to an agent, and that agent to a sub-agent.";
480
+ };
481
+ readonly subjectBinding: {
482
+ readonly type: "string";
483
+ readonly description: "REQUIRED on a `private` room, where the subject identifier is withheld: a proof that the membership credential and the authority chain's leaf describe the SAME subject. Without it two parties pool credentials — one contributes membership, the other authority — and the combination verifies as a single party holding both. A host MUST refuse a private-room presentation that omits this.";
484
+ };
485
+ };
486
+ };
487
+ };
488
+ };
489
+ };
490
+ //# sourceMappingURL=payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/rooms/epoch/chain/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,mCAAmC,CAAC;AAG/F,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,YAAY,EAAE,qBAAqB,CAAC;IACpC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,kHAAkH;AAClH,YAAY,EAAE,qBAAqB,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC;AAEtD,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,mDAA4D,CAAC;AAErF,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,sBAAsB,CAAC;AAE7C,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,4DAAqE,CAAC;AAEvG,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,8BAA8B,CAAC;AAEtD;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgIjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgG1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}