@openvtc/trust-tasks 0.19.3 → 0.19.5

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 (80) hide show
  1. package/CHANGELOG.md +209 -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 +14 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +14 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/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/vta/webvh/dids/realign-keys/1.0/payload.d.ts +484 -0
  33. package/dist/vta/webvh/dids/realign-keys/1.0/payload.d.ts.map +1 -0
  34. package/dist/vta/webvh/dids/realign-keys/1.0/payload.js +259 -0
  35. package/dist/vta/webvh/dids/realign-keys/1.0/payload.js.map +1 -0
  36. package/dist/vtc/_shared/0.1/vetter-profile.d.ts +16 -0
  37. package/dist/vtc/_shared/0.1/vetter-profile.d.ts.map +1 -0
  38. package/dist/vtc/_shared/0.1/vetter-profile.js +6 -0
  39. package/dist/vtc/_shared/0.1/vetter-profile.js.map +1 -0
  40. package/dist/vtc/join-requests/manifest/0.2/payload.d.ts +1294 -0
  41. package/dist/vtc/join-requests/manifest/0.2/payload.d.ts.map +1 -0
  42. package/dist/vtc/join-requests/manifest/0.2/payload.js +667 -0
  43. package/dist/vtc/join-requests/manifest/0.2/payload.js.map +1 -0
  44. package/dist/vtc/vetting/revoke-statement/0.1/payload.d.ts +299 -0
  45. package/dist/vtc/vetting/revoke-statement/0.1/payload.d.ts.map +1 -0
  46. package/dist/vtc/vetting/revoke-statement/0.1/payload.js +172 -0
  47. package/dist/vtc/vetting/revoke-statement/0.1/payload.js.map +1 -0
  48. package/dist/vtc/vetting/vetters/grant/0.1/payload.d.ts +337 -0
  49. package/dist/vtc/vetting/vetters/grant/0.1/payload.d.ts.map +1 -0
  50. package/dist/vtc/vetting/vetters/grant/0.1/payload.js +183 -0
  51. package/dist/vtc/vetting/vetters/grant/0.1/payload.js.map +1 -0
  52. package/dist/vtc/vetting/vetters/list/0.1/payload.d.ts +1257 -0
  53. package/dist/vtc/vetting/vetters/list/0.1/payload.d.ts.map +1 -0
  54. package/dist/vtc/vetting/vetters/list/0.1/payload.js +597 -0
  55. package/dist/vtc/vetting/vetters/list/0.1/payload.js.map +1 -0
  56. package/dist/vtc/vetting/vetters/profile/0.1/payload.d.ts +970 -0
  57. package/dist/vtc/vetting/vetters/profile/0.1/payload.d.ts.map +1 -0
  58. package/dist/vtc/vetting/vetters/profile/0.1/payload.js +463 -0
  59. package/dist/vtc/vetting/vetters/profile/0.1/payload.js.map +1 -0
  60. package/dist/vtc/vetting/vetters/resend/0.1/payload.d.ts +240 -0
  61. package/dist/vtc/vetting/vetters/resend/0.1/payload.d.ts.map +1 -0
  62. package/dist/vtc/vetting/vetters/resend/0.1/payload.js +137 -0
  63. package/dist/vtc/vetting/vetters/resend/0.1/payload.js.map +1 -0
  64. package/package.json +1 -1
  65. package/src/_shared/components.ts +318 -0
  66. package/src/index.ts +14 -0
  67. package/src/vetting/_shared/0.1/identity-vetting.ts +11 -0
  68. package/src/vetting/_shared/0.1/vetting-card.ts +17 -0
  69. package/src/vetting/_shared/0.1/vetting.ts +17 -0
  70. package/src/vetting/decline/0.1/payload.ts +111 -0
  71. package/src/vetting/request/0.1/payload.ts +799 -0
  72. package/src/vetting/session/0.1/payload.ts +629 -0
  73. package/src/vta/webvh/dids/realign-keys/1.0/payload.ts +332 -0
  74. package/src/vtc/_shared/0.1/vetter-profile.ts +17 -0
  75. package/src/vtc/join-requests/manifest/0.2/payload.ts +815 -0
  76. package/src/vtc/vetting/revoke-statement/0.1/payload.ts +218 -0
  77. package/src/vtc/vetting/vetters/grant/0.1/payload.ts +237 -0
  78. package/src/vtc/vetting/vetters/list/0.1/payload.ts +816 -0
  79. package/src/vtc/vetting/vetters/profile/0.1/payload.ts +647 -0
  80. package/src/vtc/vetting/vetters/resend/0.1/payload.ts +174 -0
