@openvtc/trust-tasks 0.16.7 → 0.16.9

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 (90) hide show
  1. package/CHANGELOG.md +144 -0
  2. package/dist/_shared/components.d.ts +2 -2
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/device/list/0.1/payload.d.ts +4 -4
  5. package/dist/device/list/0.1/payload.d.ts.map +1 -1
  6. package/dist/device/list/0.1/payload.js +6 -2
  7. package/dist/device/list/0.1/payload.js.map +1 -1
  8. package/dist/device/list/0.2/payload.d.ts +4 -4
  9. package/dist/device/list/0.2/payload.d.ts.map +1 -1
  10. package/dist/device/list/0.2/payload.js +6 -2
  11. package/dist/device/list/0.2/payload.js.map +1 -1
  12. package/dist/device/register/0.1/payload.d.ts +4 -4
  13. package/dist/device/register/0.1/payload.d.ts.map +1 -1
  14. package/dist/device/register/0.1/payload.js +6 -2
  15. package/dist/device/register/0.1/payload.js.map +1 -1
  16. package/dist/device/register/0.2/payload.d.ts +4 -4
  17. package/dist/device/register/0.2/payload.d.ts.map +1 -1
  18. package/dist/device/register/0.2/payload.js +6 -2
  19. package/dist/device/register/0.2/payload.js.map +1 -1
  20. package/dist/index.d.ts +12 -0
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +12 -0
  23. package/dist/index.js.map +1 -1
  24. package/dist/rooms/keys/commit/0.1/payload.d.ts +266 -0
  25. package/dist/rooms/keys/commit/0.1/payload.d.ts.map +1 -0
  26. package/dist/rooms/keys/commit/0.1/payload.js +146 -0
  27. package/dist/rooms/keys/commit/0.1/payload.js.map +1 -0
  28. package/dist/rooms/keys/key-package/0.1/payload.d.ts +272 -0
  29. package/dist/rooms/keys/key-package/0.1/payload.d.ts.map +1 -0
  30. package/dist/rooms/keys/key-package/0.1/payload.js +147 -0
  31. package/dist/rooms/keys/key-package/0.1/payload.js.map +1 -0
  32. package/dist/rooms/keys/open/0.1/payload.d.ts +323 -0
  33. package/dist/rooms/keys/open/0.1/payload.d.ts.map +1 -0
  34. package/dist/rooms/keys/open/0.1/payload.js +171 -0
  35. package/dist/rooms/keys/open/0.1/payload.js.map +1 -0
  36. package/dist/rooms/keys/present/0.1/payload.d.ts +306 -0
  37. package/dist/rooms/keys/present/0.1/payload.d.ts.map +1 -0
  38. package/dist/rooms/keys/present/0.1/payload.js +165 -0
  39. package/dist/rooms/keys/present/0.1/payload.js.map +1 -0
  40. package/dist/rooms/keys/welcome/0.1/payload.d.ts +276 -0
  41. package/dist/rooms/keys/welcome/0.1/payload.d.ts.map +1 -0
  42. package/dist/rooms/keys/welcome/0.1/payload.js +148 -0
  43. package/dist/rooms/keys/welcome/0.1/payload.js.map +1 -0
  44. package/dist/rooms/records/curate/0.1/payload.d.ts +500 -0
  45. package/dist/rooms/records/curate/0.1/payload.d.ts.map +1 -0
  46. package/dist/rooms/records/curate/0.1/payload.js +277 -0
  47. package/dist/rooms/records/curate/0.1/payload.js.map +1 -0
  48. package/dist/vta/backup/abort/1.0/payload.d.ts +262 -0
  49. package/dist/vta/backup/abort/1.0/payload.d.ts.map +1 -0
  50. package/dist/vta/backup/abort/1.0/payload.js +146 -0
  51. package/dist/vta/backup/abort/1.0/payload.js.map +1 -0
  52. package/dist/vta/backup/complete-export/1.0/payload.d.ts +262 -0
  53. package/dist/vta/backup/complete-export/1.0/payload.d.ts.map +1 -0
  54. package/dist/vta/backup/complete-export/1.0/payload.js +146 -0
  55. package/dist/vta/backup/complete-export/1.0/payload.js.map +1 -0
  56. package/dist/vta/backup/finalize-import/1.0/payload.d.ts +477 -0
  57. package/dist/vta/backup/finalize-import/1.0/payload.d.ts.map +1 -0
  58. package/dist/vta/backup/finalize-import/1.0/payload.js +249 -0
  59. package/dist/vta/backup/finalize-import/1.0/payload.js.map +1 -0
  60. package/dist/vta/backup/initiate-export/1.0/payload.d.ts +514 -0
  61. package/dist/vta/backup/initiate-export/1.0/payload.d.ts.map +1 -0
  62. package/dist/vta/backup/initiate-export/1.0/payload.js +267 -0
  63. package/dist/vta/backup/initiate-export/1.0/payload.js.map +1 -0
  64. package/dist/vta/backup/initiate-import/1.0/payload.d.ts +510 -0
  65. package/dist/vta/backup/initiate-import/1.0/payload.d.ts.map +1 -0
  66. package/dist/vta/backup/initiate-import/1.0/payload.js +266 -0
  67. package/dist/vta/backup/initiate-import/1.0/payload.js.map +1 -0
  68. package/dist/vta/management/reload-services/1.0/payload.d.ts +230 -0
  69. package/dist/vta/management/reload-services/1.0/payload.d.ts.map +1 -0
  70. package/dist/vta/management/reload-services/1.0/payload.js +130 -0
  71. package/dist/vta/management/reload-services/1.0/payload.js.map +1 -0
  72. package/package.json +1 -1
  73. package/src/_shared/components.ts +6 -2
  74. package/src/device/list/0.1/payload.ts +6 -2
  75. package/src/device/list/0.2/payload.ts +6 -2
  76. package/src/device/register/0.1/payload.ts +6 -2
  77. package/src/device/register/0.2/payload.ts +6 -2
  78. package/src/index.ts +12 -0
  79. package/src/rooms/keys/commit/0.1/payload.ts +195 -0
  80. package/src/rooms/keys/key-package/0.1/payload.ts +196 -0
  81. package/src/rooms/keys/open/0.1/payload.ts +237 -0
  82. package/src/rooms/keys/present/0.1/payload.ts +224 -0
  83. package/src/rooms/keys/welcome/0.1/payload.ts +201 -0
  84. package/src/rooms/records/curate/0.1/payload.ts +357 -0
  85. package/src/vta/backup/abort/1.0/payload.ts +191 -0
  86. package/src/vta/backup/complete-export/1.0/payload.ts +191 -0
  87. package/src/vta/backup/finalize-import/1.0/payload.ts +333 -0
  88. package/src/vta/backup/initiate-export/1.0/payload.ts +350 -0
  89. package/src/vta/backup/initiate-import/1.0/payload.ts +349 -0
  90. package/src/vta/management/reload-services/1.0/payload.ts +167 -0
