@openvtc/trust-tasks 0.19.3 → 0.19.4

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 (75) hide show
  1. package/CHANGELOG.md +161 -0
  2. package/dist/_shared/components.d.ts +298 -0
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/index.d.ts +13 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +13 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/vetting/_shared/0.1/identity-vetting.d.ts +11 -0
  9. package/dist/vetting/_shared/0.1/identity-vetting.d.ts.map +1 -0
  10. package/dist/vetting/_shared/0.1/identity-vetting.js +6 -0
  11. package/dist/vetting/_shared/0.1/identity-vetting.js.map +1 -0
  12. package/dist/vetting/_shared/0.1/vetting-card.d.ts +16 -0
  13. package/dist/vetting/_shared/0.1/vetting-card.d.ts.map +1 -0
  14. package/dist/vetting/_shared/0.1/vetting-card.js +6 -0
  15. package/dist/vetting/_shared/0.1/vetting-card.js.map +1 -0
  16. package/dist/vetting/_shared/0.1/vetting.d.ts +16 -0
  17. package/dist/vetting/_shared/0.1/vetting.d.ts.map +1 -0
  18. package/dist/vetting/_shared/0.1/vetting.js +6 -0
  19. package/dist/vetting/_shared/0.1/vetting.js.map +1 -0
  20. package/dist/vetting/decline/0.1/payload.d.ts +138 -0
  21. package/dist/vetting/decline/0.1/payload.d.ts.map +1 -0
  22. package/dist/vetting/decline/0.1/payload.js +81 -0
  23. package/dist/vetting/decline/0.1/payload.js.map +1 -0
  24. package/dist/vetting/request/0.1/payload.d.ts +1188 -0
  25. package/dist/vetting/request/0.1/payload.d.ts.map +1 -0
  26. package/dist/vetting/request/0.1/payload.js +596 -0
  27. package/dist/vetting/request/0.1/payload.js.map +1 -0
  28. package/dist/vetting/session/0.1/payload.d.ts +978 -0
  29. package/dist/vetting/session/0.1/payload.d.ts.map +1 -0
  30. package/dist/vetting/session/0.1/payload.js +570 -0
  31. package/dist/vetting/session/0.1/payload.js.map +1 -0
  32. package/dist/vtc/_shared/0.1/vetter-profile.d.ts +16 -0
  33. package/dist/vtc/_shared/0.1/vetter-profile.d.ts.map +1 -0
  34. package/dist/vtc/_shared/0.1/vetter-profile.js +6 -0
  35. package/dist/vtc/_shared/0.1/vetter-profile.js.map +1 -0
  36. package/dist/vtc/join-requests/manifest/0.2/payload.d.ts +1294 -0
  37. package/dist/vtc/join-requests/manifest/0.2/payload.d.ts.map +1 -0
  38. package/dist/vtc/join-requests/manifest/0.2/payload.js +667 -0
  39. package/dist/vtc/join-requests/manifest/0.2/payload.js.map +1 -0
  40. package/dist/vtc/vetting/revoke-statement/0.1/payload.d.ts +299 -0
  41. package/dist/vtc/vetting/revoke-statement/0.1/payload.d.ts.map +1 -0
  42. package/dist/vtc/vetting/revoke-statement/0.1/payload.js +172 -0
  43. package/dist/vtc/vetting/revoke-statement/0.1/payload.js.map +1 -0
  44. package/dist/vtc/vetting/vetters/grant/0.1/payload.d.ts +337 -0
  45. package/dist/vtc/vetting/vetters/grant/0.1/payload.d.ts.map +1 -0
  46. package/dist/vtc/vetting/vetters/grant/0.1/payload.js +183 -0
  47. package/dist/vtc/vetting/vetters/grant/0.1/payload.js.map +1 -0
  48. package/dist/vtc/vetting/vetters/list/0.1/payload.d.ts +1257 -0
  49. package/dist/vtc/vetting/vetters/list/0.1/payload.d.ts.map +1 -0
  50. package/dist/vtc/vetting/vetters/list/0.1/payload.js +597 -0
  51. package/dist/vtc/vetting/vetters/list/0.1/payload.js.map +1 -0
  52. package/dist/vtc/vetting/vetters/profile/0.1/payload.d.ts +970 -0
  53. package/dist/vtc/vetting/vetters/profile/0.1/payload.d.ts.map +1 -0
  54. package/dist/vtc/vetting/vetters/profile/0.1/payload.js +463 -0
  55. package/dist/vtc/vetting/vetters/profile/0.1/payload.js.map +1 -0
  56. package/dist/vtc/vetting/vetters/resend/0.1/payload.d.ts +240 -0
  57. package/dist/vtc/vetting/vetters/resend/0.1/payload.d.ts.map +1 -0
  58. package/dist/vtc/vetting/vetters/resend/0.1/payload.js +137 -0
  59. package/dist/vtc/vetting/vetters/resend/0.1/payload.js.map +1 -0
  60. package/package.json +1 -1
  61. package/src/_shared/components.ts +318 -0
  62. package/src/index.ts +13 -0
  63. package/src/vetting/_shared/0.1/identity-vetting.ts +11 -0
  64. package/src/vetting/_shared/0.1/vetting-card.ts +17 -0
  65. package/src/vetting/_shared/0.1/vetting.ts +17 -0
  66. package/src/vetting/decline/0.1/payload.ts +111 -0
  67. package/src/vetting/request/0.1/payload.ts +799 -0
  68. package/src/vetting/session/0.1/payload.ts +629 -0
  69. package/src/vtc/_shared/0.1/vetter-profile.ts +17 -0
  70. package/src/vtc/join-requests/manifest/0.2/payload.ts +815 -0
  71. package/src/vtc/vetting/revoke-statement/0.1/payload.ts +218 -0
  72. package/src/vtc/vetting/vetters/grant/0.1/payload.ts +237 -0
  73. package/src/vtc/vetting/vetters/list/0.1/payload.ts +816 -0
  74. package/src/vtc/vetting/vetters/profile/0.1/payload.ts +647 -0
  75. package/src/vtc/vetting/vetters/resend/0.1/payload.ts +174 -0
