@openvtc/trust-tasks 0.19.2 → 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.
- package/CHANGELOG.md +215 -0
- package/dist/_shared/components.d.ts +298 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/dist/keys/export-secret/0.1/payload.d.ts +309 -0
- package/dist/keys/export-secret/0.1/payload.d.ts.map +1 -0
- package/dist/keys/export-secret/0.1/payload.js +181 -0
- package/dist/keys/export-secret/0.1/payload.js.map +1 -0
- package/dist/vetting/_shared/0.1/identity-vetting.d.ts +11 -0
- package/dist/vetting/_shared/0.1/identity-vetting.d.ts.map +1 -0
- package/dist/vetting/_shared/0.1/identity-vetting.js +6 -0
- package/dist/vetting/_shared/0.1/identity-vetting.js.map +1 -0
- package/dist/vetting/_shared/0.1/vetting-card.d.ts +16 -0
- package/dist/vetting/_shared/0.1/vetting-card.d.ts.map +1 -0
- package/dist/vetting/_shared/0.1/vetting-card.js +6 -0
- package/dist/vetting/_shared/0.1/vetting-card.js.map +1 -0
- package/dist/vetting/_shared/0.1/vetting.d.ts +16 -0
- package/dist/vetting/_shared/0.1/vetting.d.ts.map +1 -0
- package/dist/vetting/_shared/0.1/vetting.js +6 -0
- package/dist/vetting/_shared/0.1/vetting.js.map +1 -0
- package/dist/vetting/decline/0.1/payload.d.ts +138 -0
- package/dist/vetting/decline/0.1/payload.d.ts.map +1 -0
- package/dist/vetting/decline/0.1/payload.js +81 -0
- package/dist/vetting/decline/0.1/payload.js.map +1 -0
- package/dist/vetting/request/0.1/payload.d.ts +1188 -0
- package/dist/vetting/request/0.1/payload.d.ts.map +1 -0
- package/dist/vetting/request/0.1/payload.js +596 -0
- package/dist/vetting/request/0.1/payload.js.map +1 -0
- package/dist/vetting/session/0.1/payload.d.ts +978 -0
- package/dist/vetting/session/0.1/payload.d.ts.map +1 -0
- package/dist/vetting/session/0.1/payload.js +570 -0
- package/dist/vetting/session/0.1/payload.js.map +1 -0
- package/dist/vtc/_shared/0.1/vetter-profile.d.ts +16 -0
- package/dist/vtc/_shared/0.1/vetter-profile.d.ts.map +1 -0
- package/dist/vtc/_shared/0.1/vetter-profile.js +6 -0
- package/dist/vtc/_shared/0.1/vetter-profile.js.map +1 -0
- package/dist/vtc/join-requests/manifest/0.2/payload.d.ts +1294 -0
- package/dist/vtc/join-requests/manifest/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/join-requests/manifest/0.2/payload.js +667 -0
- package/dist/vtc/join-requests/manifest/0.2/payload.js.map +1 -0
- package/dist/vtc/vetting/revoke-statement/0.1/payload.d.ts +299 -0
- package/dist/vtc/vetting/revoke-statement/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/vetting/revoke-statement/0.1/payload.js +172 -0
- package/dist/vtc/vetting/revoke-statement/0.1/payload.js.map +1 -0
- package/dist/vtc/vetting/vetters/grant/0.1/payload.d.ts +337 -0
- package/dist/vtc/vetting/vetters/grant/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/vetting/vetters/grant/0.1/payload.js +183 -0
- package/dist/vtc/vetting/vetters/grant/0.1/payload.js.map +1 -0
- package/dist/vtc/vetting/vetters/list/0.1/payload.d.ts +1257 -0
- package/dist/vtc/vetting/vetters/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/vetting/vetters/list/0.1/payload.js +597 -0
- package/dist/vtc/vetting/vetters/list/0.1/payload.js.map +1 -0
- package/dist/vtc/vetting/vetters/profile/0.1/payload.d.ts +970 -0
- package/dist/vtc/vetting/vetters/profile/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/vetting/vetters/profile/0.1/payload.js +463 -0
- package/dist/vtc/vetting/vetters/profile/0.1/payload.js.map +1 -0
- package/dist/vtc/vetting/vetters/resend/0.1/payload.d.ts +240 -0
- package/dist/vtc/vetting/vetters/resend/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/vetting/vetters/resend/0.1/payload.js +137 -0
- package/dist/vtc/vetting/vetters/resend/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +318 -0
- package/src/index.ts +14 -0
- package/src/keys/export-secret/0.1/payload.ts +227 -0
- package/src/vetting/_shared/0.1/identity-vetting.ts +11 -0
- package/src/vetting/_shared/0.1/vetting-card.ts +17 -0
- package/src/vetting/_shared/0.1/vetting.ts +17 -0
- package/src/vetting/decline/0.1/payload.ts +111 -0
- package/src/vetting/request/0.1/payload.ts +799 -0
- package/src/vetting/session/0.1/payload.ts +629 -0
- package/src/vtc/_shared/0.1/vetter-profile.ts +17 -0
- package/src/vtc/join-requests/manifest/0.2/payload.ts +815 -0
- package/src/vtc/vetting/revoke-statement/0.1/payload.ts +218 -0
- package/src/vtc/vetting/vetters/grant/0.1/payload.ts +237 -0
- package/src/vtc/vetting/vetters/list/0.1/payload.ts +816 -0
- package/src/vtc/vetting/vetters/profile/0.1/payload.ts +647 -0
- package/src/vtc/vetting/vetters/resend/0.1/payload.ts +174 -0
|
@@ -0,0 +1,629 @@
|
|
|
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
|
+
|
|
6
|
+
import type { ClaimType, DataIntegrityProof, DigestMultibase, Ext, VettingCard, VettingCardClaim, VettingMethod } from "../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* 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.
|
|
11
|
+
*/
|
|
12
|
+
export interface VettingSessionPayload {
|
|
13
|
+
/**
|
|
14
|
+
* The `requestId` from the vetter's acceptance of the applicant's vetting request.
|
|
15
|
+
*/
|
|
16
|
+
requestId: string;
|
|
17
|
+
/**
|
|
18
|
+
* 32 fresh random bytes, base64url without padding. The card binds to it. Never reused across sessions.
|
|
19
|
+
*/
|
|
20
|
+
challenge: string;
|
|
21
|
+
/**
|
|
22
|
+
* The community DID the applicant is being vetted for. The card binds to it alongside `challenge`.
|
|
23
|
+
*/
|
|
24
|
+
domain: string;
|
|
25
|
+
/**
|
|
26
|
+
* How this session is conducted.
|
|
27
|
+
*/
|
|
28
|
+
method: VettingMethod;
|
|
29
|
+
/**
|
|
30
|
+
* Claim types the card must carry. The community criterion's `requiredClaims`; the identity commitment is computed over exactly these.
|
|
31
|
+
*/
|
|
32
|
+
requiredClaims: ClaimType[];
|
|
33
|
+
/**
|
|
34
|
+
* Claim types the applicant may add. Never part of the commitment.
|
|
35
|
+
*/
|
|
36
|
+
optionalClaims?: ClaimType[];
|
|
37
|
+
/**
|
|
38
|
+
* When the session lapses: no card is accepted for it afterwards, and the card's own `expiresAt` may not be later.
|
|
39
|
+
*/
|
|
40
|
+
expiresAt: string;
|
|
41
|
+
ext?: Ext;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The applicant's signed Vetting Card, bound to this session.
|
|
45
|
+
*/
|
|
46
|
+
export interface VettingSessionResponsePayload {
|
|
47
|
+
card: VettingCard;
|
|
48
|
+
ext?: Ext;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
52
|
+
export type { ClaimType, DataIntegrityProof, DigestMultibase, Ext, VettingCard, VettingCardClaim, VettingMethod };
|
|
53
|
+
|
|
54
|
+
/** Trust Task type URI. */
|
|
55
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vetting/session/0.1" as const;
|
|
56
|
+
|
|
57
|
+
/** Stable alias for this specification's request payload shape. */
|
|
58
|
+
export type Payload = VettingSessionPayload;
|
|
59
|
+
|
|
60
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
61
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vetting/session/0.1#response" as const;
|
|
62
|
+
|
|
63
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
64
|
+
export type Response = VettingSessionResponsePayload;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* This specification's payload schema, as a value.
|
|
68
|
+
*
|
|
69
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
70
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
71
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
72
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
73
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
74
|
+
*/
|
|
75
|
+
export const PAYLOAD_SCHEMA = {
|
|
76
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
77
|
+
"$id": "https://trusttasks.org/spec/vetting/session/0.1",
|
|
78
|
+
"title": "Vetting Session — payload",
|
|
79
|
+
"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.",
|
|
80
|
+
"type": "object",
|
|
81
|
+
"additionalProperties": false,
|
|
82
|
+
"required": [
|
|
83
|
+
"requestId",
|
|
84
|
+
"challenge",
|
|
85
|
+
"domain",
|
|
86
|
+
"method",
|
|
87
|
+
"requiredClaims",
|
|
88
|
+
"expiresAt"
|
|
89
|
+
],
|
|
90
|
+
"properties": {
|
|
91
|
+
"requestId": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"minLength": 1,
|
|
94
|
+
"maxLength": 128,
|
|
95
|
+
"description": "The `requestId` from the vetter's acceptance of the applicant's vetting request."
|
|
96
|
+
},
|
|
97
|
+
"challenge": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"pattern": "^[A-Za-z0-9_-]{43}$",
|
|
100
|
+
"description": "32 fresh random bytes, base64url without padding. The card binds to it. Never reused across sessions."
|
|
101
|
+
},
|
|
102
|
+
"domain": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"pattern": "^did:",
|
|
105
|
+
"description": "The community DID the applicant is being vetted for. The card binds to it alongside `challenge`."
|
|
106
|
+
},
|
|
107
|
+
"method": {
|
|
108
|
+
"$ref": "#/$defs/VettingMethod",
|
|
109
|
+
"description": "How this session is conducted."
|
|
110
|
+
},
|
|
111
|
+
"requiredClaims": {
|
|
112
|
+
"type": "array",
|
|
113
|
+
"uniqueItems": true,
|
|
114
|
+
"items": {
|
|
115
|
+
"$ref": "#/$defs/ClaimType",
|
|
116
|
+
"not": {
|
|
117
|
+
"const": "person.portrait"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"description": "Claim types the card must carry. The community criterion's `requiredClaims`; the identity commitment is computed over exactly these."
|
|
121
|
+
},
|
|
122
|
+
"optionalClaims": {
|
|
123
|
+
"type": "array",
|
|
124
|
+
"uniqueItems": true,
|
|
125
|
+
"items": {
|
|
126
|
+
"$ref": "#/$defs/ClaimType",
|
|
127
|
+
"not": {
|
|
128
|
+
"const": "person.portrait"
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"description": "Claim types the applicant may add. Never part of the commitment."
|
|
132
|
+
},
|
|
133
|
+
"expiresAt": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"format": "date-time",
|
|
136
|
+
"description": "When the session lapses: no card is accepted for it afterwards, and the card's own `expiresAt` may not be later."
|
|
137
|
+
},
|
|
138
|
+
"ext": {
|
|
139
|
+
"$ref": "#/$defs/Ext"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"$defs": {
|
|
143
|
+
"Response": {
|
|
144
|
+
"$anchor": "response",
|
|
145
|
+
"title": "Vetting Session — response payload",
|
|
146
|
+
"description": "The applicant's signed Vetting Card, bound to this session.",
|
|
147
|
+
"type": "object",
|
|
148
|
+
"additionalProperties": false,
|
|
149
|
+
"required": [
|
|
150
|
+
"card"
|
|
151
|
+
],
|
|
152
|
+
"properties": {
|
|
153
|
+
"card": {
|
|
154
|
+
"$ref": "#/$defs/VettingCard"
|
|
155
|
+
},
|
|
156
|
+
"ext": {
|
|
157
|
+
"$ref": "#/$defs/Ext"
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
"Ext": {
|
|
162
|
+
"title": "Ext",
|
|
163
|
+
"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.",
|
|
164
|
+
"type": "object",
|
|
165
|
+
"minProperties": 1,
|
|
166
|
+
"additionalProperties": true,
|
|
167
|
+
"propertyNames": {
|
|
168
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"VettingCard": {
|
|
172
|
+
"title": "VettingCard",
|
|
173
|
+
"type": "object",
|
|
174
|
+
"additionalProperties": false,
|
|
175
|
+
"required": [
|
|
176
|
+
"type",
|
|
177
|
+
"id",
|
|
178
|
+
"publisher",
|
|
179
|
+
"cardVersion",
|
|
180
|
+
"audience",
|
|
181
|
+
"community",
|
|
182
|
+
"challenge",
|
|
183
|
+
"domain",
|
|
184
|
+
"issuedAt",
|
|
185
|
+
"expiresAt",
|
|
186
|
+
"claims",
|
|
187
|
+
"identityCommitment",
|
|
188
|
+
"commitmentSalt",
|
|
189
|
+
"proof"
|
|
190
|
+
],
|
|
191
|
+
"properties": {
|
|
192
|
+
"type": {
|
|
193
|
+
"type": "array",
|
|
194
|
+
"minItems": 3,
|
|
195
|
+
"maxItems": 3,
|
|
196
|
+
"uniqueItems": true,
|
|
197
|
+
"items": {
|
|
198
|
+
"type": "string",
|
|
199
|
+
"enum": [
|
|
200
|
+
"VerifiableDataStructure",
|
|
201
|
+
"RelationshipCard",
|
|
202
|
+
"VettingCard"
|
|
203
|
+
]
|
|
204
|
+
},
|
|
205
|
+
"description": "Exactly `VerifiableDataStructure`, `RelationshipCard` and `VettingCard`, in any order."
|
|
206
|
+
},
|
|
207
|
+
"id": {
|
|
208
|
+
"type": "string",
|
|
209
|
+
"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}$",
|
|
210
|
+
"description": "Fresh per card. A card is never re-sent to a second session under the same id."
|
|
211
|
+
},
|
|
212
|
+
"publisher": {
|
|
213
|
+
"type": "string",
|
|
214
|
+
"pattern": "^did:",
|
|
215
|
+
"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."
|
|
216
|
+
},
|
|
217
|
+
"cardVersion": {
|
|
218
|
+
"type": "integer",
|
|
219
|
+
"minimum": 1
|
|
220
|
+
},
|
|
221
|
+
"audience": {
|
|
222
|
+
"type": "string",
|
|
223
|
+
"pattern": "^did:",
|
|
224
|
+
"description": "The vetter's DID — the issuer of the vetting session. A card addressed to anyone else is refused."
|
|
225
|
+
},
|
|
226
|
+
"community": {
|
|
227
|
+
"type": "string",
|
|
228
|
+
"pattern": "^did:",
|
|
229
|
+
"description": "The community the applicant is being vetted for."
|
|
230
|
+
},
|
|
231
|
+
"challenge": {
|
|
232
|
+
"type": "string",
|
|
233
|
+
"pattern": "^[A-Za-z0-9_-]{43}$",
|
|
234
|
+
"description": "The session's challenge, copied verbatim."
|
|
235
|
+
},
|
|
236
|
+
"domain": {
|
|
237
|
+
"type": "string",
|
|
238
|
+
"pattern": "^did:",
|
|
239
|
+
"description": "The session's domain, copied verbatim."
|
|
240
|
+
},
|
|
241
|
+
"issuedAt": {
|
|
242
|
+
"type": "string",
|
|
243
|
+
"format": "date-time"
|
|
244
|
+
},
|
|
245
|
+
"expiresAt": {
|
|
246
|
+
"type": "string",
|
|
247
|
+
"format": "date-time",
|
|
248
|
+
"description": "No later than the session's `expiresAt`."
|
|
249
|
+
},
|
|
250
|
+
"claims": {
|
|
251
|
+
"type": "array",
|
|
252
|
+
"minItems": 1,
|
|
253
|
+
"items": {
|
|
254
|
+
"$ref": "#/$defs/VettingCardClaim"
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
"identityCommitment": {
|
|
258
|
+
"$ref": "#/$defs/DigestMultibase",
|
|
259
|
+
"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."
|
|
260
|
+
},
|
|
261
|
+
"commitmentSalt": {
|
|
262
|
+
"type": "string",
|
|
263
|
+
"pattern": "^[A-Za-z0-9_-]{43}$",
|
|
264
|
+
"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."
|
|
265
|
+
},
|
|
266
|
+
"proof": {
|
|
267
|
+
"$ref": "#/$defs/DataIntegrityProof"
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
"DataIntegrityProof": {
|
|
272
|
+
"title": "DataIntegrityProof",
|
|
273
|
+
"type": "object",
|
|
274
|
+
"additionalProperties": true,
|
|
275
|
+
"required": [
|
|
276
|
+
"type",
|
|
277
|
+
"cryptosuite",
|
|
278
|
+
"verificationMethod",
|
|
279
|
+
"proofPurpose",
|
|
280
|
+
"proofValue"
|
|
281
|
+
],
|
|
282
|
+
"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.",
|
|
283
|
+
"properties": {
|
|
284
|
+
"type": {
|
|
285
|
+
"type": "string",
|
|
286
|
+
"const": "DataIntegrityProof"
|
|
287
|
+
},
|
|
288
|
+
"cryptosuite": {
|
|
289
|
+
"type": "string",
|
|
290
|
+
"minLength": 1,
|
|
291
|
+
"maxLength": 64,
|
|
292
|
+
"pattern": "^[a-z0-9-]+$",
|
|
293
|
+
"description": "e.g. `eddsa-jcs-2022`."
|
|
294
|
+
},
|
|
295
|
+
"verificationMethod": {
|
|
296
|
+
"type": "string",
|
|
297
|
+
"pattern": "^did:",
|
|
298
|
+
"description": "A verification method of `publisher`, authorized for `assertionMethod`."
|
|
299
|
+
},
|
|
300
|
+
"proofPurpose": {
|
|
301
|
+
"type": "string",
|
|
302
|
+
"const": "assertionMethod"
|
|
303
|
+
},
|
|
304
|
+
"proofValue": {
|
|
305
|
+
"type": "string",
|
|
306
|
+
"pattern": "^z[1-9A-HJ-NP-Za-km-z]+$"
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"VettingCardClaim": {
|
|
311
|
+
"title": "VettingCardClaim",
|
|
312
|
+
"type": "object",
|
|
313
|
+
"additionalProperties": false,
|
|
314
|
+
"required": [
|
|
315
|
+
"type",
|
|
316
|
+
"value",
|
|
317
|
+
"provenance"
|
|
318
|
+
],
|
|
319
|
+
"properties": {
|
|
320
|
+
"type": {
|
|
321
|
+
"$ref": "#/$defs/ClaimType",
|
|
322
|
+
"not": {
|
|
323
|
+
"const": "person.portrait"
|
|
324
|
+
},
|
|
325
|
+
"description": "The claim type. `person.portrait` is refused: identity vetting works by a vetter looking at the person, not by transmitting their image."
|
|
326
|
+
},
|
|
327
|
+
"value": {
|
|
328
|
+
"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."
|
|
329
|
+
},
|
|
330
|
+
"provenance": {
|
|
331
|
+
"type": "string",
|
|
332
|
+
"minLength": 1,
|
|
333
|
+
"maxLength": 64,
|
|
334
|
+
"pattern": "^[a-z][a-zA-Z0-9]*$",
|
|
335
|
+
"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."
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
},
|
|
339
|
+
"ClaimType": {
|
|
340
|
+
"title": "ClaimType",
|
|
341
|
+
"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.",
|
|
342
|
+
"type": "string",
|
|
343
|
+
"minLength": 1,
|
|
344
|
+
"maxLength": 128,
|
|
345
|
+
"pattern": "^(x:)?[a-z][a-zA-Z0-9]*(\\.[a-z][a-zA-Z0-9]*)*$"
|
|
346
|
+
},
|
|
347
|
+
"DigestMultibase": {
|
|
348
|
+
"title": "DigestMultibase",
|
|
349
|
+
"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`.",
|
|
350
|
+
"type": "string",
|
|
351
|
+
"minLength": 16,
|
|
352
|
+
"pattern": "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$",
|
|
353
|
+
"examples": [
|
|
354
|
+
"zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"
|
|
355
|
+
]
|
|
356
|
+
},
|
|
357
|
+
"VettingMethod": {
|
|
358
|
+
"title": "VettingMethod",
|
|
359
|
+
"type": "string",
|
|
360
|
+
"enum": [
|
|
361
|
+
"inPerson",
|
|
362
|
+
"video",
|
|
363
|
+
"priorAcquaintance"
|
|
364
|
+
],
|
|
365
|
+
"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."
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
} as const;
|
|
369
|
+
|
|
370
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
371
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
372
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
373
|
+
"$ref": "#/$defs/Response",
|
|
374
|
+
"$defs": {
|
|
375
|
+
"Response": {
|
|
376
|
+
"$anchor": "response",
|
|
377
|
+
"title": "Vetting Session — response payload",
|
|
378
|
+
"description": "The applicant's signed Vetting Card, bound to this session.",
|
|
379
|
+
"type": "object",
|
|
380
|
+
"additionalProperties": false,
|
|
381
|
+
"required": [
|
|
382
|
+
"card"
|
|
383
|
+
],
|
|
384
|
+
"properties": {
|
|
385
|
+
"card": {
|
|
386
|
+
"$ref": "#/$defs/VettingCard"
|
|
387
|
+
},
|
|
388
|
+
"ext": {
|
|
389
|
+
"$ref": "#/$defs/Ext"
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
},
|
|
393
|
+
"Ext": {
|
|
394
|
+
"title": "Ext",
|
|
395
|
+
"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.",
|
|
396
|
+
"type": "object",
|
|
397
|
+
"minProperties": 1,
|
|
398
|
+
"additionalProperties": true,
|
|
399
|
+
"propertyNames": {
|
|
400
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
401
|
+
}
|
|
402
|
+
},
|
|
403
|
+
"VettingCard": {
|
|
404
|
+
"title": "VettingCard",
|
|
405
|
+
"type": "object",
|
|
406
|
+
"additionalProperties": false,
|
|
407
|
+
"required": [
|
|
408
|
+
"type",
|
|
409
|
+
"id",
|
|
410
|
+
"publisher",
|
|
411
|
+
"cardVersion",
|
|
412
|
+
"audience",
|
|
413
|
+
"community",
|
|
414
|
+
"challenge",
|
|
415
|
+
"domain",
|
|
416
|
+
"issuedAt",
|
|
417
|
+
"expiresAt",
|
|
418
|
+
"claims",
|
|
419
|
+
"identityCommitment",
|
|
420
|
+
"commitmentSalt",
|
|
421
|
+
"proof"
|
|
422
|
+
],
|
|
423
|
+
"properties": {
|
|
424
|
+
"type": {
|
|
425
|
+
"type": "array",
|
|
426
|
+
"minItems": 3,
|
|
427
|
+
"maxItems": 3,
|
|
428
|
+
"uniqueItems": true,
|
|
429
|
+
"items": {
|
|
430
|
+
"type": "string",
|
|
431
|
+
"enum": [
|
|
432
|
+
"VerifiableDataStructure",
|
|
433
|
+
"RelationshipCard",
|
|
434
|
+
"VettingCard"
|
|
435
|
+
]
|
|
436
|
+
},
|
|
437
|
+
"description": "Exactly `VerifiableDataStructure`, `RelationshipCard` and `VettingCard`, in any order."
|
|
438
|
+
},
|
|
439
|
+
"id": {
|
|
440
|
+
"type": "string",
|
|
441
|
+
"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}$",
|
|
442
|
+
"description": "Fresh per card. A card is never re-sent to a second session under the same id."
|
|
443
|
+
},
|
|
444
|
+
"publisher": {
|
|
445
|
+
"type": "string",
|
|
446
|
+
"pattern": "^did:",
|
|
447
|
+
"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."
|
|
448
|
+
},
|
|
449
|
+
"cardVersion": {
|
|
450
|
+
"type": "integer",
|
|
451
|
+
"minimum": 1
|
|
452
|
+
},
|
|
453
|
+
"audience": {
|
|
454
|
+
"type": "string",
|
|
455
|
+
"pattern": "^did:",
|
|
456
|
+
"description": "The vetter's DID — the issuer of the vetting session. A card addressed to anyone else is refused."
|
|
457
|
+
},
|
|
458
|
+
"community": {
|
|
459
|
+
"type": "string",
|
|
460
|
+
"pattern": "^did:",
|
|
461
|
+
"description": "The community the applicant is being vetted for."
|
|
462
|
+
},
|
|
463
|
+
"challenge": {
|
|
464
|
+
"type": "string",
|
|
465
|
+
"pattern": "^[A-Za-z0-9_-]{43}$",
|
|
466
|
+
"description": "The session's challenge, copied verbatim."
|
|
467
|
+
},
|
|
468
|
+
"domain": {
|
|
469
|
+
"type": "string",
|
|
470
|
+
"pattern": "^did:",
|
|
471
|
+
"description": "The session's domain, copied verbatim."
|
|
472
|
+
},
|
|
473
|
+
"issuedAt": {
|
|
474
|
+
"type": "string",
|
|
475
|
+
"format": "date-time"
|
|
476
|
+
},
|
|
477
|
+
"expiresAt": {
|
|
478
|
+
"type": "string",
|
|
479
|
+
"format": "date-time",
|
|
480
|
+
"description": "No later than the session's `expiresAt`."
|
|
481
|
+
},
|
|
482
|
+
"claims": {
|
|
483
|
+
"type": "array",
|
|
484
|
+
"minItems": 1,
|
|
485
|
+
"items": {
|
|
486
|
+
"$ref": "#/$defs/VettingCardClaim"
|
|
487
|
+
}
|
|
488
|
+
},
|
|
489
|
+
"identityCommitment": {
|
|
490
|
+
"$ref": "#/$defs/DigestMultibase",
|
|
491
|
+
"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."
|
|
492
|
+
},
|
|
493
|
+
"commitmentSalt": {
|
|
494
|
+
"type": "string",
|
|
495
|
+
"pattern": "^[A-Za-z0-9_-]{43}$",
|
|
496
|
+
"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."
|
|
497
|
+
},
|
|
498
|
+
"proof": {
|
|
499
|
+
"$ref": "#/$defs/DataIntegrityProof"
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
},
|
|
503
|
+
"DataIntegrityProof": {
|
|
504
|
+
"title": "DataIntegrityProof",
|
|
505
|
+
"type": "object",
|
|
506
|
+
"additionalProperties": true,
|
|
507
|
+
"required": [
|
|
508
|
+
"type",
|
|
509
|
+
"cryptosuite",
|
|
510
|
+
"verificationMethod",
|
|
511
|
+
"proofPurpose",
|
|
512
|
+
"proofValue"
|
|
513
|
+
],
|
|
514
|
+
"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.",
|
|
515
|
+
"properties": {
|
|
516
|
+
"type": {
|
|
517
|
+
"type": "string",
|
|
518
|
+
"const": "DataIntegrityProof"
|
|
519
|
+
},
|
|
520
|
+
"cryptosuite": {
|
|
521
|
+
"type": "string",
|
|
522
|
+
"minLength": 1,
|
|
523
|
+
"maxLength": 64,
|
|
524
|
+
"pattern": "^[a-z0-9-]+$",
|
|
525
|
+
"description": "e.g. `eddsa-jcs-2022`."
|
|
526
|
+
},
|
|
527
|
+
"verificationMethod": {
|
|
528
|
+
"type": "string",
|
|
529
|
+
"pattern": "^did:",
|
|
530
|
+
"description": "A verification method of `publisher`, authorized for `assertionMethod`."
|
|
531
|
+
},
|
|
532
|
+
"proofPurpose": {
|
|
533
|
+
"type": "string",
|
|
534
|
+
"const": "assertionMethod"
|
|
535
|
+
},
|
|
536
|
+
"proofValue": {
|
|
537
|
+
"type": "string",
|
|
538
|
+
"pattern": "^z[1-9A-HJ-NP-Za-km-z]+$"
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
},
|
|
542
|
+
"VettingCardClaim": {
|
|
543
|
+
"title": "VettingCardClaim",
|
|
544
|
+
"type": "object",
|
|
545
|
+
"additionalProperties": false,
|
|
546
|
+
"required": [
|
|
547
|
+
"type",
|
|
548
|
+
"value",
|
|
549
|
+
"provenance"
|
|
550
|
+
],
|
|
551
|
+
"properties": {
|
|
552
|
+
"type": {
|
|
553
|
+
"$ref": "#/$defs/ClaimType",
|
|
554
|
+
"not": {
|
|
555
|
+
"const": "person.portrait"
|
|
556
|
+
},
|
|
557
|
+
"description": "The claim type. `person.portrait` is refused: identity vetting works by a vetter looking at the person, not by transmitting their image."
|
|
558
|
+
},
|
|
559
|
+
"value": {
|
|
560
|
+
"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."
|
|
561
|
+
},
|
|
562
|
+
"provenance": {
|
|
563
|
+
"type": "string",
|
|
564
|
+
"minLength": 1,
|
|
565
|
+
"maxLength": 64,
|
|
566
|
+
"pattern": "^[a-z][a-zA-Z0-9]*$",
|
|
567
|
+
"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."
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
},
|
|
571
|
+
"ClaimType": {
|
|
572
|
+
"title": "ClaimType",
|
|
573
|
+
"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.",
|
|
574
|
+
"type": "string",
|
|
575
|
+
"minLength": 1,
|
|
576
|
+
"maxLength": 128,
|
|
577
|
+
"pattern": "^(x:)?[a-z][a-zA-Z0-9]*(\\.[a-z][a-zA-Z0-9]*)*$"
|
|
578
|
+
},
|
|
579
|
+
"DigestMultibase": {
|
|
580
|
+
"title": "DigestMultibase",
|
|
581
|
+
"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`.",
|
|
582
|
+
"type": "string",
|
|
583
|
+
"minLength": 16,
|
|
584
|
+
"pattern": "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$",
|
|
585
|
+
"examples": [
|
|
586
|
+
"zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"
|
|
587
|
+
]
|
|
588
|
+
},
|
|
589
|
+
"VettingMethod": {
|
|
590
|
+
"title": "VettingMethod",
|
|
591
|
+
"type": "string",
|
|
592
|
+
"enum": [
|
|
593
|
+
"inPerson",
|
|
594
|
+
"video",
|
|
595
|
+
"priorAcquaintance"
|
|
596
|
+
],
|
|
597
|
+
"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."
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
} as const;
|
|
601
|
+
|
|
602
|
+
/**
|
|
603
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
604
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
605
|
+
* per-specification and cannot be derived from the document alone, and
|
|
606
|
+
* item 2 needs the schema this carries.
|
|
607
|
+
*/
|
|
608
|
+
export const SPEC = {
|
|
609
|
+
typeUri: TYPE_URI,
|
|
610
|
+
isBearer: false,
|
|
611
|
+
isProofRequired: true,
|
|
612
|
+
isRecipientRequired: true,
|
|
613
|
+
isIssuedAtRequired: true,
|
|
614
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
615
|
+
} as const;
|
|
616
|
+
|
|
617
|
+
/**
|
|
618
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
619
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
620
|
+
* parties (§7.3 item 5).
|
|
621
|
+
*/
|
|
622
|
+
export const RESPONSE_SPEC = {
|
|
623
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
624
|
+
isBearer: false,
|
|
625
|
+
isProofRequired: true,
|
|
626
|
+
isRecipientRequired: true,
|
|
627
|
+
isIssuedAtRequired: true,
|
|
628
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
629
|
+
} as const;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/_shared/0.1/vetter-profile.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Shared types for the vtc/vetting/vetters/* family: the pieces of a vetter's self-published profile that vtc/vetting/vetters/profile writes and vtc/vetting/vetters/list returns. Defined once so a profile and a listing entry are compared value for value. Not itself a Trust Task specification (the `_shared` folder is skipped by the registry build and the codegen).
|
|
8
|
+
*/
|
|
9
|
+
export interface VTCSharedVetterProfileDefinitions {
|
|
10
|
+
[k: string]: unknown | undefined;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The definitions this shared schema publishes, hoisted to one declaration each.
|
|
15
|
+
* See "../../../_shared/components.js".
|
|
16
|
+
*/
|
|
17
|
+
export type { CalendarDate, CountryCode, LanguageTag, PlaceName, VetterAcceptsDocumentation, VetterAvailability, VetterContactHint, VetterDisplayName, VetterEvent, VetterLocation, VetterMethods } from "../../../_shared/components.js";
|