@@ -0,0 +1,323 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/rooms/keys/open/0.1/payload.schema.json
4
+ */
5
+ import type { Ext } from "../../../../_shared/components.js";
6
+ /**
7
+ * An agent asks the party holding its principal's room keys to open one sealed record. The key never crosses to the agent: this is a decryption oracle, not a key-release call.
8
+ */
9
+ export interface RoomsKeysOpenPayload {
10
+ /**
11
+ * The room the record belongs to. Part of the record's associated data, so a caller naming the wrong room gets an authentication failure rather than someone else's plaintext.
12
+ */
13
+ roomId: string;
14
+ /**
15
+ * The record's key within the room.
16
+ */
17
+ key: string;
18
+ /**
19
+ * The record's version. Bound into the associated data, so a record served at a different version does not open.
20
+ */
21
+ version: number;
22
+ /**
23
+ * The sealed record exactly as the host returned it.
24
+ */
25
+ sealed: {
26
+ /**
27
+ * base64url.
28
+ */
29
+ ciphertext: string;
30
+ /**
31
+ * base64url.
32
+ */
33
+ nonce: string;
34
+ /**
35
+ * The epoch it was sealed under. The oracle refuses an epoch it holds no key for rather than guessing.
36
+ */
37
+ epoch: number;
38
+ };
39
+ /**
40
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
41
+ */
42
+ ext?: Ext;
43
+ }
44
+ /**
45
+ * Success response to rooms/keys/open. Type https://trusttasks.org/spec/rooms/keys/open/0.1#response.
46
+ */
47
+ export interface RoomsKeysOpenResponsePayload {
48
+ /**
49
+ * The opened record, base64url. The only thing that crosses back — never the key.
50
+ */
51
+ plaintext: string;
52
+ ext?: Ext;
53
+ }
54
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
55
+ export type { Ext };
56
+ /** Trust Task type URI. */
57
+ export declare const TYPE_URI: "https://trusttasks.org/spec/rooms/keys/open/0.1";
58
+ /** Stable alias for this specification's request payload shape. */
59
+ export type Payload = RoomsKeysOpenPayload;
60
+ /** Trust Task response type URI (request type URI + "#response"). */
61
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/rooms/keys/open/0.1#response";
62
+ /** Stable alias for this specification's success-response payload shape. */
63
+ export type Response = RoomsKeysOpenResponsePayload;
64
+ /**
65
+ * This specification's payload schema, as a value.
66
+ *
67
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
68
+ * rather than only as a `.json` file because TypeScript types are erased
69
+ * at runtime: without a schema a consumer has nothing to validate, and
70
+ * every REQUIRED payload member is optional in practice. Cross-file
71
+ * `$ref`s are already inlined, so it needs no resolver.
72
+ */
73
+ export declare const PAYLOAD_SCHEMA: {
74
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
75
+ readonly $id: "https://trusttasks.org/spec/rooms/keys/open/0.1";
76
+ readonly title: "Rooms Keys Open — payload";
77
+ readonly description: "An agent asks the party holding its principal's room keys to open one sealed record. The key never crosses to the agent: this is a decryption oracle, not a key-release call.";
78
+ readonly type: "object";
79
+ readonly additionalProperties: false;
80
+ readonly required: readonly ["roomId", "key", "version", "sealed"];
81
+ readonly properties: {
82
+ readonly roomId: {
83
+ readonly type: "string";
84
+ readonly description: "The room the record belongs to. Part of the record's associated data, so a caller naming the wrong room gets an authentication failure rather than someone else's plaintext.";
85
+ };
86
+ readonly key: {
87
+ readonly type: "string";
88
+ readonly maxLength: 512;
89
+ readonly description: "The record's key within the room.";
90
+ };
91
+ readonly version: {
92
+ readonly type: "integer";
93
+ readonly minimum: 1;
94
+ readonly description: "The record's version. Bound into the associated data, so a record served at a different version does not open.";
95
+ };
96
+ readonly sealed: {
97
+ readonly type: "object";
98
+ readonly additionalProperties: false;
99
+ readonly required: readonly ["ciphertext", "nonce", "epoch"];
100
+ readonly description: "The sealed record exactly as the host returned it.";
101
+ readonly properties: {
102
+ readonly ciphertext: {
103
+ readonly type: "string";
104
+ readonly description: "base64url.";
105
+ };
106
+ readonly nonce: {
107
+ readonly type: "string";
108
+ readonly description: "base64url.";
109
+ };
110
+ readonly epoch: {
111
+ readonly type: "integer";
112
+ readonly minimum: 1;
113
+ readonly description: "The epoch it was sealed under. The oracle refuses an epoch it holds no key for rather than guessing.";
114
+ };
115
+ };
116
+ };
117
+ readonly ext: {
118
+ readonly $ref: "#/$defs/Ext";
119
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
120
+ };
121
+ };
122
+ readonly $defs: {
123
+ readonly Response: {
124
+ readonly $anchor: "response";
125
+ readonly title: "Rooms Keys Open — response payload";
126
+ readonly description: "Success response to rooms/keys/open. Type https://trusttasks.org/spec/rooms/keys/open/0.1#response.";
127
+ readonly type: "object";
128
+ readonly additionalProperties: false;
129
+ readonly required: readonly ["plaintext"];
130
+ readonly properties: {
131
+ readonly plaintext: {
132
+ readonly type: "string";
133
+ readonly description: "The opened record, base64url. The only thing that crosses back — never the key.";
134
+ };
135
+ readonly ext: {
136
+ readonly $ref: "#/$defs/Ext";
137
+ };
138
+ };
139
+ };
140
+ readonly Ext: {
141
+ readonly title: "Ext";
142
+ 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.";
143
+ readonly type: "object";
144
+ readonly minProperties: 1;
145
+ readonly additionalProperties: true;
146
+ readonly propertyNames: {
147
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
148
+ };
149
+ };
150
+ };
151
+ };
152
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
153
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
154
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
155
+ readonly $ref: "#/$defs/Response";
156
+ readonly $defs: {
157
+ readonly Response: {
158
+ readonly $anchor: "response";
159
+ readonly title: "Rooms Keys Open — response payload";
160
+ readonly description: "Success response to rooms/keys/open. Type https://trusttasks.org/spec/rooms/keys/open/0.1#response.";
161
+ readonly type: "object";
162
+ readonly additionalProperties: false;
163
+ readonly required: readonly ["plaintext"];
164
+ readonly properties: {
165
+ readonly plaintext: {
166
+ readonly type: "string";
167
+ readonly description: "The opened record, base64url. The only thing that crosses back — never the key.";
168
+ };
169
+ readonly ext: {
170
+ readonly $ref: "#/$defs/Ext";
171
+ };
172
+ };
173
+ };
174
+ readonly Ext: {
175
+ readonly title: "Ext";
176
+ 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.";
177
+ readonly type: "object";
178
+ readonly minProperties: 1;
179
+ readonly additionalProperties: true;
180
+ readonly propertyNames: {
181
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
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 declare const SPEC: {
193
+ readonly typeUri: "https://trusttasks.org/spec/rooms/keys/open/0.1";
194
+ readonly isBearer: false;
195
+ readonly isProofRequired: true;
196
+ readonly isRecipientRequired: true;
197
+ readonly isIssuedAtRequired: true;
198
+ readonly payloadSchema: {
199
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
200
+ readonly $id: "https://trusttasks.org/spec/rooms/keys/open/0.1";
201
+ readonly title: "Rooms Keys Open — payload";
202
+ readonly description: "An agent asks the party holding its principal's room keys to open one sealed record. The key never crosses to the agent: this is a decryption oracle, not a key-release call.";
203
+ readonly type: "object";
204
+ readonly additionalProperties: false;
205
+ readonly required: readonly ["roomId", "key", "version", "sealed"];
206
+ readonly properties: {
207
+ readonly roomId: {
208
+ readonly type: "string";
209
+ readonly description: "The room the record belongs to. Part of the record's associated data, so a caller naming the wrong room gets an authentication failure rather than someone else's plaintext.";
210
+ };
211
+ readonly key: {
212
+ readonly type: "string";
213
+ readonly maxLength: 512;
214
+ readonly description: "The record's key within the room.";
215
+ };
216
+ readonly version: {
217
+ readonly type: "integer";
218
+ readonly minimum: 1;
219
+ readonly description: "The record's version. Bound into the associated data, so a record served at a different version does not open.";
220
+ };
221
+ readonly sealed: {
222
+ readonly type: "object";
223
+ readonly additionalProperties: false;
224
+ readonly required: readonly ["ciphertext", "nonce", "epoch"];
225
+ readonly description: "The sealed record exactly as the host returned it.";
226
+ readonly properties: {
227
+ readonly ciphertext: {
228
+ readonly type: "string";
229
+ readonly description: "base64url.";
230
+ };
231
+ readonly nonce: {
232
+ readonly type: "string";
233
+ readonly description: "base64url.";
234
+ };
235
+ readonly epoch: {
236
+ readonly type: "integer";
237
+ readonly minimum: 1;
238
+ readonly description: "The epoch it was sealed under. The oracle refuses an epoch it holds no key for rather than guessing.";
239
+ };
240
+ };
241
+ };
242
+ readonly ext: {
243
+ readonly $ref: "#/$defs/Ext";
244
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
245
+ };
246
+ };
247
+ readonly $defs: {
248
+ readonly Response: {
249
+ readonly $anchor: "response";
250
+ readonly title: "Rooms Keys Open — response payload";
251
+ readonly description: "Success response to rooms/keys/open. Type https://trusttasks.org/spec/rooms/keys/open/0.1#response.";
252
+ readonly type: "object";
253
+ readonly additionalProperties: false;
254
+ readonly required: readonly ["plaintext"];
255
+ readonly properties: {
256
+ readonly plaintext: {
257
+ readonly type: "string";
258
+ readonly description: "The opened record, base64url. The only thing that crosses back — never the key.";
259
+ };
260
+ readonly ext: {
261
+ readonly $ref: "#/$defs/Ext";
262
+ };
263
+ };
264
+ };
265
+ readonly Ext: {
266
+ readonly title: "Ext";
267
+ 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.";
268
+ readonly type: "object";
269
+ readonly minProperties: 1;
270
+ readonly additionalProperties: true;
271
+ readonly propertyNames: {
272
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
273
+ };
274
+ };
275
+ };
276
+ };
277
+ };
278
+ /**
279
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
280
+ * tracks the *issuer* party's requirement because a response swaps the
281
+ * parties (§7.3 item 5).
282
+ */
283
+ export declare const RESPONSE_SPEC: {
284
+ readonly typeUri: "https://trusttasks.org/spec/rooms/keys/open/0.1#response";
285
+ readonly isBearer: false;
286
+ readonly isProofRequired: true;
287
+ readonly isRecipientRequired: true;
288
+ readonly isIssuedAtRequired: true;
289
+ readonly payloadSchema: {
290
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
291
+ readonly $ref: "#/$defs/Response";
292
+ readonly $defs: {
293
+ readonly Response: {
294
+ readonly $anchor: "response";
295
+ readonly title: "Rooms Keys Open — response payload";
296
+ readonly description: "Success response to rooms/keys/open. Type https://trusttasks.org/spec/rooms/keys/open/0.1#response.";
297
+ readonly type: "object";
298
+ readonly additionalProperties: false;
299
+ readonly required: readonly ["plaintext"];
300
+ readonly properties: {
301
+ readonly plaintext: {
302
+ readonly type: "string";
303
+ readonly description: "The opened record, base64url. The only thing that crosses back — never the key.";
304
+ };
305
+ readonly ext: {
306
+ readonly $ref: "#/$defs/Ext";
307
+ };
308
+ };
309
+ };
310
+ readonly Ext: {
311
+ readonly title: "Ext";
312
+ 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.";
313
+ readonly type: "object";
314
+ readonly minProperties: 1;
315
+ readonly additionalProperties: true;
316
+ readonly propertyNames: {
317
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
318
+ };
319
+ };
320
+ };
321
+ };
322
+ };
323
+ //# sourceMappingURL=payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/rooms/keys/open/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mCAAmC,CAAC;AAG7D;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,MAAM,EAAE;QACN;;WAEG;QACH,UAAU,EAAE,MAAM,CAAC;QACnB;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QACd;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,kHAAkH;AAClH,YAAY,EAAE,GAAG,EAAE,CAAC;AAEpB,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,iDAA0D,CAAC;AAEnF,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,oBAAoB,CAAC;AAE3C,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,0DAAmE,CAAC;AAErG,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,4BAA4B,CAAC;AAEpD;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyFjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkC1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}
@@ -0,0 +1,171 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/rooms/keys/open/0.1/payload.schema.json
4
+ */
5
+ /** Trust Task type URI. */
6
+ export const TYPE_URI = "https://trusttasks.org/spec/rooms/keys/open/0.1";
7
+ /** Trust Task response type URI (request type URI + "#response"). */
8
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/keys/open/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/open/0.1",
21
+ "title": "Rooms Keys Open — payload",
22
+ "description": "An agent asks the party holding its principal's room keys to open one sealed record. The key never crosses to the agent: this is a decryption oracle, not a key-release call.",
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "required": [
26
+ "roomId",
27
+ "key",
28
+ "version",
29
+ "sealed"
30
+ ],
31
+ "properties": {
32
+ "roomId": {
33
+ "type": "string",
34
+ "description": "The room the record belongs to. Part of the record's associated data, so a caller naming the wrong room gets an authentication failure rather than someone else's plaintext."
35
+ },
36
+ "key": {
37
+ "type": "string",
38
+ "maxLength": 512,
39
+ "description": "The record's key within the room."
40
+ },
41
+ "version": {
42
+ "type": "integer",
43
+ "minimum": 1,
44
+ "description": "The record's version. Bound into the associated data, so a record served at a different version does not open."
45
+ },
46
+ "sealed": {
47
+ "type": "object",
48
+ "additionalProperties": false,
49
+ "required": [
50
+ "ciphertext",
51
+ "nonce",
52
+ "epoch"
53
+ ],
54
+ "description": "The sealed record exactly as the host returned it.",
55
+ "properties": {
56
+ "ciphertext": {
57
+ "type": "string",
58
+ "description": "base64url."
59
+ },
60
+ "nonce": {
61
+ "type": "string",
62
+ "description": "base64url."
63
+ },
64
+ "epoch": {
65
+ "type": "integer",
66
+ "minimum": 1,
67
+ "description": "The epoch it was sealed under. The oracle refuses an epoch it holds no key for rather than guessing."
68
+ }
69
+ }
70
+ },
71
+ "ext": {
72
+ "$ref": "#/$defs/Ext",
73
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
74
+ }
75
+ },
76
+ "$defs": {
77
+ "Response": {
78
+ "$anchor": "response",
79
+ "title": "Rooms Keys Open — response payload",
80
+ "description": "Success response to rooms/keys/open. Type https://trusttasks.org/spec/rooms/keys/open/0.1#response.",
81
+ "type": "object",
82
+ "additionalProperties": false,
83
+ "required": [
84
+ "plaintext"
85
+ ],
86
+ "properties": {
87
+ "plaintext": {
88
+ "type": "string",
89
+ "description": "The opened record, base64url. The only thing that crosses back — never the key."
90
+ },
91
+ "ext": {
92
+ "$ref": "#/$defs/Ext"
93
+ }
94
+ }
95
+ },
96
+ "Ext": {
97
+ "title": "Ext",
98
+ "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.",
99
+ "type": "object",
100
+ "minProperties": 1,
101
+ "additionalProperties": true,
102
+ "propertyNames": {
103
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
104
+ }
105
+ }
106
+ }
107
+ };
108
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
109
+ export const RESPONSE_PAYLOAD_SCHEMA = {
110
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
111
+ "$ref": "#/$defs/Response",
112
+ "$defs": {
113
+ "Response": {
114
+ "$anchor": "response",
115
+ "title": "Rooms Keys Open — response payload",
116
+ "description": "Success response to rooms/keys/open. Type https://trusttasks.org/spec/rooms/keys/open/0.1#response.",
117
+ "type": "object",
118
+ "additionalProperties": false,
119
+ "required": [
120
+ "plaintext"
121
+ ],
122
+ "properties": {
123
+ "plaintext": {
124
+ "type": "string",
125
+ "description": "The opened record, base64url. The only thing that crosses back — never the key."
126
+ },
127
+ "ext": {
128
+ "$ref": "#/$defs/Ext"
129
+ }
130
+ }
131
+ },
132
+ "Ext": {
133
+ "title": "Ext",
134
+ "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.",
135
+ "type": "object",
136
+ "minProperties": 1,
137
+ "additionalProperties": true,
138
+ "propertyNames": {
139
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
140
+ }
141
+ }
142
+ }
143
+ };
144
+ /**
145
+ * SPEC.md §7.2 policy for the request variant, from this specification's
146
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
147
+ * per-specification and cannot be derived from the document alone, and
148
+ * item 2 needs the schema this carries.
149
+ */
150
+ export const SPEC = {
151
+ typeUri: TYPE_URI,
152
+ isBearer: false,
153
+ isProofRequired: true,
154
+ isRecipientRequired: true,
155
+ isIssuedAtRequired: true,
156
+ payloadSchema: PAYLOAD_SCHEMA,
157
+ };
158
+ /**
159
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
160
+ * tracks the *issuer* party's requirement because a response swaps the
161
+ * parties (§7.3 item 5).
162
+ */
163
+ export const RESPONSE_SPEC = {
164
+ typeUri: RESPONSE_TYPE_URI,
165
+ isBearer: false,
166
+ isProofRequired: true,
167
+ isRecipientRequired: true,
168
+ isIssuedAtRequired: true,
169
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
170
+ };
171
+ //# sourceMappingURL=payload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/rooms/keys/open/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAyDH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,iDAA0D,CAAC;AAKnF,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,0DAAmE,CAAC;AAKrG;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,iD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