@openvtc/trust-tasks 0.17.6 → 0.17.8

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 (58) hide show
  1. package/CHANGELOG.md +158 -0
  2. package/dist/_shared/components.d.ts +4 -0
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/index.d.ts +8 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +8 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/rooms/_shared/0.1/room.d.ts +1 -1
  9. package/dist/rooms/_shared/0.1/room.d.ts.map +1 -1
  10. package/dist/rooms/create/0.1/payload.d.ts +42 -2
  11. package/dist/rooms/create/0.1/payload.d.ts.map +1 -1
  12. package/dist/rooms/create/0.1/payload.js +24 -0
  13. package/dist/rooms/create/0.1/payload.js.map +1 -1
  14. package/dist/rooms/keys/backfill/0.1/payload.d.ts +336 -0
  15. package/dist/rooms/keys/backfill/0.1/payload.d.ts.map +1 -0
  16. package/dist/rooms/keys/backfill/0.1/payload.js +177 -0
  17. package/dist/rooms/keys/backfill/0.1/payload.js.map +1 -0
  18. package/dist/rooms/keys/chain/0.1/payload.d.ts +382 -0
  19. package/dist/rooms/keys/chain/0.1/payload.d.ts.map +1 -0
  20. package/dist/rooms/keys/chain/0.1/payload.js +213 -0
  21. package/dist/rooms/keys/chain/0.1/payload.js.map +1 -0
  22. package/dist/rooms/keys/list/0.1/payload.d.ts +314 -0
  23. package/dist/rooms/keys/list/0.1/payload.d.ts.map +1 -0
  24. package/dist/rooms/keys/list/0.1/payload.js +175 -0
  25. package/dist/rooms/keys/list/0.1/payload.js.map +1 -0
  26. package/dist/rooms/keys/seal/0.1/payload.d.ts +352 -0
  27. package/dist/rooms/keys/seal/0.1/payload.d.ts.map +1 -0
  28. package/dist/rooms/keys/seal/0.1/payload.js +199 -0
  29. package/dist/rooms/keys/seal/0.1/payload.js.map +1 -0
  30. package/dist/rooms/owner/invite/0.1/payload.d.ts +291 -0
  31. package/dist/rooms/owner/invite/0.1/payload.d.ts.map +1 -0
  32. package/dist/rooms/owner/invite/0.1/payload.js +158 -0
  33. package/dist/rooms/owner/invite/0.1/payload.js.map +1 -0
  34. package/dist/rooms/owner/issue-authority/0.1/payload.d.ts +315 -0
  35. package/dist/rooms/owner/issue-authority/0.1/payload.d.ts.map +1 -0
  36. package/dist/rooms/owner/issue-authority/0.1/payload.js +173 -0
  37. package/dist/rooms/owner/issue-authority/0.1/payload.js.map +1 -0
  38. package/dist/rooms/owner/issue-membership/0.1/payload.d.ts +291 -0
  39. package/dist/rooms/owner/issue-membership/0.1/payload.d.ts.map +1 -0
  40. package/dist/rooms/owner/issue-membership/0.1/payload.js +158 -0
  41. package/dist/rooms/owner/issue-membership/0.1/payload.js.map +1 -0
  42. package/dist/rooms/owner/register/0.1/payload.d.ts +382 -0
  43. package/dist/rooms/owner/register/0.1/payload.d.ts.map +1 -0
  44. package/dist/rooms/owner/register/0.1/payload.js +215 -0
  45. package/dist/rooms/owner/register/0.1/payload.js.map +1 -0
  46. package/package.json +1 -1
  47. package/src/_shared/components.ts +4 -0
  48. package/src/index.ts +8 -0
  49. package/src/rooms/_shared/0.1/room.ts +1 -1
  50. package/src/rooms/create/0.1/payload.ts +30 -2
  51. package/src/rooms/keys/backfill/0.1/payload.ts +236 -0
  52. package/src/rooms/keys/chain/0.1/payload.ts +262 -0
  53. package/src/rooms/keys/list/0.1/payload.ts +222 -0
  54. package/src/rooms/keys/seal/0.1/payload.ts +246 -0
  55. package/src/rooms/owner/invite/0.1/payload.ts +212 -0
  56. package/src/rooms/owner/issue-authority/0.1/payload.ts +233 -0
  57. package/src/rooms/owner/issue-membership/0.1/payload.ts +212 -0
  58. package/src/rooms/owner/register/0.1/payload.ts +278 -0
