@openvtc/trust-tasks 0.26.6 → 0.26.7

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 (35) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist/_shared/components.d.ts +2 -2
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/device/list/0.1/payload.d.ts +4 -4
  5. package/dist/device/list/0.1/payload.d.ts.map +1 -1
  6. package/dist/device/list/0.1/payload.js +4 -2
  7. package/dist/device/list/0.1/payload.js.map +1 -1
  8. package/dist/device/list/0.2/payload.d.ts +4 -4
  9. package/dist/device/list/0.2/payload.d.ts.map +1 -1
  10. package/dist/device/list/0.2/payload.js +4 -2
  11. package/dist/device/list/0.2/payload.js.map +1 -1
  12. package/dist/device/register/0.1/payload.d.ts +4 -4
  13. package/dist/device/register/0.1/payload.d.ts.map +1 -1
  14. package/dist/device/register/0.1/payload.js +4 -2
  15. package/dist/device/register/0.1/payload.js.map +1 -1
  16. package/dist/device/register/0.2/payload.d.ts +4 -4
  17. package/dist/device/register/0.2/payload.d.ts.map +1 -1
  18. package/dist/device/register/0.2/payload.js +4 -2
  19. package/dist/device/register/0.2/payload.js.map +1 -1
  20. package/dist/index.d.ts +1 -0
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +1 -0
  23. package/dist/index.js.map +1 -1
  24. package/dist/vta/witness/request/0.1/payload.d.ts +597 -0
  25. package/dist/vta/witness/request/0.1/payload.d.ts.map +1 -0
  26. package/dist/vta/witness/request/0.1/payload.js +311 -0
  27. package/dist/vta/witness/request/0.1/payload.js.map +1 -0
  28. package/package.json +1 -1
  29. package/src/_shared/components.ts +4 -2
  30. package/src/device/list/0.1/payload.ts +4 -2
  31. package/src/device/list/0.2/payload.ts +4 -2
  32. package/src/device/register/0.1/payload.ts +4 -2
  33. package/src/device/register/0.2/payload.ts +4 -2
  34. package/src/index.ts +1 -0
  35. package/src/vta/witness/request/0.1/payload.ts +405 -0