@@ -0,0 +1,978 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vetting/session/0.1/payload.schema.json
4
+ */
5
+ import type { ClaimType, DataIntegrityProof, DigestMultibase, Ext, VettingCard, VettingCardClaim, VettingMethod } from "../../../_shared/components.js";
6
+ /**
7
+ * A vetter opens a vetting session with an applicant whose request it accepted, while the two are together in person or on a call. The request issues the session challenge and names the claims to present; the applicant's response is the signed Vetting Card. This document's `id` is the value the resulting Vetting Statement carries as `taskContext`, and its task digest is what binds the statement to it.
8
+ */
9
+ export interface VettingSessionPayload {
10
+ /**
11
+ * The `requestId` from the vetter's acceptance of the applicant's vetting request.
12
+ */
13
+ requestId: string;
14
+ /**
15
+ * 32 fresh random bytes, base64url without padding. The card binds to it. Never reused across sessions.
16
+ */
17
+ challenge: string;
18
+ /**
19
+ * The community DID the applicant is being vetted for. The card binds to it alongside `challenge`.
20
+ */
21
+ domain: string;
22
+ /**
23
+ * How this session is conducted.
24
+ */
25
+ method: VettingMethod;
26
+ /**
27
+ * Claim types the card must carry. The community criterion's `requiredClaims`; the identity commitment is computed over exactly these.
28
+ */
29
+ requiredClaims: ClaimType[];
30
+ /**
31
+ * Claim types the applicant may add. Never part of the commitment.
32
+ */
33
+ optionalClaims?: ClaimType[];
34
+ /**
35
+ * When the session lapses: no card is accepted for it afterwards, and the card's own `expiresAt` may not be later.
36
+ */
37
+ expiresAt: string;
38
+ ext?: Ext;
39
+ }
40
+ /**
41
+ * The applicant's signed Vetting Card, bound to this session.
42
+ */
43
+ export interface VettingSessionResponsePayload {
44
+ card: VettingCard;
45
+ ext?: Ext;
46
+ }
47
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
48
+ export type { ClaimType, DataIntegrityProof, DigestMultibase, Ext, VettingCard, VettingCardClaim, VettingMethod };
49
+ /** Trust Task type URI. */
50
+ export declare const TYPE_URI: "https://trusttasks.org/spec/vetting/session/0.1";
51
+ /** Stable alias for this specification's request payload shape. */
52
+ export type Payload = VettingSessionPayload;
53
+ /** Trust Task response type URI (request type URI + "#response"). */
54
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/vetting/session/0.1#response";
55
+ /** Stable alias for this specification's success-response payload shape. */
56
+ export type Response = VettingSessionResponsePayload;
57
+ /**
58
+ * This specification's payload schema, as a value.
59
+ *
60
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
61
+ * rather than only as a `.json` file because TypeScript types are erased
62
+ * at runtime: without a schema a consumer has nothing to validate, and
63
+ * every REQUIRED payload member is optional in practice. Cross-file
64
+ * `$ref`s are already inlined, so it needs no resolver.
65
+ */
66
+ export declare const PAYLOAD_SCHEMA: {
67
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
68
+ readonly $id: "https://trusttasks.org/spec/vetting/session/0.1";
69
+ readonly title: "Vetting Session — payload";
70
+ readonly description: "A vetter opens a vetting session with an applicant whose request it accepted, while the two are together in person or on a call. The request issues the session challenge and names the claims to present; the applicant's response is the signed Vetting Card. This document's `id` is the value the resulting Vetting Statement carries as `taskContext`, and its task digest is what binds the statement to it.";
71
+ readonly type: "object";
72
+ readonly additionalProperties: false;
73
+ readonly required: readonly ["requestId", "challenge", "domain", "method", "requiredClaims", "expiresAt"];
74
+ readonly properties: {
75
+ readonly requestId: {
76
+ readonly type: "string";
77
+ readonly minLength: 1;
78
+ readonly maxLength: 128;
79
+ readonly description: "The `requestId` from the vetter's acceptance of the applicant's vetting request.";
80
+ };
81
+ readonly challenge: {
82
+ readonly type: "string";
83
+ readonly pattern: "^[A-Za-z0-9_-]{43}$";
84
+ readonly description: "32 fresh random bytes, base64url without padding. The card binds to it. Never reused across sessions.";
85
+ };
86
+ readonly domain: {
87
+ readonly type: "string";
88
+ readonly pattern: "^did:";
89
+ readonly description: "The community DID the applicant is being vetted for. The card binds to it alongside `challenge`.";
90
+ };
91
+ readonly method: {
92
+ readonly $ref: "#/$defs/VettingMethod";
93
+ readonly description: "How this session is conducted.";
94
+ };
95
+ readonly requiredClaims: {
96
+ readonly type: "array";
97
+ readonly uniqueItems: true;
98
+ readonly items: {
99
+ readonly $ref: "#/$defs/ClaimType";
100
+ readonly not: {
101
+ readonly const: "person.portrait";
102
+ };
103
+ };
104
+ readonly description: "Claim types the card must carry. The community criterion's `requiredClaims`; the identity commitment is computed over exactly these.";
105
+ };
106
+ readonly optionalClaims: {
107
+ readonly type: "array";
108
+ readonly uniqueItems: true;
109
+ readonly items: {
110
+ readonly $ref: "#/$defs/ClaimType";
111
+ readonly not: {
112
+ readonly const: "person.portrait";
113
+ };
114
+ };
115
+ readonly description: "Claim types the applicant may add. Never part of the commitment.";
116
+ };
117
+ readonly expiresAt: {
118
+ readonly type: "string";
119
+ readonly format: "date-time";
120
+ readonly description: "When the session lapses: no card is accepted for it afterwards, and the card's own `expiresAt` may not be later.";
121
+ };
122
+ readonly ext: {
123
+ readonly $ref: "#/$defs/Ext";
124
+ };
125
+ };
126
+ readonly $defs: {
127
+ readonly Response: {
128
+ readonly $anchor: "response";
129
+ readonly title: "Vetting Session — response payload";
130
+ readonly description: "The applicant's signed Vetting Card, bound to this session.";
131
+ readonly type: "object";
132
+ readonly additionalProperties: false;
133
+ readonly required: readonly ["card"];
134
+ readonly properties: {
135
+ readonly card: {
136
+ readonly $ref: "#/$defs/VettingCard";
137
+ };
138
+ readonly ext: {
139
+ readonly $ref: "#/$defs/Ext";
140
+ };
141
+ };
142
+ };
143
+ readonly Ext: {
144
+ readonly title: "Ext";
145
+ 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.";
146
+ readonly type: "object";
147
+ readonly minProperties: 1;
148
+ readonly additionalProperties: true;
149
+ readonly propertyNames: {
150
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
151
+ };
152
+ };
153
+ readonly VettingCard: {
154
+ readonly title: "VettingCard";
155
+ readonly type: "object";
156
+ readonly additionalProperties: false;
157
+ readonly required: readonly ["type", "id", "publisher", "cardVersion", "audience", "community", "challenge", "domain", "issuedAt", "expiresAt", "claims", "identityCommitment", "commitmentSalt", "proof"];
158
+ readonly properties: {
159
+ readonly type: {
160
+ readonly type: "array";
161
+ readonly minItems: 3;
162
+ readonly maxItems: 3;
163
+ readonly uniqueItems: true;
164
+ readonly items: {
165
+ readonly type: "string";
166
+ readonly enum: readonly ["VerifiableDataStructure", "RelationshipCard", "VettingCard"];
167
+ };
168
+ readonly description: "Exactly `VerifiableDataStructure`, `RelationshipCard` and `VettingCard`, in any order.";
169
+ };
170
+ readonly id: {
171
+ readonly type: "string";
172
+ readonly pattern: "^urn:uuid:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$";
173
+ readonly description: "Fresh per card. A card is never re-sent to a second session under the same id.";
174
+ };
175
+ readonly publisher: {
176
+ readonly type: "string";
177
+ readonly pattern: "^did:";
178
+ readonly description: "The applicant's DID — the issuer of the vetting request and the subject every resulting statement names. The card is signed with this DID's assertion key.";
179
+ };
180
+ readonly cardVersion: {
181
+ readonly type: "integer";
182
+ readonly minimum: 1;
183
+ };
184
+ readonly audience: {
185
+ readonly type: "string";
186
+ readonly pattern: "^did:";
187
+ readonly description: "The vetter's DID — the issuer of the vetting session. A card addressed to anyone else is refused.";
188
+ };
189
+ readonly community: {
190
+ readonly type: "string";
191
+ readonly pattern: "^did:";
192
+ readonly description: "The community the applicant is being vetted for.";
193
+ };
194
+ readonly challenge: {
195
+ readonly type: "string";
196
+ readonly pattern: "^[A-Za-z0-9_-]{43}$";
197
+ readonly description: "The session's challenge, copied verbatim.";
198
+ };
199
+ readonly domain: {
200
+ readonly type: "string";
201
+ readonly pattern: "^did:";
202
+ readonly description: "The session's domain, copied verbatim.";
203
+ };
204
+ readonly issuedAt: {
205
+ readonly type: "string";
206
+ readonly format: "date-time";
207
+ };
208
+ readonly expiresAt: {
209
+ readonly type: "string";
210
+ readonly format: "date-time";
211
+ readonly description: "No later than the session's `expiresAt`.";
212
+ };
213
+ readonly claims: {
214
+ readonly type: "array";
215
+ readonly minItems: 1;
216
+ readonly items: {
217
+ readonly $ref: "#/$defs/VettingCardClaim";
218
+ };
219
+ };
220
+ readonly identityCommitment: {
221
+ readonly $ref: "#/$defs/DigestMultibase";
222
+ readonly description: "digestMultibase over the RFC 8785 canonicalization of `{ \"salt\": commitmentSalt, \"claims\": R }`, where R is `{ \"type\", \"value\" }` for every card claim whose type the session lists in `requiredClaims`, ordered by `type` then `value` (code-point order). SHA-256 RECOMMENDED. Because the applicant uses one salt per application, every vetter of that application sees the same value.";
223
+ };
224
+ readonly commitmentSalt: {
225
+ readonly type: "string";
226
+ readonly pattern: "^[A-Za-z0-9_-]{43}$";
227
+ readonly description: "32 random bytes, base64url without padding, generated once per application. Goes to vetters inside the card and to nobody else: a party holding the commitment without the salt cannot test guesses at the claimed name.";
228
+ };
229
+ readonly proof: {
230
+ readonly $ref: "#/$defs/DataIntegrityProof";
231
+ };
232
+ };
233
+ };
234
+ readonly DataIntegrityProof: {
235
+ readonly title: "DataIntegrityProof";
236
+ readonly type: "object";
237
+ readonly additionalProperties: true;
238
+ readonly required: readonly ["type", "cryptosuite", "verificationMethod", "proofPurpose", "proofValue"];
239
+ readonly description: "A W3C Data Integrity proof by the card's publisher. Additional Data Integrity members (e.g. `created`) are permitted and are covered as the cryptosuite defines.";
240
+ readonly properties: {
241
+ readonly type: {
242
+ readonly type: "string";
243
+ readonly const: "DataIntegrityProof";
244
+ };
245
+ readonly cryptosuite: {
246
+ readonly type: "string";
247
+ readonly minLength: 1;
248
+ readonly maxLength: 64;
249
+ readonly pattern: "^[a-z0-9-]+$";
250
+ readonly description: "e.g. `eddsa-jcs-2022`.";
251
+ };
252
+ readonly verificationMethod: {
253
+ readonly type: "string";
254
+ readonly pattern: "^did:";
255
+ readonly description: "A verification method of `publisher`, authorized for `assertionMethod`.";
256
+ };
257
+ readonly proofPurpose: {
258
+ readonly type: "string";
259
+ readonly const: "assertionMethod";
260
+ };
261
+ readonly proofValue: {
262
+ readonly type: "string";
263
+ readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
264
+ };
265
+ };
266
+ };
267
+ readonly VettingCardClaim: {
268
+ readonly title: "VettingCardClaim";
269
+ readonly type: "object";
270
+ readonly additionalProperties: false;
271
+ readonly required: readonly ["type", "value", "provenance"];
272
+ readonly properties: {
273
+ readonly type: {
274
+ readonly $ref: "#/$defs/ClaimType";
275
+ readonly not: {
276
+ readonly const: "person.portrait";
277
+ };
278
+ readonly description: "The claim type. `person.portrait` is refused: identity vetting works by a vetter looking at the person, not by transmitting their image.";
279
+ };
280
+ readonly value: {
281
+ readonly description: "The claimed value, exactly as rendered from the applicant's persona — a string for most claim types, structured JSON for some (e.g. a postal address). Authored by the applicant and asserted under their signature; the vetter's check is what gives it any assurance.";
282
+ };
283
+ readonly provenance: {
284
+ readonly type: "string";
285
+ readonly minLength: 1;
286
+ readonly maxLength: 64;
287
+ readonly pattern: "^[a-z][a-zA-Z0-9]*$";
288
+ readonly description: "Where the value's assurance comes from. `selfAsserted` — the applicant says so, and the vetter's human check is the only assurance added — is the only value this version defines; a verifier MUST NOT treat any other value as adding assurance it does not understand.";
289
+ };
290
+ };
291
+ };
292
+ readonly ClaimType: {
293
+ readonly title: "ClaimType";
294
+ readonly description: "The vocabulary token naming what a value IS — `name.legal`, `phone.mobile`, `address.postal`, `person.birthDate`. Dotted, most-general segment first, so that a consumer with no knowledge of the specific token can still group by its prefix.\n\nThe token is the maintainer's own; no external vocabulary is primary. External vocabularies (vCard/jCard, OIDC standard claims, schema.org) are mappings applied at PRESENTATION by a renderer, not at rest, so that a query written in any of them can be matched without the store having to live inside any one of them.\n\nThe `x:` prefix is an open extension namespace and is not decoration. The closest prior art — Windows CardSpace's self-issued card — supported exactly fifteen predefined claim types with no extensibility, and that is the specific way it failed the requirement a holder actually has. An `x:` attribute stores, composes, binds and discloses exactly like a known one; it renders generically and matches only an explicit query.";
295
+ readonly type: "string";
296
+ readonly minLength: 1;
297
+ readonly maxLength: 128;
298
+ readonly pattern: "^(x:)?[a-z][a-zA-Z0-9]*(\\.[a-z][a-zA-Z0-9]*)*$";
299
+ };
300
+ readonly DigestMultibase: {
301
+ readonly title: "DigestMultibase";
302
+ 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`.";
303
+ readonly type: "string";
304
+ readonly minLength: 16;
305
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
306
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
307
+ };
308
+ readonly VettingMethod: {
309
+ readonly title: "VettingMethod";
310
+ readonly type: "string";
311
+ readonly enum: readonly ["inPerson", "video", "priorAcquaintance"];
312
+ 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.";
313
+ };
314
+ };
315
+ };
316
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
317
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
318
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
319
+ readonly $ref: "#/$defs/Response";
320
+ readonly $defs: {
321
+ readonly Response: {
322
+ readonly $anchor: "response";
323
+ readonly title: "Vetting Session — response payload";
324
+ readonly description: "The applicant's signed Vetting Card, bound to this session.";
325
+ readonly type: "object";
326
+ readonly additionalProperties: false;
327
+ readonly required: readonly ["card"];
328
+ readonly properties: {
329
+ readonly card: {
330
+ readonly $ref: "#/$defs/VettingCard";
331
+ };
332
+ readonly ext: {
333
+ readonly $ref: "#/$defs/Ext";
334
+ };
335
+ };
336
+ };
337
+ readonly Ext: {
338
+ readonly title: "Ext";
339
+ 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.";
340
+ readonly type: "object";
341
+ readonly minProperties: 1;
342
+ readonly additionalProperties: true;
343
+ readonly propertyNames: {
344
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
345
+ };
346
+ };
347
+ readonly VettingCard: {
348
+ readonly title: "VettingCard";
349
+ readonly type: "object";
350
+ readonly additionalProperties: false;
351
+ readonly required: readonly ["type", "id", "publisher", "cardVersion", "audience", "community", "challenge", "domain", "issuedAt", "expiresAt", "claims", "identityCommitment", "commitmentSalt", "proof"];
352
+ readonly properties: {
353
+ readonly type: {
354
+ readonly type: "array";
355
+ readonly minItems: 3;
356
+ readonly maxItems: 3;
357
+ readonly uniqueItems: true;
358
+ readonly items: {
359
+ readonly type: "string";
360
+ readonly enum: readonly ["VerifiableDataStructure", "RelationshipCard", "VettingCard"];
361
+ };
362
+ readonly description: "Exactly `VerifiableDataStructure`, `RelationshipCard` and `VettingCard`, in any order.";
363
+ };
364
+ readonly id: {
365
+ readonly type: "string";
366
+ readonly pattern: "^urn:uuid:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$";
367
+ readonly description: "Fresh per card. A card is never re-sent to a second session under the same id.";
368
+ };
369
+ readonly publisher: {
370
+ readonly type: "string";
371
+ readonly pattern: "^did:";
372
+ readonly description: "The applicant's DID — the issuer of the vetting request and the subject every resulting statement names. The card is signed with this DID's assertion key.";
373
+ };
374
+ readonly cardVersion: {
375
+ readonly type: "integer";
376
+ readonly minimum: 1;
377
+ };
378
+ readonly audience: {
379
+ readonly type: "string";
380
+ readonly pattern: "^did:";
381
+ readonly description: "The vetter's DID — the issuer of the vetting session. A card addressed to anyone else is refused.";
382
+ };
383
+ readonly community: {
384
+ readonly type: "string";
385
+ readonly pattern: "^did:";
386
+ readonly description: "The community the applicant is being vetted for.";
387
+ };
388
+ readonly challenge: {
389
+ readonly type: "string";
390
+ readonly pattern: "^[A-Za-z0-9_-]{43}$";
391
+ readonly description: "The session's challenge, copied verbatim.";
392
+ };
393
+ readonly domain: {
394
+ readonly type: "string";
395
+ readonly pattern: "^did:";
396
+ readonly description: "The session's domain, copied verbatim.";
397
+ };
398
+ readonly issuedAt: {
399
+ readonly type: "string";
400
+ readonly format: "date-time";
401
+ };
402
+ readonly expiresAt: {
403
+ readonly type: "string";
404
+ readonly format: "date-time";
405
+ readonly description: "No later than the session's `expiresAt`.";
406
+ };
407
+ readonly claims: {
408
+ readonly type: "array";
409
+ readonly minItems: 1;
410
+ readonly items: {
411
+ readonly $ref: "#/$defs/VettingCardClaim";
412
+ };
413
+ };
414
+ readonly identityCommitment: {
415
+ readonly $ref: "#/$defs/DigestMultibase";
416
+ readonly description: "digestMultibase over the RFC 8785 canonicalization of `{ \"salt\": commitmentSalt, \"claims\": R }`, where R is `{ \"type\", \"value\" }` for every card claim whose type the session lists in `requiredClaims`, ordered by `type` then `value` (code-point order). SHA-256 RECOMMENDED. Because the applicant uses one salt per application, every vetter of that application sees the same value.";
417
+ };
418
+ readonly commitmentSalt: {
419
+ readonly type: "string";
420
+ readonly pattern: "^[A-Za-z0-9_-]{43}$";
421
+ readonly description: "32 random bytes, base64url without padding, generated once per application. Goes to vetters inside the card and to nobody else: a party holding the commitment without the salt cannot test guesses at the claimed name.";
422
+ };
423
+ readonly proof: {
424
+ readonly $ref: "#/$defs/DataIntegrityProof";
425
+ };
426
+ };
427
+ };
428
+ readonly DataIntegrityProof: {
429
+ readonly title: "DataIntegrityProof";
430
+ readonly type: "object";
431
+ readonly additionalProperties: true;
432
+ readonly required: readonly ["type", "cryptosuite", "verificationMethod", "proofPurpose", "proofValue"];
433
+ readonly description: "A W3C Data Integrity proof by the card's publisher. Additional Data Integrity members (e.g. `created`) are permitted and are covered as the cryptosuite defines.";
434
+ readonly properties: {
435
+ readonly type: {
436
+ readonly type: "string";
437
+ readonly const: "DataIntegrityProof";
438
+ };
439
+ readonly cryptosuite: {
440
+ readonly type: "string";
441
+ readonly minLength: 1;
442
+ readonly maxLength: 64;
443
+ readonly pattern: "^[a-z0-9-]+$";
444
+ readonly description: "e.g. `eddsa-jcs-2022`.";
445
+ };
446
+ readonly verificationMethod: {
447
+ readonly type: "string";
448
+ readonly pattern: "^did:";
449
+ readonly description: "A verification method of `publisher`, authorized for `assertionMethod`.";
450
+ };
451
+ readonly proofPurpose: {
452
+ readonly type: "string";
453
+ readonly const: "assertionMethod";
454
+ };
455
+ readonly proofValue: {
456
+ readonly type: "string";
457
+ readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
458
+ };
459
+ };
460
+ };
461
+ readonly VettingCardClaim: {
462
+ readonly title: "VettingCardClaim";
463
+ readonly type: "object";
464
+ readonly additionalProperties: false;
465
+ readonly required: readonly ["type", "value", "provenance"];
466
+ readonly properties: {
467
+ readonly type: {
468
+ readonly $ref: "#/$defs/ClaimType";
469
+ readonly not: {
470
+ readonly const: "person.portrait";
471
+ };
472
+ readonly description: "The claim type. `person.portrait` is refused: identity vetting works by a vetter looking at the person, not by transmitting their image.";
473
+ };
474
+ readonly value: {
475
+ readonly description: "The claimed value, exactly as rendered from the applicant's persona — a string for most claim types, structured JSON for some (e.g. a postal address). Authored by the applicant and asserted under their signature; the vetter's check is what gives it any assurance.";
476
+ };
477
+ readonly provenance: {
478
+ readonly type: "string";
479
+ readonly minLength: 1;
480
+ readonly maxLength: 64;
481
+ readonly pattern: "^[a-z][a-zA-Z0-9]*$";
482
+ readonly description: "Where the value's assurance comes from. `selfAsserted` — the applicant says so, and the vetter's human check is the only assurance added — is the only value this version defines; a verifier MUST NOT treat any other value as adding assurance it does not understand.";
483
+ };
484
+ };
485
+ };
486
+ readonly ClaimType: {
487
+ readonly title: "ClaimType";
488
+ readonly description: "The vocabulary token naming what a value IS — `name.legal`, `phone.mobile`, `address.postal`, `person.birthDate`. Dotted, most-general segment first, so that a consumer with no knowledge of the specific token can still group by its prefix.\n\nThe token is the maintainer's own; no external vocabulary is primary. External vocabularies (vCard/jCard, OIDC standard claims, schema.org) are mappings applied at PRESENTATION by a renderer, not at rest, so that a query written in any of them can be matched without the store having to live inside any one of them.\n\nThe `x:` prefix is an open extension namespace and is not decoration. The closest prior art — Windows CardSpace's self-issued card — supported exactly fifteen predefined claim types with no extensibility, and that is the specific way it failed the requirement a holder actually has. An `x:` attribute stores, composes, binds and discloses exactly like a known one; it renders generically and matches only an explicit query.";
489
+ readonly type: "string";
490
+ readonly minLength: 1;
491
+ readonly maxLength: 128;
492
+ readonly pattern: "^(x:)?[a-z][a-zA-Z0-9]*(\\.[a-z][a-zA-Z0-9]*)*$";
493
+ };
494
+ readonly DigestMultibase: {
495
+ readonly title: "DigestMultibase";
496
+ 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`.";
497
+ readonly type: "string";
498
+ readonly minLength: 16;
499
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
500
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
501
+ };
502
+ readonly VettingMethod: {
503
+ readonly title: "VettingMethod";
504
+ readonly type: "string";
505
+ readonly enum: readonly ["inPerson", "video", "priorAcquaintance"];
506
+ 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.";
507
+ };
508
+ };
509
+ };
510
+ /**
511
+ * SPEC.md §7.2 policy for the request variant, from this specification's
512
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
513
+ * per-specification and cannot be derived from the document alone, and
514
+ * item 2 needs the schema this carries.
515
+ */
516
+ export declare const SPEC: {
517
+ readonly typeUri: "https://trusttasks.org/spec/vetting/session/0.1";
518
+ readonly isBearer: false;
519
+ readonly isProofRequired: true;
520
+ readonly isRecipientRequired: true;
521
+ readonly isIssuedAtRequired: true;
522
+ readonly payloadSchema: {
523
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
524
+ readonly $id: "https://trusttasks.org/spec/vetting/session/0.1";
525
+ readonly title: "Vetting Session — payload";
526
+ readonly description: "A vetter opens a vetting session with an applicant whose request it accepted, while the two are together in person or on a call. The request issues the session challenge and names the claims to present; the applicant's response is the signed Vetting Card. This document's `id` is the value the resulting Vetting Statement carries as `taskContext`, and its task digest is what binds the statement to it.";
527
+ readonly type: "object";
528
+ readonly additionalProperties: false;
529
+ readonly required: readonly ["requestId", "challenge", "domain", "method", "requiredClaims", "expiresAt"];
530
+ readonly properties: {
531
+ readonly requestId: {
532
+ readonly type: "string";
533
+ readonly minLength: 1;
534
+ readonly maxLength: 128;
535
+ readonly description: "The `requestId` from the vetter's acceptance of the applicant's vetting request.";
536
+ };
537
+ readonly challenge: {
538
+ readonly type: "string";
539
+ readonly pattern: "^[A-Za-z0-9_-]{43}$";
540
+ readonly description: "32 fresh random bytes, base64url without padding. The card binds to it. Never reused across sessions.";
541
+ };
542
+ readonly domain: {
543
+ readonly type: "string";
544
+ readonly pattern: "^did:";
545
+ readonly description: "The community DID the applicant is being vetted for. The card binds to it alongside `challenge`.";
546
+ };
547
+ readonly method: {
548
+ readonly $ref: "#/$defs/VettingMethod";
549
+ readonly description: "How this session is conducted.";
550
+ };
551
+ readonly requiredClaims: {
552
+ readonly type: "array";
553
+ readonly uniqueItems: true;
554
+ readonly items: {
555
+ readonly $ref: "#/$defs/ClaimType";
556
+ readonly not: {
557
+ readonly const: "person.portrait";
558
+ };
559
+ };
560
+ readonly description: "Claim types the card must carry. The community criterion's `requiredClaims`; the identity commitment is computed over exactly these.";
561
+ };
562
+ readonly optionalClaims: {
563
+ readonly type: "array";
564
+ readonly uniqueItems: true;
565
+ readonly items: {
566
+ readonly $ref: "#/$defs/ClaimType";
567
+ readonly not: {
568
+ readonly const: "person.portrait";
569
+ };
570
+ };
571
+ readonly description: "Claim types the applicant may add. Never part of the commitment.";
572
+ };
573
+ readonly expiresAt: {
574
+ readonly type: "string";
575
+ readonly format: "date-time";
576
+ readonly description: "When the session lapses: no card is accepted for it afterwards, and the card's own `expiresAt` may not be later.";
577
+ };
578
+ readonly ext: {
579
+ readonly $ref: "#/$defs/Ext";
580
+ };
581
+ };
582
+ readonly $defs: {
583
+ readonly Response: {
584
+ readonly $anchor: "response";
585
+ readonly title: "Vetting Session — response payload";
586
+ readonly description: "The applicant's signed Vetting Card, bound to this session.";
587
+ readonly type: "object";
588
+ readonly additionalProperties: false;
589
+ readonly required: readonly ["card"];
590
+ readonly properties: {
591
+ readonly card: {
592
+ readonly $ref: "#/$defs/VettingCard";
593
+ };
594
+ readonly ext: {
595
+ readonly $ref: "#/$defs/Ext";
596
+ };
597
+ };
598
+ };
599
+ readonly Ext: {
600
+ readonly title: "Ext";
601
+ 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.";
602
+ readonly type: "object";
603
+ readonly minProperties: 1;
604
+ readonly additionalProperties: true;
605
+ readonly propertyNames: {
606
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
607
+ };
608
+ };
609
+ readonly VettingCard: {
610
+ readonly title: "VettingCard";
611
+ readonly type: "object";
612
+ readonly additionalProperties: false;
613
+ readonly required: readonly ["type", "id", "publisher", "cardVersion", "audience", "community", "challenge", "domain", "issuedAt", "expiresAt", "claims", "identityCommitment", "commitmentSalt", "proof"];
614
+ readonly properties: {
615
+ readonly type: {
616
+ readonly type: "array";
617
+ readonly minItems: 3;
618
+ readonly maxItems: 3;
619
+ readonly uniqueItems: true;
620
+ readonly items: {
621
+ readonly type: "string";
622
+ readonly enum: readonly ["VerifiableDataStructure", "RelationshipCard", "VettingCard"];
623
+ };
624
+ readonly description: "Exactly `VerifiableDataStructure`, `RelationshipCard` and `VettingCard`, in any order.";
625
+ };
626
+ readonly id: {
627
+ readonly type: "string";
628
+ readonly pattern: "^urn:uuid:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$";
629
+ readonly description: "Fresh per card. A card is never re-sent to a second session under the same id.";
630
+ };
631
+ readonly publisher: {
632
+ readonly type: "string";
633
+ readonly pattern: "^did:";
634
+ readonly description: "The applicant's DID — the issuer of the vetting request and the subject every resulting statement names. The card is signed with this DID's assertion key.";
635
+ };
636
+ readonly cardVersion: {
637
+ readonly type: "integer";
638
+ readonly minimum: 1;
639
+ };
640
+ readonly audience: {
641
+ readonly type: "string";
642
+ readonly pattern: "^did:";
643
+ readonly description: "The vetter's DID — the issuer of the vetting session. A card addressed to anyone else is refused.";
644
+ };
645
+ readonly community: {
646
+ readonly type: "string";
647
+ readonly pattern: "^did:";
648
+ readonly description: "The community the applicant is being vetted for.";
649
+ };
650
+ readonly challenge: {
651
+ readonly type: "string";
652
+ readonly pattern: "^[A-Za-z0-9_-]{43}$";
653
+ readonly description: "The session's challenge, copied verbatim.";
654
+ };
655
+ readonly domain: {
656
+ readonly type: "string";
657
+ readonly pattern: "^did:";
658
+ readonly description: "The session's domain, copied verbatim.";
659
+ };
660
+ readonly issuedAt: {
661
+ readonly type: "string";
662
+ readonly format: "date-time";
663
+ };
664
+ readonly expiresAt: {
665
+ readonly type: "string";
666
+ readonly format: "date-time";
667
+ readonly description: "No later than the session's `expiresAt`.";
668
+ };
669
+ readonly claims: {
670
+ readonly type: "array";
671
+ readonly minItems: 1;
672
+ readonly items: {
673
+ readonly $ref: "#/$defs/VettingCardClaim";
674
+ };
675
+ };
676
+ readonly identityCommitment: {
677
+ readonly $ref: "#/$defs/DigestMultibase";
678
+ readonly description: "digestMultibase over the RFC 8785 canonicalization of `{ \"salt\": commitmentSalt, \"claims\": R }`, where R is `{ \"type\", \"value\" }` for every card claim whose type the session lists in `requiredClaims`, ordered by `type` then `value` (code-point order). SHA-256 RECOMMENDED. Because the applicant uses one salt per application, every vetter of that application sees the same value.";
679
+ };
680
+ readonly commitmentSalt: {
681
+ readonly type: "string";
682
+ readonly pattern: "^[A-Za-z0-9_-]{43}$";
683
+ readonly description: "32 random bytes, base64url without padding, generated once per application. Goes to vetters inside the card and to nobody else: a party holding the commitment without the salt cannot test guesses at the claimed name.";
684
+ };
685
+ readonly proof: {
686
+ readonly $ref: "#/$defs/DataIntegrityProof";
687
+ };
688
+ };
689
+ };
690
+ readonly DataIntegrityProof: {
691
+ readonly title: "DataIntegrityProof";
692
+ readonly type: "object";
693
+ readonly additionalProperties: true;
694
+ readonly required: readonly ["type", "cryptosuite", "verificationMethod", "proofPurpose", "proofValue"];
695
+ readonly description: "A W3C Data Integrity proof by the card's publisher. Additional Data Integrity members (e.g. `created`) are permitted and are covered as the cryptosuite defines.";
696
+ readonly properties: {
697
+ readonly type: {
698
+ readonly type: "string";
699
+ readonly const: "DataIntegrityProof";
700
+ };
701
+ readonly cryptosuite: {
702
+ readonly type: "string";
703
+ readonly minLength: 1;
704
+ readonly maxLength: 64;
705
+ readonly pattern: "^[a-z0-9-]+$";
706
+ readonly description: "e.g. `eddsa-jcs-2022`.";
707
+ };
708
+ readonly verificationMethod: {
709
+ readonly type: "string";
710
+ readonly pattern: "^did:";
711
+ readonly description: "A verification method of `publisher`, authorized for `assertionMethod`.";
712
+ };
713
+ readonly proofPurpose: {
714
+ readonly type: "string";
715
+ readonly const: "assertionMethod";
716
+ };
717
+ readonly proofValue: {
718
+ readonly type: "string";
719
+ readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
720
+ };
721
+ };
722
+ };
723
+ readonly VettingCardClaim: {
724
+ readonly title: "VettingCardClaim";
725
+ readonly type: "object";
726
+ readonly additionalProperties: false;
727
+ readonly required: readonly ["type", "value", "provenance"];
728
+ readonly properties: {
729
+ readonly type: {
730
+ readonly $ref: "#/$defs/ClaimType";
731
+ readonly not: {
732
+ readonly const: "person.portrait";
733
+ };
734
+ readonly description: "The claim type. `person.portrait` is refused: identity vetting works by a vetter looking at the person, not by transmitting their image.";
735
+ };
736
+ readonly value: {
737
+ readonly description: "The claimed value, exactly as rendered from the applicant's persona — a string for most claim types, structured JSON for some (e.g. a postal address). Authored by the applicant and asserted under their signature; the vetter's check is what gives it any assurance.";
738
+ };
739
+ readonly provenance: {
740
+ readonly type: "string";
741
+ readonly minLength: 1;
742
+ readonly maxLength: 64;
743
+ readonly pattern: "^[a-z][a-zA-Z0-9]*$";
744
+ readonly description: "Where the value's assurance comes from. `selfAsserted` — the applicant says so, and the vetter's human check is the only assurance added — is the only value this version defines; a verifier MUST NOT treat any other value as adding assurance it does not understand.";
745
+ };
746
+ };
747
+ };
748
+ readonly ClaimType: {
749
+ readonly title: "ClaimType";
750
+ readonly description: "The vocabulary token naming what a value IS — `name.legal`, `phone.mobile`, `address.postal`, `person.birthDate`. Dotted, most-general segment first, so that a consumer with no knowledge of the specific token can still group by its prefix.\n\nThe token is the maintainer's own; no external vocabulary is primary. External vocabularies (vCard/jCard, OIDC standard claims, schema.org) are mappings applied at PRESENTATION by a renderer, not at rest, so that a query written in any of them can be matched without the store having to live inside any one of them.\n\nThe `x:` prefix is an open extension namespace and is not decoration. The closest prior art — Windows CardSpace's self-issued card — supported exactly fifteen predefined claim types with no extensibility, and that is the specific way it failed the requirement a holder actually has. An `x:` attribute stores, composes, binds and discloses exactly like a known one; it renders generically and matches only an explicit query.";
751
+ readonly type: "string";
752
+ readonly minLength: 1;
753
+ readonly maxLength: 128;
754
+ readonly pattern: "^(x:)?[a-z][a-zA-Z0-9]*(\\.[a-z][a-zA-Z0-9]*)*$";
755
+ };
756
+ readonly DigestMultibase: {
757
+ readonly title: "DigestMultibase";
758
+ 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`.";
759
+ readonly type: "string";
760
+ readonly minLength: 16;
761
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
762
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
763
+ };
764
+ readonly VettingMethod: {
765
+ readonly title: "VettingMethod";
766
+ readonly type: "string";
767
+ readonly enum: readonly ["inPerson", "video", "priorAcquaintance"];
768
+ 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.";
769
+ };
770
+ };
771
+ };
772
+ };
773
+ /**
774
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
775
+ * tracks the *issuer* party's requirement because a response swaps the
776
+ * parties (§7.3 item 5).
777
+ */
778
+ export declare const RESPONSE_SPEC: {
779
+ readonly typeUri: "https://trusttasks.org/spec/vetting/session/0.1#response";
780
+ readonly isBearer: false;
781
+ readonly isProofRequired: true;
782
+ readonly isRecipientRequired: true;
783
+ readonly isIssuedAtRequired: true;
784
+ readonly payloadSchema: {
785
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
786
+ readonly $ref: "#/$defs/Response";
787
+ readonly $defs: {
788
+ readonly Response: {
789
+ readonly $anchor: "response";
790
+ readonly title: "Vetting Session — response payload";
791
+ readonly description: "The applicant's signed Vetting Card, bound to this session.";
792
+ readonly type: "object";
793
+ readonly additionalProperties: false;
794
+ readonly required: readonly ["card"];
795
+ readonly properties: {
796
+ readonly card: {
797
+ readonly $ref: "#/$defs/VettingCard";
798
+ };
799
+ readonly ext: {
800
+ readonly $ref: "#/$defs/Ext";
801
+ };
802
+ };
803
+ };
804
+ readonly Ext: {
805
+ readonly title: "Ext";
806
+ 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.";
807
+ readonly type: "object";
808
+ readonly minProperties: 1;
809
+ readonly additionalProperties: true;
810
+ readonly propertyNames: {
811
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
812
+ };
813
+ };
814
+ readonly VettingCard: {
815
+ readonly title: "VettingCard";
816
+ readonly type: "object";
817
+ readonly additionalProperties: false;
818
+ readonly required: readonly ["type", "id", "publisher", "cardVersion", "audience", "community", "challenge", "domain", "issuedAt", "expiresAt", "claims", "identityCommitment", "commitmentSalt", "proof"];
819
+ readonly properties: {
820
+ readonly type: {
821
+ readonly type: "array";
822
+ readonly minItems: 3;
823
+ readonly maxItems: 3;
824
+ readonly uniqueItems: true;
825
+ readonly items: {
826
+ readonly type: "string";
827
+ readonly enum: readonly ["VerifiableDataStructure", "RelationshipCard", "VettingCard"];
828
+ };
829
+ readonly description: "Exactly `VerifiableDataStructure`, `RelationshipCard` and `VettingCard`, in any order.";
830
+ };
831
+ readonly id: {
832
+ readonly type: "string";
833
+ readonly pattern: "^urn:uuid:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$";
834
+ readonly description: "Fresh per card. A card is never re-sent to a second session under the same id.";
835
+ };
836
+ readonly publisher: {
837
+ readonly type: "string";
838
+ readonly pattern: "^did:";
839
+ readonly description: "The applicant's DID — the issuer of the vetting request and the subject every resulting statement names. The card is signed with this DID's assertion key.";
840
+ };
841
+ readonly cardVersion: {
842
+ readonly type: "integer";
843
+ readonly minimum: 1;
844
+ };
845
+ readonly audience: {
846
+ readonly type: "string";
847
+ readonly pattern: "^did:";
848
+ readonly description: "The vetter's DID — the issuer of the vetting session. A card addressed to anyone else is refused.";
849
+ };
850
+ readonly community: {
851
+ readonly type: "string";
852
+ readonly pattern: "^did:";
853
+ readonly description: "The community the applicant is being vetted for.";
854
+ };
855
+ readonly challenge: {
856
+ readonly type: "string";
857
+ readonly pattern: "^[A-Za-z0-9_-]{43}$";
858
+ readonly description: "The session's challenge, copied verbatim.";
859
+ };
860
+ readonly domain: {
861
+ readonly type: "string";
862
+ readonly pattern: "^did:";
863
+ readonly description: "The session's domain, copied verbatim.";
864
+ };
865
+ readonly issuedAt: {
866
+ readonly type: "string";
867
+ readonly format: "date-time";
868
+ };
869
+ readonly expiresAt: {
870
+ readonly type: "string";
871
+ readonly format: "date-time";
872
+ readonly description: "No later than the session's `expiresAt`.";
873
+ };
874
+ readonly claims: {
875
+ readonly type: "array";
876
+ readonly minItems: 1;
877
+ readonly items: {
878
+ readonly $ref: "#/$defs/VettingCardClaim";
879
+ };
880
+ };
881
+ readonly identityCommitment: {
882
+ readonly $ref: "#/$defs/DigestMultibase";
883
+ readonly description: "digestMultibase over the RFC 8785 canonicalization of `{ \"salt\": commitmentSalt, \"claims\": R }`, where R is `{ \"type\", \"value\" }` for every card claim whose type the session lists in `requiredClaims`, ordered by `type` then `value` (code-point order). SHA-256 RECOMMENDED. Because the applicant uses one salt per application, every vetter of that application sees the same value.";
884
+ };
885
+ readonly commitmentSalt: {
886
+ readonly type: "string";
887
+ readonly pattern: "^[A-Za-z0-9_-]{43}$";
888
+ readonly description: "32 random bytes, base64url without padding, generated once per application. Goes to vetters inside the card and to nobody else: a party holding the commitment without the salt cannot test guesses at the claimed name.";
889
+ };
890
+ readonly proof: {
891
+ readonly $ref: "#/$defs/DataIntegrityProof";
892
+ };
893
+ };
894
+ };
895
+ readonly DataIntegrityProof: {
896
+ readonly title: "DataIntegrityProof";
897
+ readonly type: "object";
898
+ readonly additionalProperties: true;
899
+ readonly required: readonly ["type", "cryptosuite", "verificationMethod", "proofPurpose", "proofValue"];
900
+ readonly description: "A W3C Data Integrity proof by the card's publisher. Additional Data Integrity members (e.g. `created`) are permitted and are covered as the cryptosuite defines.";
901
+ readonly properties: {
902
+ readonly type: {
903
+ readonly type: "string";
904
+ readonly const: "DataIntegrityProof";
905
+ };
906
+ readonly cryptosuite: {
907
+ readonly type: "string";
908
+ readonly minLength: 1;
909
+ readonly maxLength: 64;
910
+ readonly pattern: "^[a-z0-9-]+$";
911
+ readonly description: "e.g. `eddsa-jcs-2022`.";
912
+ };
913
+ readonly verificationMethod: {
914
+ readonly type: "string";
915
+ readonly pattern: "^did:";
916
+ readonly description: "A verification method of `publisher`, authorized for `assertionMethod`.";
917
+ };
918
+ readonly proofPurpose: {
919
+ readonly type: "string";
920
+ readonly const: "assertionMethod";
921
+ };
922
+ readonly proofValue: {
923
+ readonly type: "string";
924
+ readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
925
+ };
926
+ };
927
+ };
928
+ readonly VettingCardClaim: {
929
+ readonly title: "VettingCardClaim";
930
+ readonly type: "object";
931
+ readonly additionalProperties: false;
932
+ readonly required: readonly ["type", "value", "provenance"];
933
+ readonly properties: {
934
+ readonly type: {
935
+ readonly $ref: "#/$defs/ClaimType";
936
+ readonly not: {
937
+ readonly const: "person.portrait";
938
+ };
939
+ readonly description: "The claim type. `person.portrait` is refused: identity vetting works by a vetter looking at the person, not by transmitting their image.";
940
+ };
941
+ readonly value: {
942
+ readonly description: "The claimed value, exactly as rendered from the applicant's persona — a string for most claim types, structured JSON for some (e.g. a postal address). Authored by the applicant and asserted under their signature; the vetter's check is what gives it any assurance.";
943
+ };
944
+ readonly provenance: {
945
+ readonly type: "string";
946
+ readonly minLength: 1;
947
+ readonly maxLength: 64;
948
+ readonly pattern: "^[a-z][a-zA-Z0-9]*$";
949
+ readonly description: "Where the value's assurance comes from. `selfAsserted` — the applicant says so, and the vetter's human check is the only assurance added — is the only value this version defines; a verifier MUST NOT treat any other value as adding assurance it does not understand.";
950
+ };
951
+ };
952
+ };
953
+ readonly ClaimType: {
954
+ readonly title: "ClaimType";
955
+ readonly description: "The vocabulary token naming what a value IS — `name.legal`, `phone.mobile`, `address.postal`, `person.birthDate`. Dotted, most-general segment first, so that a consumer with no knowledge of the specific token can still group by its prefix.\n\nThe token is the maintainer's own; no external vocabulary is primary. External vocabularies (vCard/jCard, OIDC standard claims, schema.org) are mappings applied at PRESENTATION by a renderer, not at rest, so that a query written in any of them can be matched without the store having to live inside any one of them.\n\nThe `x:` prefix is an open extension namespace and is not decoration. The closest prior art — Windows CardSpace's self-issued card — supported exactly fifteen predefined claim types with no extensibility, and that is the specific way it failed the requirement a holder actually has. An `x:` attribute stores, composes, binds and discloses exactly like a known one; it renders generically and matches only an explicit query.";
956
+ readonly type: "string";
957
+ readonly minLength: 1;
958
+ readonly maxLength: 128;
959
+ readonly pattern: "^(x:)?[a-z][a-zA-Z0-9]*(\\.[a-z][a-zA-Z0-9]*)*$";
960
+ };
961
+ readonly DigestMultibase: {
962
+ readonly title: "DigestMultibase";
963
+ 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`.";
964
+ readonly type: "string";
965
+ readonly minLength: 16;
966
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
967
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
968
+ };
969
+ readonly VettingMethod: {
970
+ readonly title: "VettingMethod";
971
+ readonly type: "string";
972
+ readonly enum: readonly ["inPerson", "video", "priorAcquaintance"];
973
+ 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.";
974
+ };
975
+ };
976
+ };
977
+ };
978
+ //# sourceMappingURL=payload.d.ts.map