@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.
Files changed (84) hide show
  1. package/CHANGELOG.md +351 -0
  2. package/dist/_shared/components.d.ts +18 -0
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/index.d.ts +14 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +14 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/rooms/keys/act/0.2/payload.d.ts +546 -0
  9. package/dist/rooms/keys/act/0.2/payload.d.ts.map +1 -0
  10. package/dist/rooms/keys/act/0.2/payload.js +305 -0
  11. package/dist/rooms/keys/act/0.2/payload.js.map +1 -0
  12. package/dist/rooms/keys/act/0.3/payload.d.ts +546 -0
  13. package/dist/rooms/keys/act/0.3/payload.d.ts.map +1 -0
  14. package/dist/rooms/keys/act/0.3/payload.js +305 -0
  15. package/dist/rooms/keys/act/0.3/payload.js.map +1 -0
  16. package/dist/rooms/keys/file-key/0.2/payload.d.ts +306 -0
  17. package/dist/rooms/keys/file-key/0.2/payload.d.ts.map +1 -0
  18. package/dist/rooms/keys/file-key/0.2/payload.js +167 -0
  19. package/dist/rooms/keys/file-key/0.2/payload.js.map +1 -0
  20. package/dist/rooms/keys/open/0.2/payload.d.ts +323 -0
  21. package/dist/rooms/keys/open/0.2/payload.d.ts.map +1 -0
  22. package/dist/rooms/keys/open/0.2/payload.js +171 -0
  23. package/dist/rooms/keys/open/0.2/payload.js.map +1 -0
  24. package/dist/rooms/owner/group/add/0.2/payload.d.ts +417 -0
  25. package/dist/rooms/owner/group/add/0.2/payload.d.ts.map +1 -0
  26. package/dist/rooms/owner/group/add/0.2/payload.js +218 -0
  27. package/dist/rooms/owner/group/add/0.2/payload.js.map +1 -0
  28. package/dist/vta/_shared/0.6/witness-party.d.ts +16 -0
  29. package/dist/vta/_shared/0.6/witness-party.d.ts.map +1 -0
  30. package/dist/vta/_shared/0.6/witness-party.js +6 -0
  31. package/dist/vta/_shared/0.6/witness-party.js.map +1 -0
  32. package/dist/vta/witness/accept/0.2/payload.d.ts +499 -0
  33. package/dist/vta/witness/accept/0.2/payload.d.ts.map +1 -0
  34. package/dist/vta/witness/accept/0.2/payload.js +278 -0
  35. package/dist/vta/witness/accept/0.2/payload.js.map +1 -0
  36. package/dist/vta/witness/open/0.2/payload.d.ts +500 -0
  37. package/dist/vta/witness/open/0.2/payload.d.ts.map +1 -0
  38. package/dist/vta/witness/open/0.2/payload.js +259 -0
  39. package/dist/vta/witness/open/0.2/payload.js.map +1 -0
  40. package/dist/vta/witness/present/0.2/payload.d.ts +303 -0
  41. package/dist/vta/witness/present/0.2/payload.d.ts.map +1 -0
  42. package/dist/vta/witness/present/0.2/payload.js +170 -0
  43. package/dist/vta/witness/present/0.2/payload.js.map +1 -0
  44. package/dist/vtc/members/personhood/assert/0.2/payload.d.ts +536 -0
  45. package/dist/vtc/members/personhood/assert/0.2/payload.d.ts.map +1 -0
  46. package/dist/vtc/members/personhood/assert/0.2/payload.js +228 -0
  47. package/dist/vtc/members/personhood/assert/0.2/payload.js.map +1 -0
  48. package/dist/vtc/members/registry-consent/0.1/payload.d.ts +311 -0
  49. package/dist/vtc/members/registry-consent/0.1/payload.d.ts.map +1 -0
  50. package/dist/vtc/members/registry-consent/0.1/payload.js +183 -0
  51. package/dist/vtc/members/registry-consent/0.1/payload.js.map +1 -0
  52. package/dist/vtc/members/update/0.1/payload.d.ts +3 -3
  53. package/dist/vtc/members/update/0.1/payload.js +1 -1
  54. package/dist/vtc/members/update/0.1/payload.js.map +1 -1
  55. package/dist/witness/_shared/0.1/outcome-evidence.d.ts +16 -0
  56. package/dist/witness/_shared/0.1/outcome-evidence.d.ts.map +1 -0
  57. package/dist/witness/_shared/0.1/outcome-evidence.js +6 -0
  58. package/dist/witness/_shared/0.1/outcome-evidence.js.map +1 -0
  59. package/dist/witness/session/0.2/payload.d.ts +274 -0
  60. package/dist/witness/session/0.2/payload.d.ts.map +1 -0
  61. package/dist/witness/session/0.2/payload.js +152 -0
  62. package/dist/witness/session/0.2/payload.js.map +1 -0
  63. package/dist/witness/session/submit/0.2/payload.d.ts +295 -0
  64. package/dist/witness/session/submit/0.2/payload.d.ts.map +1 -0
  65. package/dist/witness/session/submit/0.2/payload.js +166 -0
  66. package/dist/witness/session/submit/0.2/payload.js.map +1 -0
  67. package/package.json +1 -1
  68. package/src/_shared/components.ts +17 -0
  69. package/src/index.ts +14 -0
  70. package/src/rooms/keys/act/0.2/payload.ts +380 -0
  71. package/src/rooms/keys/act/0.3/payload.ts +380 -0
  72. package/src/rooms/keys/file-key/0.2/payload.ts +224 -0
  73. package/src/rooms/keys/open/0.2/payload.ts +237 -0
  74. package/src/rooms/owner/group/add/0.2/payload.ts +288 -0
  75. package/src/vta/_shared/0.6/witness-party.ts +17 -0
  76. package/src/vta/witness/accept/0.2/payload.ts +330 -0
  77. package/src/vta/witness/open/0.2/payload.ts +336 -0
  78. package/src/vta/witness/present/0.2/payload.ts +210 -0
  79. package/src/vtc/members/personhood/assert/0.2/payload.ts +421 -0
  80. package/src/vtc/members/registry-consent/0.1/payload.ts +231 -0
  81. package/src/vtc/members/update/0.1/payload.ts +2 -2
  82. package/src/witness/_shared/0.1/outcome-evidence.ts +17 -0
  83. package/src/witness/session/0.2/payload.ts +197 -0
  84. package/src/witness/session/submit/0.2/payload.ts +212 -0