@@ -0,0 +1,597 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/witness/request/0.1/payload.schema.json
4
+ */
5
+ import type { DigestMultibase, Ext } from "../../../../_shared/components.js";
6
+ /**
7
+ * A client asks its VTA to run a witnessed session for one of its principal's relationships: open a witness/session with the named witness as the relationship DID the VTA holds, present the relationship credential (and, optionally, the membership evidence) from its credential vault, verify the Verifiable Witness Credential the witness returns, and store it in the vault with its evidence.
8
+ */
9
+ export interface VTAWitnessRequestPayload {
10
+ /**
11
+ * The witness to run the session with, as its public DID: the recipient of the witness/session and witness/session/submit documents the VTA sends, and the issuer of the VWC it must return. Chosen by the caller, because which witness observes an exchange is the parties' privacy decision (witness/session, Security & Privacy).
12
+ */
13
+ witness: string;
14
+ /**
15
+ * The principal's relationship DID for this relationship: the participating party, and the issuer of both documents the VTA sends to the witness. The VTA signs them, and the relationship presentation, with a key of this DID it holds in a context the caller may act in; never as itself.
16
+ */
17
+ relationshipDid: string;
18
+ /**
19
+ * The other party's relationship DID. With relationshipDid it forms the session's `parties` pair, 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. The VTA sets it 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: one issued by relationshipDid whose subject is counterpartyDid. A handle, as vault/credentials/query returns one; the credential itself never travels in this request.
28
+ */
29
+ relationshipCredentialId: string;
30
+ membership?: Membership;
31
+ /**
32
+ * The credential-vault handle to store the VWC under. Absent, the VTA derives one. Supplying it lets a caller recognise its own result after an ambiguous failure.
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.
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 stored VWC's vault handle, its digest, and the evidence documents that carry it. Sent only once the VWC is verified and stored.
52
+ */
53
+ export interface VTAWitnessRequestResponsePayload {
54
+ /**
55
+ * The credential-vault handle the VWC is now stored under, with its evidence.
56
+ */
57
+ credentialId: string;
58
+ /**
59
+ * The witness that issued the VWC. Equal to the request's witness: a VWC issued by any other party is refused, not stored.
60
+ */
61
+ witness: string;
62
+ /**
63
+ * The digest the witness returned for the VWC, which the VTA has checked against the VWC it stored: over the RFC 8785 canonicalization of the VWC, proof included.
64
+ */
65
+ vwcDigestMultibase: DigestMultibase;
66
+ evidence: Evidence;
67
+ ext?: Ext;
68
+ }
69
+ /**
70
+ * The two documents a holder ships with the VWC so a verifier can pair it with the session that produced it (witness/session/submit, This response is the outcome evidence). Each is carried exactly as sent or received, never re-serialised.
71
+ */
72
+ export interface Evidence {
73
+ /**
74
+ * The witness/session document that opened the session, as the VTA sent it. The VWC's taskContext is its id and its taskDigestMultibase is computed over it.
75
+ */
76
+ session: {};
77
+ /**
78
+ * The witness/session/submit #response, as the VTA received it, under the witness's proof. It carries the VWC and its vwcDigestMultibase.
79
+ */
80
+ outcome: {};
81
+ }
82
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
83
+ export type { DigestMultibase, Ext };
84
+ /** Trust Task type URI. */
85
+ export declare const TYPE_URI: "https://trusttasks.org/spec/vta/witness/request/0.1";
86
+ /** Stable alias for this specification's request payload shape. */
87
+ export type Payload = VTAWitnessRequestPayload;
88
+ /** Trust Task response type URI (request type URI + "#response"). */
89
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/vta/witness/request/0.1#response";
90
+ /** Stable alias for this specification's success-response payload shape. */
91
+ export type Response = VTAWitnessRequestResponsePayload;
92
+ /**
93
+ * This specification's payload schema, as a value.
94
+ *
95
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
96
+ * rather than only as a `.json` file because TypeScript types are erased
97
+ * at runtime: without a schema a consumer has nothing to validate, and
98
+ * every REQUIRED payload member is optional in practice. Cross-file
99
+ * `$ref`s are already inlined, so it needs no resolver.
100
+ */
101
+ export declare const PAYLOAD_SCHEMA: {
102
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
103
+ readonly $id: "https://trusttasks.org/spec/vta/witness/request/0.1";
104
+ readonly title: "VTA Witness — Request — payload";
105
+ readonly description: "A client asks its VTA to run a witnessed session for one of its principal's relationships: open a witness/session with the named witness as the relationship DID the VTA holds, present the relationship credential (and, optionally, the membership evidence) from its credential vault, verify the Verifiable Witness Credential the witness returns, and store it in the vault with its evidence.";
106
+ readonly type: "object";
107
+ readonly additionalProperties: false;
108
+ readonly required: readonly ["witness", "relationshipDid", "counterpartyDid", "relationshipThreadId", "relationshipCredentialId"];
109
+ readonly properties: {
110
+ readonly witness: {
111
+ readonly type: "string";
112
+ readonly pattern: "^did:";
113
+ readonly description: "The witness to run the session with, as its public DID: the recipient of the witness/session and witness/session/submit documents the VTA sends, and the issuer of the VWC it must return. Chosen by the caller, because which witness observes an exchange is the parties' privacy decision (witness/session, Security & Privacy).";
114
+ };
115
+ readonly relationshipDid: {
116
+ readonly type: "string";
117
+ readonly pattern: "^did:";
118
+ readonly description: "The principal's relationship DID for this relationship: the participating party, and the issuer of both documents the VTA sends to the witness. The VTA signs them, and the relationship presentation, with a key of this DID it holds in a context the caller may act in; never as itself.";
119
+ };
120
+ readonly counterpartyDid: {
121
+ readonly type: "string";
122
+ readonly pattern: "^did:";
123
+ readonly description: "The other party's relationship DID. With relationshipDid it forms the session's `parties` pair, and it is the subject of the relationship credential presented.";
124
+ };
125
+ readonly relationshipThreadId: {
126
+ readonly type: "string";
127
+ readonly minLength: 1;
128
+ readonly maxLength: 256;
129
+ readonly description: "The threadId of the relationship exchange the session is nested in. The VTA sets it as `parentThreadId` on every document of the session, as witness/session requires of a producer.";
130
+ };
131
+ readonly relationshipCredentialId: {
132
+ readonly type: "string";
133
+ readonly minLength: 1;
134
+ readonly maxLength: 256;
135
+ readonly description: "The credential-vault handle of the relationship credential (VRC) to present: one issued by relationshipDid whose subject is counterpartyDid. A handle, as vault/credentials/query returns one; the credential itself never travels in this request.";
136
+ };
137
+ readonly membership: {
138
+ readonly $ref: "#/$defs/Membership";
139
+ readonly description: "The membership evidence to present beside the relationship credential, for a witness whose policy asks for it. Absent, none is presented.";
140
+ };
141
+ readonly storeAs: {
142
+ readonly type: "string";
143
+ readonly minLength: 1;
144
+ readonly maxLength: 256;
145
+ readonly description: "The credential-vault handle to store the VWC under. Absent, the VTA derives one. Supplying it lets a caller recognise its own result after an ambiguous failure.";
146
+ };
147
+ readonly ext: {
148
+ readonly $ref: "#/$defs/Ext";
149
+ };
150
+ };
151
+ readonly $defs: {
152
+ readonly Membership: {
153
+ readonly title: "Membership";
154
+ 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 is presented in the relationship presentation. When memberDid is present the VMC names that DID, and the VTA builds a second presentation — the member presentation — signed by memberDid and bound to the same session, which discloses memberDid to the witness.";
155
+ readonly type: "object";
156
+ readonly additionalProperties: false;
157
+ readonly required: readonly ["credentialId"];
158
+ readonly properties: {
159
+ readonly credentialId: {
160
+ readonly type: "string";
161
+ readonly minLength: 1;
162
+ readonly maxLength: 256;
163
+ readonly description: "The credential-vault handle of the membership credential.";
164
+ };
165
+ readonly memberDid: {
166
+ readonly type: "string";
167
+ readonly pattern: "^did:";
168
+ 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.";
169
+ };
170
+ };
171
+ };
172
+ readonly Evidence: {
173
+ readonly title: "Evidence";
174
+ readonly description: "The two documents a holder ships with the VWC so a verifier can pair it with the session that produced it (witness/session/submit, This response is the outcome evidence). Each is carried exactly as sent or received, never re-serialised.";
175
+ readonly type: "object";
176
+ readonly additionalProperties: false;
177
+ readonly required: readonly ["session", "outcome"];
178
+ readonly properties: {
179
+ readonly session: {
180
+ readonly type: "object";
181
+ readonly minProperties: 1;
182
+ readonly description: "The witness/session document that opened the session, as the VTA sent it. The VWC's taskContext is its id and its taskDigestMultibase is computed over it.";
183
+ };
184
+ readonly outcome: {
185
+ readonly type: "object";
186
+ readonly minProperties: 1;
187
+ readonly description: "The witness/session/submit #response, as the VTA received it, under the witness's proof. It carries the VWC and its vwcDigestMultibase.";
188
+ };
189
+ };
190
+ };
191
+ readonly Response: {
192
+ readonly $anchor: "response";
193
+ readonly title: "VTA Witness — Request — response payload";
194
+ readonly description: "The stored VWC's vault handle, its digest, and the evidence documents that carry it. Sent only once the VWC is verified and stored.";
195
+ readonly type: "object";
196
+ readonly additionalProperties: false;
197
+ readonly required: readonly ["credentialId", "witness", "vwcDigestMultibase", "evidence"];
198
+ readonly properties: {
199
+ readonly credentialId: {
200
+ readonly type: "string";
201
+ readonly minLength: 1;
202
+ readonly maxLength: 256;
203
+ readonly description: "The credential-vault handle the VWC is now stored under, with its evidence.";
204
+ };
205
+ readonly witness: {
206
+ readonly type: "string";
207
+ readonly pattern: "^did:";
208
+ readonly description: "The witness that issued the VWC. Equal to the request's witness: a VWC issued by any other party is refused, not stored.";
209
+ };
210
+ readonly vwcDigestMultibase: {
211
+ readonly $ref: "#/$defs/DigestMultibase";
212
+ readonly description: "The digest the witness returned for the VWC, which the VTA has checked against the VWC it stored: over the RFC 8785 canonicalization of the VWC, proof included.";
213
+ };
214
+ readonly evidence: {
215
+ readonly $ref: "#/$defs/Evidence";
216
+ };
217
+ readonly ext: {
218
+ readonly $ref: "#/$defs/Ext";
219
+ };
220
+ };
221
+ };
222
+ readonly Ext: {
223
+ readonly title: "Ext";
224
+ 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.";
225
+ readonly type: "object";
226
+ readonly minProperties: 1;
227
+ readonly additionalProperties: true;
228
+ readonly propertyNames: {
229
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
230
+ };
231
+ };
232
+ readonly DigestMultibase: {
233
+ readonly title: "DigestMultibase";
234
+ readonly description: "A cryptographic digest as a multibase-encoded multihash — the encoding the W3C Verifiable Credentials Data Model 2.0 defines for `digestMultibase`, and the one `did:webvh` uses for its SCID and entry hashes.\n\nMultihash carries the hash algorithm in-band, so the value is self-describing and the wire format survives an algorithm change without a schema revision; multibase does the same for the base encoding, so a verifier never infers base58 from base64url by context. A bare hex string or a `sha-256:`-style prefix hard-codes one algorithm into the wire contract and is non-conforming here.\n\nThis definition constrains the *encoding only*. What the digest is computed over is stated by each referencing field, because it differs legitimately: a digest over a JSON document is taken over its RFC 8785 (JCS) canonicalization, while a digest over an opaque artifact is taken over its bytes. A field whose input is a JSON document and which does not name a canonicalization is not reproducible.\n\nRestricted to the two multibase headers W3C Controlled Identifiers 1.0 §2.4 normatively requires — `z` (base58btc) and `u` (base64url-no-pad). CID permits others but states that \"interoperability is not guaranteed between implementations using such values\", and a registry whose purpose is interoperability should not mint digests a conforming verifier may be unable to read. The alphabets are enforced rather than assumed: base58btc excludes 0, O, I and l, and an earlier permissive pattern let three published examples carry digests that were not valid base58 at all. base58btc is RECOMMENDED, for consistency with `did:key` and `did:webvh`.";
235
+ readonly type: "string";
236
+ readonly minLength: 16;
237
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
238
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
239
+ };
240
+ };
241
+ };
242
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
243
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
244
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
245
+ readonly $ref: "#/$defs/Response";
246
+ readonly $defs: {
247
+ readonly Membership: {
248
+ readonly title: "Membership";
249
+ 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 is presented in the relationship presentation. When memberDid is present the VMC names that DID, and the VTA builds a second presentation — the member presentation — signed by memberDid and bound to the same session, which discloses memberDid to the witness.";
250
+ readonly type: "object";
251
+ readonly additionalProperties: false;
252
+ readonly required: readonly ["credentialId"];
253
+ readonly properties: {
254
+ readonly credentialId: {
255
+ readonly type: "string";
256
+ readonly minLength: 1;
257
+ readonly maxLength: 256;
258
+ readonly description: "The credential-vault handle of the membership credential.";
259
+ };
260
+ readonly memberDid: {
261
+ readonly type: "string";
262
+ readonly pattern: "^did:";
263
+ 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.";
264
+ };
265
+ };
266
+ };
267
+ readonly Evidence: {
268
+ readonly title: "Evidence";
269
+ readonly description: "The two documents a holder ships with the VWC so a verifier can pair it with the session that produced it (witness/session/submit, This response is the outcome evidence). Each is carried exactly as sent or received, never re-serialised.";
270
+ readonly type: "object";
271
+ readonly additionalProperties: false;
272
+ readonly required: readonly ["session", "outcome"];
273
+ readonly properties: {
274
+ readonly session: {
275
+ readonly type: "object";
276
+ readonly minProperties: 1;
277
+ readonly description: "The witness/session document that opened the session, as the VTA sent it. The VWC's taskContext is its id and its taskDigestMultibase is computed over it.";
278
+ };
279
+ readonly outcome: {
280
+ readonly type: "object";
281
+ readonly minProperties: 1;
282
+ readonly description: "The witness/session/submit #response, as the VTA received it, under the witness's proof. It carries the VWC and its vwcDigestMultibase.";
283
+ };
284
+ };
285
+ };
286
+ readonly Response: {
287
+ readonly $anchor: "response";
288
+ readonly title: "VTA Witness — Request — response payload";
289
+ readonly description: "The stored VWC's vault handle, its digest, and the evidence documents that carry it. Sent only once the VWC is verified and stored.";
290
+ readonly type: "object";
291
+ readonly additionalProperties: false;
292
+ readonly required: readonly ["credentialId", "witness", "vwcDigestMultibase", "evidence"];
293
+ readonly properties: {
294
+ readonly credentialId: {
295
+ readonly type: "string";
296
+ readonly minLength: 1;
297
+ readonly maxLength: 256;
298
+ readonly description: "The credential-vault handle the VWC is now stored under, with its evidence.";
299
+ };
300
+ readonly witness: {
301
+ readonly type: "string";
302
+ readonly pattern: "^did:";
303
+ readonly description: "The witness that issued the VWC. Equal to the request's witness: a VWC issued by any other party is refused, not stored.";
304
+ };
305
+ readonly vwcDigestMultibase: {
306
+ readonly $ref: "#/$defs/DigestMultibase";
307
+ readonly description: "The digest the witness returned for the VWC, which the VTA has checked against the VWC it stored: over the RFC 8785 canonicalization of the VWC, proof included.";
308
+ };
309
+ readonly evidence: {
310
+ readonly $ref: "#/$defs/Evidence";
311
+ };
312
+ readonly ext: {
313
+ readonly $ref: "#/$defs/Ext";
314
+ };
315
+ };
316
+ };
317
+ readonly Ext: {
318
+ readonly title: "Ext";
319
+ 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.";
320
+ readonly type: "object";
321
+ readonly minProperties: 1;
322
+ readonly additionalProperties: true;
323
+ readonly propertyNames: {
324
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
325
+ };
326
+ };
327
+ readonly DigestMultibase: {
328
+ readonly title: "DigestMultibase";
329
+ readonly description: "A cryptographic digest as a multibase-encoded multihash — the encoding the W3C Verifiable Credentials Data Model 2.0 defines for `digestMultibase`, and the one `did:webvh` uses for its SCID and entry hashes.\n\nMultihash carries the hash algorithm in-band, so the value is self-describing and the wire format survives an algorithm change without a schema revision; multibase does the same for the base encoding, so a verifier never infers base58 from base64url by context. A bare hex string or a `sha-256:`-style prefix hard-codes one algorithm into the wire contract and is non-conforming here.\n\nThis definition constrains the *encoding only*. What the digest is computed over is stated by each referencing field, because it differs legitimately: a digest over a JSON document is taken over its RFC 8785 (JCS) canonicalization, while a digest over an opaque artifact is taken over its bytes. A field whose input is a JSON document and which does not name a canonicalization is not reproducible.\n\nRestricted to the two multibase headers W3C Controlled Identifiers 1.0 §2.4 normatively requires — `z` (base58btc) and `u` (base64url-no-pad). CID permits others but states that \"interoperability is not guaranteed between implementations using such values\", and a registry whose purpose is interoperability should not mint digests a conforming verifier may be unable to read. The alphabets are enforced rather than assumed: base58btc excludes 0, O, I and l, and an earlier permissive pattern let three published examples carry digests that were not valid base58 at all. base58btc is RECOMMENDED, for consistency with `did:key` and `did:webvh`.";
330
+ readonly type: "string";
331
+ readonly minLength: 16;
332
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
333
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
334
+ };
335
+ };
336
+ };
337
+ /**
338
+ * SPEC.md §7.2 policy for the request variant, from this specification's
339
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
340
+ * per-specification and cannot be derived from the document alone, and
341
+ * item 2 needs the schema this carries.
342
+ */
343
+ export declare const SPEC: {
344
+ readonly typeUri: "https://trusttasks.org/spec/vta/witness/request/0.1";
345
+ readonly isBearer: false;
346
+ readonly isProofRequired: true;
347
+ readonly isRecipientRequired: true;
348
+ readonly isIssuedAtRequired: true;
349
+ readonly payloadSchema: {
350
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
351
+ readonly $id: "https://trusttasks.org/spec/vta/witness/request/0.1";
352
+ readonly title: "VTA Witness — Request — payload";
353
+ readonly description: "A client asks its VTA to run a witnessed session for one of its principal's relationships: open a witness/session with the named witness as the relationship DID the VTA holds, present the relationship credential (and, optionally, the membership evidence) from its credential vault, verify the Verifiable Witness Credential the witness returns, and store it in the vault with its evidence.";
354
+ readonly type: "object";
355
+ readonly additionalProperties: false;
356
+ readonly required: readonly ["witness", "relationshipDid", "counterpartyDid", "relationshipThreadId", "relationshipCredentialId"];
357
+ readonly properties: {
358
+ readonly witness: {
359
+ readonly type: "string";
360
+ readonly pattern: "^did:";
361
+ readonly description: "The witness to run the session with, as its public DID: the recipient of the witness/session and witness/session/submit documents the VTA sends, and the issuer of the VWC it must return. Chosen by the caller, because which witness observes an exchange is the parties' privacy decision (witness/session, Security & Privacy).";
362
+ };
363
+ readonly relationshipDid: {
364
+ readonly type: "string";
365
+ readonly pattern: "^did:";
366
+ readonly description: "The principal's relationship DID for this relationship: the participating party, and the issuer of both documents the VTA sends to the witness. The VTA signs them, and the relationship presentation, with a key of this DID it holds in a context the caller may act in; never as itself.";
367
+ };
368
+ readonly counterpartyDid: {
369
+ readonly type: "string";
370
+ readonly pattern: "^did:";
371
+ readonly description: "The other party's relationship DID. With relationshipDid it forms the session's `parties` pair, and it is the subject of the relationship credential presented.";
372
+ };
373
+ readonly relationshipThreadId: {
374
+ readonly type: "string";
375
+ readonly minLength: 1;
376
+ readonly maxLength: 256;
377
+ readonly description: "The threadId of the relationship exchange the session is nested in. The VTA sets it as `parentThreadId` on every document of the session, as witness/session requires of a producer.";
378
+ };
379
+ readonly relationshipCredentialId: {
380
+ readonly type: "string";
381
+ readonly minLength: 1;
382
+ readonly maxLength: 256;
383
+ readonly description: "The credential-vault handle of the relationship credential (VRC) to present: one issued by relationshipDid whose subject is counterpartyDid. A handle, as vault/credentials/query returns one; the credential itself never travels in this request.";
384
+ };
385
+ readonly membership: {
386
+ readonly $ref: "#/$defs/Membership";
387
+ readonly description: "The membership evidence to present beside the relationship credential, for a witness whose policy asks for it. Absent, none is presented.";
388
+ };
389
+ readonly storeAs: {
390
+ readonly type: "string";
391
+ readonly minLength: 1;
392
+ readonly maxLength: 256;
393
+ readonly description: "The credential-vault handle to store the VWC under. Absent, the VTA derives one. Supplying it lets a caller recognise its own result after an ambiguous failure.";
394
+ };
395
+ readonly ext: {
396
+ readonly $ref: "#/$defs/Ext";
397
+ };
398
+ };
399
+ readonly $defs: {
400
+ readonly Membership: {
401
+ readonly title: "Membership";
402
+ 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 is presented in the relationship presentation. When memberDid is present the VMC names that DID, and the VTA builds a second presentation — the member presentation — signed by memberDid and bound to the same session, which discloses memberDid to the witness.";
403
+ readonly type: "object";
404
+ readonly additionalProperties: false;
405
+ readonly required: readonly ["credentialId"];
406
+ readonly properties: {
407
+ readonly credentialId: {
408
+ readonly type: "string";
409
+ readonly minLength: 1;
410
+ readonly maxLength: 256;
411
+ readonly description: "The credential-vault handle of the membership credential.";
412
+ };
413
+ readonly memberDid: {
414
+ readonly type: "string";
415
+ readonly pattern: "^did:";
416
+ 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.";
417
+ };
418
+ };
419
+ };
420
+ readonly Evidence: {
421
+ readonly title: "Evidence";
422
+ readonly description: "The two documents a holder ships with the VWC so a verifier can pair it with the session that produced it (witness/session/submit, This response is the outcome evidence). Each is carried exactly as sent or received, never re-serialised.";
423
+ readonly type: "object";
424
+ readonly additionalProperties: false;
425
+ readonly required: readonly ["session", "outcome"];
426
+ readonly properties: {
427
+ readonly session: {
428
+ readonly type: "object";
429
+ readonly minProperties: 1;
430
+ readonly description: "The witness/session document that opened the session, as the VTA sent it. The VWC's taskContext is its id and its taskDigestMultibase is computed over it.";
431
+ };
432
+ readonly outcome: {
433
+ readonly type: "object";
434
+ readonly minProperties: 1;
435
+ readonly description: "The witness/session/submit #response, as the VTA received it, under the witness's proof. It carries the VWC and its vwcDigestMultibase.";
436
+ };
437
+ };
438
+ };
439
+ readonly Response: {
440
+ readonly $anchor: "response";
441
+ readonly title: "VTA Witness — Request — response payload";
442
+ readonly description: "The stored VWC's vault handle, its digest, and the evidence documents that carry it. Sent only once the VWC is verified and stored.";
443
+ readonly type: "object";
444
+ readonly additionalProperties: false;
445
+ readonly required: readonly ["credentialId", "witness", "vwcDigestMultibase", "evidence"];
446
+ readonly properties: {
447
+ readonly credentialId: {
448
+ readonly type: "string";
449
+ readonly minLength: 1;
450
+ readonly maxLength: 256;
451
+ readonly description: "The credential-vault handle the VWC is now stored under, with its evidence.";
452
+ };
453
+ readonly witness: {
454
+ readonly type: "string";
455
+ readonly pattern: "^did:";
456
+ readonly description: "The witness that issued the VWC. Equal to the request's witness: a VWC issued by any other party is refused, not stored.";
457
+ };
458
+ readonly vwcDigestMultibase: {
459
+ readonly $ref: "#/$defs/DigestMultibase";
460
+ readonly description: "The digest the witness returned for the VWC, which the VTA has checked against the VWC it stored: over the RFC 8785 canonicalization of the VWC, proof included.";
461
+ };
462
+ readonly evidence: {
463
+ readonly $ref: "#/$defs/Evidence";
464
+ };
465
+ readonly ext: {
466
+ readonly $ref: "#/$defs/Ext";
467
+ };
468
+ };
469
+ };
470
+ readonly Ext: {
471
+ readonly title: "Ext";
472
+ 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.";
473
+ readonly type: "object";
474
+ readonly minProperties: 1;
475
+ readonly additionalProperties: true;
476
+ readonly propertyNames: {
477
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
478
+ };
479
+ };
480
+ readonly DigestMultibase: {
481
+ readonly title: "DigestMultibase";
482
+ readonly description: "A cryptographic digest as a multibase-encoded multihash — the encoding the W3C Verifiable Credentials Data Model 2.0 defines for `digestMultibase`, and the one `did:webvh` uses for its SCID and entry hashes.\n\nMultihash carries the hash algorithm in-band, so the value is self-describing and the wire format survives an algorithm change without a schema revision; multibase does the same for the base encoding, so a verifier never infers base58 from base64url by context. A bare hex string or a `sha-256:`-style prefix hard-codes one algorithm into the wire contract and is non-conforming here.\n\nThis definition constrains the *encoding only*. What the digest is computed over is stated by each referencing field, because it differs legitimately: a digest over a JSON document is taken over its RFC 8785 (JCS) canonicalization, while a digest over an opaque artifact is taken over its bytes. A field whose input is a JSON document and which does not name a canonicalization is not reproducible.\n\nRestricted to the two multibase headers W3C Controlled Identifiers 1.0 §2.4 normatively requires — `z` (base58btc) and `u` (base64url-no-pad). CID permits others but states that \"interoperability is not guaranteed between implementations using such values\", and a registry whose purpose is interoperability should not mint digests a conforming verifier may be unable to read. The alphabets are enforced rather than assumed: base58btc excludes 0, O, I and l, and an earlier permissive pattern let three published examples carry digests that were not valid base58 at all. base58btc is RECOMMENDED, for consistency with `did:key` and `did:webvh`.";
483
+ readonly type: "string";
484
+ readonly minLength: 16;
485
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
486
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
487
+ };
488
+ };
489
+ };
490
+ };
491
+ /**
492
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
493
+ * tracks the *issuer* party's requirement because a response swaps the
494
+ * parties (§7.3 item 5).
495
+ */
496
+ export declare const RESPONSE_SPEC: {
497
+ readonly typeUri: "https://trusttasks.org/spec/vta/witness/request/0.1#response";
498
+ readonly isBearer: false;
499
+ readonly isProofRequired: false;
500
+ readonly isRecipientRequired: true;
501
+ readonly isIssuedAtRequired: true;
502
+ readonly payloadSchema: {
503
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
504
+ readonly $ref: "#/$defs/Response";
505
+ readonly $defs: {
506
+ readonly Membership: {
507
+ readonly title: "Membership";
508
+ 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 is presented in the relationship presentation. When memberDid is present the VMC names that DID, and the VTA builds a second presentation — the member presentation — signed by memberDid and bound to the same session, which discloses memberDid to the witness.";
509
+ readonly type: "object";
510
+ readonly additionalProperties: false;
511
+ readonly required: readonly ["credentialId"];
512
+ readonly properties: {
513
+ readonly credentialId: {
514
+ readonly type: "string";
515
+ readonly minLength: 1;
516
+ readonly maxLength: 256;
517
+ readonly description: "The credential-vault handle of the membership credential.";
518
+ };
519
+ readonly memberDid: {
520
+ readonly type: "string";
521
+ readonly pattern: "^did:";
522
+ 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.";
523
+ };
524
+ };
525
+ };
526
+ readonly Evidence: {
527
+ readonly title: "Evidence";
528
+ readonly description: "The two documents a holder ships with the VWC so a verifier can pair it with the session that produced it (witness/session/submit, This response is the outcome evidence). Each is carried exactly as sent or received, never re-serialised.";
529
+ readonly type: "object";
530
+ readonly additionalProperties: false;
531
+ readonly required: readonly ["session", "outcome"];
532
+ readonly properties: {
533
+ readonly session: {
534
+ readonly type: "object";
535
+ readonly minProperties: 1;
536
+ readonly description: "The witness/session document that opened the session, as the VTA sent it. The VWC's taskContext is its id and its taskDigestMultibase is computed over it.";
537
+ };
538
+ readonly outcome: {
539
+ readonly type: "object";
540
+ readonly minProperties: 1;
541
+ readonly description: "The witness/session/submit #response, as the VTA received it, under the witness's proof. It carries the VWC and its vwcDigestMultibase.";
542
+ };
543
+ };
544
+ };
545
+ readonly Response: {
546
+ readonly $anchor: "response";
547
+ readonly title: "VTA Witness — Request — response payload";
548
+ readonly description: "The stored VWC's vault handle, its digest, and the evidence documents that carry it. Sent only once the VWC is verified and stored.";
549
+ readonly type: "object";
550
+ readonly additionalProperties: false;
551
+ readonly required: readonly ["credentialId", "witness", "vwcDigestMultibase", "evidence"];
552
+ readonly properties: {
553
+ readonly credentialId: {
554
+ readonly type: "string";
555
+ readonly minLength: 1;
556
+ readonly maxLength: 256;
557
+ readonly description: "The credential-vault handle the VWC is now stored under, with its evidence.";
558
+ };
559
+ readonly witness: {
560
+ readonly type: "string";
561
+ readonly pattern: "^did:";
562
+ readonly description: "The witness that issued the VWC. Equal to the request's witness: a VWC issued by any other party is refused, not stored.";
563
+ };
564
+ readonly vwcDigestMultibase: {
565
+ readonly $ref: "#/$defs/DigestMultibase";
566
+ readonly description: "The digest the witness returned for the VWC, which the VTA has checked against the VWC it stored: over the RFC 8785 canonicalization of the VWC, proof included.";
567
+ };
568
+ readonly evidence: {
569
+ readonly $ref: "#/$defs/Evidence";
570
+ };
571
+ readonly ext: {
572
+ readonly $ref: "#/$defs/Ext";
573
+ };
574
+ };
575
+ };
576
+ readonly Ext: {
577
+ readonly title: "Ext";
578
+ 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.";
579
+ readonly type: "object";
580
+ readonly minProperties: 1;
581
+ readonly additionalProperties: true;
582
+ readonly propertyNames: {
583
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
584
+ };
585
+ };
586
+ readonly DigestMultibase: {
587
+ readonly title: "DigestMultibase";
588
+ readonly description: "A cryptographic digest as a multibase-encoded multihash — the encoding the W3C Verifiable Credentials Data Model 2.0 defines for `digestMultibase`, and the one `did:webvh` uses for its SCID and entry hashes.\n\nMultihash carries the hash algorithm in-band, so the value is self-describing and the wire format survives an algorithm change without a schema revision; multibase does the same for the base encoding, so a verifier never infers base58 from base64url by context. A bare hex string or a `sha-256:`-style prefix hard-codes one algorithm into the wire contract and is non-conforming here.\n\nThis definition constrains the *encoding only*. What the digest is computed over is stated by each referencing field, because it differs legitimately: a digest over a JSON document is taken over its RFC 8785 (JCS) canonicalization, while a digest over an opaque artifact is taken over its bytes. A field whose input is a JSON document and which does not name a canonicalization is not reproducible.\n\nRestricted to the two multibase headers W3C Controlled Identifiers 1.0 §2.4 normatively requires — `z` (base58btc) and `u` (base64url-no-pad). CID permits others but states that \"interoperability is not guaranteed between implementations using such values\", and a registry whose purpose is interoperability should not mint digests a conforming verifier may be unable to read. The alphabets are enforced rather than assumed: base58btc excludes 0, O, I and l, and an earlier permissive pattern let three published examples carry digests that were not valid base58 at all. base58btc is RECOMMENDED, for consistency with `did:key` and `did:webvh`.";
589
+ readonly type: "string";
590
+ readonly minLength: 16;
591
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
592
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
593
+ };
594
+ };
595
+ };
596
+ };
597
+ //# sourceMappingURL=payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/vta/witness/request/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,GAAG,EAAE,MAAM,mCAAmC,CAAC;AAG9E;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;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,gCAAgC;IAC/C;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,kBAAkB,EAAE,eAAe,CAAC;IACpC,QAAQ,EAAE,QAAQ,CAAC;IACnB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,OAAO,EAAE,EAAE,CAAC;IACZ;;OAEG;IACH,OAAO,EAAE,EAAE,CAAC;CACb;AAED,kHAAkH;AAClH,YAAY,EAAE,eAAe,EAAE,GAAG,EAAE,CAAC;AAErC,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,qDAA8D,CAAC;AAEvF,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,wBAAwB,CAAC;AAE/C,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,8DAAuE,CAAC;AAEzG,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,gCAAgC,CAAC;AAExD;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8JjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyG1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}