@openvtc/trust-tasks 0.16.7 → 0.16.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.
- package/CHANGELOG.md +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- 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/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/index.ts +8 -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/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
package/src/index.ts
CHANGED
|
@@ -205,6 +205,8 @@ 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 RoomsKeysOpen_v0_1 from "./rooms/keys/open/0.1/payload.js";
|
|
209
|
+
export * as RoomsKeysPresent_v0_1 from "./rooms/keys/present/0.1/payload.js";
|
|
208
210
|
export * as RoomsRecordsGet_v0_1 from "./rooms/records/get/0.1/payload.js";
|
|
209
211
|
export * as RoomsRecordsList_v0_1 from "./rooms/records/list/0.1/payload.js";
|
|
210
212
|
export * as RoomsRecordsPut_v0_1 from "./rooms/records/put/0.1/payload.js";
|
|
@@ -283,6 +285,11 @@ export * as VtaAppStateGet_v1_0 from "./vta/app-state/get/1.0/payload.js";
|
|
|
283
285
|
export * as VtaAppStateList_v1_0 from "./vta/app-state/list/1.0/payload.js";
|
|
284
286
|
export * as VtaAppStatePutMany_v1_0 from "./vta/app-state/put-many/1.0/payload.js";
|
|
285
287
|
export * as VtaAppStatePut_v1_0 from "./vta/app-state/put/1.0/payload.js";
|
|
288
|
+
export * as VtaBackupAbort_v1_0 from "./vta/backup/abort/1.0/payload.js";
|
|
289
|
+
export * as VtaBackupCompleteExport_v1_0 from "./vta/backup/complete-export/1.0/payload.js";
|
|
290
|
+
export * as VtaBackupFinalizeImport_v1_0 from "./vta/backup/finalize-import/1.0/payload.js";
|
|
291
|
+
export * as VtaBackupInitiateExport_v1_0 from "./vta/backup/initiate-export/1.0/payload.js";
|
|
292
|
+
export * as VtaBackupInitiateImport_v1_0 from "./vta/backup/initiate-import/1.0/payload.js";
|
|
286
293
|
export * as VtaContextsCreate_v1_0 from "./vta/contexts/create/1.0/payload.js";
|
|
287
294
|
export * as VtaContextsDelete_v1_0 from "./vta/contexts/delete/1.0/payload.js";
|
|
288
295
|
export * as VtaContextsDidTemplatesCreate_v1_0 from "./vta/contexts/did-templates/create/1.0/payload.js";
|
|
@@ -312,6 +319,7 @@ export * as VtaDidTemplatesRender_v1_0 from "./vta/did-templates/render/1.0/payl
|
|
|
312
319
|
export * as VtaDidTemplatesRender_v2_0 from "./vta/did-templates/render/2.0/payload.js";
|
|
313
320
|
export * as VtaDidTemplatesUpdate_v1_0 from "./vta/did-templates/update/1.0/payload.js";
|
|
314
321
|
export * as VtaDidTemplatesUpdate_v2_0 from "./vta/did-templates/update/2.0/payload.js";
|
|
322
|
+
export * as VtaManagementReloadServices_v1_0 from "./vta/management/reload-services/1.0/payload.js";
|
|
315
323
|
export * as VtaMemoryDelete_v0_1 from "./vta/memory/delete/0.1/payload.js";
|
|
316
324
|
export * as VtaMemoryList_v0_1 from "./vta/memory/list/0.1/payload.js";
|
|
317
325
|
export * as VtaMemoryPut_v0_1 from "./vta/memory/put/0.1/payload.js";
|
|
@@ -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.1/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.1#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.1" 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.1#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.1",
|
|
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.1#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.1#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,224 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/rooms/keys/present/0.1/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 credentials to produce a presentation for one room operation. The credentials never cross to the agent; only the presentation does, and it is bound to the operation it was asked for.
|
|
11
|
+
*/
|
|
12
|
+
export interface RoomsKeysPresentPayload {
|
|
13
|
+
/**
|
|
14
|
+
* The room to present for.
|
|
15
|
+
*/
|
|
16
|
+
roomId: string;
|
|
17
|
+
/**
|
|
18
|
+
* The action the presentation must confer. Named here so the produced presentation can be scoped to it: a presentation minted for `read` should not be reusable for `write`, and a holder that mints one covering everything has handed the agent its own standing.
|
|
19
|
+
*/
|
|
20
|
+
action: "read" | "write" | "curate" | "admin";
|
|
21
|
+
/**
|
|
22
|
+
* The party the presentation is for, so it cannot be replayed elsewhere. A host's identifier, normally.
|
|
23
|
+
*/
|
|
24
|
+
audience?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Freshness value from the verifier, echoed into the presentation. Without one a captured presentation is replayable for as long as its credentials live.
|
|
27
|
+
*/
|
|
28
|
+
nonce?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
31
|
+
*/
|
|
32
|
+
ext?: Ext;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Success response to rooms/keys/present. Type https://trusttasks.org/spec/rooms/keys/present/0.1#response.
|
|
36
|
+
*/
|
|
37
|
+
export interface RoomsKeysPresentResponsePayload {
|
|
38
|
+
/**
|
|
39
|
+
* The presentation to send to the host: a membership credential, an authority chain, and — where the room withholds the subject — a same-subject binding.
|
|
40
|
+
*/
|
|
41
|
+
presentation: {
|
|
42
|
+
[k: string]: unknown | undefined;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* When the presentation stops being accepted, so a caller can avoid presenting a stale one.
|
|
46
|
+
*/
|
|
47
|
+
expiresAt?: string;
|
|
48
|
+
ext?: Ext;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
52
|
+
export type { Ext };
|
|
53
|
+
|
|
54
|
+
/** Trust Task type URI. */
|
|
55
|
+
export const TYPE_URI = "https://trusttasks.org/spec/rooms/keys/present/0.1" as const;
|
|
56
|
+
|
|
57
|
+
/** Stable alias for this specification's request payload shape. */
|
|
58
|
+
export type Payload = RoomsKeysPresentPayload;
|
|
59
|
+
|
|
60
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
61
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/keys/present/0.1#response" as const;
|
|
62
|
+
|
|
63
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
64
|
+
export type Response = RoomsKeysPresentResponsePayload;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* This specification's payload schema, as a value.
|
|
68
|
+
*
|
|
69
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
70
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
71
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
72
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
73
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
74
|
+
*/
|
|
75
|
+
export const PAYLOAD_SCHEMA = {
|
|
76
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
77
|
+
"$id": "https://trusttasks.org/spec/rooms/keys/present/0.1",
|
|
78
|
+
"title": "Rooms Keys Present — payload",
|
|
79
|
+
"description": "An agent asks the party holding its principal's room credentials to produce a presentation for one room operation. The credentials never cross to the agent; only the presentation does, and it is bound to the operation it was asked for.",
|
|
80
|
+
"type": "object",
|
|
81
|
+
"additionalProperties": false,
|
|
82
|
+
"required": [
|
|
83
|
+
"roomId",
|
|
84
|
+
"action"
|
|
85
|
+
],
|
|
86
|
+
"properties": {
|
|
87
|
+
"roomId": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"description": "The room to present for."
|
|
90
|
+
},
|
|
91
|
+
"action": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"enum": [
|
|
94
|
+
"read",
|
|
95
|
+
"write",
|
|
96
|
+
"curate",
|
|
97
|
+
"admin"
|
|
98
|
+
],
|
|
99
|
+
"description": "The action the presentation must confer. Named here so the produced presentation can be scoped to it: a presentation minted for `read` should not be reusable for `write`, and a holder that mints one covering everything has handed the agent its own standing."
|
|
100
|
+
},
|
|
101
|
+
"audience": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"description": "The party the presentation is for, so it cannot be replayed elsewhere. A host's identifier, normally."
|
|
104
|
+
},
|
|
105
|
+
"nonce": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"maxLength": 512,
|
|
108
|
+
"description": "Freshness value from the verifier, echoed into the presentation. Without one a captured presentation is replayable for as long as its credentials live."
|
|
109
|
+
},
|
|
110
|
+
"ext": {
|
|
111
|
+
"$ref": "#/$defs/Ext",
|
|
112
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"$defs": {
|
|
116
|
+
"Response": {
|
|
117
|
+
"$anchor": "response",
|
|
118
|
+
"title": "Rooms Keys Present — response payload",
|
|
119
|
+
"description": "Success response to rooms/keys/present. Type https://trusttasks.org/spec/rooms/keys/present/0.1#response.",
|
|
120
|
+
"type": "object",
|
|
121
|
+
"additionalProperties": false,
|
|
122
|
+
"required": [
|
|
123
|
+
"presentation"
|
|
124
|
+
],
|
|
125
|
+
"properties": {
|
|
126
|
+
"presentation": {
|
|
127
|
+
"type": "object",
|
|
128
|
+
"additionalProperties": true,
|
|
129
|
+
"description": "The presentation to send to the host: a membership credential, an authority chain, and — where the room withholds the subject — a same-subject binding."
|
|
130
|
+
},
|
|
131
|
+
"expiresAt": {
|
|
132
|
+
"type": "string",
|
|
133
|
+
"format": "date-time",
|
|
134
|
+
"description": "When the presentation stops being accepted, so a caller can avoid presenting a stale one."
|
|
135
|
+
},
|
|
136
|
+
"ext": {
|
|
137
|
+
"$ref": "#/$defs/Ext"
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"Ext": {
|
|
142
|
+
"title": "Ext",
|
|
143
|
+
"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.",
|
|
144
|
+
"type": "object",
|
|
145
|
+
"minProperties": 1,
|
|
146
|
+
"additionalProperties": true,
|
|
147
|
+
"propertyNames": {
|
|
148
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
} as const;
|
|
153
|
+
|
|
154
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
155
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
156
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
157
|
+
"$ref": "#/$defs/Response",
|
|
158
|
+
"$defs": {
|
|
159
|
+
"Response": {
|
|
160
|
+
"$anchor": "response",
|
|
161
|
+
"title": "Rooms Keys Present — response payload",
|
|
162
|
+
"description": "Success response to rooms/keys/present. Type https://trusttasks.org/spec/rooms/keys/present/0.1#response.",
|
|
163
|
+
"type": "object",
|
|
164
|
+
"additionalProperties": false,
|
|
165
|
+
"required": [
|
|
166
|
+
"presentation"
|
|
167
|
+
],
|
|
168
|
+
"properties": {
|
|
169
|
+
"presentation": {
|
|
170
|
+
"type": "object",
|
|
171
|
+
"additionalProperties": true,
|
|
172
|
+
"description": "The presentation to send to the host: a membership credential, an authority chain, and — where the room withholds the subject — a same-subject binding."
|
|
173
|
+
},
|
|
174
|
+
"expiresAt": {
|
|
175
|
+
"type": "string",
|
|
176
|
+
"format": "date-time",
|
|
177
|
+
"description": "When the presentation stops being accepted, so a caller can avoid presenting a stale one."
|
|
178
|
+
},
|
|
179
|
+
"ext": {
|
|
180
|
+
"$ref": "#/$defs/Ext"
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"Ext": {
|
|
185
|
+
"title": "Ext",
|
|
186
|
+
"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.",
|
|
187
|
+
"type": "object",
|
|
188
|
+
"minProperties": 1,
|
|
189
|
+
"additionalProperties": true,
|
|
190
|
+
"propertyNames": {
|
|
191
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
} as const;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
199
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
200
|
+
* per-specification and cannot be derived from the document alone, and
|
|
201
|
+
* item 2 needs the schema this carries.
|
|
202
|
+
*/
|
|
203
|
+
export const SPEC = {
|
|
204
|
+
typeUri: TYPE_URI,
|
|
205
|
+
isBearer: false,
|
|
206
|
+
isProofRequired: true,
|
|
207
|
+
isRecipientRequired: true,
|
|
208
|
+
isIssuedAtRequired: true,
|
|
209
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
210
|
+
} as const;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
214
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
215
|
+
* parties (§7.3 item 5).
|
|
216
|
+
*/
|
|
217
|
+
export const RESPONSE_SPEC = {
|
|
218
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
219
|
+
isBearer: false,
|
|
220
|
+
isProofRequired: true,
|
|
221
|
+
isRecipientRequired: true,
|
|
222
|
+
isIssuedAtRequired: true,
|
|
223
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
224
|
+
} as const;
|