@openvtc/trust-tasks 0.25.2 → 0.26.1
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 +56 -0
- package/dist/_shared/components.d.ts +10 -1
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/vtc/_shared/0.1/room-storage.d.ts +1 -1
- package/dist/vtc/_shared/0.1/room-storage.d.ts.map +1 -1
- package/dist/vtc/oid4vp/identities/list/0.1/payload.d.ts +938 -0
- package/dist/vtc/oid4vp/identities/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/oid4vp/identities/list/0.1/payload.js +559 -0
- package/dist/vtc/oid4vp/identities/list/0.1/payload.js.map +1 -0
- package/dist/vtc/storage/configs/create/0.1/payload.d.ts +50 -10
- package/dist/vtc/storage/configs/create/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/storage/configs/create/0.1/payload.js +24 -2
- package/dist/vtc/storage/configs/create/0.1/payload.js.map +1 -1
- package/dist/vtc/storage/configs/get/0.1/payload.d.ts +66 -10
- package/dist/vtc/storage/configs/get/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/storage/configs/get/0.1/payload.js +32 -2
- package/dist/vtc/storage/configs/get/0.1/payload.js.map +1 -1
- package/dist/vtc/storage/configs/list/0.1/payload.d.ts +66 -10
- package/dist/vtc/storage/configs/list/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/storage/configs/list/0.1/payload.js +32 -2
- package/dist/vtc/storage/configs/list/0.1/payload.js.map +1 -1
- package/dist/vtc/storage/configs/update/0.1/payload.d.ts +50 -10
- package/dist/vtc/storage/configs/update/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/storage/configs/update/0.1/payload.js +24 -2
- package/dist/vtc/storage/configs/update/0.1/payload.js.map +1 -1
- package/dist/vtc/storage/credentials/set/0.1/payload.d.ts +46 -2
- package/dist/vtc/storage/credentials/set/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/storage/credentials/set/0.1/payload.js +22 -0
- package/dist/vtc/storage/credentials/set/0.1/payload.js.map +1 -1
- package/package.json +1 -1
- package/src/_shared/components.ts +10 -1
- package/src/index.ts +1 -0
- package/src/vtc/_shared/0.1/room-storage.ts +1 -1
- package/src/vtc/oid4vp/identities/list/0.1/payload.ts +706 -0
- package/src/vtc/storage/configs/create/0.1/payload.ts +26 -4
- package/src/vtc/storage/configs/get/0.1/payload.ts +34 -4
- package/src/vtc/storage/configs/list/0.1/payload.ts +34 -4
- package/src/vtc/storage/configs/update/0.1/payload.ts +26 -4
- package/src/vtc/storage/credentials/set/0.1/payload.ts +24 -2
|
@@ -0,0 +1,706 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/oid4vp/identities/list/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext } from "../../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* An administrator reads the OpenID4VP verifier identities the community holds — the identities it presents to wallets that speak OpenID4VP and no Trust Task protocol — and, for each, whether it can open a presentation session now and what stands in the way. The outer document members are owned by the framework — SPEC §6.3.
|
|
11
|
+
*/
|
|
12
|
+
export interface VTCOpenID4VPVerifierIdentitiesListPayload {
|
|
13
|
+
ext?: Ext;
|
|
14
|
+
}
|
|
15
|
+
export interface VTCOpenID4VPVerifierIdentitiesListResponsePayload {
|
|
16
|
+
/**
|
|
17
|
+
* Every verifier identity the community holds, by `id`. Empty when it holds none.
|
|
18
|
+
*/
|
|
19
|
+
identities: Identity[];
|
|
20
|
+
/**
|
|
21
|
+
* The identity the community is configured to use when a session names no client identifier prefix; null when none is configured, and the first usable identity is used.
|
|
22
|
+
*/
|
|
23
|
+
defaultIdentity?: string | null;
|
|
24
|
+
/**
|
|
25
|
+
* What is wrong with the community's verifier as a whole, rather than with one identity. Empty when nothing is.
|
|
26
|
+
*/
|
|
27
|
+
problems: Problem[];
|
|
28
|
+
ext?: Ext;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* One verifier identity, described by what is public about it. The signing key's private half, and where a remote custodian keeps it, are never returned.
|
|
32
|
+
*/
|
|
33
|
+
export interface Identity {
|
|
34
|
+
/**
|
|
35
|
+
* The administrator's name for the identity.
|
|
36
|
+
*/
|
|
37
|
+
id: string;
|
|
38
|
+
/**
|
|
39
|
+
* The wallet ecosystem it is known to: `swiyu` (a DID registered in the swiyu Base Registry) or `eudi` (an X.509 access certificate).
|
|
40
|
+
*/
|
|
41
|
+
kind: "swiyu" | "eudi";
|
|
42
|
+
/**
|
|
43
|
+
* The OpenID4VP client identifier wallets see, prefix included. Null while an `eudi` identity has no certificate.
|
|
44
|
+
*/
|
|
45
|
+
clientId?: string | null;
|
|
46
|
+
/**
|
|
47
|
+
* The identity's DID, for a `swiyu` identity.
|
|
48
|
+
*/
|
|
49
|
+
did?: string | null;
|
|
50
|
+
/**
|
|
51
|
+
* The verification method that signs request objects, for an identity known by a DID.
|
|
52
|
+
*/
|
|
53
|
+
keyId?: string | null;
|
|
54
|
+
/**
|
|
55
|
+
* Where the signing key is: `cached` by the community, kept by its `agent` (which signs every request object), or `invalid` when the record names neither or both.
|
|
56
|
+
*/
|
|
57
|
+
custody: "cached" | "agent" | "invalid";
|
|
58
|
+
/**
|
|
59
|
+
* Whether a session could be opened on this identity now: true exactly when no `error` problem applies to it, and none other than `defaultIdentityNotInstalled` applies to the community's verifier as a whole.
|
|
60
|
+
*/
|
|
61
|
+
usable: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Whether a session that names no client identifier prefix uses this identity.
|
|
64
|
+
*/
|
|
65
|
+
isDefault: boolean;
|
|
66
|
+
certificate?: Certificate;
|
|
67
|
+
/**
|
|
68
|
+
* What every request object carries in `verifier_info`, in the order it carries them. Empty when it carries none.
|
|
69
|
+
*/
|
|
70
|
+
attestations: Attestation[];
|
|
71
|
+
/**
|
|
72
|
+
* What is wrong with this identity. Empty when nothing is.
|
|
73
|
+
*/
|
|
74
|
+
problems: Problem[];
|
|
75
|
+
installedAt: string;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* The access certificate, for an `eudi` identity that has one.
|
|
79
|
+
*/
|
|
80
|
+
export interface Certificate {
|
|
81
|
+
/**
|
|
82
|
+
* The leaf's subject distinguished name, as RFC 4514 renders it.
|
|
83
|
+
*/
|
|
84
|
+
subject?: string;
|
|
85
|
+
/**
|
|
86
|
+
* The leaf's issuer distinguished name, as RFC 4514 renders it.
|
|
87
|
+
*/
|
|
88
|
+
issuer?: string;
|
|
89
|
+
notBefore: string;
|
|
90
|
+
notAfter: string;
|
|
91
|
+
/**
|
|
92
|
+
* Certificates in the chain, leaf included.
|
|
93
|
+
*/
|
|
94
|
+
chainLength: number;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* One attestation about the verifier that every request object carries in `verifier_info`.
|
|
98
|
+
*/
|
|
99
|
+
export interface Attestation {
|
|
100
|
+
/**
|
|
101
|
+
* Which attestation it is, as tabled in the specification.
|
|
102
|
+
*/
|
|
103
|
+
kind: "identityTrustStatement" | "protectedVerificationAuthorization" | "registrationCertificate" | "other";
|
|
104
|
+
/**
|
|
105
|
+
* When it expires, if it says; null when it carries no expiry the maintainer reads.
|
|
106
|
+
*/
|
|
107
|
+
expiresAt?: string | null;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* One thing that stops, or will soon stop, a verifier identity or the community's verifier as a whole from serving wallets.
|
|
111
|
+
*/
|
|
112
|
+
export interface Problem {
|
|
113
|
+
/**
|
|
114
|
+
* What is wrong, as tabled in the specification.
|
|
115
|
+
*/
|
|
116
|
+
code:
|
|
117
|
+
| "keyCustodyInvalid"
|
|
118
|
+
| "signerNotLoaded"
|
|
119
|
+
| "agentLinkMissing"
|
|
120
|
+
| "certificateMissing"
|
|
121
|
+
| "certificateNotYetValid"
|
|
122
|
+
| "certificateExpired"
|
|
123
|
+
| "certificateExpiresSoon"
|
|
124
|
+
| "identityStatementMissing"
|
|
125
|
+
| "statementExpired"
|
|
126
|
+
| "statementExpiresSoon"
|
|
127
|
+
| "defaultIdentityNotInstalled"
|
|
128
|
+
| "noPublicUrl";
|
|
129
|
+
/**
|
|
130
|
+
* `error`: sessions are refused, or wallets will refuse what the community sends, until it is fixed. `warning`: it works now and will not for long.
|
|
131
|
+
*/
|
|
132
|
+
severity: "error" | "warning";
|
|
133
|
+
/**
|
|
134
|
+
* Maintainer-authored prose for the administrator — what to run to fix it. Never parsed.
|
|
135
|
+
*/
|
|
136
|
+
detail?: string;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
140
|
+
export type { Ext };
|
|
141
|
+
|
|
142
|
+
/** Trust Task type URI. */
|
|
143
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vtc/oid4vp/identities/list/0.1" as const;
|
|
144
|
+
|
|
145
|
+
/** Stable alias for this specification's request payload shape. */
|
|
146
|
+
export type Payload = VTCOpenID4VPVerifierIdentitiesListPayload;
|
|
147
|
+
|
|
148
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
149
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/oid4vp/identities/list/0.1#response" as const;
|
|
150
|
+
|
|
151
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
152
|
+
export type Response = VTCOpenID4VPVerifierIdentitiesListResponsePayload;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* This specification's payload schema, as a value.
|
|
156
|
+
*
|
|
157
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
158
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
159
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
160
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
161
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
162
|
+
*/
|
|
163
|
+
export const PAYLOAD_SCHEMA = {
|
|
164
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
165
|
+
"$id": "https://trusttasks.org/spec/vtc/oid4vp/identities/list/0.1",
|
|
166
|
+
"title": "VTC OpenID4VP Verifier Identities List — payload",
|
|
167
|
+
"description": "An administrator reads the OpenID4VP verifier identities the community holds — the identities it presents to wallets that speak OpenID4VP and no Trust Task protocol — and, for each, whether it can open a presentation session now and what stands in the way. The outer document members are owned by the framework — SPEC §6.3.",
|
|
168
|
+
"type": "object",
|
|
169
|
+
"additionalProperties": false,
|
|
170
|
+
"properties": {
|
|
171
|
+
"ext": {
|
|
172
|
+
"$ref": "#/$defs/Ext"
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
"$defs": {
|
|
176
|
+
"Problem": {
|
|
177
|
+
"title": "Problem",
|
|
178
|
+
"type": "object",
|
|
179
|
+
"additionalProperties": false,
|
|
180
|
+
"description": "One thing that stops, or will soon stop, a verifier identity or the community's verifier as a whole from serving wallets.",
|
|
181
|
+
"required": [
|
|
182
|
+
"code",
|
|
183
|
+
"severity"
|
|
184
|
+
],
|
|
185
|
+
"properties": {
|
|
186
|
+
"code": {
|
|
187
|
+
"type": "string",
|
|
188
|
+
"enum": [
|
|
189
|
+
"keyCustodyInvalid",
|
|
190
|
+
"signerNotLoaded",
|
|
191
|
+
"agentLinkMissing",
|
|
192
|
+
"certificateMissing",
|
|
193
|
+
"certificateNotYetValid",
|
|
194
|
+
"certificateExpired",
|
|
195
|
+
"certificateExpiresSoon",
|
|
196
|
+
"identityStatementMissing",
|
|
197
|
+
"statementExpired",
|
|
198
|
+
"statementExpiresSoon",
|
|
199
|
+
"defaultIdentityNotInstalled",
|
|
200
|
+
"noPublicUrl"
|
|
201
|
+
],
|
|
202
|
+
"description": "What is wrong, as tabled in the specification."
|
|
203
|
+
},
|
|
204
|
+
"severity": {
|
|
205
|
+
"type": "string",
|
|
206
|
+
"enum": [
|
|
207
|
+
"error",
|
|
208
|
+
"warning"
|
|
209
|
+
],
|
|
210
|
+
"description": "`error`: sessions are refused, or wallets will refuse what the community sends, until it is fixed. `warning`: it works now and will not for long."
|
|
211
|
+
},
|
|
212
|
+
"detail": {
|
|
213
|
+
"type": "string",
|
|
214
|
+
"maxLength": 1024,
|
|
215
|
+
"description": "Maintainer-authored prose for the administrator — what to run to fix it. Never parsed."
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"Certificate": {
|
|
220
|
+
"title": "Certificate",
|
|
221
|
+
"type": "object",
|
|
222
|
+
"additionalProperties": false,
|
|
223
|
+
"description": "An X.509-identified verifier's access certificate: the leaf of the chain it sends wallets as `x5c`.",
|
|
224
|
+
"required": [
|
|
225
|
+
"notBefore",
|
|
226
|
+
"notAfter",
|
|
227
|
+
"chainLength"
|
|
228
|
+
],
|
|
229
|
+
"properties": {
|
|
230
|
+
"subject": {
|
|
231
|
+
"type": "string",
|
|
232
|
+
"maxLength": 1024,
|
|
233
|
+
"description": "The leaf's subject distinguished name, as RFC 4514 renders it."
|
|
234
|
+
},
|
|
235
|
+
"issuer": {
|
|
236
|
+
"type": "string",
|
|
237
|
+
"maxLength": 1024,
|
|
238
|
+
"description": "The leaf's issuer distinguished name, as RFC 4514 renders it."
|
|
239
|
+
},
|
|
240
|
+
"notBefore": {
|
|
241
|
+
"type": "string",
|
|
242
|
+
"format": "date-time"
|
|
243
|
+
},
|
|
244
|
+
"notAfter": {
|
|
245
|
+
"type": "string",
|
|
246
|
+
"format": "date-time"
|
|
247
|
+
},
|
|
248
|
+
"chainLength": {
|
|
249
|
+
"type": "integer",
|
|
250
|
+
"minimum": 1,
|
|
251
|
+
"description": "Certificates in the chain, leaf included."
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
"Attestation": {
|
|
256
|
+
"title": "Attestation",
|
|
257
|
+
"type": "object",
|
|
258
|
+
"additionalProperties": false,
|
|
259
|
+
"description": "One attestation about the verifier that every request object carries in `verifier_info`.",
|
|
260
|
+
"required": [
|
|
261
|
+
"kind"
|
|
262
|
+
],
|
|
263
|
+
"properties": {
|
|
264
|
+
"kind": {
|
|
265
|
+
"type": "string",
|
|
266
|
+
"enum": [
|
|
267
|
+
"identityTrustStatement",
|
|
268
|
+
"protectedVerificationAuthorization",
|
|
269
|
+
"registrationCertificate",
|
|
270
|
+
"other"
|
|
271
|
+
],
|
|
272
|
+
"description": "Which attestation it is, as tabled in the specification."
|
|
273
|
+
},
|
|
274
|
+
"expiresAt": {
|
|
275
|
+
"type": [
|
|
276
|
+
"string",
|
|
277
|
+
"null"
|
|
278
|
+
],
|
|
279
|
+
"format": "date-time",
|
|
280
|
+
"description": "When it expires, if it says; null when it carries no expiry the maintainer reads."
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
"Identity": {
|
|
285
|
+
"title": "Identity",
|
|
286
|
+
"type": "object",
|
|
287
|
+
"additionalProperties": false,
|
|
288
|
+
"description": "One verifier identity, described by what is public about it. The signing key's private half, and where a remote custodian keeps it, are never returned.",
|
|
289
|
+
"required": [
|
|
290
|
+
"id",
|
|
291
|
+
"kind",
|
|
292
|
+
"custody",
|
|
293
|
+
"usable",
|
|
294
|
+
"isDefault",
|
|
295
|
+
"attestations",
|
|
296
|
+
"problems",
|
|
297
|
+
"installedAt"
|
|
298
|
+
],
|
|
299
|
+
"properties": {
|
|
300
|
+
"id": {
|
|
301
|
+
"type": "string",
|
|
302
|
+
"minLength": 1,
|
|
303
|
+
"maxLength": 128,
|
|
304
|
+
"description": "The administrator's name for the identity."
|
|
305
|
+
},
|
|
306
|
+
"kind": {
|
|
307
|
+
"type": "string",
|
|
308
|
+
"enum": [
|
|
309
|
+
"swiyu",
|
|
310
|
+
"eudi"
|
|
311
|
+
],
|
|
312
|
+
"description": "The wallet ecosystem it is known to: `swiyu` (a DID registered in the swiyu Base Registry) or `eudi` (an X.509 access certificate)."
|
|
313
|
+
},
|
|
314
|
+
"clientId": {
|
|
315
|
+
"type": [
|
|
316
|
+
"string",
|
|
317
|
+
"null"
|
|
318
|
+
],
|
|
319
|
+
"description": "The OpenID4VP client identifier wallets see, prefix included. Null while an `eudi` identity has no certificate."
|
|
320
|
+
},
|
|
321
|
+
"did": {
|
|
322
|
+
"type": [
|
|
323
|
+
"string",
|
|
324
|
+
"null"
|
|
325
|
+
],
|
|
326
|
+
"description": "The identity's DID, for a `swiyu` identity."
|
|
327
|
+
},
|
|
328
|
+
"keyId": {
|
|
329
|
+
"type": [
|
|
330
|
+
"string",
|
|
331
|
+
"null"
|
|
332
|
+
],
|
|
333
|
+
"description": "The verification method that signs request objects, for an identity known by a DID."
|
|
334
|
+
},
|
|
335
|
+
"custody": {
|
|
336
|
+
"type": "string",
|
|
337
|
+
"enum": [
|
|
338
|
+
"cached",
|
|
339
|
+
"agent",
|
|
340
|
+
"invalid"
|
|
341
|
+
],
|
|
342
|
+
"description": "Where the signing key is: `cached` by the community, kept by its `agent` (which signs every request object), or `invalid` when the record names neither or both."
|
|
343
|
+
},
|
|
344
|
+
"usable": {
|
|
345
|
+
"type": "boolean",
|
|
346
|
+
"description": "Whether a session could be opened on this identity now: true exactly when no `error` problem applies to it, and none other than `defaultIdentityNotInstalled` applies to the community's verifier as a whole."
|
|
347
|
+
},
|
|
348
|
+
"isDefault": {
|
|
349
|
+
"type": "boolean",
|
|
350
|
+
"description": "Whether a session that names no client identifier prefix uses this identity."
|
|
351
|
+
},
|
|
352
|
+
"certificate": {
|
|
353
|
+
"$ref": "#/$defs/Certificate",
|
|
354
|
+
"description": "The access certificate, for an `eudi` identity that has one."
|
|
355
|
+
},
|
|
356
|
+
"attestations": {
|
|
357
|
+
"type": "array",
|
|
358
|
+
"items": {
|
|
359
|
+
"$ref": "#/$defs/Attestation"
|
|
360
|
+
},
|
|
361
|
+
"description": "What every request object carries in `verifier_info`, in the order it carries them. Empty when it carries none."
|
|
362
|
+
},
|
|
363
|
+
"problems": {
|
|
364
|
+
"type": "array",
|
|
365
|
+
"items": {
|
|
366
|
+
"$ref": "#/$defs/Problem"
|
|
367
|
+
},
|
|
368
|
+
"description": "What is wrong with this identity. Empty when nothing is."
|
|
369
|
+
},
|
|
370
|
+
"installedAt": {
|
|
371
|
+
"type": "string",
|
|
372
|
+
"format": "date-time"
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
},
|
|
376
|
+
"Response": {
|
|
377
|
+
"$anchor": "response",
|
|
378
|
+
"title": "VTC OpenID4VP Verifier Identities List — response payload",
|
|
379
|
+
"type": "object",
|
|
380
|
+
"additionalProperties": false,
|
|
381
|
+
"required": [
|
|
382
|
+
"identities",
|
|
383
|
+
"problems"
|
|
384
|
+
],
|
|
385
|
+
"properties": {
|
|
386
|
+
"identities": {
|
|
387
|
+
"type": "array",
|
|
388
|
+
"items": {
|
|
389
|
+
"$ref": "#/$defs/Identity"
|
|
390
|
+
},
|
|
391
|
+
"description": "Every verifier identity the community holds, by `id`. Empty when it holds none."
|
|
392
|
+
},
|
|
393
|
+
"defaultIdentity": {
|
|
394
|
+
"type": [
|
|
395
|
+
"string",
|
|
396
|
+
"null"
|
|
397
|
+
],
|
|
398
|
+
"description": "The identity the community is configured to use when a session names no client identifier prefix; null when none is configured, and the first usable identity is used."
|
|
399
|
+
},
|
|
400
|
+
"problems": {
|
|
401
|
+
"type": "array",
|
|
402
|
+
"items": {
|
|
403
|
+
"$ref": "#/$defs/Problem"
|
|
404
|
+
},
|
|
405
|
+
"description": "What is wrong with the community's verifier as a whole, rather than with one identity. Empty when nothing is."
|
|
406
|
+
},
|
|
407
|
+
"ext": {
|
|
408
|
+
"$ref": "#/$defs/Ext"
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
"Ext": {
|
|
413
|
+
"title": "Ext",
|
|
414
|
+
"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.",
|
|
415
|
+
"type": "object",
|
|
416
|
+
"minProperties": 1,
|
|
417
|
+
"additionalProperties": true,
|
|
418
|
+
"propertyNames": {
|
|
419
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
} as const;
|
|
424
|
+
|
|
425
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
426
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
427
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
428
|
+
"$ref": "#/$defs/Response",
|
|
429
|
+
"$defs": {
|
|
430
|
+
"Problem": {
|
|
431
|
+
"title": "Problem",
|
|
432
|
+
"type": "object",
|
|
433
|
+
"additionalProperties": false,
|
|
434
|
+
"description": "One thing that stops, or will soon stop, a verifier identity or the community's verifier as a whole from serving wallets.",
|
|
435
|
+
"required": [
|
|
436
|
+
"code",
|
|
437
|
+
"severity"
|
|
438
|
+
],
|
|
439
|
+
"properties": {
|
|
440
|
+
"code": {
|
|
441
|
+
"type": "string",
|
|
442
|
+
"enum": [
|
|
443
|
+
"keyCustodyInvalid",
|
|
444
|
+
"signerNotLoaded",
|
|
445
|
+
"agentLinkMissing",
|
|
446
|
+
"certificateMissing",
|
|
447
|
+
"certificateNotYetValid",
|
|
448
|
+
"certificateExpired",
|
|
449
|
+
"certificateExpiresSoon",
|
|
450
|
+
"identityStatementMissing",
|
|
451
|
+
"statementExpired",
|
|
452
|
+
"statementExpiresSoon",
|
|
453
|
+
"defaultIdentityNotInstalled",
|
|
454
|
+
"noPublicUrl"
|
|
455
|
+
],
|
|
456
|
+
"description": "What is wrong, as tabled in the specification."
|
|
457
|
+
},
|
|
458
|
+
"severity": {
|
|
459
|
+
"type": "string",
|
|
460
|
+
"enum": [
|
|
461
|
+
"error",
|
|
462
|
+
"warning"
|
|
463
|
+
],
|
|
464
|
+
"description": "`error`: sessions are refused, or wallets will refuse what the community sends, until it is fixed. `warning`: it works now and will not for long."
|
|
465
|
+
},
|
|
466
|
+
"detail": {
|
|
467
|
+
"type": "string",
|
|
468
|
+
"maxLength": 1024,
|
|
469
|
+
"description": "Maintainer-authored prose for the administrator — what to run to fix it. Never parsed."
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
},
|
|
473
|
+
"Certificate": {
|
|
474
|
+
"title": "Certificate",
|
|
475
|
+
"type": "object",
|
|
476
|
+
"additionalProperties": false,
|
|
477
|
+
"description": "An X.509-identified verifier's access certificate: the leaf of the chain it sends wallets as `x5c`.",
|
|
478
|
+
"required": [
|
|
479
|
+
"notBefore",
|
|
480
|
+
"notAfter",
|
|
481
|
+
"chainLength"
|
|
482
|
+
],
|
|
483
|
+
"properties": {
|
|
484
|
+
"subject": {
|
|
485
|
+
"type": "string",
|
|
486
|
+
"maxLength": 1024,
|
|
487
|
+
"description": "The leaf's subject distinguished name, as RFC 4514 renders it."
|
|
488
|
+
},
|
|
489
|
+
"issuer": {
|
|
490
|
+
"type": "string",
|
|
491
|
+
"maxLength": 1024,
|
|
492
|
+
"description": "The leaf's issuer distinguished name, as RFC 4514 renders it."
|
|
493
|
+
},
|
|
494
|
+
"notBefore": {
|
|
495
|
+
"type": "string",
|
|
496
|
+
"format": "date-time"
|
|
497
|
+
},
|
|
498
|
+
"notAfter": {
|
|
499
|
+
"type": "string",
|
|
500
|
+
"format": "date-time"
|
|
501
|
+
},
|
|
502
|
+
"chainLength": {
|
|
503
|
+
"type": "integer",
|
|
504
|
+
"minimum": 1,
|
|
505
|
+
"description": "Certificates in the chain, leaf included."
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
},
|
|
509
|
+
"Attestation": {
|
|
510
|
+
"title": "Attestation",
|
|
511
|
+
"type": "object",
|
|
512
|
+
"additionalProperties": false,
|
|
513
|
+
"description": "One attestation about the verifier that every request object carries in `verifier_info`.",
|
|
514
|
+
"required": [
|
|
515
|
+
"kind"
|
|
516
|
+
],
|
|
517
|
+
"properties": {
|
|
518
|
+
"kind": {
|
|
519
|
+
"type": "string",
|
|
520
|
+
"enum": [
|
|
521
|
+
"identityTrustStatement",
|
|
522
|
+
"protectedVerificationAuthorization",
|
|
523
|
+
"registrationCertificate",
|
|
524
|
+
"other"
|
|
525
|
+
],
|
|
526
|
+
"description": "Which attestation it is, as tabled in the specification."
|
|
527
|
+
},
|
|
528
|
+
"expiresAt": {
|
|
529
|
+
"type": [
|
|
530
|
+
"string",
|
|
531
|
+
"null"
|
|
532
|
+
],
|
|
533
|
+
"format": "date-time",
|
|
534
|
+
"description": "When it expires, if it says; null when it carries no expiry the maintainer reads."
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
},
|
|
538
|
+
"Identity": {
|
|
539
|
+
"title": "Identity",
|
|
540
|
+
"type": "object",
|
|
541
|
+
"additionalProperties": false,
|
|
542
|
+
"description": "One verifier identity, described by what is public about it. The signing key's private half, and where a remote custodian keeps it, are never returned.",
|
|
543
|
+
"required": [
|
|
544
|
+
"id",
|
|
545
|
+
"kind",
|
|
546
|
+
"custody",
|
|
547
|
+
"usable",
|
|
548
|
+
"isDefault",
|
|
549
|
+
"attestations",
|
|
550
|
+
"problems",
|
|
551
|
+
"installedAt"
|
|
552
|
+
],
|
|
553
|
+
"properties": {
|
|
554
|
+
"id": {
|
|
555
|
+
"type": "string",
|
|
556
|
+
"minLength": 1,
|
|
557
|
+
"maxLength": 128,
|
|
558
|
+
"description": "The administrator's name for the identity."
|
|
559
|
+
},
|
|
560
|
+
"kind": {
|
|
561
|
+
"type": "string",
|
|
562
|
+
"enum": [
|
|
563
|
+
"swiyu",
|
|
564
|
+
"eudi"
|
|
565
|
+
],
|
|
566
|
+
"description": "The wallet ecosystem it is known to: `swiyu` (a DID registered in the swiyu Base Registry) or `eudi` (an X.509 access certificate)."
|
|
567
|
+
},
|
|
568
|
+
"clientId": {
|
|
569
|
+
"type": [
|
|
570
|
+
"string",
|
|
571
|
+
"null"
|
|
572
|
+
],
|
|
573
|
+
"description": "The OpenID4VP client identifier wallets see, prefix included. Null while an `eudi` identity has no certificate."
|
|
574
|
+
},
|
|
575
|
+
"did": {
|
|
576
|
+
"type": [
|
|
577
|
+
"string",
|
|
578
|
+
"null"
|
|
579
|
+
],
|
|
580
|
+
"description": "The identity's DID, for a `swiyu` identity."
|
|
581
|
+
},
|
|
582
|
+
"keyId": {
|
|
583
|
+
"type": [
|
|
584
|
+
"string",
|
|
585
|
+
"null"
|
|
586
|
+
],
|
|
587
|
+
"description": "The verification method that signs request objects, for an identity known by a DID."
|
|
588
|
+
},
|
|
589
|
+
"custody": {
|
|
590
|
+
"type": "string",
|
|
591
|
+
"enum": [
|
|
592
|
+
"cached",
|
|
593
|
+
"agent",
|
|
594
|
+
"invalid"
|
|
595
|
+
],
|
|
596
|
+
"description": "Where the signing key is: `cached` by the community, kept by its `agent` (which signs every request object), or `invalid` when the record names neither or both."
|
|
597
|
+
},
|
|
598
|
+
"usable": {
|
|
599
|
+
"type": "boolean",
|
|
600
|
+
"description": "Whether a session could be opened on this identity now: true exactly when no `error` problem applies to it, and none other than `defaultIdentityNotInstalled` applies to the community's verifier as a whole."
|
|
601
|
+
},
|
|
602
|
+
"isDefault": {
|
|
603
|
+
"type": "boolean",
|
|
604
|
+
"description": "Whether a session that names no client identifier prefix uses this identity."
|
|
605
|
+
},
|
|
606
|
+
"certificate": {
|
|
607
|
+
"$ref": "#/$defs/Certificate",
|
|
608
|
+
"description": "The access certificate, for an `eudi` identity that has one."
|
|
609
|
+
},
|
|
610
|
+
"attestations": {
|
|
611
|
+
"type": "array",
|
|
612
|
+
"items": {
|
|
613
|
+
"$ref": "#/$defs/Attestation"
|
|
614
|
+
},
|
|
615
|
+
"description": "What every request object carries in `verifier_info`, in the order it carries them. Empty when it carries none."
|
|
616
|
+
},
|
|
617
|
+
"problems": {
|
|
618
|
+
"type": "array",
|
|
619
|
+
"items": {
|
|
620
|
+
"$ref": "#/$defs/Problem"
|
|
621
|
+
},
|
|
622
|
+
"description": "What is wrong with this identity. Empty when nothing is."
|
|
623
|
+
},
|
|
624
|
+
"installedAt": {
|
|
625
|
+
"type": "string",
|
|
626
|
+
"format": "date-time"
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
},
|
|
630
|
+
"Response": {
|
|
631
|
+
"$anchor": "response",
|
|
632
|
+
"title": "VTC OpenID4VP Verifier Identities List — response payload",
|
|
633
|
+
"type": "object",
|
|
634
|
+
"additionalProperties": false,
|
|
635
|
+
"required": [
|
|
636
|
+
"identities",
|
|
637
|
+
"problems"
|
|
638
|
+
],
|
|
639
|
+
"properties": {
|
|
640
|
+
"identities": {
|
|
641
|
+
"type": "array",
|
|
642
|
+
"items": {
|
|
643
|
+
"$ref": "#/$defs/Identity"
|
|
644
|
+
},
|
|
645
|
+
"description": "Every verifier identity the community holds, by `id`. Empty when it holds none."
|
|
646
|
+
},
|
|
647
|
+
"defaultIdentity": {
|
|
648
|
+
"type": [
|
|
649
|
+
"string",
|
|
650
|
+
"null"
|
|
651
|
+
],
|
|
652
|
+
"description": "The identity the community is configured to use when a session names no client identifier prefix; null when none is configured, and the first usable identity is used."
|
|
653
|
+
},
|
|
654
|
+
"problems": {
|
|
655
|
+
"type": "array",
|
|
656
|
+
"items": {
|
|
657
|
+
"$ref": "#/$defs/Problem"
|
|
658
|
+
},
|
|
659
|
+
"description": "What is wrong with the community's verifier as a whole, rather than with one identity. Empty when nothing is."
|
|
660
|
+
},
|
|
661
|
+
"ext": {
|
|
662
|
+
"$ref": "#/$defs/Ext"
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
},
|
|
666
|
+
"Ext": {
|
|
667
|
+
"title": "Ext",
|
|
668
|
+
"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.",
|
|
669
|
+
"type": "object",
|
|
670
|
+
"minProperties": 1,
|
|
671
|
+
"additionalProperties": true,
|
|
672
|
+
"propertyNames": {
|
|
673
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
} as const;
|
|
678
|
+
|
|
679
|
+
/**
|
|
680
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
681
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
682
|
+
* per-specification and cannot be derived from the document alone, and
|
|
683
|
+
* item 2 needs the schema this carries.
|
|
684
|
+
*/
|
|
685
|
+
export const SPEC = {
|
|
686
|
+
typeUri: TYPE_URI,
|
|
687
|
+
isBearer: false,
|
|
688
|
+
isProofRequired: true,
|
|
689
|
+
isRecipientRequired: true,
|
|
690
|
+
isIssuedAtRequired: false,
|
|
691
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
692
|
+
} as const;
|
|
693
|
+
|
|
694
|
+
/**
|
|
695
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
696
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
697
|
+
* parties (§7.3 item 5).
|
|
698
|
+
*/
|
|
699
|
+
export const RESPONSE_SPEC = {
|
|
700
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
701
|
+
isBearer: false,
|
|
702
|
+
isProofRequired: true,
|
|
703
|
+
isRecipientRequired: true,
|
|
704
|
+
isIssuedAtRequired: false,
|
|
705
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
706
|
+
} as const;
|