@@ -0,0 +1,213 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/rooms/keys/chain/0.1/payload.schema.json
4
+ */
5
+ /** Trust Task type URI. */
6
+ export const TYPE_URI = "https://trusttasks.org/spec/rooms/keys/chain/0.1";
7
+ /** Trust Task response type URI (request type URI + "#response"). */
8
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/keys/chain/0.1#response";
9
+ /**
10
+ * This specification's payload schema, as a value.
11
+ *
12
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
13
+ * rather than only as a `.json` file because TypeScript types are erased
14
+ * at runtime: without a schema a consumer has nothing to validate, and
15
+ * every REQUIRED payload member is optional in practice. Cross-file
16
+ * `$ref`s are already inlined, so it needs no resolver.
17
+ */
18
+ export const PAYLOAD_SCHEMA = {
19
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
20
+ "$id": "https://trusttasks.org/spec/rooms/keys/chain/0.1",
21
+ "title": "Rooms Keys Chain — payload",
22
+ "type": "object",
23
+ "additionalProperties": false,
24
+ "required": [
25
+ "roomId",
26
+ "links"
27
+ ],
28
+ "properties": {
29
+ "roomId": {
30
+ "type": "string",
31
+ "description": "The room whose chain these rungs belong to. The recipient MUST hold group state for it, and MUST NOT create any on the strength of this request: rungs are inert without an epoch key, so accepting them for a room one is not in would retain key material for nothing."
32
+ },
33
+ "links": {
34
+ "type": "array",
35
+ "minItems": 1,
36
+ "description": "The rungs, in any order. A recipient stores them and reports how far back it can now reach — see the response's `earliestReadableEpoch`.",
37
+ "items": {
38
+ "$ref": "#/$defs/EpochLink"
39
+ }
40
+ },
41
+ "ext": {
42
+ "$ref": "#/$defs/Ext",
43
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
44
+ }
45
+ },
46
+ "$defs": {
47
+ "Response": {
48
+ "$anchor": "response",
49
+ "title": "Rooms Keys Chain — response payload",
50
+ "description": "Success response to rooms/keys/chain. Type https://trusttasks.org/spec/rooms/keys/chain/0.1#response.",
51
+ "type": "object",
52
+ "additionalProperties": false,
53
+ "required": [
54
+ "roomId",
55
+ "earliestReadableEpoch"
56
+ ],
57
+ "properties": {
58
+ "roomId": {
59
+ "type": "string"
60
+ },
61
+ "earliestReadableEpoch": {
62
+ "type": "integer",
63
+ "minimum": 1,
64
+ "description": "The earliest epoch the recipient can now derive a key for, having walked the chain it holds. **This is the answer worth having**, and it is not a restatement of what was sent: a rung only extends reach if every rung above it is present too, so a caller that supplied a set with a gap in it learns that here rather than at the first record that will not open. `1` means the room's whole history is reachable."
65
+ },
66
+ "stored": {
67
+ "type": "integer",
68
+ "minimum": 0,
69
+ "description": "How many rungs the recipient did not already hold. Zero is a success, not a no-op: it means the caller's chain was already delivered, which is what a retry looks like."
70
+ },
71
+ "ext": {
72
+ "$ref": "#/$defs/Ext"
73
+ }
74
+ }
75
+ },
76
+ "Ext": {
77
+ "title": "Ext",
78
+ "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.",
79
+ "type": "object",
80
+ "minProperties": 1,
81
+ "additionalProperties": true,
82
+ "propertyNames": {
83
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
84
+ }
85
+ },
86
+ "EpochLink": {
87
+ "title": "EpochLink",
88
+ "type": "object",
89
+ "additionalProperties": false,
90
+ "required": [
91
+ "epoch",
92
+ "wrapped",
93
+ "nonce"
94
+ ],
95
+ "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.",
96
+ "properties": {
97
+ "epoch": {
98
+ "type": "integer",
99
+ "minimum": 2,
100
+ "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."
101
+ },
102
+ "wrapped": {
103
+ "type": "string",
104
+ "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."
105
+ },
106
+ "nonce": {
107
+ "type": "string",
108
+ "description": "AEAD nonce, base64url."
109
+ }
110
+ }
111
+ }
112
+ }
113
+ };
114
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
115
+ export const RESPONSE_PAYLOAD_SCHEMA = {
116
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
117
+ "$ref": "#/$defs/Response",
118
+ "$defs": {
119
+ "Response": {
120
+ "$anchor": "response",
121
+ "title": "Rooms Keys Chain — response payload",
122
+ "description": "Success response to rooms/keys/chain. Type https://trusttasks.org/spec/rooms/keys/chain/0.1#response.",
123
+ "type": "object",
124
+ "additionalProperties": false,
125
+ "required": [
126
+ "roomId",
127
+ "earliestReadableEpoch"
128
+ ],
129
+ "properties": {
130
+ "roomId": {
131
+ "type": "string"
132
+ },
133
+ "earliestReadableEpoch": {
134
+ "type": "integer",
135
+ "minimum": 1,
136
+ "description": "The earliest epoch the recipient can now derive a key for, having walked the chain it holds. **This is the answer worth having**, and it is not a restatement of what was sent: a rung only extends reach if every rung above it is present too, so a caller that supplied a set with a gap in it learns that here rather than at the first record that will not open. `1` means the room's whole history is reachable."
137
+ },
138
+ "stored": {
139
+ "type": "integer",
140
+ "minimum": 0,
141
+ "description": "How many rungs the recipient did not already hold. Zero is a success, not a no-op: it means the caller's chain was already delivered, which is what a retry looks like."
142
+ },
143
+ "ext": {
144
+ "$ref": "#/$defs/Ext"
145
+ }
146
+ }
147
+ },
148
+ "Ext": {
149
+ "title": "Ext",
150
+ "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.",
151
+ "type": "object",
152
+ "minProperties": 1,
153
+ "additionalProperties": true,
154
+ "propertyNames": {
155
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
156
+ }
157
+ },
158
+ "EpochLink": {
159
+ "title": "EpochLink",
160
+ "type": "object",
161
+ "additionalProperties": false,
162
+ "required": [
163
+ "epoch",
164
+ "wrapped",
165
+ "nonce"
166
+ ],
167
+ "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.",
168
+ "properties": {
169
+ "epoch": {
170
+ "type": "integer",
171
+ "minimum": 2,
172
+ "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."
173
+ },
174
+ "wrapped": {
175
+ "type": "string",
176
+ "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."
177
+ },
178
+ "nonce": {
179
+ "type": "string",
180
+ "description": "AEAD nonce, base64url."
181
+ }
182
+ }
183
+ }
184
+ }
185
+ };
186
+ /**
187
+ * SPEC.md §7.2 policy for the request variant, from this specification's
188
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
189
+ * per-specification and cannot be derived from the document alone, and
190
+ * item 2 needs the schema this carries.
191
+ */
192
+ export const SPEC = {
193
+ typeUri: TYPE_URI,
194
+ isBearer: false,
195
+ isProofRequired: true,
196
+ isRecipientRequired: true,
197
+ isIssuedAtRequired: true,
198
+ payloadSchema: PAYLOAD_SCHEMA,
199
+ };
200
+ /**
201
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
202
+ * tracks the *issuer* party's requirement because a response swaps the
203
+ * parties (§7.3 item 5).
204
+ */
205
+ export const RESPONSE_SPEC = {
206
+ typeUri: RESPONSE_TYPE_URI,
207
+ isBearer: false,
208
+ isProofRequired: true,
209
+ isRecipientRequired: true,
210
+ isIssuedAtRequired: true,
211
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
212
+ };
213
+ //# sourceMappingURL=payload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/rooms/keys/chain/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAwCH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,kDAA2D,CAAC;AAKpF,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,2DAAoE,CAAC;AAKtG;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,kDAAkD;IACzD,OAAO,EAAE,4BAA4B;IACrC,MAAM,EAAE,QAAQ;IAChB,sBAAsB,EAAE,KAAK;IAC7B,UAAU,EAAE;QACV,QAAQ;QACR,OAAO;KACR;IACD,YAAY,EAAE;QACZ,QAAQ,EAAE;YACR,MAAM,EAAE,QAAQ;YAChB,aAAa,EAAE,0QAA0Q;SAC1R;QACD,OAAO,EAAE;YACP,MAAM,EAAE,OAAO;YACf,UAAU,EAAE,CAAC;YACb,aAAa,EAAE,0IAA0I;YACzJ,OAAO,EAAE;gBACP,MAAM,EAAE,mBAAmB;aAC5B;SACF;QACD,KAAK,EAAE;YACL,MAAM,EAAE,aAAa;YACrB,aAAa,EAAE,yDAAyD;SACzE;KACF;IACD,OAAO,EAAE;QACP,UAAU,EAAE;YACV,SAAS,EAAE,UAAU;YACr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AChB,aAAa,EAAE,wBAAwB;iBACxC;aACF;SACF;KACF;CACO,CAAC;AAEX;;;;;GAKG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,OAAO,EAAE,QAAQ;IACjB,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,cAAc;CACrB,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,uBAAuB;CAC9B,CAAC"}
@@ -0,0 +1,314 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/rooms/keys/list/0.1/payload.schema.json
4
+ */
5
+ import type { Ext } from "../../../../_shared/components.js";
6
+ export interface RoomsKeysListPayload {
7
+ /**
8
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
9
+ */
10
+ ext?: Ext;
11
+ }
12
+ /**
13
+ * Success response to rooms/keys/list. Type https://trusttasks.org/spec/rooms/keys/list/0.1#response. The rooms this key holder can open, which is a different set from the rooms its principal is a member of: membership is a credential the room issued, and this is key custody. A room whose group state was never delivered is absent here and the principal may still hold a perfectly good VMC for it.
14
+ */
15
+ export interface RoomsKeysListResponsePayload {
16
+ /**
17
+ * One entry per room, in no guaranteed order.
18
+ */
19
+ rooms: {
20
+ /**
21
+ * The room's identifier.
22
+ */
23
+ roomId: string;
24
+ /**
25
+ * The epoch this key holder is at. Behind the room's own epoch means a commit has not been delivered, and records sealed since will not open.
26
+ */
27
+ epoch: number;
28
+ /**
29
+ * The earliest epoch this key holder can derive a key for, walking the epoch key chain it holds. Equal to `epoch` means it reads only from where it joined; `1` means the room's whole retained history. Anything between is a chain that has been delivered in part, or one deliberately severed below that point.
30
+ */
31
+ earliestReadableEpoch: number;
32
+ }[];
33
+ ext?: Ext;
34
+ }
35
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
36
+ export type { Ext };
37
+ /** Trust Task type URI. */
38
+ export declare const TYPE_URI: "https://trusttasks.org/spec/rooms/keys/list/0.1";
39
+ /** Stable alias for this specification's request payload shape. */
40
+ export type Payload = RoomsKeysListPayload;
41
+ /** Trust Task response type URI (request type URI + "#response"). */
42
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/rooms/keys/list/0.1#response";
43
+ /** Stable alias for this specification's success-response payload shape. */
44
+ export type Response = RoomsKeysListResponsePayload;
45
+ /**
46
+ * This specification's payload schema, as a value.
47
+ *
48
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
49
+ * rather than only as a `.json` file because TypeScript types are erased
50
+ * at runtime: without a schema a consumer has nothing to validate, and
51
+ * every REQUIRED payload member is optional in practice. Cross-file
52
+ * `$ref`s are already inlined, so it needs no resolver.
53
+ */
54
+ export declare const PAYLOAD_SCHEMA: {
55
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
56
+ readonly $id: "https://trusttasks.org/spec/rooms/keys/list/0.1";
57
+ readonly title: "Rooms Keys List — payload";
58
+ readonly type: "object";
59
+ readonly additionalProperties: false;
60
+ readonly properties: {
61
+ readonly ext: {
62
+ readonly $ref: "#/$defs/Ext";
63
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
64
+ };
65
+ };
66
+ readonly $defs: {
67
+ readonly Response: {
68
+ readonly $anchor: "response";
69
+ readonly title: "Rooms Keys List — response payload";
70
+ readonly description: "Success response to rooms/keys/list. Type https://trusttasks.org/spec/rooms/keys/list/0.1#response. The rooms this key holder can open, which is a different set from the rooms its principal is a member of: membership is a credential the room issued, and this is key custody. A room whose group state was never delivered is absent here and the principal may still hold a perfectly good VMC for it.";
71
+ readonly type: "object";
72
+ readonly additionalProperties: false;
73
+ readonly required: readonly ["rooms"];
74
+ readonly properties: {
75
+ readonly rooms: {
76
+ readonly type: "array";
77
+ readonly description: "One entry per room, in no guaranteed order.";
78
+ readonly items: {
79
+ readonly type: "object";
80
+ readonly additionalProperties: false;
81
+ readonly required: readonly ["roomId", "epoch", "earliestReadableEpoch"];
82
+ readonly properties: {
83
+ readonly roomId: {
84
+ readonly type: "string";
85
+ readonly description: "The room's identifier.";
86
+ };
87
+ readonly epoch: {
88
+ readonly type: "integer";
89
+ readonly minimum: 1;
90
+ readonly description: "The epoch this key holder is at. Behind the room's own epoch means a commit has not been delivered, and records sealed since will not open.";
91
+ };
92
+ readonly earliestReadableEpoch: {
93
+ readonly type: "integer";
94
+ readonly minimum: 1;
95
+ readonly description: "The earliest epoch this key holder can derive a key for, walking the epoch key chain it holds. Equal to `epoch` means it reads only from where it joined; `1` means the room's whole retained history. Anything between is a chain that has been delivered in part, or one deliberately severed below that point.";
96
+ };
97
+ };
98
+ };
99
+ };
100
+ readonly ext: {
101
+ readonly $ref: "#/$defs/Ext";
102
+ };
103
+ };
104
+ };
105
+ readonly Ext: {
106
+ readonly title: "Ext";
107
+ 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.";
108
+ readonly type: "object";
109
+ readonly minProperties: 1;
110
+ readonly additionalProperties: true;
111
+ readonly propertyNames: {
112
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
113
+ };
114
+ };
115
+ };
116
+ };
117
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
118
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
119
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
120
+ readonly $ref: "#/$defs/Response";
121
+ readonly $defs: {
122
+ readonly Response: {
123
+ readonly $anchor: "response";
124
+ readonly title: "Rooms Keys List — response payload";
125
+ readonly description: "Success response to rooms/keys/list. Type https://trusttasks.org/spec/rooms/keys/list/0.1#response. The rooms this key holder can open, which is a different set from the rooms its principal is a member of: membership is a credential the room issued, and this is key custody. A room whose group state was never delivered is absent here and the principal may still hold a perfectly good VMC for it.";
126
+ readonly type: "object";
127
+ readonly additionalProperties: false;
128
+ readonly required: readonly ["rooms"];
129
+ readonly properties: {
130
+ readonly rooms: {
131
+ readonly type: "array";
132
+ readonly description: "One entry per room, in no guaranteed order.";
133
+ readonly items: {
134
+ readonly type: "object";
135
+ readonly additionalProperties: false;
136
+ readonly required: readonly ["roomId", "epoch", "earliestReadableEpoch"];
137
+ readonly properties: {
138
+ readonly roomId: {
139
+ readonly type: "string";
140
+ readonly description: "The room's identifier.";
141
+ };
142
+ readonly epoch: {
143
+ readonly type: "integer";
144
+ readonly minimum: 1;
145
+ readonly description: "The epoch this key holder is at. Behind the room's own epoch means a commit has not been delivered, and records sealed since will not open.";
146
+ };
147
+ readonly earliestReadableEpoch: {
148
+ readonly type: "integer";
149
+ readonly minimum: 1;
150
+ readonly description: "The earliest epoch this key holder can derive a key for, walking the epoch key chain it holds. Equal to `epoch` means it reads only from where it joined; `1` means the room's whole retained history. Anything between is a chain that has been delivered in part, or one deliberately severed below that point.";
151
+ };
152
+ };
153
+ };
154
+ };
155
+ readonly ext: {
156
+ readonly $ref: "#/$defs/Ext";
157
+ };
158
+ };
159
+ };
160
+ readonly Ext: {
161
+ readonly title: "Ext";
162
+ 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.";
163
+ readonly type: "object";
164
+ readonly minProperties: 1;
165
+ readonly additionalProperties: true;
166
+ readonly propertyNames: {
167
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
168
+ };
169
+ };
170
+ };
171
+ };
172
+ /**
173
+ * SPEC.md §7.2 policy for the request variant, from this specification's
174
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
175
+ * per-specification and cannot be derived from the document alone, and
176
+ * item 2 needs the schema this carries.
177
+ */
178
+ export declare const SPEC: {
179
+ readonly typeUri: "https://trusttasks.org/spec/rooms/keys/list/0.1";
180
+ readonly isBearer: false;
181
+ readonly isProofRequired: true;
182
+ readonly isRecipientRequired: true;
183
+ readonly isIssuedAtRequired: true;
184
+ readonly payloadSchema: {
185
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
186
+ readonly $id: "https://trusttasks.org/spec/rooms/keys/list/0.1";
187
+ readonly title: "Rooms Keys List — payload";
188
+ readonly type: "object";
189
+ readonly additionalProperties: false;
190
+ readonly properties: {
191
+ readonly ext: {
192
+ readonly $ref: "#/$defs/Ext";
193
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
194
+ };
195
+ };
196
+ readonly $defs: {
197
+ readonly Response: {
198
+ readonly $anchor: "response";
199
+ readonly title: "Rooms Keys List — response payload";
200
+ readonly description: "Success response to rooms/keys/list. Type https://trusttasks.org/spec/rooms/keys/list/0.1#response. The rooms this key holder can open, which is a different set from the rooms its principal is a member of: membership is a credential the room issued, and this is key custody. A room whose group state was never delivered is absent here and the principal may still hold a perfectly good VMC for it.";
201
+ readonly type: "object";
202
+ readonly additionalProperties: false;
203
+ readonly required: readonly ["rooms"];
204
+ readonly properties: {
205
+ readonly rooms: {
206
+ readonly type: "array";
207
+ readonly description: "One entry per room, in no guaranteed order.";
208
+ readonly items: {
209
+ readonly type: "object";
210
+ readonly additionalProperties: false;
211
+ readonly required: readonly ["roomId", "epoch", "earliestReadableEpoch"];
212
+ readonly properties: {
213
+ readonly roomId: {
214
+ readonly type: "string";
215
+ readonly description: "The room's identifier.";
216
+ };
217
+ readonly epoch: {
218
+ readonly type: "integer";
219
+ readonly minimum: 1;
220
+ readonly description: "The epoch this key holder is at. Behind the room's own epoch means a commit has not been delivered, and records sealed since will not open.";
221
+ };
222
+ readonly earliestReadableEpoch: {
223
+ readonly type: "integer";
224
+ readonly minimum: 1;
225
+ readonly description: "The earliest epoch this key holder can derive a key for, walking the epoch key chain it holds. Equal to `epoch` means it reads only from where it joined; `1` means the room's whole retained history. Anything between is a chain that has been delivered in part, or one deliberately severed below that point.";
226
+ };
227
+ };
228
+ };
229
+ };
230
+ readonly ext: {
231
+ readonly $ref: "#/$defs/Ext";
232
+ };
233
+ };
234
+ };
235
+ readonly Ext: {
236
+ readonly title: "Ext";
237
+ 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.";
238
+ readonly type: "object";
239
+ readonly minProperties: 1;
240
+ readonly additionalProperties: true;
241
+ readonly propertyNames: {
242
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
243
+ };
244
+ };
245
+ };
246
+ };
247
+ };
248
+ /**
249
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
250
+ * tracks the *issuer* party's requirement because a response swaps the
251
+ * parties (§7.3 item 5).
252
+ */
253
+ export declare const RESPONSE_SPEC: {
254
+ readonly typeUri: "https://trusttasks.org/spec/rooms/keys/list/0.1#response";
255
+ readonly isBearer: false;
256
+ readonly isProofRequired: true;
257
+ readonly isRecipientRequired: true;
258
+ readonly isIssuedAtRequired: true;
259
+ readonly payloadSchema: {
260
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
261
+ readonly $ref: "#/$defs/Response";
262
+ readonly $defs: {
263
+ readonly Response: {
264
+ readonly $anchor: "response";
265
+ readonly title: "Rooms Keys List — response payload";
266
+ readonly description: "Success response to rooms/keys/list. Type https://trusttasks.org/spec/rooms/keys/list/0.1#response. The rooms this key holder can open, which is a different set from the rooms its principal is a member of: membership is a credential the room issued, and this is key custody. A room whose group state was never delivered is absent here and the principal may still hold a perfectly good VMC for it.";
267
+ readonly type: "object";
268
+ readonly additionalProperties: false;
269
+ readonly required: readonly ["rooms"];
270
+ readonly properties: {
271
+ readonly rooms: {
272
+ readonly type: "array";
273
+ readonly description: "One entry per room, in no guaranteed order.";
274
+ readonly items: {
275
+ readonly type: "object";
276
+ readonly additionalProperties: false;
277
+ readonly required: readonly ["roomId", "epoch", "earliestReadableEpoch"];
278
+ readonly properties: {
279
+ readonly roomId: {
280
+ readonly type: "string";
281
+ readonly description: "The room's identifier.";
282
+ };
283
+ readonly epoch: {
284
+ readonly type: "integer";
285
+ readonly minimum: 1;
286
+ readonly description: "The epoch this key holder is at. Behind the room's own epoch means a commit has not been delivered, and records sealed since will not open.";
287
+ };
288
+ readonly earliestReadableEpoch: {
289
+ readonly type: "integer";
290
+ readonly minimum: 1;
291
+ readonly description: "The earliest epoch this key holder can derive a key for, walking the epoch key chain it holds. Equal to `epoch` means it reads only from where it joined; `1` means the room's whole retained history. Anything between is a chain that has been delivered in part, or one deliberately severed below that point.";
292
+ };
293
+ };
294
+ };
295
+ };
296
+ readonly ext: {
297
+ readonly $ref: "#/$defs/Ext";
298
+ };
299
+ };
300
+ };
301
+ readonly Ext: {
302
+ readonly title: "Ext";
303
+ 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.";
304
+ readonly type: "object";
305
+ readonly minProperties: 1;
306
+ readonly additionalProperties: true;
307
+ readonly propertyNames: {
308
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
309
+ };
310
+ };
311
+ };
312
+ };
313
+ };
314
+ //# sourceMappingURL=payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/rooms/keys/list/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mCAAmC,CAAC;AAG7D,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,KAAK,EAAE;QACL;;WAEG;QACH,MAAM,EAAE,MAAM,CA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