@@ -0,0 +1,500 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/witness/open/0.2/payload.schema.json
4
+ */
5
+ import type { CarriedDocument, Ext, SessionId } from "../../../../_shared/components.js";
6
+ /**
7
+ * A client asks its VTA to open a witnessed session for one of its principal's relationships: the VTA checks custody and the credentials to be presented, and returns the witness/session document, built and signed as the principal's relationship DID, for the client to send to the witness.
8
+ */
9
+ export interface VTAWitnessOpenPayload {
10
+ /**
11
+ * The witness to be witnessed by, as its public DID: the recipient of every document of the session, and the issuer of every answer the VTA will accept for it. Chosen by the caller, because which witness observes an exchange is the parties' privacy decision.
12
+ */
13
+ witness: string;
14
+ /**
15
+ * The principal's relationship DID for this relationship: the participating party, the issuer of every document of the session, and the DID the client sends them from. The VTA must hold a key of it in a context the caller may act in.
16
+ */
17
+ relationshipDid: string;
18
+ /**
19
+ * The other party's relationship DID. With relationshipDid it forms the session's `parties`, and it is the subject of the relationship credential presented.
20
+ */
21
+ counterpartyDid: string;
22
+ /**
23
+ * The threadId of the relationship exchange the session is nested in, set as `parentThreadId` on every document of the session, as witness/session requires of a producer.
24
+ */
25
+ relationshipThreadId: string;
26
+ /**
27
+ * The credential-vault handle of the relationship credential (VRC) to present: issued by relationshipDid, naming counterpartyDid. Bound to the session here, so a later step cannot present another.
28
+ */
29
+ relationshipCredentialId: string;
30
+ membership?: Membership;
31
+ /**
32
+ * The credential-vault handle to store the VWC under at vta/witness/accept. Absent, the VTA derives one.
33
+ */
34
+ storeAs?: string;
35
+ ext?: Ext;
36
+ }
37
+ /**
38
+ * The membership evidence to present beside the relationship credential, for a witness whose policy asks for it. Absent, none is presented. Bound to the session here.
39
+ */
40
+ export interface Membership {
41
+ /**
42
+ * The credential-vault handle of the membership credential.
43
+ */
44
+ credentialId: string;
45
+ /**
46
+ * The member DID the membership credential names, when it is not relationshipDid. The VTA must hold a key of it in a context the caller may act in. Naming it is the caller's explicit choice to disclose it to the witness.
47
+ */
48
+ memberDid?: string;
49
+ }
50
+ /**
51
+ * The session id and the witness/session document to send.
52
+ */
53
+ export interface VTAWitnessOpenResponsePayload {
54
+ sessionId: SessionId;
55
+ /**
56
+ * The witness/session/0.2 document, issued and signed by relationshipDid and addressed to the witness, for the client to send from relationshipDid unaltered. Its id is sessionId.
57
+ */
58
+ document: CarriedDocument;
59
+ /**
60
+ * When the VTA's record of the session expires. The client must hand back the witness's answers before then.
61
+ */
62
+ expiresAt: string;
63
+ ext?: Ext;
64
+ }
65
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
66
+ export type { CarriedDocument, Ext, SessionId };
67
+ /** Trust Task type URI. */
68
+ export declare const TYPE_URI: "https://trusttasks.org/spec/vta/witness/open/0.2";
69
+ /** Stable alias for this specification's request payload shape. */
70
+ export type Payload = VTAWitnessOpenPayload;
71
+ /** Trust Task response type URI (request type URI + "#response"). */
72
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/vta/witness/open/0.2#response";
73
+ /** Stable alias for this specification's success-response payload shape. */
74
+ export type Response = VTAWitnessOpenResponsePayload;
75
+ /**
76
+ * This specification's payload schema, as a value.
77
+ *
78
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
79
+ * rather than only as a `.json` file because TypeScript types are erased
80
+ * at runtime: without a schema a consumer has nothing to validate, and
81
+ * every REQUIRED payload member is optional in practice. Cross-file
82
+ * `$ref`s are already inlined, so it needs no resolver.
83
+ */
84
+ export declare const PAYLOAD_SCHEMA: {
85
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
86
+ readonly $id: "https://trusttasks.org/spec/vta/witness/open/0.2";
87
+ readonly title: "VTA Witness — Open — payload";
88
+ readonly description: "A client asks its VTA to open a witnessed session for one of its principal's relationships: the VTA checks custody and the credentials to be presented, and returns the witness/session document, built and signed as the principal's relationship DID, for the client to send to the witness.";
89
+ readonly type: "object";
90
+ readonly additionalProperties: false;
91
+ readonly required: readonly ["witness", "relationshipDid", "counterpartyDid", "relationshipThreadId", "relationshipCredentialId"];
92
+ readonly properties: {
93
+ readonly witness: {
94
+ readonly type: "string";
95
+ readonly pattern: "^did:";
96
+ readonly description: "The witness to be witnessed by, as its public DID: the recipient of every document of the session, and the issuer of every answer the VTA will accept for it. Chosen by the caller, because which witness observes an exchange is the parties' privacy decision.";
97
+ };
98
+ readonly relationshipDid: {
99
+ readonly type: "string";
100
+ readonly pattern: "^did:";
101
+ readonly description: "The principal's relationship DID for this relationship: the participating party, the issuer of every document of the session, and the DID the client sends them from. The VTA must hold a key of it in a context the caller may act in.";
102
+ };
103
+ readonly counterpartyDid: {
104
+ readonly type: "string";
105
+ readonly pattern: "^did:";
106
+ readonly description: "The other party's relationship DID. With relationshipDid it forms the session's `parties`, and it is the subject of the relationship credential presented.";
107
+ };
108
+ readonly relationshipThreadId: {
109
+ readonly type: "string";
110
+ readonly minLength: 1;
111
+ readonly maxLength: 256;
112
+ readonly description: "The threadId of the relationship exchange the session is nested in, set as `parentThreadId` on every document of the session, as witness/session requires of a producer.";
113
+ };
114
+ readonly relationshipCredentialId: {
115
+ readonly type: "string";
116
+ readonly minLength: 1;
117
+ readonly maxLength: 256;
118
+ readonly description: "The credential-vault handle of the relationship credential (VRC) to present: issued by relationshipDid, naming counterpartyDid. Bound to the session here, so a later step cannot present another.";
119
+ };
120
+ readonly membership: {
121
+ readonly $ref: "#/$defs/Membership";
122
+ readonly description: "The membership evidence to present beside the relationship credential, for a witness whose policy asks for it. Absent, none is presented. Bound to the session here.";
123
+ };
124
+ readonly storeAs: {
125
+ readonly type: "string";
126
+ readonly minLength: 1;
127
+ readonly maxLength: 256;
128
+ readonly description: "The credential-vault handle to store the VWC under at vta/witness/accept. Absent, the VTA derives one.";
129
+ };
130
+ readonly ext: {
131
+ readonly $ref: "#/$defs/Ext";
132
+ };
133
+ };
134
+ readonly $defs: {
135
+ readonly Membership: {
136
+ readonly title: "Membership";
137
+ readonly description: "A membership credential (VMC) held in the credential vault, and the DID it names. When memberDid is absent the VMC names relationshipDid and rides in the relationship presentation. When memberDid is present the VMC names that DID, and the VTA builds a second presentation — the member presentation, carried in witness/session/submit/0.2's memberPresentation — signed by memberDid and bound to the same session, which discloses memberDid to the witness.";
138
+ readonly type: "object";
139
+ readonly additionalProperties: false;
140
+ readonly required: readonly ["credentialId"];
141
+ readonly properties: {
142
+ readonly credentialId: {
143
+ readonly type: "string";
144
+ readonly minLength: 1;
145
+ readonly maxLength: 256;
146
+ readonly description: "The credential-vault handle of the membership credential.";
147
+ };
148
+ readonly memberDid: {
149
+ readonly type: "string";
150
+ readonly pattern: "^did:";
151
+ readonly description: "The member DID the membership credential names, when it is not relationshipDid. The VTA must hold a key of it in a context the caller may act in. Naming it is the caller's explicit choice to disclose it to the witness.";
152
+ };
153
+ };
154
+ };
155
+ readonly Response: {
156
+ readonly $anchor: "response";
157
+ readonly title: "VTA Witness — Open — response payload";
158
+ readonly description: "The session id and the witness/session document to send.";
159
+ readonly type: "object";
160
+ readonly additionalProperties: false;
161
+ readonly required: readonly ["sessionId", "document", "expiresAt"];
162
+ readonly properties: {
163
+ readonly sessionId: {
164
+ readonly $ref: "#/$defs/SessionId";
165
+ };
166
+ readonly document: {
167
+ readonly $ref: "#/$defs/CarriedDocument";
168
+ readonly description: "The witness/session/0.2 document, issued and signed by relationshipDid and addressed to the witness, for the client to send from relationshipDid unaltered. Its id is sessionId.";
169
+ };
170
+ readonly expiresAt: {
171
+ readonly type: "string";
172
+ readonly format: "date-time";
173
+ readonly description: "When the VTA's record of the session expires. The client must hand back the witness's answers before then.";
174
+ };
175
+ readonly ext: {
176
+ readonly $ref: "#/$defs/Ext";
177
+ };
178
+ };
179
+ };
180
+ readonly Ext: {
181
+ readonly title: "Ext";
182
+ 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.";
183
+ readonly type: "object";
184
+ readonly minProperties: 1;
185
+ readonly additionalProperties: true;
186
+ readonly propertyNames: {
187
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
188
+ };
189
+ };
190
+ readonly CarriedDocument: {
191
+ readonly title: "CarriedDocument";
192
+ readonly description: "A whole Trust Task document — `id`, `type`, `payload` and every other member, `proof` included — carried between the VTA and the witness by the client: one the VTA built and signed for the client to send, or one the witness returned for the client to hand back. Typed as an open object so every member survives a round trip: carried exactly as built or received, never re-serialised, because its proof is over itself. Its envelope is checked by the VTA against the session record (CONVENTIONS.md §3), not by this schema.";
193
+ readonly type: "object";
194
+ readonly minProperties: 1;
195
+ };
196
+ readonly SessionId: {
197
+ readonly title: "SessionId";
198
+ readonly description: "The id of the witness/session document the VTA built in vta/witness/open: the session's name, the thread every document of the session is on, and the value the VWC carries as taskContext. The VTA keys its state for the session by it.";
199
+ readonly type: "string";
200
+ readonly minLength: 1;
201
+ readonly maxLength: 256;
202
+ };
203
+ };
204
+ };
205
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
206
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
207
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
208
+ readonly $ref: "#/$defs/Response";
209
+ readonly $defs: {
210
+ readonly Membership: {
211
+ readonly title: "Membership";
212
+ readonly description: "A membership credential (VMC) held in the credential vault, and the DID it names. When memberDid is absent the VMC names relationshipDid and rides in the relationship presentation. When memberDid is present the VMC names that DID, and the VTA builds a second presentation — the member presentation, carried in witness/session/submit/0.2's memberPresentation — signed by memberDid and bound to the same session, which discloses memberDid to the witness.";
213
+ readonly type: "object";
214
+ readonly additionalProperties: false;
215
+ readonly required: readonly ["credentialId"];
216
+ readonly properties: {
217
+ readonly credentialId: {
218
+ readonly type: "string";
219
+ readonly minLength: 1;
220
+ readonly maxLength: 256;
221
+ readonly description: "The credential-vault handle of the membership credential.";
222
+ };
223
+ readonly memberDid: {
224
+ readonly type: "string";
225
+ readonly pattern: "^did:";
226
+ readonly description: "The member DID the membership credential names, when it is not relationshipDid. The VTA must hold a key of it in a context the caller may act in. Naming it is the caller's explicit choice to disclose it to the witness.";
227
+ };
228
+ };
229
+ };
230
+ readonly Response: {
231
+ readonly $anchor: "response";
232
+ readonly title: "VTA Witness — Open — response payload";
233
+ readonly description: "The session id and the witness/session document to send.";
234
+ readonly type: "object";
235
+ readonly additionalProperties: false;
236
+ readonly required: readonly ["sessionId", "document", "expiresAt"];
237
+ readonly properties: {
238
+ readonly sessionId: {
239
+ readonly $ref: "#/$defs/SessionId";
240
+ };
241
+ readonly document: {
242
+ readonly $ref: "#/$defs/CarriedDocument";
243
+ readonly description: "The witness/session/0.2 document, issued and signed by relationshipDid and addressed to the witness, for the client to send from relationshipDid unaltered. Its id is sessionId.";
244
+ };
245
+ readonly expiresAt: {
246
+ readonly type: "string";
247
+ readonly format: "date-time";
248
+ readonly description: "When the VTA's record of the session expires. The client must hand back the witness's answers before then.";
249
+ };
250
+ readonly ext: {
251
+ readonly $ref: "#/$defs/Ext";
252
+ };
253
+ };
254
+ };
255
+ readonly Ext: {
256
+ readonly title: "Ext";
257
+ 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.";
258
+ readonly type: "object";
259
+ readonly minProperties: 1;
260
+ readonly additionalProperties: true;
261
+ readonly propertyNames: {
262
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
263
+ };
264
+ };
265
+ readonly CarriedDocument: {
266
+ readonly title: "CarriedDocument";
267
+ readonly description: "A whole Trust Task document — `id`, `type`, `payload` and every other member, `proof` included — carried between the VTA and the witness by the client: one the VTA built and signed for the client to send, or one the witness returned for the client to hand back. Typed as an open object so every member survives a round trip: carried exactly as built or received, never re-serialised, because its proof is over itself. Its envelope is checked by the VTA against the session record (CONVENTIONS.md §3), not by this schema.";
268
+ readonly type: "object";
269
+ readonly minProperties: 1;
270
+ };
271
+ readonly SessionId: {
272
+ readonly title: "SessionId";
273
+ readonly description: "The id of the witness/session document the VTA built in vta/witness/open: the session's name, the thread every document of the session is on, and the value the VWC carries as taskContext. The VTA keys its state for the session by it.";
274
+ readonly type: "string";
275
+ readonly minLength: 1;
276
+ readonly maxLength: 256;
277
+ };
278
+ };
279
+ };
280
+ /**
281
+ * SPEC.md §7.2 policy for the request variant, from this specification's
282
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
283
+ * per-specification and cannot be derived from the document alone, and
284
+ * item 2 needs the schema this carries.
285
+ */
286
+ export declare const SPEC: {
287
+ readonly typeUri: "https://trusttasks.org/spec/vta/witness/open/0.2";
288
+ readonly isBearer: false;
289
+ readonly isProofRequired: true;
290
+ readonly isRecipientRequired: true;
291
+ readonly isIssuedAtRequired: true;
292
+ readonly payloadSchema: {
293
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
294
+ readonly $id: "https://trusttasks.org/spec/vta/witness/open/0.2";
295
+ readonly title: "VTA Witness — Open — payload";
296
+ readonly description: "A client asks its VTA to open a witnessed session for one of its principal's relationships: the VTA checks custody and the credentials to be presented, and returns the witness/session document, built and signed as the principal's relationship DID, for the client to send to the witness.";
297
+ readonly type: "object";
298
+ readonly additionalProperties: false;
299
+ readonly required: readonly ["witness", "relationshipDid", "counterpartyDid", "relationshipThreadId", "relationshipCredentialId"];
300
+ readonly properties: {
301
+ readonly witness: {
302
+ readonly type: "string";
303
+ readonly pattern: "^did:";
304
+ readonly description: "The witness to be witnessed by, as its public DID: the recipient of every document of the session, and the issuer of every answer the VTA will accept for it. Chosen by the caller, because which witness observes an exchange is the parties' privacy decision.";
305
+ };
306
+ readonly relationshipDid: {
307
+ readonly type: "string";
308
+ readonly pattern: "^did:";
309
+ readonly description: "The principal's relationship DID for this relationship: the participating party, the issuer of every document of the session, and the DID the client sends them from. The VTA must hold a key of it in a context the caller may act in.";
310
+ };
311
+ readonly counterpartyDid: {
312
+ readonly type: "string";
313
+ readonly pattern: "^did:";
314
+ readonly description: "The other party's relationship DID. With relationshipDid it forms the session's `parties`, and it is the subject of the relationship credential presented.";
315
+ };
316
+ readonly relationshipThreadId: {
317
+ readonly type: "string";
318
+ readonly minLength: 1;
319
+ readonly maxLength: 256;
320
+ readonly description: "The threadId of the relationship exchange the session is nested in, set as `parentThreadId` on every document of the session, as witness/session requires of a producer.";
321
+ };
322
+ readonly relationshipCredentialId: {
323
+ readonly type: "string";
324
+ readonly minLength: 1;
325
+ readonly maxLength: 256;
326
+ readonly description: "The credential-vault handle of the relationship credential (VRC) to present: issued by relationshipDid, naming counterpartyDid. Bound to the session here, so a later step cannot present another.";
327
+ };
328
+ readonly membership: {
329
+ readonly $ref: "#/$defs/Membership";
330
+ readonly description: "The membership evidence to present beside the relationship credential, for a witness whose policy asks for it. Absent, none is presented. Bound to the session here.";
331
+ };
332
+ readonly storeAs: {
333
+ readonly type: "string";
334
+ readonly minLength: 1;
335
+ readonly maxLength: 256;
336
+ readonly description: "The credential-vault handle to store the VWC under at vta/witness/accept. Absent, the VTA derives one.";
337
+ };
338
+ readonly ext: {
339
+ readonly $ref: "#/$defs/Ext";
340
+ };
341
+ };
342
+ readonly $defs: {
343
+ readonly Membership: {
344
+ readonly title: "Membership";
345
+ readonly description: "A membership credential (VMC) held in the credential vault, and the DID it names. When memberDid is absent the VMC names relationshipDid and rides in the relationship presentation. When memberDid is present the VMC names that DID, and the VTA builds a second presentation — the member presentation, carried in witness/session/submit/0.2's memberPresentation — signed by memberDid and bound to the same session, which discloses memberDid to the witness.";
346
+ readonly type: "object";
347
+ readonly additionalProperties: false;
348
+ readonly required: readonly ["credentialId"];
349
+ readonly properties: {
350
+ readonly credentialId: {
351
+ readonly type: "string";
352
+ readonly minLength: 1;
353
+ readonly maxLength: 256;
354
+ readonly description: "The credential-vault handle of the membership credential.";
355
+ };
356
+ readonly memberDid: {
357
+ readonly type: "string";
358
+ readonly pattern: "^did:";
359
+ readonly description: "The member DID the membership credential names, when it is not relationshipDid. The VTA must hold a key of it in a context the caller may act in. Naming it is the caller's explicit choice to disclose it to the witness.";
360
+ };
361
+ };
362
+ };
363
+ readonly Response: {
364
+ readonly $anchor: "response";
365
+ readonly title: "VTA Witness — Open — response payload";
366
+ readonly description: "The session id and the witness/session document to send.";
367
+ readonly type: "object";
368
+ readonly additionalProperties: false;
369
+ readonly required: readonly ["sessionId", "document", "expiresAt"];
370
+ readonly properties: {
371
+ readonly sessionId: {
372
+ readonly $ref: "#/$defs/SessionId";
373
+ };
374
+ readonly document: {
375
+ readonly $ref: "#/$defs/CarriedDocument";
376
+ readonly description: "The witness/session/0.2 document, issued and signed by relationshipDid and addressed to the witness, for the client to send from relationshipDid unaltered. Its id is sessionId.";
377
+ };
378
+ readonly expiresAt: {
379
+ readonly type: "string";
380
+ readonly format: "date-time";
381
+ readonly description: "When the VTA's record of the session expires. The client must hand back the witness's answers before then.";
382
+ };
383
+ readonly ext: {
384
+ readonly $ref: "#/$defs/Ext";
385
+ };
386
+ };
387
+ };
388
+ readonly Ext: {
389
+ readonly title: "Ext";
390
+ 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.";
391
+ readonly type: "object";
392
+ readonly minProperties: 1;
393
+ readonly additionalProperties: true;
394
+ readonly propertyNames: {
395
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
396
+ };
397
+ };
398
+ readonly CarriedDocument: {
399
+ readonly title: "CarriedDocument";
400
+ readonly description: "A whole Trust Task document — `id`, `type`, `payload` and every other member, `proof` included — carried between the VTA and the witness by the client: one the VTA built and signed for the client to send, or one the witness returned for the client to hand back. Typed as an open object so every member survives a round trip: carried exactly as built or received, never re-serialised, because its proof is over itself. Its envelope is checked by the VTA against the session record (CONVENTIONS.md §3), not by this schema.";
401
+ readonly type: "object";
402
+ readonly minProperties: 1;
403
+ };
404
+ readonly SessionId: {
405
+ readonly title: "SessionId";
406
+ readonly description: "The id of the witness/session document the VTA built in vta/witness/open: the session's name, the thread every document of the session is on, and the value the VWC carries as taskContext. The VTA keys its state for the session by it.";
407
+ readonly type: "string";
408
+ readonly minLength: 1;
409
+ readonly maxLength: 256;
410
+ };
411
+ };
412
+ };
413
+ };
414
+ /**
415
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
416
+ * tracks the *issuer* party's requirement because a response swaps the
417
+ * parties (§7.3 item 5).
418
+ */
419
+ export declare const RESPONSE_SPEC: {
420
+ readonly typeUri: "https://trusttasks.org/spec/vta/witness/open/0.2#response";
421
+ readonly isBearer: false;
422
+ readonly isProofRequired: false;
423
+ readonly isRecipientRequired: true;
424
+ readonly isIssuedAtRequired: true;
425
+ readonly payloadSchema: {
426
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
427
+ readonly $ref: "#/$defs/Response";
428
+ readonly $defs: {
429
+ readonly Membership: {
430
+ readonly title: "Membership";
431
+ readonly description: "A membership credential (VMC) held in the credential vault, and the DID it names. When memberDid is absent the VMC names relationshipDid and rides in the relationship presentation. When memberDid is present the VMC names that DID, and the VTA builds a second presentation — the member presentation, carried in witness/session/submit/0.2's memberPresentation — signed by memberDid and bound to the same session, which discloses memberDid to the witness.";
432
+ readonly type: "object";
433
+ readonly additionalProperties: false;
434
+ readonly required: readonly ["credentialId"];
435
+ readonly properties: {
436
+ readonly credentialId: {
437
+ readonly type: "string";
438
+ readonly minLength: 1;
439
+ readonly maxLength: 256;
440
+ readonly description: "The credential-vault handle of the membership credential.";
441
+ };
442
+ readonly memberDid: {
443
+ readonly type: "string";
444
+ readonly pattern: "^did:";
445
+ readonly description: "The member DID the membership credential names, when it is not relationshipDid. The VTA must hold a key of it in a context the caller may act in. Naming it is the caller's explicit choice to disclose it to the witness.";
446
+ };
447
+ };
448
+ };
449
+ readonly Response: {
450
+ readonly $anchor: "response";
451
+ readonly title: "VTA Witness — Open — response payload";
452
+ readonly description: "The session id and the witness/session document to send.";
453
+ readonly type: "object";
454
+ readonly additionalProperties: false;
455
+ readonly required: readonly ["sessionId", "document", "expiresAt"];
456
+ readonly properties: {
457
+ readonly sessionId: {
458
+ readonly $ref: "#/$defs/SessionId";
459
+ };
460
+ readonly document: {
461
+ readonly $ref: "#/$defs/CarriedDocument";
462
+ readonly description: "The witness/session/0.2 document, issued and signed by relationshipDid and addressed to the witness, for the client to send from relationshipDid unaltered. Its id is sessionId.";
463
+ };
464
+ readonly expiresAt: {
465
+ readonly type: "string";
466
+ readonly format: "date-time";
467
+ readonly description: "When the VTA's record of the session expires. The client must hand back the witness's answers before then.";
468
+ };
469
+ readonly ext: {
470
+ readonly $ref: "#/$defs/Ext";
471
+ };
472
+ };
473
+ };
474
+ readonly Ext: {
475
+ readonly title: "Ext";
476
+ 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.";
477
+ readonly type: "object";
478
+ readonly minProperties: 1;
479
+ readonly additionalProperties: true;
480
+ readonly propertyNames: {
481
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
482
+ };
483
+ };
484
+ readonly CarriedDocument: {
485
+ readonly title: "CarriedDocument";
486
+ readonly description: "A whole Trust Task document — `id`, `type`, `payload` and every other member, `proof` included — carried between the VTA and the witness by the client: one the VTA built and signed for the client to send, or one the witness returned for the client to hand back. Typed as an open object so every member survives a round trip: carried exactly as built or received, never re-serialised, because its proof is over itself. Its envelope is checked by the VTA against the session record (CONVENTIONS.md §3), not by this schema.";
487
+ readonly type: "object";
488
+ readonly minProperties: 1;
489
+ };
490
+ readonly SessionId: {
491
+ readonly title: "SessionId";
492
+ readonly description: "The id of the witness/session document the VTA built in vta/witness/open: the session's name, the thread every document of the session is on, and the value the VWC carries as taskContext. The VTA keys its state for the session by it.";
493
+ readonly type: "string";
494
+ readonly minLength: 1;
495
+ readonly maxLength: 256;
496
+ };
497
+ };
498
+ };
499
+ };
500
+ //# sourceMappingURL=payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/vta/witness/open/0.2/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAGzF;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,wBAAwB,EAAE,MAAM,CAAC;IACjC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AACD;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C,SAAS,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,QAAQ,EAAE,eAAe,CAAC;IAC1B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,kHAAkH;AAClH,YAAY,EAAE,eAAe,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC;AAEhD,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,kDAA2D,CAAC;AAEpF,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,qBAAqB,CAAC;AAE5C,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,2DAAoE,CAAC;AAEtG,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,6BAA6B,CAAC;AAErD;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoIjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+E1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}