@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.
- package/CHANGELOG.md +144 -0
- package/dist/_shared/components.d.ts +2 -2
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/device/list/0.1/payload.d.ts +4 -4
- package/dist/device/list/0.1/payload.d.ts.map +1 -1
- package/dist/device/list/0.1/payload.js +6 -2
- package/dist/device/list/0.1/payload.js.map +1 -1
- package/dist/device/list/0.2/payload.d.ts +4 -4
- package/dist/device/list/0.2/payload.d.ts.map +1 -1
- package/dist/device/list/0.2/payload.js +6 -2
- package/dist/device/list/0.2/payload.js.map +1 -1
- package/dist/device/register/0.1/payload.d.ts +4 -4
- package/dist/device/register/0.1/payload.d.ts.map +1 -1
- package/dist/device/register/0.1/payload.js +6 -2
- package/dist/device/register/0.1/payload.js.map +1 -1
- package/dist/device/register/0.2/payload.d.ts +4 -4
- package/dist/device/register/0.2/payload.d.ts.map +1 -1
- package/dist/device/register/0.2/payload.js +6 -2
- package/dist/device/register/0.2/payload.js.map +1 -1
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/rooms/keys/commit/0.1/payload.d.ts +266 -0
- package/dist/rooms/keys/commit/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/commit/0.1/payload.js +146 -0
- package/dist/rooms/keys/commit/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/key-package/0.1/payload.d.ts +272 -0
- package/dist/rooms/keys/key-package/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/key-package/0.1/payload.js +147 -0
- package/dist/rooms/keys/key-package/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/open/0.1/payload.d.ts +323 -0
- package/dist/rooms/keys/open/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/open/0.1/payload.js +171 -0
- package/dist/rooms/keys/open/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/present/0.1/payload.d.ts +306 -0
- package/dist/rooms/keys/present/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/present/0.1/payload.js +165 -0
- package/dist/rooms/keys/present/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/welcome/0.1/payload.d.ts +276 -0
- package/dist/rooms/keys/welcome/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/welcome/0.1/payload.js +148 -0
- package/dist/rooms/keys/welcome/0.1/payload.js.map +1 -0
- package/dist/rooms/records/curate/0.1/payload.d.ts +500 -0
- package/dist/rooms/records/curate/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/records/curate/0.1/payload.js +277 -0
- package/dist/rooms/records/curate/0.1/payload.js.map +1 -0
- package/dist/vta/backup/abort/1.0/payload.d.ts +262 -0
- package/dist/vta/backup/abort/1.0/payload.d.ts.map +1 -0
- package/dist/vta/backup/abort/1.0/payload.js +146 -0
- package/dist/vta/backup/abort/1.0/payload.js.map +1 -0
- package/dist/vta/backup/complete-export/1.0/payload.d.ts +262 -0
- package/dist/vta/backup/complete-export/1.0/payload.d.ts.map +1 -0
- package/dist/vta/backup/complete-export/1.0/payload.js +146 -0
- package/dist/vta/backup/complete-export/1.0/payload.js.map +1 -0
- package/dist/vta/backup/finalize-import/1.0/payload.d.ts +477 -0
- package/dist/vta/backup/finalize-import/1.0/payload.d.ts.map +1 -0
- package/dist/vta/backup/finalize-import/1.0/payload.js +249 -0
- package/dist/vta/backup/finalize-import/1.0/payload.js.map +1 -0
- package/dist/vta/backup/initiate-export/1.0/payload.d.ts +514 -0
- package/dist/vta/backup/initiate-export/1.0/payload.d.ts.map +1 -0
- package/dist/vta/backup/initiate-export/1.0/payload.js +267 -0
- package/dist/vta/backup/initiate-export/1.0/payload.js.map +1 -0
- package/dist/vta/backup/initiate-import/1.0/payload.d.ts +510 -0
- package/dist/vta/backup/initiate-import/1.0/payload.d.ts.map +1 -0
- package/dist/vta/backup/initiate-import/1.0/payload.js +266 -0
- package/dist/vta/backup/initiate-import/1.0/payload.js.map +1 -0
- package/dist/vta/management/reload-services/1.0/payload.d.ts +230 -0
- package/dist/vta/management/reload-services/1.0/payload.d.ts.map +1 -0
- package/dist/vta/management/reload-services/1.0/payload.js +130 -0
- package/dist/vta/management/reload-services/1.0/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +6 -2
- package/src/device/list/0.1/payload.ts +6 -2
- package/src/device/list/0.2/payload.ts +6 -2
- package/src/device/register/0.1/payload.ts +6 -2
- package/src/device/register/0.2/payload.ts +6 -2
- package/src/index.ts +12 -0
- package/src/rooms/keys/commit/0.1/payload.ts +195 -0
- package/src/rooms/keys/key-package/0.1/payload.ts +196 -0
- package/src/rooms/keys/open/0.1/payload.ts +237 -0
- package/src/rooms/keys/present/0.1/payload.ts +224 -0
- package/src/rooms/keys/welcome/0.1/payload.ts +201 -0
- package/src/rooms/records/curate/0.1/payload.ts +357 -0
- package/src/vta/backup/abort/1.0/payload.ts +191 -0
- package/src/vta/backup/complete-export/1.0/payload.ts +191 -0
- package/src/vta/backup/finalize-import/1.0/payload.ts +333 -0
- package/src/vta/backup/initiate-export/1.0/payload.ts +350 -0
- package/src/vta/backup/initiate-import/1.0/payload.ts +349 -0
- package/src/vta/management/reload-services/1.0/payload.ts +167 -0
package/package.json
CHANGED
|
@@ -45,7 +45,9 @@ export type Capability_DeviceV0_1 =
|
|
|
45
45
|
| "sign-trust-task"
|
|
46
46
|
| "credential-write"
|
|
47
47
|
| "memory-read"
|
|
48
|
-
| "memory-write"
|
|
48
|
+
| "memory-write"
|
|
49
|
+
| "room-present"
|
|
50
|
+
| "room-open";
|
|
49
51
|
/**
|
|
50
52
|
* Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each. Capability values are additive: a consumer MUST ignore a value it does not recognise rather than reject the binding, and MUST NOT treat an unrecognised value as conferring anything.
|
|
51
53
|
*/
|
|
@@ -61,7 +63,9 @@ export type Capability_DeviceV0_2 =
|
|
|
61
63
|
| "signTrustTask"
|
|
62
64
|
| "credentialWrite"
|
|
63
65
|
| "memoryRead"
|
|
64
|
-
| "memoryWrite"
|
|
66
|
+
| "memoryWrite"
|
|
67
|
+
| "roomPresent"
|
|
68
|
+
| "roomOpen";
|
|
65
69
|
/**
|
|
66
70
|
* Discriminator: is this consumer a user-driven Companion or a headless Service?
|
|
67
71
|
*/
|
|
@@ -245,7 +245,9 @@ export const PAYLOAD_SCHEMA = {
|
|
|
245
245
|
"sign-trust-task",
|
|
246
246
|
"credential-write",
|
|
247
247
|
"memory-read",
|
|
248
|
-
"memory-write"
|
|
248
|
+
"memory-write",
|
|
249
|
+
"room-present",
|
|
250
|
+
"room-open"
|
|
249
251
|
],
|
|
250
252
|
"description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each. Capability values are additive: a consumer MUST ignore a value it does not recognise rather than reject the binding, and MUST NOT treat an unrecognised value as conferring anything."
|
|
251
253
|
},
|
|
@@ -581,7 +583,9 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
581
583
|
"sign-trust-task",
|
|
582
584
|
"credential-write",
|
|
583
585
|
"memory-read",
|
|
584
|
-
"memory-write"
|
|
586
|
+
"memory-write",
|
|
587
|
+
"room-present",
|
|
588
|
+
"room-open"
|
|
585
589
|
],
|
|
586
590
|
"description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each. Capability values are additive: a consumer MUST ignore a value it does not recognise rather than reject the binding, and MUST NOT treat an unrecognised value as conferring anything."
|
|
587
591
|
},
|
|
@@ -245,7 +245,9 @@ export const PAYLOAD_SCHEMA = {
|
|
|
245
245
|
"signTrustTask",
|
|
246
246
|
"credentialWrite",
|
|
247
247
|
"memoryRead",
|
|
248
|
-
"memoryWrite"
|
|
248
|
+
"memoryWrite",
|
|
249
|
+
"roomPresent",
|
|
250
|
+
"roomOpen"
|
|
249
251
|
],
|
|
250
252
|
"description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each. Capability values are additive: a consumer MUST ignore a value it does not recognise rather than reject the binding, and MUST NOT treat an unrecognised value as conferring anything."
|
|
251
253
|
},
|
|
@@ -581,7 +583,9 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
581
583
|
"signTrustTask",
|
|
582
584
|
"credentialWrite",
|
|
583
585
|
"memoryRead",
|
|
584
|
-
"memoryWrite"
|
|
586
|
+
"memoryWrite",
|
|
587
|
+
"roomPresent",
|
|
588
|
+
"roomOpen"
|
|
585
589
|
],
|
|
586
590
|
"description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each. Capability values are additive: a consumer MUST ignore a value it does not recognise rather than reject the binding, and MUST NOT treat an unrecognised value as conferring anything."
|
|
587
591
|
},
|
|
@@ -213,7 +213,9 @@ export const PAYLOAD_SCHEMA = {
|
|
|
213
213
|
"sign-trust-task",
|
|
214
214
|
"credential-write",
|
|
215
215
|
"memory-read",
|
|
216
|
-
"memory-write"
|
|
216
|
+
"memory-write",
|
|
217
|
+
"room-present",
|
|
218
|
+
"room-open"
|
|
217
219
|
],
|
|
218
220
|
"description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each. Capability values are additive: a consumer MUST ignore a value it does not recognise rather than reject the binding, and MUST NOT treat an unrecognised value as conferring anything."
|
|
219
221
|
},
|
|
@@ -539,7 +541,9 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
539
541
|
"sign-trust-task",
|
|
540
542
|
"credential-write",
|
|
541
543
|
"memory-read",
|
|
542
|
-
"memory-write"
|
|
544
|
+
"memory-write",
|
|
545
|
+
"room-present",
|
|
546
|
+
"room-open"
|
|
543
547
|
],
|
|
544
548
|
"description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each. Capability values are additive: a consumer MUST ignore a value it does not recognise rather than reject the binding, and MUST NOT treat an unrecognised value as conferring anything."
|
|
545
549
|
},
|
|
@@ -213,7 +213,9 @@ export const PAYLOAD_SCHEMA = {
|
|
|
213
213
|
"signTrustTask",
|
|
214
214
|
"credentialWrite",
|
|
215
215
|
"memoryRead",
|
|
216
|
-
"memoryWrite"
|
|
216
|
+
"memoryWrite",
|
|
217
|
+
"roomPresent",
|
|
218
|
+
"roomOpen"
|
|
217
219
|
],
|
|
218
220
|
"description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each. Capability values are additive: a consumer MUST ignore a value it does not recognise rather than reject the binding, and MUST NOT treat an unrecognised value as conferring anything."
|
|
219
221
|
},
|
|
@@ -539,7 +541,9 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
539
541
|
"signTrustTask",
|
|
540
542
|
"credentialWrite",
|
|
541
543
|
"memoryRead",
|
|
542
|
-
"memoryWrite"
|
|
544
|
+
"memoryWrite",
|
|
545
|
+
"roomPresent",
|
|
546
|
+
"roomOpen"
|
|
543
547
|
],
|
|
544
548
|
"description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each. Capability values are additive: a consumer MUST ignore a value it does not recognise rather than reject the binding, and MUST NOT treat an unrecognised value as conferring anything."
|
|
545
549
|
},
|
package/src/index.ts
CHANGED
|
@@ -205,6 +205,12 @@ export * as RegistryRecordUpdate_v0_1 from "./registry/record/update/0.1/payload
|
|
|
205
205
|
export * as RoomShared_v0_1 from "./rooms/_shared/0.1/room.js";
|
|
206
206
|
export * as RoomsCreate_v0_1 from "./rooms/create/0.1/payload.js";
|
|
207
207
|
export * as RoomsEpochMint_v0_1 from "./rooms/epoch/mint/0.1/payload.js";
|
|
208
|
+
export * as RoomsKeysCommit_v0_1 from "./rooms/keys/commit/0.1/payload.js";
|
|
209
|
+
export * as RoomsKeysKeyPackage_v0_1 from "./rooms/keys/key-package/0.1/payload.js";
|
|
210
|
+
export * as RoomsKeysOpen_v0_1 from "./rooms/keys/open/0.1/payload.js";
|
|
211
|
+
export * as RoomsKeysPresent_v0_1 from "./rooms/keys/present/0.1/payload.js";
|
|
212
|
+
export * as RoomsKeysWelcome_v0_1 from "./rooms/keys/welcome/0.1/payload.js";
|
|
213
|
+
export * as RoomsRecordsCurate_v0_1 from "./rooms/records/curate/0.1/payload.js";
|
|
208
214
|
export * as RoomsRecordsGet_v0_1 from "./rooms/records/get/0.1/payload.js";
|
|
209
215
|
export * as RoomsRecordsList_v0_1 from "./rooms/records/list/0.1/payload.js";
|
|
210
216
|
export * as RoomsRecordsPut_v0_1 from "./rooms/records/put/0.1/payload.js";
|
|
@@ -283,6 +289,11 @@ export * as VtaAppStateGet_v1_0 from "./vta/app-state/get/1.0/payload.js";
|
|
|
283
289
|
export * as VtaAppStateList_v1_0 from "./vta/app-state/list/1.0/payload.js";
|
|
284
290
|
export * as VtaAppStatePutMany_v1_0 from "./vta/app-state/put-many/1.0/payload.js";
|
|
285
291
|
export * as VtaAppStatePut_v1_0 from "./vta/app-state/put/1.0/payload.js";
|
|
292
|
+
export * as VtaBackupAbort_v1_0 from "./vta/backup/abort/1.0/payload.js";
|
|
293
|
+
export * as VtaBackupCompleteExport_v1_0 from "./vta/backup/complete-export/1.0/payload.js";
|
|
294
|
+
export * as VtaBackupFinalizeImport_v1_0 from "./vta/backup/finalize-import/1.0/payload.js";
|
|
295
|
+
export * as VtaBackupInitiateExport_v1_0 from "./vta/backup/initiate-export/1.0/payload.js";
|
|
296
|
+
export * as VtaBackupInitiateImport_v1_0 from "./vta/backup/initiate-import/1.0/payload.js";
|
|
286
297
|
export * as VtaContextsCreate_v1_0 from "./vta/contexts/create/1.0/payload.js";
|
|
287
298
|
export * as VtaContextsDelete_v1_0 from "./vta/contexts/delete/1.0/payload.js";
|
|
288
299
|
export * as VtaContextsDidTemplatesCreate_v1_0 from "./vta/contexts/did-templates/create/1.0/payload.js";
|
|
@@ -312,6 +323,7 @@ export * as VtaDidTemplatesRender_v1_0 from "./vta/did-templates/render/1.0/payl
|
|
|
312
323
|
export * as VtaDidTemplatesRender_v2_0 from "./vta/did-templates/render/2.0/payload.js";
|
|
313
324
|
export * as VtaDidTemplatesUpdate_v1_0 from "./vta/did-templates/update/1.0/payload.js";
|
|
314
325
|
export * as VtaDidTemplatesUpdate_v2_0 from "./vta/did-templates/update/2.0/payload.js";
|
|
326
|
+
export * as VtaManagementReloadServices_v1_0 from "./vta/management/reload-services/1.0/payload.js";
|
|
315
327
|
export * as VtaMemoryDelete_v0_1 from "./vta/memory/delete/0.1/payload.js";
|
|
316
328
|
export * as VtaMemoryList_v0_1 from "./vta/memory/list/0.1/payload.js";
|
|
317
329
|
export * as VtaMemoryPut_v0_1 from "./vta/memory/put/0.1/payload.js";
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/rooms/keys/commit/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* A room's owner delivers an MLS Commit to a member's key-holding agent, advancing it one epoch. Every member must apply every commit, in order: an agent that misses one is stuck at its last epoch and can open nothing sealed after it.
|
|
11
|
+
*/
|
|
12
|
+
export interface RoomsKeysCommitPayload {
|
|
13
|
+
/**
|
|
14
|
+
* The room whose group is advancing.
|
|
15
|
+
*/
|
|
16
|
+
roomId: string;
|
|
17
|
+
/**
|
|
18
|
+
* The MLS Commit message, base64url.
|
|
19
|
+
*/
|
|
20
|
+
commit: string;
|
|
21
|
+
/**
|
|
22
|
+
* The MLS epoch this commit produces — the recipient's epoch after applying it. Stated so a recipient can tell a replay from a gap without parsing the commit: equal to its current epoch is a replay, more than one ahead is a gap.
|
|
23
|
+
*/
|
|
24
|
+
epoch: number;
|
|
25
|
+
/**
|
|
26
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
27
|
+
*/
|
|
28
|
+
ext?: Ext;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Success response to rooms/keys/commit. Type https://trusttasks.org/spec/rooms/keys/commit/0.1#response.
|
|
32
|
+
*/
|
|
33
|
+
export interface RoomsKeysCommitResponsePayload {
|
|
34
|
+
/**
|
|
35
|
+
* The recipient's epoch after the operation. On a replay this is unchanged, which is how a sender distinguishes 'applied' from 'already had it' without either being an error.
|
|
36
|
+
*/
|
|
37
|
+
epoch: number;
|
|
38
|
+
ext?: Ext;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
42
|
+
export type { Ext };
|
|
43
|
+
|
|
44
|
+
/** Trust Task type URI. */
|
|
45
|
+
export const TYPE_URI = "https://trusttasks.org/spec/rooms/keys/commit/0.1" as const;
|
|
46
|
+
|
|
47
|
+
/** Stable alias for this specification's request payload shape. */
|
|
48
|
+
export type Payload = RoomsKeysCommitPayload;
|
|
49
|
+
|
|
50
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
51
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/keys/commit/0.1#response" as const;
|
|
52
|
+
|
|
53
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
54
|
+
export type Response = RoomsKeysCommitResponsePayload;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* This specification's payload schema, as a value.
|
|
58
|
+
*
|
|
59
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
60
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
61
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
62
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
63
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
64
|
+
*/
|
|
65
|
+
export const PAYLOAD_SCHEMA = {
|
|
66
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
67
|
+
"$id": "https://trusttasks.org/spec/rooms/keys/commit/0.1",
|
|
68
|
+
"title": "Rooms Keys Commit — payload",
|
|
69
|
+
"description": "A room's owner delivers an MLS Commit to a member's key-holding agent, advancing it one epoch. Every member must apply every commit, in order: an agent that misses one is stuck at its last epoch and can open nothing sealed after it.",
|
|
70
|
+
"type": "object",
|
|
71
|
+
"additionalProperties": false,
|
|
72
|
+
"required": [
|
|
73
|
+
"roomId",
|
|
74
|
+
"commit",
|
|
75
|
+
"epoch"
|
|
76
|
+
],
|
|
77
|
+
"properties": {
|
|
78
|
+
"roomId": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"description": "The room whose group is advancing."
|
|
81
|
+
},
|
|
82
|
+
"commit": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"description": "The MLS Commit message, base64url."
|
|
85
|
+
},
|
|
86
|
+
"epoch": {
|
|
87
|
+
"type": "integer",
|
|
88
|
+
"minimum": 1,
|
|
89
|
+
"description": "The MLS epoch this commit produces — the recipient's epoch after applying it. Stated so a recipient can tell a replay from a gap without parsing the commit: equal to its current epoch is a replay, more than one ahead is a gap."
|
|
90
|
+
},
|
|
91
|
+
"ext": {
|
|
92
|
+
"$ref": "#/$defs/Ext",
|
|
93
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"$defs": {
|
|
97
|
+
"Response": {
|
|
98
|
+
"$anchor": "response",
|
|
99
|
+
"title": "Rooms Keys Commit — response payload",
|
|
100
|
+
"description": "Success response to rooms/keys/commit. Type https://trusttasks.org/spec/rooms/keys/commit/0.1#response.",
|
|
101
|
+
"type": "object",
|
|
102
|
+
"additionalProperties": false,
|
|
103
|
+
"required": [
|
|
104
|
+
"epoch"
|
|
105
|
+
],
|
|
106
|
+
"properties": {
|
|
107
|
+
"epoch": {
|
|
108
|
+
"type": "integer",
|
|
109
|
+
"minimum": 0,
|
|
110
|
+
"description": "The recipient's epoch after the operation. On a replay this is unchanged, which is how a sender distinguishes 'applied' from 'already had it' without either being an error."
|
|
111
|
+
},
|
|
112
|
+
"ext": {
|
|
113
|
+
"$ref": "#/$defs/Ext"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"Ext": {
|
|
118
|
+
"title": "Ext",
|
|
119
|
+
"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.",
|
|
120
|
+
"type": "object",
|
|
121
|
+
"minProperties": 1,
|
|
122
|
+
"additionalProperties": true,
|
|
123
|
+
"propertyNames": {
|
|
124
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
} as const;
|
|
129
|
+
|
|
130
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
131
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
132
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
133
|
+
"$ref": "#/$defs/Response",
|
|
134
|
+
"$defs": {
|
|
135
|
+
"Response": {
|
|
136
|
+
"$anchor": "response",
|
|
137
|
+
"title": "Rooms Keys Commit — response payload",
|
|
138
|
+
"description": "Success response to rooms/keys/commit. Type https://trusttasks.org/spec/rooms/keys/commit/0.1#response.",
|
|
139
|
+
"type": "object",
|
|
140
|
+
"additionalProperties": false,
|
|
141
|
+
"required": [
|
|
142
|
+
"epoch"
|
|
143
|
+
],
|
|
144
|
+
"properties": {
|
|
145
|
+
"epoch": {
|
|
146
|
+
"type": "integer",
|
|
147
|
+
"minimum": 0,
|
|
148
|
+
"description": "The recipient's epoch after the operation. On a replay this is unchanged, which is how a sender distinguishes 'applied' from 'already had it' without either being an error."
|
|
149
|
+
},
|
|
150
|
+
"ext": {
|
|
151
|
+
"$ref": "#/$defs/Ext"
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"Ext": {
|
|
156
|
+
"title": "Ext",
|
|
157
|
+
"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.",
|
|
158
|
+
"type": "object",
|
|
159
|
+
"minProperties": 1,
|
|
160
|
+
"additionalProperties": true,
|
|
161
|
+
"propertyNames": {
|
|
162
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
} as const;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
170
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
171
|
+
* per-specification and cannot be derived from the document alone, and
|
|
172
|
+
* item 2 needs the schema this carries.
|
|
173
|
+
*/
|
|
174
|
+
export const SPEC = {
|
|
175
|
+
typeUri: TYPE_URI,
|
|
176
|
+
isBearer: false,
|
|
177
|
+
isProofRequired: true,
|
|
178
|
+
isRecipientRequired: true,
|
|
179
|
+
isIssuedAtRequired: true,
|
|
180
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
181
|
+
} as const;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
185
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
186
|
+
* parties (§7.3 item 5).
|
|
187
|
+
*/
|
|
188
|
+
export const RESPONSE_SPEC = {
|
|
189
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
190
|
+
isBearer: false,
|
|
191
|
+
isProofRequired: true,
|
|
192
|
+
isRecipientRequired: true,
|
|
193
|
+
isIssuedAtRequired: true,
|
|
194
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
195
|
+
} as const;
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/rooms/keys/key-package/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* An invited party asks the agent that will hold its room keys to mint an MLS KeyPackage, so the room's owner can add it to the group. The private half stays with the agent; only the KeyPackage travels.
|
|
11
|
+
*/
|
|
12
|
+
export interface RoomsKeysKeyPackagePayload {
|
|
13
|
+
/**
|
|
14
|
+
* The room to mint a KeyPackage for. Scoped per room rather than reused across rooms: one KeyPackage presented to two rooms correlates a member across them, which is the linkage a `private` room exists to deny.
|
|
15
|
+
*/
|
|
16
|
+
roomId: string;
|
|
17
|
+
/**
|
|
18
|
+
* The invitation credential (VIC) the room issued to this party, serialized per the governing profile. Where an implementation requires one — and one that mints group state on unauthenticated request should — this is what authorizes the mint.
|
|
19
|
+
*/
|
|
20
|
+
invitation?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
23
|
+
*/
|
|
24
|
+
ext?: Ext;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Success response to rooms/keys/key-package. Type https://trusttasks.org/spec/rooms/keys/key-package/0.1#response.
|
|
28
|
+
*/
|
|
29
|
+
export interface RoomsKeysKeyPackageResponsePayload {
|
|
30
|
+
/**
|
|
31
|
+
* The MLS KeyPackage, base64url. Public: it carries a signature key, an HPKE init key and the leaf's credential, and nothing that opens anything.
|
|
32
|
+
*/
|
|
33
|
+
keyPackage: string;
|
|
34
|
+
/**
|
|
35
|
+
* When the KeyPackage stops being offered. A KeyPackage is single-use and an unused one is retained key material, so an implementation SHOULD bound how long it holds the private half.
|
|
36
|
+
*/
|
|
37
|
+
expiresAt?: string;
|
|
38
|
+
ext?: Ext;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
42
|
+
export type { Ext };
|
|
43
|
+
|
|
44
|
+
/** Trust Task type URI. */
|
|
45
|
+
export const TYPE_URI = "https://trusttasks.org/spec/rooms/keys/key-package/0.1" as const;
|
|
46
|
+
|
|
47
|
+
/** Stable alias for this specification's request payload shape. */
|
|
48
|
+
export type Payload = RoomsKeysKeyPackagePayload;
|
|
49
|
+
|
|
50
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
51
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/keys/key-package/0.1#response" as const;
|
|
52
|
+
|
|
53
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
54
|
+
export type Response = RoomsKeysKeyPackageResponsePayload;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* This specification's payload schema, as a value.
|
|
58
|
+
*
|
|
59
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
60
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
61
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
62
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
63
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
64
|
+
*/
|
|
65
|
+
export const PAYLOAD_SCHEMA = {
|
|
66
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
67
|
+
"$id": "https://trusttasks.org/spec/rooms/keys/key-package/0.1",
|
|
68
|
+
"title": "Rooms Keys Key-Package — payload",
|
|
69
|
+
"description": "An invited party asks the agent that will hold its room keys to mint an MLS KeyPackage, so the room's owner can add it to the group. The private half stays with the agent; only the KeyPackage travels.",
|
|
70
|
+
"type": "object",
|
|
71
|
+
"additionalProperties": false,
|
|
72
|
+
"required": [
|
|
73
|
+
"roomId"
|
|
74
|
+
],
|
|
75
|
+
"properties": {
|
|
76
|
+
"roomId": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"description": "The room to mint a KeyPackage for. Scoped per room rather than reused across rooms: one KeyPackage presented to two rooms correlates a member across them, which is the linkage a `private` room exists to deny."
|
|
79
|
+
},
|
|
80
|
+
"invitation": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"description": "The invitation credential (VIC) the room issued to this party, serialized per the governing profile. Where an implementation requires one — and one that mints group state on unauthenticated request should — this is what authorizes the mint."
|
|
83
|
+
},
|
|
84
|
+
"ext": {
|
|
85
|
+
"$ref": "#/$defs/Ext",
|
|
86
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"$defs": {
|
|
90
|
+
"Response": {
|
|
91
|
+
"$anchor": "response",
|
|
92
|
+
"title": "Rooms Keys Key-Package — response payload",
|
|
93
|
+
"description": "Success response to rooms/keys/key-package. Type https://trusttasks.org/spec/rooms/keys/key-package/0.1#response.",
|
|
94
|
+
"type": "object",
|
|
95
|
+
"additionalProperties": false,
|
|
96
|
+
"required": [
|
|
97
|
+
"keyPackage"
|
|
98
|
+
],
|
|
99
|
+
"properties": {
|
|
100
|
+
"keyPackage": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"description": "The MLS KeyPackage, base64url. Public: it carries a signature key, an HPKE init key and the leaf's credential, and nothing that opens anything."
|
|
103
|
+
},
|
|
104
|
+
"expiresAt": {
|
|
105
|
+
"type": "string",
|
|
106
|
+
"format": "date-time",
|
|
107
|
+
"description": "When the KeyPackage stops being offered. A KeyPackage is single-use and an unused one is retained key material, so an implementation SHOULD bound how long it holds the private half."
|
|
108
|
+
},
|
|
109
|
+
"ext": {
|
|
110
|
+
"$ref": "#/$defs/Ext"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"Ext": {
|
|
115
|
+
"title": "Ext",
|
|
116
|
+
"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
|
+
"type": "object",
|
|
118
|
+
"minProperties": 1,
|
|
119
|
+
"additionalProperties": true,
|
|
120
|
+
"propertyNames": {
|
|
121
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
} as const;
|
|
126
|
+
|
|
127
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
128
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
129
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
130
|
+
"$ref": "#/$defs/Response",
|
|
131
|
+
"$defs": {
|
|
132
|
+
"Response": {
|
|
133
|
+
"$anchor": "response",
|
|
134
|
+
"title": "Rooms Keys Key-Package — response payload",
|
|
135
|
+
"description": "Success response to rooms/keys/key-package. Type https://trusttasks.org/spec/rooms/keys/key-package/0.1#response.",
|
|
136
|
+
"type": "object",
|
|
137
|
+
"additionalProperties": false,
|
|
138
|
+
"required": [
|
|
139
|
+
"keyPackage"
|
|
140
|
+
],
|
|
141
|
+
"properties": {
|
|
142
|
+
"keyPackage": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"description": "The MLS KeyPackage, base64url. Public: it carries a signature key, an HPKE init key and the leaf's credential, and nothing that opens anything."
|
|
145
|
+
},
|
|
146
|
+
"expiresAt": {
|
|
147
|
+
"type": "string",
|
|
148
|
+
"format": "date-time",
|
|
149
|
+
"description": "When the KeyPackage stops being offered. A KeyPackage is single-use and an unused one is retained key material, so an implementation SHOULD bound how long it holds the private half."
|
|
150
|
+
},
|
|
151
|
+
"ext": {
|
|
152
|
+
"$ref": "#/$defs/Ext"
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"Ext": {
|
|
157
|
+
"title": "Ext",
|
|
158
|
+
"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.",
|
|
159
|
+
"type": "object",
|
|
160
|
+
"minProperties": 1,
|
|
161
|
+
"additionalProperties": true,
|
|
162
|
+
"propertyNames": {
|
|
163
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
} as const;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
171
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
172
|
+
* per-specification and cannot be derived from the document alone, and
|
|
173
|
+
* item 2 needs the schema this carries.
|
|
174
|
+
*/
|
|
175
|
+
export const SPEC = {
|
|
176
|
+
typeUri: TYPE_URI,
|
|
177
|
+
isBearer: false,
|
|
178
|
+
isProofRequired: true,
|
|
179
|
+
isRecipientRequired: true,
|
|
180
|
+
isIssuedAtRequired: true,
|
|
181
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
182
|
+
} as const;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
186
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
187
|
+
* parties (§7.3 item 5).
|
|
188
|
+
*/
|
|
189
|
+
export const RESPONSE_SPEC = {
|
|
190
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
191
|
+
isBearer: false,
|
|
192
|
+
isProofRequired: true,
|
|
193
|
+
isRecipientRequired: true,
|
|
194
|
+
isIssuedAtRequired: true,
|
|
195
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
196
|
+
} as const;
|