@openvtc/trust-tasks 0.26.10 → 0.26.12
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 +351 -0
- package/dist/_shared/components.d.ts +18 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/dist/rooms/keys/act/0.2/payload.d.ts +546 -0
- package/dist/rooms/keys/act/0.2/payload.d.ts.map +1 -0
- package/dist/rooms/keys/act/0.2/payload.js +305 -0
- package/dist/rooms/keys/act/0.2/payload.js.map +1 -0
- package/dist/rooms/keys/act/0.3/payload.d.ts +546 -0
- package/dist/rooms/keys/act/0.3/payload.d.ts.map +1 -0
- package/dist/rooms/keys/act/0.3/payload.js +305 -0
- package/dist/rooms/keys/act/0.3/payload.js.map +1 -0
- package/dist/rooms/keys/file-key/0.2/payload.d.ts +306 -0
- package/dist/rooms/keys/file-key/0.2/payload.d.ts.map +1 -0
- package/dist/rooms/keys/file-key/0.2/payload.js +167 -0
- package/dist/rooms/keys/file-key/0.2/payload.js.map +1 -0
- package/dist/rooms/keys/open/0.2/payload.d.ts +323 -0
- package/dist/rooms/keys/open/0.2/payload.d.ts.map +1 -0
- package/dist/rooms/keys/open/0.2/payload.js +171 -0
- package/dist/rooms/keys/open/0.2/payload.js.map +1 -0
- package/dist/rooms/owner/group/add/0.2/payload.d.ts +417 -0
- package/dist/rooms/owner/group/add/0.2/payload.d.ts.map +1 -0
- package/dist/rooms/owner/group/add/0.2/payload.js +218 -0
- package/dist/rooms/owner/group/add/0.2/payload.js.map +1 -0
- package/dist/vta/_shared/0.6/witness-party.d.ts +16 -0
- package/dist/vta/_shared/0.6/witness-party.d.ts.map +1 -0
- package/dist/vta/_shared/0.6/witness-party.js +6 -0
- package/dist/vta/_shared/0.6/witness-party.js.map +1 -0
- package/dist/vta/witness/accept/0.2/payload.d.ts +499 -0
- package/dist/vta/witness/accept/0.2/payload.d.ts.map +1 -0
- package/dist/vta/witness/accept/0.2/payload.js +278 -0
- package/dist/vta/witness/accept/0.2/payload.js.map +1 -0
- package/dist/vta/witness/open/0.2/payload.d.ts +500 -0
- package/dist/vta/witness/open/0.2/payload.d.ts.map +1 -0
- package/dist/vta/witness/open/0.2/payload.js +259 -0
- package/dist/vta/witness/open/0.2/payload.js.map +1 -0
- package/dist/vta/witness/present/0.2/payload.d.ts +303 -0
- package/dist/vta/witness/present/0.2/payload.d.ts.map +1 -0
- package/dist/vta/witness/present/0.2/payload.js +170 -0
- package/dist/vta/witness/present/0.2/payload.js.map +1 -0
- package/dist/vtc/members/personhood/assert/0.2/payload.d.ts +536 -0
- package/dist/vtc/members/personhood/assert/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/members/personhood/assert/0.2/payload.js +228 -0
- package/dist/vtc/members/personhood/assert/0.2/payload.js.map +1 -0
- package/dist/vtc/members/registry-consent/0.1/payload.d.ts +311 -0
- package/dist/vtc/members/registry-consent/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/members/registry-consent/0.1/payload.js +183 -0
- package/dist/vtc/members/registry-consent/0.1/payload.js.map +1 -0
- package/dist/vtc/members/update/0.1/payload.d.ts +3 -3
- package/dist/vtc/members/update/0.1/payload.js +1 -1
- package/dist/vtc/members/update/0.1/payload.js.map +1 -1
- package/dist/witness/_shared/0.1/outcome-evidence.d.ts +16 -0
- package/dist/witness/_shared/0.1/outcome-evidence.d.ts.map +1 -0
- package/dist/witness/_shared/0.1/outcome-evidence.js +6 -0
- package/dist/witness/_shared/0.1/outcome-evidence.js.map +1 -0
- package/dist/witness/session/0.2/payload.d.ts +274 -0
- package/dist/witness/session/0.2/payload.d.ts.map +1 -0
- package/dist/witness/session/0.2/payload.js +152 -0
- package/dist/witness/session/0.2/payload.js.map +1 -0
- package/dist/witness/session/submit/0.2/payload.d.ts +295 -0
- package/dist/witness/session/submit/0.2/payload.d.ts.map +1 -0
- package/dist/witness/session/submit/0.2/payload.js +166 -0
- package/dist/witness/session/submit/0.2/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +17 -0
- package/src/index.ts +14 -0
- package/src/rooms/keys/act/0.2/payload.ts +380 -0
- package/src/rooms/keys/act/0.3/payload.ts +380 -0
- package/src/rooms/keys/file-key/0.2/payload.ts +224 -0
- package/src/rooms/keys/open/0.2/payload.ts +237 -0
- package/src/rooms/owner/group/add/0.2/payload.ts +288 -0
- package/src/vta/_shared/0.6/witness-party.ts +17 -0
- package/src/vta/witness/accept/0.2/payload.ts +330 -0
- package/src/vta/witness/open/0.2/payload.ts +336 -0
- package/src/vta/witness/present/0.2/payload.ts +210 -0
- package/src/vtc/members/personhood/assert/0.2/payload.ts +421 -0
- package/src/vtc/members/registry-consent/0.1/payload.ts +231 -0
- package/src/vtc/members/update/0.1/payload.ts +2 -2
- package/src/witness/_shared/0.1/outcome-evidence.ts +17 -0
- package/src/witness/session/0.2/payload.ts +197 -0
- package/src/witness/session/submit/0.2/payload.ts +212 -0
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/rooms/keys/open/0.2/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* 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.
|
|
11
|
+
*/
|
|
12
|
+
export interface RoomsKeysOpenPayload {
|
|
13
|
+
/**
|
|
14
|
+
* 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.
|
|
15
|
+
*/
|
|
16
|
+
roomId: string;
|
|
17
|
+
/**
|
|
18
|
+
* The record's key within the room.
|
|
19
|
+
*/
|
|
20
|
+
key: string;
|
|
21
|
+
/**
|
|
22
|
+
* The record's version. Bound into the associated data, so a record served at a different version does not open.
|
|
23
|
+
*/
|
|
24
|
+
version: number;
|
|
25
|
+
/**
|
|
26
|
+
* The sealed record exactly as the host returned it.
|
|
27
|
+
*/
|
|
28
|
+
sealed: {
|
|
29
|
+
/**
|
|
30
|
+
* base64url.
|
|
31
|
+
*/
|
|
32
|
+
ciphertext: string;
|
|
33
|
+
/**
|
|
34
|
+
* base64url.
|
|
35
|
+
*/
|
|
36
|
+
nonce: string;
|
|
37
|
+
/**
|
|
38
|
+
* The epoch it was sealed under. The oracle refuses an epoch it holds no key for rather than guessing.
|
|
39
|
+
*/
|
|
40
|
+
epoch: number;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
44
|
+
*/
|
|
45
|
+
ext?: Ext;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Success response to rooms/keys/open. Type https://trusttasks.org/spec/rooms/keys/open/0.2#response.
|
|
49
|
+
*/
|
|
50
|
+
export interface RoomsKeysOpenResponsePayload {
|
|
51
|
+
/**
|
|
52
|
+
* The opened record, base64url. The only thing that crosses back — never the key.
|
|
53
|
+
*/
|
|
54
|
+
plaintext: string;
|
|
55
|
+
ext?: Ext;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
59
|
+
export type { Ext };
|
|
60
|
+
|
|
61
|
+
/** Trust Task type URI. */
|
|
62
|
+
export const TYPE_URI = "https://trusttasks.org/spec/rooms/keys/open/0.2" as const;
|
|
63
|
+
|
|
64
|
+
/** Stable alias for this specification's request payload shape. */
|
|
65
|
+
export type Payload = RoomsKeysOpenPayload;
|
|
66
|
+
|
|
67
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
68
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/keys/open/0.2#response" as const;
|
|
69
|
+
|
|
70
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
71
|
+
export type Response = RoomsKeysOpenResponsePayload;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* This specification's payload schema, as a value.
|
|
75
|
+
*
|
|
76
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
77
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
78
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
79
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
80
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
81
|
+
*/
|
|
82
|
+
export const PAYLOAD_SCHEMA = {
|
|
83
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
84
|
+
"$id": "https://trusttasks.org/spec/rooms/keys/open/0.2",
|
|
85
|
+
"title": "Rooms Keys Open — payload",
|
|
86
|
+
"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.",
|
|
87
|
+
"type": "object",
|
|
88
|
+
"additionalProperties": false,
|
|
89
|
+
"required": [
|
|
90
|
+
"roomId",
|
|
91
|
+
"key",
|
|
92
|
+
"version",
|
|
93
|
+
"sealed"
|
|
94
|
+
],
|
|
95
|
+
"properties": {
|
|
96
|
+
"roomId": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"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."
|
|
99
|
+
},
|
|
100
|
+
"key": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"maxLength": 512,
|
|
103
|
+
"description": "The record's key within the room."
|
|
104
|
+
},
|
|
105
|
+
"version": {
|
|
106
|
+
"type": "integer",
|
|
107
|
+
"minimum": 1,
|
|
108
|
+
"description": "The record's version. Bound into the associated data, so a record served at a different version does not open."
|
|
109
|
+
},
|
|
110
|
+
"sealed": {
|
|
111
|
+
"type": "object",
|
|
112
|
+
"additionalProperties": false,
|
|
113
|
+
"required": [
|
|
114
|
+
"ciphertext",
|
|
115
|
+
"nonce",
|
|
116
|
+
"epoch"
|
|
117
|
+
],
|
|
118
|
+
"description": "The sealed record exactly as the host returned it.",
|
|
119
|
+
"properties": {
|
|
120
|
+
"ciphertext": {
|
|
121
|
+
"type": "string",
|
|
122
|
+
"description": "base64url."
|
|
123
|
+
},
|
|
124
|
+
"nonce": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"description": "base64url."
|
|
127
|
+
},
|
|
128
|
+
"epoch": {
|
|
129
|
+
"type": "integer",
|
|
130
|
+
"minimum": 1,
|
|
131
|
+
"description": "The epoch it was sealed under. The oracle refuses an epoch it holds no key for rather than guessing."
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"ext": {
|
|
136
|
+
"$ref": "#/$defs/Ext",
|
|
137
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"$defs": {
|
|
141
|
+
"Response": {
|
|
142
|
+
"$anchor": "response",
|
|
143
|
+
"title": "Rooms Keys Open — response payload",
|
|
144
|
+
"description": "Success response to rooms/keys/open. Type https://trusttasks.org/spec/rooms/keys/open/0.2#response.",
|
|
145
|
+
"type": "object",
|
|
146
|
+
"additionalProperties": false,
|
|
147
|
+
"required": [
|
|
148
|
+
"plaintext"
|
|
149
|
+
],
|
|
150
|
+
"properties": {
|
|
151
|
+
"plaintext": {
|
|
152
|
+
"type": "string",
|
|
153
|
+
"description": "The opened record, base64url. The only thing that crosses back — never the key."
|
|
154
|
+
},
|
|
155
|
+
"ext": {
|
|
156
|
+
"$ref": "#/$defs/Ext"
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
"Ext": {
|
|
161
|
+
"title": "Ext",
|
|
162
|
+
"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
|
+
"type": "object",
|
|
164
|
+
"minProperties": 1,
|
|
165
|
+
"additionalProperties": true,
|
|
166
|
+
"propertyNames": {
|
|
167
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
} as const;
|
|
172
|
+
|
|
173
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
174
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
175
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
176
|
+
"$ref": "#/$defs/Response",
|
|
177
|
+
"$defs": {
|
|
178
|
+
"Response": {
|
|
179
|
+
"$anchor": "response",
|
|
180
|
+
"title": "Rooms Keys Open — response payload",
|
|
181
|
+
"description": "Success response to rooms/keys/open. Type https://trusttasks.org/spec/rooms/keys/open/0.2#response.",
|
|
182
|
+
"type": "object",
|
|
183
|
+
"additionalProperties": false,
|
|
184
|
+
"required": [
|
|
185
|
+
"plaintext"
|
|
186
|
+
],
|
|
187
|
+
"properties": {
|
|
188
|
+
"plaintext": {
|
|
189
|
+
"type": "string",
|
|
190
|
+
"description": "The opened record, base64url. The only thing that crosses back — never the key."
|
|
191
|
+
},
|
|
192
|
+
"ext": {
|
|
193
|
+
"$ref": "#/$defs/Ext"
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
"Ext": {
|
|
198
|
+
"title": "Ext",
|
|
199
|
+
"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.",
|
|
200
|
+
"type": "object",
|
|
201
|
+
"minProperties": 1,
|
|
202
|
+
"additionalProperties": true,
|
|
203
|
+
"propertyNames": {
|
|
204
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
} as const;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
212
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
213
|
+
* per-specification and cannot be derived from the document alone, and
|
|
214
|
+
* item 2 needs the schema this carries.
|
|
215
|
+
*/
|
|
216
|
+
export const SPEC = {
|
|
217
|
+
typeUri: TYPE_URI,
|
|
218
|
+
isBearer: false,
|
|
219
|
+
isProofRequired: true,
|
|
220
|
+
isRecipientRequired: true,
|
|
221
|
+
isIssuedAtRequired: true,
|
|
222
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
223
|
+
} as const;
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
227
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
228
|
+
* parties (§7.3 item 5).
|
|
229
|
+
*/
|
|
230
|
+
export const RESPONSE_SPEC = {
|
|
231
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
232
|
+
isBearer: false,
|
|
233
|
+
isProofRequired: true,
|
|
234
|
+
isRecipientRequired: true,
|
|
235
|
+
isIssuedAtRequired: true,
|
|
236
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
237
|
+
} as const;
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/rooms/owner/group/add/0.2/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext } from "../../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
export interface RoomsOwnerGroupAddPayload {
|
|
10
|
+
/**
|
|
11
|
+
* The room whose group admits a member. The recipient MUST hold its group.
|
|
12
|
+
*/
|
|
13
|
+
roomId: string;
|
|
14
|
+
/**
|
|
15
|
+
* The room's host, as a DID: where the room's epoch advances. Named by the caller because the recipient holds key custody, not a hosting register.
|
|
16
|
+
*/
|
|
17
|
+
host: string;
|
|
18
|
+
/**
|
|
19
|
+
* The DID being admitted. The KeyPackage's leaf credential MUST identify it; one that names anyone else is refused, so an owner never admits a party other than the one they meant.
|
|
20
|
+
*/
|
|
21
|
+
member: string;
|
|
22
|
+
/**
|
|
23
|
+
* The newcomer's MLS KeyPackage, base64url without padding, as rooms/keys/key-package returned it.
|
|
24
|
+
*/
|
|
25
|
+
keyPackage: string;
|
|
26
|
+
/**
|
|
27
|
+
* Why, carried to the host's epoch advance. Untrusted and attributed to its author: it MUST NOT carry personal data or a credential.
|
|
28
|
+
*/
|
|
29
|
+
reason?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
32
|
+
*/
|
|
33
|
+
ext?: Ext;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Success response to rooms/owner/group/add. Type https://trusttasks.org/spec/rooms/owner/group/add/0.2#response. The room's new epoch, and the Welcome for the caller to deliver to the newcomer's key holder with rooms/keys/welcome.
|
|
37
|
+
*/
|
|
38
|
+
export interface RoomsOwnerGroupAddResponsePayload {
|
|
39
|
+
/**
|
|
40
|
+
* The room.
|
|
41
|
+
*/
|
|
42
|
+
roomId: string;
|
|
43
|
+
/**
|
|
44
|
+
* Who was admitted.
|
|
45
|
+
*/
|
|
46
|
+
member: string;
|
|
47
|
+
/**
|
|
48
|
+
* The room epoch after the admission, as the host recorded it.
|
|
49
|
+
*/
|
|
50
|
+
epoch: number;
|
|
51
|
+
/**
|
|
52
|
+
* The MLS Welcome, base64url, sealed to the newcomer's KeyPackage. For rooms/keys/welcome; never through the host.
|
|
53
|
+
*/
|
|
54
|
+
welcome: string;
|
|
55
|
+
/**
|
|
56
|
+
* The group's ratchet tree, base64url, where the Welcome does not carry it as an extension. Passed to rooms/keys/welcome unchanged.
|
|
57
|
+
*/
|
|
58
|
+
ratchetTree?: string;
|
|
59
|
+
ext?: Ext;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
63
|
+
export type { Ext };
|
|
64
|
+
|
|
65
|
+
/** Trust Task type URI. */
|
|
66
|
+
export const TYPE_URI = "https://trusttasks.org/spec/rooms/owner/group/add/0.2" as const;
|
|
67
|
+
|
|
68
|
+
/** Stable alias for this specification's request payload shape. */
|
|
69
|
+
export type Payload = RoomsOwnerGroupAddPayload;
|
|
70
|
+
|
|
71
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
72
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/owner/group/add/0.2#response" as const;
|
|
73
|
+
|
|
74
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
75
|
+
export type Response = RoomsOwnerGroupAddResponsePayload;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* This specification's payload schema, as a value.
|
|
79
|
+
*
|
|
80
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
81
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
82
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
83
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
84
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
85
|
+
*/
|
|
86
|
+
export const PAYLOAD_SCHEMA = {
|
|
87
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
88
|
+
"$id": "https://trusttasks.org/spec/rooms/owner/group/add/0.2",
|
|
89
|
+
"title": "Rooms Owner Group Add — payload",
|
|
90
|
+
"type": "object",
|
|
91
|
+
"additionalProperties": false,
|
|
92
|
+
"required": [
|
|
93
|
+
"roomId",
|
|
94
|
+
"host",
|
|
95
|
+
"member",
|
|
96
|
+
"keyPackage"
|
|
97
|
+
],
|
|
98
|
+
"properties": {
|
|
99
|
+
"roomId": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"minLength": 1,
|
|
102
|
+
"maxLength": 512,
|
|
103
|
+
"description": "The room whose group admits a member. The recipient MUST hold its group."
|
|
104
|
+
},
|
|
105
|
+
"host": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"pattern": "^did:",
|
|
108
|
+
"maxLength": 2048,
|
|
109
|
+
"description": "The room's host, as a DID: where the room's epoch advances. Named by the caller because the recipient holds key custody, not a hosting register."
|
|
110
|
+
},
|
|
111
|
+
"member": {
|
|
112
|
+
"type": "string",
|
|
113
|
+
"pattern": "^did:",
|
|
114
|
+
"maxLength": 2048,
|
|
115
|
+
"description": "The DID being admitted. The KeyPackage's leaf credential MUST identify it; one that names anyone else is refused, so an owner never admits a party other than the one they meant."
|
|
116
|
+
},
|
|
117
|
+
"keyPackage": {
|
|
118
|
+
"type": "string",
|
|
119
|
+
"minLength": 1,
|
|
120
|
+
"maxLength": 65536,
|
|
121
|
+
"pattern": "^[A-Za-z0-9_-]+$",
|
|
122
|
+
"description": "The newcomer's MLS KeyPackage, base64url without padding, as rooms/keys/key-package returned it."
|
|
123
|
+
},
|
|
124
|
+
"reason": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"minLength": 1,
|
|
127
|
+
"maxLength": 500,
|
|
128
|
+
"description": "Why, carried to the host's epoch advance. Untrusted and attributed to its author: it MUST NOT carry personal data or a credential."
|
|
129
|
+
},
|
|
130
|
+
"ext": {
|
|
131
|
+
"$ref": "#/$defs/Ext",
|
|
132
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"$defs": {
|
|
136
|
+
"Response": {
|
|
137
|
+
"$anchor": "response",
|
|
138
|
+
"title": "Rooms Owner Group Add — response payload",
|
|
139
|
+
"description": "Success response to rooms/owner/group/add. Type https://trusttasks.org/spec/rooms/owner/group/add/0.2#response. The room's new epoch, and the Welcome for the caller to deliver to the newcomer's key holder with rooms/keys/welcome.",
|
|
140
|
+
"type": "object",
|
|
141
|
+
"additionalProperties": false,
|
|
142
|
+
"required": [
|
|
143
|
+
"roomId",
|
|
144
|
+
"member",
|
|
145
|
+
"epoch",
|
|
146
|
+
"welcome"
|
|
147
|
+
],
|
|
148
|
+
"properties": {
|
|
149
|
+
"roomId": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"minLength": 1,
|
|
152
|
+
"maxLength": 512,
|
|
153
|
+
"description": "The room."
|
|
154
|
+
},
|
|
155
|
+
"member": {
|
|
156
|
+
"type": "string",
|
|
157
|
+
"pattern": "^did:",
|
|
158
|
+
"maxLength": 2048,
|
|
159
|
+
"description": "Who was admitted."
|
|
160
|
+
},
|
|
161
|
+
"epoch": {
|
|
162
|
+
"type": "integer",
|
|
163
|
+
"minimum": 2,
|
|
164
|
+
"description": "The room epoch after the admission, as the host recorded it."
|
|
165
|
+
},
|
|
166
|
+
"welcome": {
|
|
167
|
+
"type": "string",
|
|
168
|
+
"minLength": 1,
|
|
169
|
+
"pattern": "^[A-Za-z0-9_-]+$",
|
|
170
|
+
"description": "The MLS Welcome, base64url, sealed to the newcomer's KeyPackage. For rooms/keys/welcome; never through the host."
|
|
171
|
+
},
|
|
172
|
+
"ratchetTree": {
|
|
173
|
+
"type": "string",
|
|
174
|
+
"minLength": 1,
|
|
175
|
+
"pattern": "^[A-Za-z0-9_-]+$",
|
|
176
|
+
"description": "The group's ratchet tree, base64url, where the Welcome does not carry it as an extension. Passed to rooms/keys/welcome unchanged."
|
|
177
|
+
},
|
|
178
|
+
"ext": {
|
|
179
|
+
"$ref": "#/$defs/Ext"
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"Ext": {
|
|
184
|
+
"title": "Ext",
|
|
185
|
+
"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.",
|
|
186
|
+
"type": "object",
|
|
187
|
+
"minProperties": 1,
|
|
188
|
+
"additionalProperties": true,
|
|
189
|
+
"propertyNames": {
|
|
190
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
} as const;
|
|
195
|
+
|
|
196
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
197
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
198
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
199
|
+
"$ref": "#/$defs/Response",
|
|
200
|
+
"$defs": {
|
|
201
|
+
"Response": {
|
|
202
|
+
"$anchor": "response",
|
|
203
|
+
"title": "Rooms Owner Group Add — response payload",
|
|
204
|
+
"description": "Success response to rooms/owner/group/add. Type https://trusttasks.org/spec/rooms/owner/group/add/0.2#response. The room's new epoch, and the Welcome for the caller to deliver to the newcomer's key holder with rooms/keys/welcome.",
|
|
205
|
+
"type": "object",
|
|
206
|
+
"additionalProperties": false,
|
|
207
|
+
"required": [
|
|
208
|
+
"roomId",
|
|
209
|
+
"member",
|
|
210
|
+
"epoch",
|
|
211
|
+
"welcome"
|
|
212
|
+
],
|
|
213
|
+
"properties": {
|
|
214
|
+
"roomId": {
|
|
215
|
+
"type": "string",
|
|
216
|
+
"minLength": 1,
|
|
217
|
+
"maxLength": 512,
|
|
218
|
+
"description": "The room."
|
|
219
|
+
},
|
|
220
|
+
"member": {
|
|
221
|
+
"type": "string",
|
|
222
|
+
"pattern": "^did:",
|
|
223
|
+
"maxLength": 2048,
|
|
224
|
+
"description": "Who was admitted."
|
|
225
|
+
},
|
|
226
|
+
"epoch": {
|
|
227
|
+
"type": "integer",
|
|
228
|
+
"minimum": 2,
|
|
229
|
+
"description": "The room epoch after the admission, as the host recorded it."
|
|
230
|
+
},
|
|
231
|
+
"welcome": {
|
|
232
|
+
"type": "string",
|
|
233
|
+
"minLength": 1,
|
|
234
|
+
"pattern": "^[A-Za-z0-9_-]+$",
|
|
235
|
+
"description": "The MLS Welcome, base64url, sealed to the newcomer's KeyPackage. For rooms/keys/welcome; never through the host."
|
|
236
|
+
},
|
|
237
|
+
"ratchetTree": {
|
|
238
|
+
"type": "string",
|
|
239
|
+
"minLength": 1,
|
|
240
|
+
"pattern": "^[A-Za-z0-9_-]+$",
|
|
241
|
+
"description": "The group's ratchet tree, base64url, where the Welcome does not carry it as an extension. Passed to rooms/keys/welcome unchanged."
|
|
242
|
+
},
|
|
243
|
+
"ext": {
|
|
244
|
+
"$ref": "#/$defs/Ext"
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
"Ext": {
|
|
249
|
+
"title": "Ext",
|
|
250
|
+
"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.",
|
|
251
|
+
"type": "object",
|
|
252
|
+
"minProperties": 1,
|
|
253
|
+
"additionalProperties": true,
|
|
254
|
+
"propertyNames": {
|
|
255
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
} as const;
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
263
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
264
|
+
* per-specification and cannot be derived from the document alone, and
|
|
265
|
+
* item 2 needs the schema this carries.
|
|
266
|
+
*/
|
|
267
|
+
export const SPEC = {
|
|
268
|
+
typeUri: TYPE_URI,
|
|
269
|
+
isBearer: false,
|
|
270
|
+
isProofRequired: true,
|
|
271
|
+
isRecipientRequired: true,
|
|
272
|
+
isIssuedAtRequired: true,
|
|
273
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
274
|
+
} as const;
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
278
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
279
|
+
* parties (§7.3 item 5).
|
|
280
|
+
*/
|
|
281
|
+
export const RESPONSE_SPEC = {
|
|
282
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
283
|
+
isBearer: false,
|
|
284
|
+
isProofRequired: true,
|
|
285
|
+
isRecipientRequired: true,
|
|
286
|
+
isIssuedAtRequired: true,
|
|
287
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
288
|
+
} as const;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/_shared/0.6/witness-party.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A VTA can act as the participating party of a witnessed session (witness/session/0.2, witness/session/submit/0.2) for its principal: it builds and signs, as the principal's relationship DID, every document the party sends, and verifies and stores what the witness returns. The client carries the documents between the VTA and the witness. The normative rules (the session binding, custody, authorization, retries) are in CONVENTIONS.md beside this file. The outcome evidence vta/witness/accept returns is the witness family's shared OutcomeEvidence (witness/_shared/0.1/outcome-evidence), which a holder also ships to a verifier. Not itself a Trust Task specification: the `_shared` folder is skipped by the registry build and the codegen.
|
|
8
|
+
*/
|
|
9
|
+
export interface WitnessedPartySharedDefinitionsForTheVtaWitness02Tasks {
|
|
10
|
+
[k: string]: unknown | undefined;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The definitions this shared schema publishes, hoisted to one declaration each.
|
|
15
|
+
* See "../../../_shared/components.js".
|
|
16
|
+
*/
|
|
17
|
+
export type { CarriedDocument, SessionId } from "../../../_shared/components.js";
|