@@ -0,0 +1,1188 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vetting/request/0.1/payload.schema.json
4
+ */
5
+ import type { DigestMultibase, Ext, VettingDocumentation, VettingMethod } from "../../../_shared/components.js";
6
+ /**
7
+ * A ticket the vetter issued: the short code a person reads or types, or the full-entropy QR form.
8
+ */
9
+ export type Ticket = ShortCodeTicket | QrTicket;
10
+ /**
11
+ * An applicant asks one vetter to vet them for one community. The applicant is the document's issuer, and `joinDid` repeats that DID: it is the DID the applicant is applying with, and every card and statement that follows names it. Carries a ticket the vetter issued or an introduction, never both. The vetter's response accepts the request and proves the vetter is currently eligible to vet for that community.
12
+ */
13
+ export interface VettingRequestPayload {
14
+ /**
15
+ * The community the applicant is applying to and asks to be vetted for.
16
+ */
17
+ community: string;
18
+ /**
19
+ * The `requirementsDigest` of the community's manifest criterion the applicant is gathering for, recorded when the application started. RECOMMENDED; a community that publishes no digest leaves the applicant nothing to cite.
20
+ */
21
+ requirementsDigest?: DigestMultibase;
22
+ /**
23
+ * The DID the applicant will join the community with. MUST equal the document's `issuer`. Every card and statement this request leads to names it, and it is the holder of the presentation the applicant eventually submits.
24
+ */
25
+ joinDid: string;
26
+ ticket?: Ticket;
27
+ /**
28
+ * A verifiable invitation credential for `community` whose subject is the applicant's DID, issued by the community or a member (opaque here). An alternative to a ticket for vetters who accept introductions.
29
+ */
30
+ introduction?: {};
31
+ /**
32
+ * The method the applicant would prefer. A preference: the vetter chooses the session's method.
33
+ */
34
+ preferredMethod?: VettingMethod;
35
+ /**
36
+ * BCP 47 language tags the applicant can hold a session in, most preferred first.
37
+ *
38
+ * @maxItems 16
39
+ */
40
+ languages?: [] | [string] | [string, string] | [string, string, string] | [string, string, string, string] | [string, string, string, string, string] | [string, string, string, string, string, string] | [string, string, string, string, string, string, string] | [string, string, string, string, string, string, string, string] | [string, string, string, string, string, string, string, string, string] | [string, string, string, string, string, string, string, string, string, string] | [string, string, string, string, string, string, string, string, string, string, string] | [string, string, string, string, string, string, string, string, string, string, string, string] | [string, string, string, string, string, string, string, string, string, string, string, string, string] | [string, string, string, string, string, string, string, string, string, string, string, string, string, string] | [
41
+ string,
42
+ string,
43
+ string,
44
+ string,
45
+ string,
46
+ string,
47
+ string,
48
+ string,
49
+ string,
50
+ string,
51
+ string,
52
+ string,
53
+ string,
54
+ string,
55
+ string
56
+ ] | [
57
+ string,
58
+ string,
59
+ string,
60
+ string,
61
+ string,
62
+ string,
63
+ string,
64
+ string,
65
+ string,
66
+ string,
67
+ string,
68
+ string,
69
+ string,
70
+ string,
71
+ string,
72
+ string
73
+ ];
74
+ /**
75
+ * OPTIONAL applicant-authored text for the vetter — typically how they know each other. Untrusted: read by the vetter, attributed to the applicant on every surface that renders it, never shown to the community.
76
+ */
77
+ message?: string;
78
+ /**
79
+ * OPTIONAL applicant-authored free text on when they can meet. Scheduling is out of band; this is a hint, attributed to the applicant.
80
+ */
81
+ availability?: string;
82
+ ext?: Ext;
83
+ }
84
+ export interface ShortCodeTicket {
85
+ /**
86
+ * Eight Crockford base32 characters, grouped four and four (40 bits). A secret the vetter handed over; not derived from anything.
87
+ */
88
+ code: string;
89
+ }
90
+ export interface QrTicket {
91
+ ticketId: string;
92
+ /**
93
+ * 32 random bytes, base64url without padding.
94
+ */
95
+ secret: string;
96
+ }
97
+ /**
98
+ * The vetter accepts the request. A refusal is a trust-task-error, never a response document.
99
+ */
100
+ export interface VettingRequestResponsePayload {
101
+ /**
102
+ * The vetter's handle for this accepted request, carried by the session and any decline.
103
+ */
104
+ requestId: string;
105
+ eligibilityVp?: EligibilityPresentation;
106
+ /**
107
+ * RECOMMENDED. What this vetter will rely on, so the applicant brings it — the vetter's own choice. `none` means the vetter attests from prior acquaintance.
108
+ *
109
+ * @minItems 1
110
+ */
111
+ acceptsDocumentation?: [VettingDocumentation, ...VettingDocumentation[]];
112
+ /**
113
+ * OPTIONAL vetter-authored free text on how and when the session will happen. Attributed to the vetter.
114
+ */
115
+ sessionHint?: string;
116
+ ext?: Ext;
117
+ }
118
+ /**
119
+ * OPTIONAL. A W3C Verifiable Presentation by which the vetter shows the applicant that it currently holds the community's vetter role. Bound to this request by `nonce` (the vetting/request document's `id`, which the applicant chose) and to this applicant by `domain` (its `joinDid`), so it cannot be replayed to another request or another applicant. The applicant's check is advisory; the community evaluates eligibility again, authoritatively, when it decides. Members other than those defined here are permitted, as the VC data model allows.
120
+ */
121
+ export interface EligibilityPresentation {
122
+ /**
123
+ * JSON-LD contexts. The first item MUST be `https://www.w3.org/ns/credentials/v2` (stated here rather than as `prefixItems`, which the Rust generator cannot express).
124
+ *
125
+ * @minItems 1
126
+ */
127
+ "@context": [string, ...string[]];
128
+ /**
129
+ * MUST include `VerifiablePresentation` (stated here rather than as `contains`, which the Rust generator cannot express).
130
+ *
131
+ * @minItems 1
132
+ */
133
+ type: [string, ...string[]];
134
+ /**
135
+ * The vetter's DID — the response's `issuer`.
136
+ */
137
+ holder: string;
138
+ /**
139
+ * Credentials presented (opaque here). MUST include the community-issued `CommunityRole` endorsement credential naming `holder`, whose `endorsement.role` is the manifest's `eligibleVetters.role` — see vtc/vetting/vetters/grant/0.1. MAY include others, such as the membership credential.
140
+ *
141
+ * @minItems 1
142
+ */
143
+ verifiableCredential: [{}, ...{}[]];
144
+ /**
145
+ * The `id` of the vetting/request document this responds to.
146
+ */
147
+ nonce: string;
148
+ /**
149
+ * The applicant's `joinDid` from that request.
150
+ */
151
+ domain: string;
152
+ proof: EligibilityPresentationProof;
153
+ [k: string]: unknown | undefined;
154
+ }
155
+ /**
156
+ * A W3C Data Integrity proof by `holder` over the presentation, `nonce` and `domain` included.
157
+ */
158
+ export interface EligibilityPresentationProof {
159
+ type: "DataIntegrityProof";
160
+ /**
161
+ * e.g. `eddsa-jcs-2022`.
162
+ */
163
+ cryptosuite: string;
164
+ /**
165
+ * A verification method of `holder`, authorized for `authentication`.
166
+ */
167
+ verificationMethod: string;
168
+ proofPurpose: "authentication";
169
+ created?: string;
170
+ proofValue: string;
171
+ [k: string]: unknown | undefined;
172
+ }
173
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
174
+ export type { DigestMultibase, Ext, VettingDocumentation, VettingMethod };
175
+ /** Trust Task type URI. */
176
+ export declare const TYPE_URI: "https://trusttasks.org/spec/vetting/request/0.1";
177
+ /** Stable alias for this specification's request payload shape. */
178
+ export type Payload = VettingRequestPayload;
179
+ /** Trust Task response type URI (request type URI + "#response"). */
180
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/vetting/request/0.1#response";
181
+ /** Stable alias for this specification's success-response payload shape. */
182
+ export type Response = VettingRequestResponsePayload;
183
+ /**
184
+ * This specification's payload schema, as a value.
185
+ *
186
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
187
+ * rather than only as a `.json` file because TypeScript types are erased
188
+ * at runtime: without a schema a consumer has nothing to validate, and
189
+ * every REQUIRED payload member is optional in practice. Cross-file
190
+ * `$ref`s are already inlined, so it needs no resolver.
191
+ */
192
+ export declare const PAYLOAD_SCHEMA: {
193
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
194
+ readonly $id: "https://trusttasks.org/spec/vetting/request/0.1";
195
+ readonly title: "Vetting Request — payload";
196
+ readonly description: "An applicant asks one vetter to vet them for one community. The applicant is the document's issuer, and `joinDid` repeats that DID: it is the DID the applicant is applying with, and every card and statement that follows names it. Carries a ticket the vetter issued or an introduction, never both. The vetter's response accepts the request and proves the vetter is currently eligible to vet for that community.";
197
+ readonly type: "object";
198
+ readonly additionalProperties: false;
199
+ readonly required: readonly ["community", "joinDid"];
200
+ readonly dependentSchemas: {
201
+ readonly ticket: {
202
+ readonly not: {
203
+ readonly required: readonly ["introduction"];
204
+ };
205
+ };
206
+ };
207
+ readonly properties: {
208
+ readonly community: {
209
+ readonly type: "string";
210
+ readonly pattern: "^did:";
211
+ readonly description: "The community the applicant is applying to and asks to be vetted for.";
212
+ };
213
+ readonly requirementsDigest: {
214
+ readonly $ref: "#/$defs/DigestMultibase";
215
+ readonly description: "The `requirementsDigest` of the community's manifest criterion the applicant is gathering for, recorded when the application started. RECOMMENDED; a community that publishes no digest leaves the applicant nothing to cite.";
216
+ };
217
+ readonly joinDid: {
218
+ readonly type: "string";
219
+ readonly pattern: "^did:";
220
+ readonly description: "The DID the applicant will join the community with. MUST equal the document's `issuer`. Every card and statement this request leads to names it, and it is the holder of the presentation the applicant eventually submits.";
221
+ };
222
+ readonly ticket: {
223
+ readonly $ref: "#/$defs/Ticket";
224
+ };
225
+ readonly introduction: {
226
+ readonly type: "object";
227
+ readonly description: "A verifiable invitation credential for `community` whose subject is the applicant's DID, issued by the community or a member (opaque here). An alternative to a ticket for vetters who accept introductions.";
228
+ };
229
+ readonly preferredMethod: {
230
+ readonly $ref: "#/$defs/VettingMethod";
231
+ readonly description: "The method the applicant would prefer. A preference: the vetter chooses the session's method.";
232
+ };
233
+ readonly languages: {
234
+ readonly type: "array";
235
+ readonly maxItems: 16;
236
+ readonly uniqueItems: true;
237
+ readonly items: {
238
+ readonly type: "string";
239
+ readonly maxLength: 35;
240
+ readonly pattern: "^[A-Za-z]{2,3}(-[A-Za-z0-9]{1,8})*$";
241
+ };
242
+ readonly description: "BCP 47 language tags the applicant can hold a session in, most preferred first.";
243
+ };
244
+ readonly message: {
245
+ readonly type: "string";
246
+ readonly minLength: 1;
247
+ readonly maxLength: 1000;
248
+ readonly description: "OPTIONAL applicant-authored text for the vetter — typically how they know each other. Untrusted: read by the vetter, attributed to the applicant on every surface that renders it, never shown to the community.";
249
+ };
250
+ readonly availability: {
251
+ readonly type: "string";
252
+ readonly minLength: 1;
253
+ readonly maxLength: 256;
254
+ readonly description: "OPTIONAL applicant-authored free text on when they can meet. Scheduling is out of band; this is a hint, attributed to the applicant.";
255
+ };
256
+ readonly ext: {
257
+ readonly $ref: "#/$defs/Ext";
258
+ };
259
+ };
260
+ readonly $defs: {
261
+ readonly Ticket: {
262
+ readonly title: "Ticket";
263
+ readonly description: "A ticket the vetter issued: the short code a person reads or types, or the full-entropy QR form.";
264
+ readonly oneOf: readonly [{
265
+ readonly $ref: "#/$defs/ShortCodeTicket";
266
+ }, {
267
+ readonly $ref: "#/$defs/QrTicket";
268
+ }];
269
+ };
270
+ readonly ShortCodeTicket: {
271
+ readonly title: "ShortCodeTicket";
272
+ readonly type: "object";
273
+ readonly additionalProperties: false;
274
+ readonly required: readonly ["code"];
275
+ readonly properties: {
276
+ readonly code: {
277
+ readonly type: "string";
278
+ readonly pattern: "^[0-9A-HJKMNP-TV-Z]{4}-[0-9A-HJKMNP-TV-Z]{4}$";
279
+ readonly description: "Eight Crockford base32 characters, grouped four and four (40 bits). A secret the vetter handed over; not derived from anything.";
280
+ };
281
+ };
282
+ };
283
+ readonly QrTicket: {
284
+ readonly title: "QrTicket";
285
+ readonly type: "object";
286
+ readonly additionalProperties: false;
287
+ readonly required: readonly ["ticketId", "secret"];
288
+ readonly properties: {
289
+ readonly ticketId: {
290
+ readonly type: "string";
291
+ readonly minLength: 1;
292
+ readonly maxLength: 128;
293
+ readonly pattern: "^[A-Za-z0-9._:-]+$";
294
+ };
295
+ readonly secret: {
296
+ readonly type: "string";
297
+ readonly pattern: "^[A-Za-z0-9_-]{43}$";
298
+ readonly description: "32 random bytes, base64url without padding.";
299
+ };
300
+ };
301
+ };
302
+ readonly EligibilityPresentation: {
303
+ readonly title: "EligibilityPresentation";
304
+ readonly description: "OPTIONAL. A W3C Verifiable Presentation by which the vetter shows the applicant that it currently holds the community's vetter role. Bound to this request by `nonce` (the vetting/request document's `id`, which the applicant chose) and to this applicant by `domain` (its `joinDid`), so it cannot be replayed to another request or another applicant. The applicant's check is advisory; the community evaluates eligibility again, authoritatively, when it decides. Members other than those defined here are permitted, as the VC data model allows.";
305
+ readonly type: "object";
306
+ readonly additionalProperties: true;
307
+ readonly required: readonly ["@context", "type", "holder", "verifiableCredential", "nonce", "domain", "proof"];
308
+ readonly properties: {
309
+ readonly "@context": {
310
+ readonly type: "array";
311
+ readonly minItems: 1;
312
+ readonly items: {
313
+ readonly type: "string";
314
+ readonly minLength: 1;
315
+ readonly maxLength: 2048;
316
+ };
317
+ readonly description: "JSON-LD contexts. The first item MUST be `https://www.w3.org/ns/credentials/v2` (stated here rather than as `prefixItems`, which the Rust generator cannot express).";
318
+ };
319
+ readonly type: {
320
+ readonly type: "array";
321
+ readonly minItems: 1;
322
+ readonly uniqueItems: true;
323
+ readonly items: {
324
+ readonly type: "string";
325
+ readonly minLength: 1;
326
+ readonly maxLength: 128;
327
+ };
328
+ readonly description: "MUST include `VerifiablePresentation` (stated here rather than as `contains`, which the Rust generator cannot express).";
329
+ };
330
+ readonly holder: {
331
+ readonly type: "string";
332
+ readonly pattern: "^did:";
333
+ readonly description: "The vetter's DID — the response's `issuer`.";
334
+ };
335
+ readonly verifiableCredential: {
336
+ readonly type: "array";
337
+ readonly minItems: 1;
338
+ readonly items: {
339
+ readonly type: "object";
340
+ };
341
+ readonly description: "Credentials presented (opaque here). MUST include the community-issued `CommunityRole` endorsement credential naming `holder`, whose `endorsement.role` is the manifest's `eligibleVetters.role` — see vtc/vetting/vetters/grant/0.1. MAY include others, such as the membership credential.";
342
+ };
343
+ readonly nonce: {
344
+ readonly type: "string";
345
+ readonly minLength: 1;
346
+ readonly maxLength: 512;
347
+ readonly description: "The `id` of the vetting/request document this responds to.";
348
+ };
349
+ readonly domain: {
350
+ readonly type: "string";
351
+ readonly pattern: "^did:";
352
+ readonly description: "The applicant's `joinDid` from that request.";
353
+ };
354
+ readonly proof: {
355
+ readonly $ref: "#/$defs/EligibilityPresentationProof";
356
+ };
357
+ };
358
+ };
359
+ readonly EligibilityPresentationProof: {
360
+ readonly title: "EligibilityPresentationProof";
361
+ readonly description: "A W3C Data Integrity proof by `holder` over the presentation, `nonce` and `domain` included.";
362
+ readonly type: "object";
363
+ readonly additionalProperties: true;
364
+ readonly required: readonly ["type", "cryptosuite", "verificationMethod", "proofPurpose", "proofValue"];
365
+ readonly properties: {
366
+ readonly type: {
367
+ readonly type: "string";
368
+ readonly const: "DataIntegrityProof";
369
+ };
370
+ readonly cryptosuite: {
371
+ readonly type: "string";
372
+ readonly minLength: 1;
373
+ readonly maxLength: 64;
374
+ readonly pattern: "^[a-z0-9-]+$";
375
+ readonly description: "e.g. `eddsa-jcs-2022`.";
376
+ };
377
+ readonly verificationMethod: {
378
+ readonly type: "string";
379
+ readonly pattern: "^did:";
380
+ readonly description: "A verification method of `holder`, authorized for `authentication`.";
381
+ };
382
+ readonly proofPurpose: {
383
+ readonly type: "string";
384
+ readonly const: "authentication";
385
+ };
386
+ readonly created: {
387
+ readonly type: "string";
388
+ readonly format: "date-time";
389
+ };
390
+ readonly proofValue: {
391
+ readonly type: "string";
392
+ readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
393
+ };
394
+ };
395
+ };
396
+ readonly Response: {
397
+ readonly $anchor: "response";
398
+ readonly title: "Vetting Request — response payload";
399
+ readonly description: "The vetter accepts the request. A refusal is a trust-task-error, never a response document.";
400
+ readonly type: "object";
401
+ readonly additionalProperties: false;
402
+ readonly required: readonly ["requestId"];
403
+ readonly properties: {
404
+ readonly requestId: {
405
+ readonly type: "string";
406
+ readonly minLength: 1;
407
+ readonly maxLength: 128;
408
+ readonly description: "The vetter's handle for this accepted request, carried by the session and any decline.";
409
+ };
410
+ readonly eligibilityVp: {
411
+ readonly $ref: "#/$defs/EligibilityPresentation";
412
+ };
413
+ readonly acceptsDocumentation: {
414
+ readonly type: "array";
415
+ readonly minItems: 1;
416
+ readonly uniqueItems: true;
417
+ readonly items: {
418
+ readonly $ref: "#/$defs/VettingDocumentation";
419
+ };
420
+ readonly description: "RECOMMENDED. What this vetter will rely on, so the applicant brings it — the vetter's own choice. `none` means the vetter attests from prior acquaintance.";
421
+ };
422
+ readonly sessionHint: {
423
+ readonly type: "string";
424
+ readonly minLength: 1;
425
+ readonly maxLength: 500;
426
+ readonly description: "OPTIONAL vetter-authored free text on how and when the session will happen. Attributed to the vetter.";
427
+ };
428
+ readonly ext: {
429
+ readonly $ref: "#/$defs/Ext";
430
+ };
431
+ };
432
+ };
433
+ readonly Ext: {
434
+ readonly title: "Ext";
435
+ 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.";
436
+ readonly type: "object";
437
+ readonly minProperties: 1;
438
+ readonly additionalProperties: true;
439
+ readonly propertyNames: {
440
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
441
+ };
442
+ };
443
+ readonly VettingDocumentation: {
444
+ readonly title: "VettingDocumentation";
445
+ readonly type: "string";
446
+ readonly minLength: 1;
447
+ readonly maxLength: 64;
448
+ readonly pattern: "^[a-z][a-zA-Z0-9]*$";
449
+ readonly description: "A class of documentation, named in lowerCamelCase. Open rather than enumerated, because what documentation a vetter accepts is each vetter's own choice. Well-known values: `passport`, `nationalId`, `driverLicence`, and `none` — the vetter will attest without a document, which is the `priorAcquaintance` case. Only the class ever travels — never a document number, an image, an issuing authority or an expiry date. `none` states a policy (what a vetter accepts); a record of what was relied on expresses 'no document' as an empty list instead.";
450
+ };
451
+ readonly VettingMethod: {
452
+ readonly title: "VettingMethod";
453
+ readonly type: "string";
454
+ readonly enum: readonly ["inPerson", "video", "priorAcquaintance"];
455
+ readonly description: "How the vetter established that the person they checked is the person controlling the applicant's DID. `inPerson` — both people were physically together. `video` — a live, two-way video call. `priorAcquaintance` — the vetter has known or worked with this person over a period, and attests from that knowledge rather than from a document. A method is a description of what happened, not an assurance level: which methods count, and how many of each, is community policy.";
456
+ };
457
+ readonly DigestMultibase: {
458
+ readonly title: "DigestMultibase";
459
+ 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`.";
460
+ readonly type: "string";
461
+ readonly minLength: 16;
462
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
463
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
464
+ };
465
+ };
466
+ };
467
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
468
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
469
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
470
+ readonly $ref: "#/$defs/Response";
471
+ readonly $defs: {
472
+ readonly Ticket: {
473
+ readonly title: "Ticket";
474
+ readonly description: "A ticket the vetter issued: the short code a person reads or types, or the full-entropy QR form.";
475
+ readonly oneOf: readonly [{
476
+ readonly $ref: "#/$defs/ShortCodeTicket";
477
+ }, {
478
+ readonly $ref: "#/$defs/QrTicket";
479
+ }];
480
+ };
481
+ readonly ShortCodeTicket: {
482
+ readonly title: "ShortCodeTicket";
483
+ readonly type: "object";
484
+ readonly additionalProperties: false;
485
+ readonly required: readonly ["code"];
486
+ readonly properties: {
487
+ readonly code: {
488
+ readonly type: "string";
489
+ readonly pattern: "^[0-9A-HJKMNP-TV-Z]{4}-[0-9A-HJKMNP-TV-Z]{4}$";
490
+ readonly description: "Eight Crockford base32 characters, grouped four and four (40 bits). A secret the vetter handed over; not derived from anything.";
491
+ };
492
+ };
493
+ };
494
+ readonly QrTicket: {
495
+ readonly title: "QrTicket";
496
+ readonly type: "object";
497
+ readonly additionalProperties: false;
498
+ readonly required: readonly ["ticketId", "secret"];
499
+ readonly properties: {
500
+ readonly ticketId: {
501
+ readonly type: "string";
502
+ readonly minLength: 1;
503
+ readonly maxLength: 128;
504
+ readonly pattern: "^[A-Za-z0-9._:-]+$";
505
+ };
506
+ readonly secret: {
507
+ readonly type: "string";
508
+ readonly pattern: "^[A-Za-z0-9_-]{43}$";
509
+ readonly description: "32 random bytes, base64url without padding.";
510
+ };
511
+ };
512
+ };
513
+ readonly EligibilityPresentation: {
514
+ readonly title: "EligibilityPresentation";
515
+ readonly description: "OPTIONAL. A W3C Verifiable Presentation by which the vetter shows the applicant that it currently holds the community's vetter role. Bound to this request by `nonce` (the vetting/request document's `id`, which the applicant chose) and to this applicant by `domain` (its `joinDid`), so it cannot be replayed to another request or another applicant. The applicant's check is advisory; the community evaluates eligibility again, authoritatively, when it decides. Members other than those defined here are permitted, as the VC data model allows.";
516
+ readonly type: "object";
517
+ readonly additionalProperties: true;
518
+ readonly required: readonly ["@context", "type", "holder", "verifiableCredential", "nonce", "domain", "proof"];
519
+ readonly properties: {
520
+ readonly "@context": {
521
+ readonly type: "array";
522
+ readonly minItems: 1;
523
+ readonly items: {
524
+ readonly type: "string";
525
+ readonly minLength: 1;
526
+ readonly maxLength: 2048;
527
+ };
528
+ readonly description: "JSON-LD contexts. The first item MUST be `https://www.w3.org/ns/credentials/v2` (stated here rather than as `prefixItems`, which the Rust generator cannot express).";
529
+ };
530
+ readonly type: {
531
+ readonly type: "array";
532
+ readonly minItems: 1;
533
+ readonly uniqueItems: true;
534
+ readonly items: {
535
+ readonly type: "string";
536
+ readonly minLength: 1;
537
+ readonly maxLength: 128;
538
+ };
539
+ readonly description: "MUST include `VerifiablePresentation` (stated here rather than as `contains`, which the Rust generator cannot express).";
540
+ };
541
+ readonly holder: {
542
+ readonly type: "string";
543
+ readonly pattern: "^did:";
544
+ readonly description: "The vetter's DID — the response's `issuer`.";
545
+ };
546
+ readonly verifiableCredential: {
547
+ readonly type: "array";
548
+ readonly minItems: 1;
549
+ readonly items: {
550
+ readonly type: "object";
551
+ };
552
+ readonly description: "Credentials presented (opaque here). MUST include the community-issued `CommunityRole` endorsement credential naming `holder`, whose `endorsement.role` is the manifest's `eligibleVetters.role` — see vtc/vetting/vetters/grant/0.1. MAY include others, such as the membership credential.";
553
+ };
554
+ readonly nonce: {
555
+ readonly type: "string";
556
+ readonly minLength: 1;
557
+ readonly maxLength: 512;
558
+ readonly description: "The `id` of the vetting/request document this responds to.";
559
+ };
560
+ readonly domain: {
561
+ readonly type: "string";
562
+ readonly pattern: "^did:";
563
+ readonly description: "The applicant's `joinDid` from that request.";
564
+ };
565
+ readonly proof: {
566
+ readonly $ref: "#/$defs/EligibilityPresentationProof";
567
+ };
568
+ };
569
+ };
570
+ readonly EligibilityPresentationProof: {
571
+ readonly title: "EligibilityPresentationProof";
572
+ readonly description: "A W3C Data Integrity proof by `holder` over the presentation, `nonce` and `domain` included.";
573
+ readonly type: "object";
574
+ readonly additionalProperties: true;
575
+ readonly required: readonly ["type", "cryptosuite", "verificationMethod", "proofPurpose", "proofValue"];
576
+ readonly properties: {
577
+ readonly type: {
578
+ readonly type: "string";
579
+ readonly const: "DataIntegrityProof";
580
+ };
581
+ readonly cryptosuite: {
582
+ readonly type: "string";
583
+ readonly minLength: 1;
584
+ readonly maxLength: 64;
585
+ readonly pattern: "^[a-z0-9-]+$";
586
+ readonly description: "e.g. `eddsa-jcs-2022`.";
587
+ };
588
+ readonly verificationMethod: {
589
+ readonly type: "string";
590
+ readonly pattern: "^did:";
591
+ readonly description: "A verification method of `holder`, authorized for `authentication`.";
592
+ };
593
+ readonly proofPurpose: {
594
+ readonly type: "string";
595
+ readonly const: "authentication";
596
+ };
597
+ readonly created: {
598
+ readonly type: "string";
599
+ readonly format: "date-time";
600
+ };
601
+ readonly proofValue: {
602
+ readonly type: "string";
603
+ readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
604
+ };
605
+ };
606
+ };
607
+ readonly Response: {
608
+ readonly $anchor: "response";
609
+ readonly title: "Vetting Request — response payload";
610
+ readonly description: "The vetter accepts the request. A refusal is a trust-task-error, never a response document.";
611
+ readonly type: "object";
612
+ readonly additionalProperties: false;
613
+ readonly required: readonly ["requestId"];
614
+ readonly properties: {
615
+ readonly requestId: {
616
+ readonly type: "string";
617
+ readonly minLength: 1;
618
+ readonly maxLength: 128;
619
+ readonly description: "The vetter's handle for this accepted request, carried by the session and any decline.";
620
+ };
621
+ readonly eligibilityVp: {
622
+ readonly $ref: "#/$defs/EligibilityPresentation";
623
+ };
624
+ readonly acceptsDocumentation: {
625
+ readonly type: "array";
626
+ readonly minItems: 1;
627
+ readonly uniqueItems: true;
628
+ readonly items: {
629
+ readonly $ref: "#/$defs/VettingDocumentation";
630
+ };
631
+ readonly description: "RECOMMENDED. What this vetter will rely on, so the applicant brings it — the vetter's own choice. `none` means the vetter attests from prior acquaintance.";
632
+ };
633
+ readonly sessionHint: {
634
+ readonly type: "string";
635
+ readonly minLength: 1;
636
+ readonly maxLength: 500;
637
+ readonly description: "OPTIONAL vetter-authored free text on how and when the session will happen. Attributed to the vetter.";
638
+ };
639
+ readonly ext: {
640
+ readonly $ref: "#/$defs/Ext";
641
+ };
642
+ };
643
+ };
644
+ readonly Ext: {
645
+ readonly title: "Ext";
646
+ 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.";
647
+ readonly type: "object";
648
+ readonly minProperties: 1;
649
+ readonly additionalProperties: true;
650
+ readonly propertyNames: {
651
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
652
+ };
653
+ };
654
+ readonly VettingDocumentation: {
655
+ readonly title: "VettingDocumentation";
656
+ readonly type: "string";
657
+ readonly minLength: 1;
658
+ readonly maxLength: 64;
659
+ readonly pattern: "^[a-z][a-zA-Z0-9]*$";
660
+ readonly description: "A class of documentation, named in lowerCamelCase. Open rather than enumerated, because what documentation a vetter accepts is each vetter's own choice. Well-known values: `passport`, `nationalId`, `driverLicence`, and `none` — the vetter will attest without a document, which is the `priorAcquaintance` case. Only the class ever travels — never a document number, an image, an issuing authority or an expiry date. `none` states a policy (what a vetter accepts); a record of what was relied on expresses 'no document' as an empty list instead.";
661
+ };
662
+ readonly VettingMethod: {
663
+ readonly title: "VettingMethod";
664
+ readonly type: "string";
665
+ readonly enum: readonly ["inPerson", "video", "priorAcquaintance"];
666
+ readonly description: "How the vetter established that the person they checked is the person controlling the applicant's DID. `inPerson` — both people were physically together. `video` — a live, two-way video call. `priorAcquaintance` — the vetter has known or worked with this person over a period, and attests from that knowledge rather than from a document. A method is a description of what happened, not an assurance level: which methods count, and how many of each, is community policy.";
667
+ };
668
+ readonly DigestMultibase: {
669
+ readonly title: "DigestMultibase";
670
+ 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`.";
671
+ readonly type: "string";
672
+ readonly minLength: 16;
673
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
674
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
675
+ };
676
+ };
677
+ };
678
+ /**
679
+ * SPEC.md §7.2 policy for the request variant, from this specification's
680
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
681
+ * per-specification and cannot be derived from the document alone, and
682
+ * item 2 needs the schema this carries.
683
+ */
684
+ export declare const SPEC: {
685
+ readonly typeUri: "https://trusttasks.org/spec/vetting/request/0.1";
686
+ readonly isBearer: false;
687
+ readonly isProofRequired: true;
688
+ readonly isRecipientRequired: true;
689
+ readonly isIssuedAtRequired: true;
690
+ readonly payloadSchema: {
691
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
692
+ readonly $id: "https://trusttasks.org/spec/vetting/request/0.1";
693
+ readonly title: "Vetting Request — payload";
694
+ readonly description: "An applicant asks one vetter to vet them for one community. The applicant is the document's issuer, and `joinDid` repeats that DID: it is the DID the applicant is applying with, and every card and statement that follows names it. Carries a ticket the vetter issued or an introduction, never both. The vetter's response accepts the request and proves the vetter is currently eligible to vet for that community.";
695
+ readonly type: "object";
696
+ readonly additionalProperties: false;
697
+ readonly required: readonly ["community", "joinDid"];
698
+ readonly dependentSchemas: {
699
+ readonly ticket: {
700
+ readonly not: {
701
+ readonly required: readonly ["introduction"];
702
+ };
703
+ };
704
+ };
705
+ readonly properties: {
706
+ readonly community: {
707
+ readonly type: "string";
708
+ readonly pattern: "^did:";
709
+ readonly description: "The community the applicant is applying to and asks to be vetted for.";
710
+ };
711
+ readonly requirementsDigest: {
712
+ readonly $ref: "#/$defs/DigestMultibase";
713
+ readonly description: "The `requirementsDigest` of the community's manifest criterion the applicant is gathering for, recorded when the application started. RECOMMENDED; a community that publishes no digest leaves the applicant nothing to cite.";
714
+ };
715
+ readonly joinDid: {
716
+ readonly type: "string";
717
+ readonly pattern: "^did:";
718
+ readonly description: "The DID the applicant will join the community with. MUST equal the document's `issuer`. Every card and statement this request leads to names it, and it is the holder of the presentation the applicant eventually submits.";
719
+ };
720
+ readonly ticket: {
721
+ readonly $ref: "#/$defs/Ticket";
722
+ };
723
+ readonly introduction: {
724
+ readonly type: "object";
725
+ readonly description: "A verifiable invitation credential for `community` whose subject is the applicant's DID, issued by the community or a member (opaque here). An alternative to a ticket for vetters who accept introductions.";
726
+ };
727
+ readonly preferredMethod: {
728
+ readonly $ref: "#/$defs/VettingMethod";
729
+ readonly description: "The method the applicant would prefer. A preference: the vetter chooses the session's method.";
730
+ };
731
+ readonly languages: {
732
+ readonly type: "array";
733
+ readonly maxItems: 16;
734
+ readonly uniqueItems: true;
735
+ readonly items: {
736
+ readonly type: "string";
737
+ readonly maxLength: 35;
738
+ readonly pattern: "^[A-Za-z]{2,3}(-[A-Za-z0-9]{1,8})*$";
739
+ };
740
+ readonly description: "BCP 47 language tags the applicant can hold a session in, most preferred first.";
741
+ };
742
+ readonly message: {
743
+ readonly type: "string";
744
+ readonly minLength: 1;
745
+ readonly maxLength: 1000;
746
+ readonly description: "OPTIONAL applicant-authored text for the vetter — typically how they know each other. Untrusted: read by the vetter, attributed to the applicant on every surface that renders it, never shown to the community.";
747
+ };
748
+ readonly availability: {
749
+ readonly type: "string";
750
+ readonly minLength: 1;
751
+ readonly maxLength: 256;
752
+ readonly description: "OPTIONAL applicant-authored free text on when they can meet. Scheduling is out of band; this is a hint, attributed to the applicant.";
753
+ };
754
+ readonly ext: {
755
+ readonly $ref: "#/$defs/Ext";
756
+ };
757
+ };
758
+ readonly $defs: {
759
+ readonly Ticket: {
760
+ readonly title: "Ticket";
761
+ readonly description: "A ticket the vetter issued: the short code a person reads or types, or the full-entropy QR form.";
762
+ readonly oneOf: readonly [{
763
+ readonly $ref: "#/$defs/ShortCodeTicket";
764
+ }, {
765
+ readonly $ref: "#/$defs/QrTicket";
766
+ }];
767
+ };
768
+ readonly ShortCodeTicket: {
769
+ readonly title: "ShortCodeTicket";
770
+ readonly type: "object";
771
+ readonly additionalProperties: false;
772
+ readonly required: readonly ["code"];
773
+ readonly properties: {
774
+ readonly code: {
775
+ readonly type: "string";
776
+ readonly pattern: "^[0-9A-HJKMNP-TV-Z]{4}-[0-9A-HJKMNP-TV-Z]{4}$";
777
+ readonly description: "Eight Crockford base32 characters, grouped four and four (40 bits). A secret the vetter handed over; not derived from anything.";
778
+ };
779
+ };
780
+ };
781
+ readonly QrTicket: {
782
+ readonly title: "QrTicket";
783
+ readonly type: "object";
784
+ readonly additionalProperties: false;
785
+ readonly required: readonly ["ticketId", "secret"];
786
+ readonly properties: {
787
+ readonly ticketId: {
788
+ readonly type: "string";
789
+ readonly minLength: 1;
790
+ readonly maxLength: 128;
791
+ readonly pattern: "^[A-Za-z0-9._:-]+$";
792
+ };
793
+ readonly secret: {
794
+ readonly type: "string";
795
+ readonly pattern: "^[A-Za-z0-9_-]{43}$";
796
+ readonly description: "32 random bytes, base64url without padding.";
797
+ };
798
+ };
799
+ };
800
+ readonly EligibilityPresentation: {
801
+ readonly title: "EligibilityPresentation";
802
+ readonly description: "OPTIONAL. A W3C Verifiable Presentation by which the vetter shows the applicant that it currently holds the community's vetter role. Bound to this request by `nonce` (the vetting/request document's `id`, which the applicant chose) and to this applicant by `domain` (its `joinDid`), so it cannot be replayed to another request or another applicant. The applicant's check is advisory; the community evaluates eligibility again, authoritatively, when it decides. Members other than those defined here are permitted, as the VC data model allows.";
803
+ readonly type: "object";
804
+ readonly additionalProperties: true;
805
+ readonly required: readonly ["@context", "type", "holder", "verifiableCredential", "nonce", "domain", "proof"];
806
+ readonly properties: {
807
+ readonly "@context": {
808
+ readonly type: "array";
809
+ readonly minItems: 1;
810
+ readonly items: {
811
+ readonly type: "string";
812
+ readonly minLength: 1;
813
+ readonly maxLength: 2048;
814
+ };
815
+ readonly description: "JSON-LD contexts. The first item MUST be `https://www.w3.org/ns/credentials/v2` (stated here rather than as `prefixItems`, which the Rust generator cannot express).";
816
+ };
817
+ readonly type: {
818
+ readonly type: "array";
819
+ readonly minItems: 1;
820
+ readonly uniqueItems: true;
821
+ readonly items: {
822
+ readonly type: "string";
823
+ readonly minLength: 1;
824
+ readonly maxLength: 128;
825
+ };
826
+ readonly description: "MUST include `VerifiablePresentation` (stated here rather than as `contains`, which the Rust generator cannot express).";
827
+ };
828
+ readonly holder: {
829
+ readonly type: "string";
830
+ readonly pattern: "^did:";
831
+ readonly description: "The vetter's DID — the response's `issuer`.";
832
+ };
833
+ readonly verifiableCredential: {
834
+ readonly type: "array";
835
+ readonly minItems: 1;
836
+ readonly items: {
837
+ readonly type: "object";
838
+ };
839
+ readonly description: "Credentials presented (opaque here). MUST include the community-issued `CommunityRole` endorsement credential naming `holder`, whose `endorsement.role` is the manifest's `eligibleVetters.role` — see vtc/vetting/vetters/grant/0.1. MAY include others, such as the membership credential.";
840
+ };
841
+ readonly nonce: {
842
+ readonly type: "string";
843
+ readonly minLength: 1;
844
+ readonly maxLength: 512;
845
+ readonly description: "The `id` of the vetting/request document this responds to.";
846
+ };
847
+ readonly domain: {
848
+ readonly type: "string";
849
+ readonly pattern: "^did:";
850
+ readonly description: "The applicant's `joinDid` from that request.";
851
+ };
852
+ readonly proof: {
853
+ readonly $ref: "#/$defs/EligibilityPresentationProof";
854
+ };
855
+ };
856
+ };
857
+ readonly EligibilityPresentationProof: {
858
+ readonly title: "EligibilityPresentationProof";
859
+ readonly description: "A W3C Data Integrity proof by `holder` over the presentation, `nonce` and `domain` included.";
860
+ readonly type: "object";
861
+ readonly additionalProperties: true;
862
+ readonly required: readonly ["type", "cryptosuite", "verificationMethod", "proofPurpose", "proofValue"];
863
+ readonly properties: {
864
+ readonly type: {
865
+ readonly type: "string";
866
+ readonly const: "DataIntegrityProof";
867
+ };
868
+ readonly cryptosuite: {
869
+ readonly type: "string";
870
+ readonly minLength: 1;
871
+ readonly maxLength: 64;
872
+ readonly pattern: "^[a-z0-9-]+$";
873
+ readonly description: "e.g. `eddsa-jcs-2022`.";
874
+ };
875
+ readonly verificationMethod: {
876
+ readonly type: "string";
877
+ readonly pattern: "^did:";
878
+ readonly description: "A verification method of `holder`, authorized for `authentication`.";
879
+ };
880
+ readonly proofPurpose: {
881
+ readonly type: "string";
882
+ readonly const: "authentication";
883
+ };
884
+ readonly created: {
885
+ readonly type: "string";
886
+ readonly format: "date-time";
887
+ };
888
+ readonly proofValue: {
889
+ readonly type: "string";
890
+ readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
891
+ };
892
+ };
893
+ };
894
+ readonly Response: {
895
+ readonly $anchor: "response";
896
+ readonly title: "Vetting Request — response payload";
897
+ readonly description: "The vetter accepts the request. A refusal is a trust-task-error, never a response document.";
898
+ readonly type: "object";
899
+ readonly additionalProperties: false;
900
+ readonly required: readonly ["requestId"];
901
+ readonly properties: {
902
+ readonly requestId: {
903
+ readonly type: "string";
904
+ readonly minLength: 1;
905
+ readonly maxLength: 128;
906
+ readonly description: "The vetter's handle for this accepted request, carried by the session and any decline.";
907
+ };
908
+ readonly eligibilityVp: {
909
+ readonly $ref: "#/$defs/EligibilityPresentation";
910
+ };
911
+ readonly acceptsDocumentation: {
912
+ readonly type: "array";
913
+ readonly minItems: 1;
914
+ readonly uniqueItems: true;
915
+ readonly items: {
916
+ readonly $ref: "#/$defs/VettingDocumentation";
917
+ };
918
+ readonly description: "RECOMMENDED. What this vetter will rely on, so the applicant brings it — the vetter's own choice. `none` means the vetter attests from prior acquaintance.";
919
+ };
920
+ readonly sessionHint: {
921
+ readonly type: "string";
922
+ readonly minLength: 1;
923
+ readonly maxLength: 500;
924
+ readonly description: "OPTIONAL vetter-authored free text on how and when the session will happen. Attributed to the vetter.";
925
+ };
926
+ readonly ext: {
927
+ readonly $ref: "#/$defs/Ext";
928
+ };
929
+ };
930
+ };
931
+ readonly Ext: {
932
+ readonly title: "Ext";
933
+ 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.";
934
+ readonly type: "object";
935
+ readonly minProperties: 1;
936
+ readonly additionalProperties: true;
937
+ readonly propertyNames: {
938
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
939
+ };
940
+ };
941
+ readonly VettingDocumentation: {
942
+ readonly title: "VettingDocumentation";
943
+ readonly type: "string";
944
+ readonly minLength: 1;
945
+ readonly maxLength: 64;
946
+ readonly pattern: "^[a-z][a-zA-Z0-9]*$";
947
+ readonly description: "A class of documentation, named in lowerCamelCase. Open rather than enumerated, because what documentation a vetter accepts is each vetter's own choice. Well-known values: `passport`, `nationalId`, `driverLicence`, and `none` — the vetter will attest without a document, which is the `priorAcquaintance` case. Only the class ever travels — never a document number, an image, an issuing authority or an expiry date. `none` states a policy (what a vetter accepts); a record of what was relied on expresses 'no document' as an empty list instead.";
948
+ };
949
+ readonly VettingMethod: {
950
+ readonly title: "VettingMethod";
951
+ readonly type: "string";
952
+ readonly enum: readonly ["inPerson", "video", "priorAcquaintance"];
953
+ readonly description: "How the vetter established that the person they checked is the person controlling the applicant's DID. `inPerson` — both people were physically together. `video` — a live, two-way video call. `priorAcquaintance` — the vetter has known or worked with this person over a period, and attests from that knowledge rather than from a document. A method is a description of what happened, not an assurance level: which methods count, and how many of each, is community policy.";
954
+ };
955
+ readonly DigestMultibase: {
956
+ readonly title: "DigestMultibase";
957
+ 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`.";
958
+ readonly type: "string";
959
+ readonly minLength: 16;
960
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
961
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
962
+ };
963
+ };
964
+ };
965
+ };
966
+ /**
967
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
968
+ * tracks the *issuer* party's requirement because a response swaps the
969
+ * parties (§7.3 item 5).
970
+ */
971
+ export declare const RESPONSE_SPEC: {
972
+ readonly typeUri: "https://trusttasks.org/spec/vetting/request/0.1#response";
973
+ readonly isBearer: false;
974
+ readonly isProofRequired: true;
975
+ readonly isRecipientRequired: true;
976
+ readonly isIssuedAtRequired: true;
977
+ readonly payloadSchema: {
978
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
979
+ readonly $ref: "#/$defs/Response";
980
+ readonly $defs: {
981
+ readonly Ticket: {
982
+ readonly title: "Ticket";
983
+ readonly description: "A ticket the vetter issued: the short code a person reads or types, or the full-entropy QR form.";
984
+ readonly oneOf: readonly [{
985
+ readonly $ref: "#/$defs/ShortCodeTicket";
986
+ }, {
987
+ readonly $ref: "#/$defs/QrTicket";
988
+ }];
989
+ };
990
+ readonly ShortCodeTicket: {
991
+ readonly title: "ShortCodeTicket";
992
+ readonly type: "object";
993
+ readonly additionalProperties: false;
994
+ readonly required: readonly ["code"];
995
+ readonly properties: {
996
+ readonly code: {
997
+ readonly type: "string";
998
+ readonly pattern: "^[0-9A-HJKMNP-TV-Z]{4}-[0-9A-HJKMNP-TV-Z]{4}$";
999
+ readonly description: "Eight Crockford base32 characters, grouped four and four (40 bits). A secret the vetter handed over; not derived from anything.";
1000
+ };
1001
+ };
1002
+ };
1003
+ readonly QrTicket: {
1004
+ readonly title: "QrTicket";
1005
+ readonly type: "object";
1006
+ readonly additionalProperties: false;
1007
+ readonly required: readonly ["ticketId", "secret"];
1008
+ readonly properties: {
1009
+ readonly ticketId: {
1010
+ readonly type: "string";
1011
+ readonly minLength: 1;
1012
+ readonly maxLength: 128;
1013
+ readonly pattern: "^[A-Za-z0-9._:-]+$";
1014
+ };
1015
+ readonly secret: {
1016
+ readonly type: "string";
1017
+ readonly pattern: "^[A-Za-z0-9_-]{43}$";
1018
+ readonly description: "32 random bytes, base64url without padding.";
1019
+ };
1020
+ };
1021
+ };
1022
+ readonly EligibilityPresentation: {
1023
+ readonly title: "EligibilityPresentation";
1024
+ readonly description: "OPTIONAL. A W3C Verifiable Presentation by which the vetter shows the applicant that it currently holds the community's vetter role. Bound to this request by `nonce` (the vetting/request document's `id`, which the applicant chose) and to this applicant by `domain` (its `joinDid`), so it cannot be replayed to another request or another applicant. The applicant's check is advisory; the community evaluates eligibility again, authoritatively, when it decides. Members other than those defined here are permitted, as the VC data model allows.";
1025
+ readonly type: "object";
1026
+ readonly additionalProperties: true;
1027
+ readonly required: readonly ["@context", "type", "holder", "verifiableCredential", "nonce", "domain", "proof"];
1028
+ readonly properties: {
1029
+ readonly "@context": {
1030
+ readonly type: "array";
1031
+ readonly minItems: 1;
1032
+ readonly items: {
1033
+ readonly type: "string";
1034
+ readonly minLength: 1;
1035
+ readonly maxLength: 2048;
1036
+ };
1037
+ readonly description: "JSON-LD contexts. The first item MUST be `https://www.w3.org/ns/credentials/v2` (stated here rather than as `prefixItems`, which the Rust generator cannot express).";
1038
+ };
1039
+ readonly type: {
1040
+ readonly type: "array";
1041
+ readonly minItems: 1;
1042
+ readonly uniqueItems: true;
1043
+ readonly items: {
1044
+ readonly type: "string";
1045
+ readonly minLength: 1;
1046
+ readonly maxLength: 128;
1047
+ };
1048
+ readonly description: "MUST include `VerifiablePresentation` (stated here rather than as `contains`, which the Rust generator cannot express).";
1049
+ };
1050
+ readonly holder: {
1051
+ readonly type: "string";
1052
+ readonly pattern: "^did:";
1053
+ readonly description: "The vetter's DID — the response's `issuer`.";
1054
+ };
1055
+ readonly verifiableCredential: {
1056
+ readonly type: "array";
1057
+ readonly minItems: 1;
1058
+ readonly items: {
1059
+ readonly type: "object";
1060
+ };
1061
+ readonly description: "Credentials presented (opaque here). MUST include the community-issued `CommunityRole` endorsement credential naming `holder`, whose `endorsement.role` is the manifest's `eligibleVetters.role` — see vtc/vetting/vetters/grant/0.1. MAY include others, such as the membership credential.";
1062
+ };
1063
+ readonly nonce: {
1064
+ readonly type: "string";
1065
+ readonly minLength: 1;
1066
+ readonly maxLength: 512;
1067
+ readonly description: "The `id` of the vetting/request document this responds to.";
1068
+ };
1069
+ readonly domain: {
1070
+ readonly type: "string";
1071
+ readonly pattern: "^did:";
1072
+ readonly description: "The applicant's `joinDid` from that request.";
1073
+ };
1074
+ readonly proof: {
1075
+ readonly $ref: "#/$defs/EligibilityPresentationProof";
1076
+ };
1077
+ };
1078
+ };
1079
+ readonly EligibilityPresentationProof: {
1080
+ readonly title: "EligibilityPresentationProof";
1081
+ readonly description: "A W3C Data Integrity proof by `holder` over the presentation, `nonce` and `domain` included.";
1082
+ readonly type: "object";
1083
+ readonly additionalProperties: true;
1084
+ readonly required: readonly ["type", "cryptosuite", "verificationMethod", "proofPurpose", "proofValue"];
1085
+ readonly properties: {
1086
+ readonly type: {
1087
+ readonly type: "string";
1088
+ readonly const: "DataIntegrityProof";
1089
+ };
1090
+ readonly cryptosuite: {
1091
+ readonly type: "string";
1092
+ readonly minLength: 1;
1093
+ readonly maxLength: 64;
1094
+ readonly pattern: "^[a-z0-9-]+$";
1095
+ readonly description: "e.g. `eddsa-jcs-2022`.";
1096
+ };
1097
+ readonly verificationMethod: {
1098
+ readonly type: "string";
1099
+ readonly pattern: "^did:";
1100
+ readonly description: "A verification method of `holder`, authorized for `authentication`.";
1101
+ };
1102
+ readonly proofPurpose: {
1103
+ readonly type: "string";
1104
+ readonly const: "authentication";
1105
+ };
1106
+ readonly created: {
1107
+ readonly type: "string";
1108
+ readonly format: "date-time";
1109
+ };
1110
+ readonly proofValue: {
1111
+ readonly type: "string";
1112
+ readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
1113
+ };
1114
+ };
1115
+ };
1116
+ readonly Response: {
1117
+ readonly $anchor: "response";
1118
+ readonly title: "Vetting Request — response payload";
1119
+ readonly description: "The vetter accepts the request. A refusal is a trust-task-error, never a response document.";
1120
+ readonly type: "object";
1121
+ readonly additionalProperties: false;
1122
+ readonly required: readonly ["requestId"];
1123
+ readonly properties: {
1124
+ readonly requestId: {
1125
+ readonly type: "string";
1126
+ readonly minLength: 1;
1127
+ readonly maxLength: 128;
1128
+ readonly description: "The vetter's handle for this accepted request, carried by the session and any decline.";
1129
+ };
1130
+ readonly eligibilityVp: {
1131
+ readonly $ref: "#/$defs/EligibilityPresentation";
1132
+ };
1133
+ readonly acceptsDocumentation: {
1134
+ readonly type: "array";
1135
+ readonly minItems: 1;
1136
+ readonly uniqueItems: true;
1137
+ readonly items: {
1138
+ readonly $ref: "#/$defs/VettingDocumentation";
1139
+ };
1140
+ readonly description: "RECOMMENDED. What this vetter will rely on, so the applicant brings it — the vetter's own choice. `none` means the vetter attests from prior acquaintance.";
1141
+ };
1142
+ readonly sessionHint: {
1143
+ readonly type: "string";
1144
+ readonly minLength: 1;
1145
+ readonly maxLength: 500;
1146
+ readonly description: "OPTIONAL vetter-authored free text on how and when the session will happen. Attributed to the vetter.";
1147
+ };
1148
+ readonly ext: {
1149
+ readonly $ref: "#/$defs/Ext";
1150
+ };
1151
+ };
1152
+ };
1153
+ readonly Ext: {
1154
+ readonly title: "Ext";
1155
+ 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.";
1156
+ readonly type: "object";
1157
+ readonly minProperties: 1;
1158
+ readonly additionalProperties: true;
1159
+ readonly propertyNames: {
1160
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
1161
+ };
1162
+ };
1163
+ readonly VettingDocumentation: {
1164
+ readonly title: "VettingDocumentation";
1165
+ readonly type: "string";
1166
+ readonly minLength: 1;
1167
+ readonly maxLength: 64;
1168
+ readonly pattern: "^[a-z][a-zA-Z0-9]*$";
1169
+ readonly description: "A class of documentation, named in lowerCamelCase. Open rather than enumerated, because what documentation a vetter accepts is each vetter's own choice. Well-known values: `passport`, `nationalId`, `driverLicence`, and `none` — the vetter will attest without a document, which is the `priorAcquaintance` case. Only the class ever travels — never a document number, an image, an issuing authority or an expiry date. `none` states a policy (what a vetter accepts); a record of what was relied on expresses 'no document' as an empty list instead.";
1170
+ };
1171
+ readonly VettingMethod: {
1172
+ readonly title: "VettingMethod";
1173
+ readonly type: "string";
1174
+ readonly enum: readonly ["inPerson", "video", "priorAcquaintance"];
1175
+ readonly description: "How the vetter established that the person they checked is the person controlling the applicant's DID. `inPerson` — both people were physically together. `video` — a live, two-way video call. `priorAcquaintance` — the vetter has known or worked with this person over a period, and attests from that knowledge rather than from a document. A method is a description of what happened, not an assurance level: which methods count, and how many of each, is community policy.";
1176
+ };
1177
+ readonly DigestMultibase: {
1178
+ readonly title: "DigestMultibase";
1179
+ 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`.";
1180
+ readonly type: "string";
1181
+ readonly minLength: 16;
1182
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
1183
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
1184
+ };
1185
+ };
1186
+ };
1187
+ };
1188
+ //# sourceMappingURL=payload.d.ts.map