@sphereon/ssi-sdk.credential-validation 0.30.2-unstable.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +27 -0
- package/dist/agent/CredentialValidation.d.ts +20 -0
- package/dist/agent/CredentialValidation.d.ts.map +1 -0
- package/dist/agent/CredentialValidation.js +213 -0
- package/dist/agent/CredentialValidation.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -0
- package/dist/ssi-sdk.credential-validation.d.ts +90 -0
- package/dist/tsdoc-metadata.json +11 -0
- package/dist/types/ICredentialValidation.d.ts +50 -0
- package/dist/types/ICredentialValidation.d.ts.map +1 -0
- package/dist/types/ICredentialValidation.js +10 -0
- package/dist/types/ICredentialValidation.js.map +1 -0
- package/package.json +55 -0
- package/plugin.schema.json +1533 -0
- package/src/agent/CredentialValidation.ts +232 -0
- package/src/index.ts +7 -0
- package/src/types/ICredentialValidation.ts +58 -0
|
@@ -0,0 +1,1533 @@
|
|
|
1
|
+
{
|
|
2
|
+
"ICredentialValidation": {
|
|
3
|
+
"components": {
|
|
4
|
+
"schemas": {
|
|
5
|
+
"ValidateSchemaArgs": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"credential": {
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"validationPolicy": {
|
|
12
|
+
"$ref": "#/components/schemas/SchemaValidation"
|
|
13
|
+
},
|
|
14
|
+
"hasher": {
|
|
15
|
+
"$ref": "#/components/schemas/Hasher"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"required": [
|
|
19
|
+
"credential"
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"SchemaValidation": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"enum": [
|
|
25
|
+
"ALWAYS",
|
|
26
|
+
"NEVER",
|
|
27
|
+
"WHEN_PRESENT"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
"Hasher": {
|
|
31
|
+
"$comment": "(data: string, alg: string) => Uint8Array",
|
|
32
|
+
"type": "object",
|
|
33
|
+
"properties": {
|
|
34
|
+
"namedArgs": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"properties": {
|
|
37
|
+
"data": {
|
|
38
|
+
"type": "string"
|
|
39
|
+
},
|
|
40
|
+
"alg": {
|
|
41
|
+
"type": "string"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"required": [
|
|
45
|
+
"data",
|
|
46
|
+
"alg"
|
|
47
|
+
],
|
|
48
|
+
"additionalProperties": false
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"VerificationResult": {
|
|
53
|
+
"type": "object",
|
|
54
|
+
"properties": {
|
|
55
|
+
"result": {
|
|
56
|
+
"type": "boolean"
|
|
57
|
+
},
|
|
58
|
+
"source": {
|
|
59
|
+
"anyOf": [
|
|
60
|
+
{
|
|
61
|
+
"$ref": "#/components/schemas/WrappedVerifiableCredential"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"$ref": "#/components/schemas/WrappedVerifiablePresentation"
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"subResults": {
|
|
69
|
+
"type": "array",
|
|
70
|
+
"items": {
|
|
71
|
+
"$ref": "#/components/schemas/VerificationSubResult"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"error": {
|
|
75
|
+
"type": "string"
|
|
76
|
+
},
|
|
77
|
+
"errorDetails": {
|
|
78
|
+
"type": "string"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"required": [
|
|
82
|
+
"result",
|
|
83
|
+
"source",
|
|
84
|
+
"subResults"
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
"WrappedVerifiableCredential": {
|
|
88
|
+
"anyOf": [
|
|
89
|
+
{
|
|
90
|
+
"$ref": "#/components/schemas/WrappedW3CVerifiableCredential"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"$ref": "#/components/schemas/WrappedSdJwtVerifiableCredential"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"$ref": "#/components/schemas/WrappedMdocCredential"
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
},
|
|
100
|
+
"WrappedW3CVerifiableCredential": {
|
|
101
|
+
"type": "object",
|
|
102
|
+
"properties": {
|
|
103
|
+
"original": {
|
|
104
|
+
"anyOf": [
|
|
105
|
+
{
|
|
106
|
+
"$ref": "#/components/schemas/W3CVerifiableCredential"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"$ref": "#/components/schemas/JwtDecodedVerifiableCredential"
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
"description": "Original VC that we've received"
|
|
113
|
+
},
|
|
114
|
+
"decoded": {
|
|
115
|
+
"anyOf": [
|
|
116
|
+
{
|
|
117
|
+
"$ref": "#/components/schemas/JwtDecodedVerifiableCredential"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"$ref": "#/components/schemas/IVerifiableCredential"
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
"description": "In case of JWT credential it will be the decoded version. In other cases it will be the same as original one"
|
|
124
|
+
},
|
|
125
|
+
"type": {
|
|
126
|
+
"anyOf": [
|
|
127
|
+
{
|
|
128
|
+
"type": "string",
|
|
129
|
+
"const": "json-ld"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"type": "string",
|
|
133
|
+
"const": "jwt-encoded"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"type": "string",
|
|
137
|
+
"const": "jwt-decoded"
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
"description": "Type of this credential. Supported types are json-ld, jwt (decoded/encoded)"
|
|
141
|
+
},
|
|
142
|
+
"format": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"enum": [
|
|
145
|
+
"jwt_vc",
|
|
146
|
+
"ldp_vc",
|
|
147
|
+
"ldp",
|
|
148
|
+
"jwt"
|
|
149
|
+
],
|
|
150
|
+
"description": "The claim format, typically used during exchange transport protocols"
|
|
151
|
+
},
|
|
152
|
+
"credential": {
|
|
153
|
+
"$ref": "#/components/schemas/IVerifiableCredential",
|
|
154
|
+
"description": "Internal stable representation of a Credential"
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"required": [
|
|
158
|
+
"original",
|
|
159
|
+
"decoded",
|
|
160
|
+
"type",
|
|
161
|
+
"format",
|
|
162
|
+
"credential"
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
"W3CVerifiableCredential": {
|
|
166
|
+
"anyOf": [
|
|
167
|
+
{
|
|
168
|
+
"$ref": "#/components/schemas/IVerifiableCredential"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"$ref": "#/components/schemas/CompactJWT"
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
"description": "Represents a signed Verifiable Credential (includes proof), in either JSON, compact JWT or compact SD-JWT VC format. See {@link https://www.w3.org/TR/vc-data-model/#credentials | VC data model } See {@link https://www.w3.org/TR/vc-data-model/#proof-formats | proof formats }"
|
|
175
|
+
},
|
|
176
|
+
"IVerifiableCredential": {
|
|
177
|
+
"type": "object",
|
|
178
|
+
"properties": {
|
|
179
|
+
"proof": {
|
|
180
|
+
"anyOf": [
|
|
181
|
+
{
|
|
182
|
+
"$ref": "#/components/schemas/IProof"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"type": "array",
|
|
186
|
+
"items": {
|
|
187
|
+
"$ref": "#/components/schemas/IProof"
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
]
|
|
191
|
+
},
|
|
192
|
+
"@context": {
|
|
193
|
+
"anyOf": [
|
|
194
|
+
{
|
|
195
|
+
"$ref": "#/components/schemas/ICredentialContextType"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"type": "array",
|
|
199
|
+
"items": {
|
|
200
|
+
"$ref": "#/components/schemas/ICredentialContextType"
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
]
|
|
204
|
+
},
|
|
205
|
+
"type": {
|
|
206
|
+
"type": "array",
|
|
207
|
+
"items": {
|
|
208
|
+
"type": "string"
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
"credentialSchema": {
|
|
212
|
+
"anyOf": [
|
|
213
|
+
{
|
|
214
|
+
"$ref": "#/components/schemas/ICredentialSchemaType"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"type": "array",
|
|
218
|
+
"items": {
|
|
219
|
+
"$ref": "#/components/schemas/ICredentialSchemaType"
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
]
|
|
223
|
+
},
|
|
224
|
+
"issuer": {
|
|
225
|
+
"anyOf": [
|
|
226
|
+
{
|
|
227
|
+
"$ref": "#/components/schemas/IIssuerId"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"$ref": "#/components/schemas/IIssuer"
|
|
231
|
+
}
|
|
232
|
+
]
|
|
233
|
+
},
|
|
234
|
+
"issuanceDate": {
|
|
235
|
+
"type": "string"
|
|
236
|
+
},
|
|
237
|
+
"credentialSubject": {
|
|
238
|
+
"anyOf": [
|
|
239
|
+
{
|
|
240
|
+
"type": "object",
|
|
241
|
+
"properties": {
|
|
242
|
+
"id": {
|
|
243
|
+
"type": "string"
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"type": "array",
|
|
249
|
+
"items": {
|
|
250
|
+
"type": "object",
|
|
251
|
+
"properties": {
|
|
252
|
+
"id": {
|
|
253
|
+
"type": "string"
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
]
|
|
259
|
+
},
|
|
260
|
+
"expirationDate": {
|
|
261
|
+
"type": "string"
|
|
262
|
+
},
|
|
263
|
+
"id": {
|
|
264
|
+
"type": "string"
|
|
265
|
+
},
|
|
266
|
+
"credentialStatus": {
|
|
267
|
+
"$ref": "#/components/schemas/ICredentialStatus"
|
|
268
|
+
},
|
|
269
|
+
"description": {
|
|
270
|
+
"type": "string"
|
|
271
|
+
},
|
|
272
|
+
"name": {
|
|
273
|
+
"type": "string"
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
"required": [
|
|
277
|
+
"@context",
|
|
278
|
+
"credentialSubject",
|
|
279
|
+
"issuanceDate",
|
|
280
|
+
"issuer",
|
|
281
|
+
"proof",
|
|
282
|
+
"type"
|
|
283
|
+
]
|
|
284
|
+
},
|
|
285
|
+
"IProof": {
|
|
286
|
+
"type": "object",
|
|
287
|
+
"properties": {
|
|
288
|
+
"type": {
|
|
289
|
+
"anyOf": [
|
|
290
|
+
{
|
|
291
|
+
"$ref": "#/components/schemas/IProofType"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"type": "string"
|
|
295
|
+
}
|
|
296
|
+
]
|
|
297
|
+
},
|
|
298
|
+
"created": {
|
|
299
|
+
"type": "string"
|
|
300
|
+
},
|
|
301
|
+
"proofPurpose": {
|
|
302
|
+
"anyOf": [
|
|
303
|
+
{
|
|
304
|
+
"$ref": "#/components/schemas/IProofPurpose"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"type": "string"
|
|
308
|
+
}
|
|
309
|
+
]
|
|
310
|
+
},
|
|
311
|
+
"verificationMethod": {
|
|
312
|
+
"type": "string"
|
|
313
|
+
},
|
|
314
|
+
"challenge": {
|
|
315
|
+
"type": "string"
|
|
316
|
+
},
|
|
317
|
+
"domain": {
|
|
318
|
+
"type": "string"
|
|
319
|
+
},
|
|
320
|
+
"proofValue": {
|
|
321
|
+
"type": "string"
|
|
322
|
+
},
|
|
323
|
+
"jws": {
|
|
324
|
+
"type": "string"
|
|
325
|
+
},
|
|
326
|
+
"jwt": {
|
|
327
|
+
"type": "string"
|
|
328
|
+
},
|
|
329
|
+
"mso_mdoc": {
|
|
330
|
+
"type": "string"
|
|
331
|
+
},
|
|
332
|
+
"nonce": {
|
|
333
|
+
"type": "string"
|
|
334
|
+
},
|
|
335
|
+
"requiredRevealStatements": {
|
|
336
|
+
"type": "array",
|
|
337
|
+
"items": {
|
|
338
|
+
"type": "string"
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
},
|
|
342
|
+
"required": [
|
|
343
|
+
"type",
|
|
344
|
+
"created",
|
|
345
|
+
"proofPurpose",
|
|
346
|
+
"verificationMethod"
|
|
347
|
+
]
|
|
348
|
+
},
|
|
349
|
+
"IProofType": {
|
|
350
|
+
"type": "string",
|
|
351
|
+
"enum": [
|
|
352
|
+
"Ed25519Signature2018",
|
|
353
|
+
"Ed25519Signature2020",
|
|
354
|
+
"EcdsaSecp256k1Signature2019",
|
|
355
|
+
"EcdsaSecp256k1RecoverySignature2020",
|
|
356
|
+
"JsonWebSignature2020",
|
|
357
|
+
"RsaSignature2018",
|
|
358
|
+
"GpgSignature2020",
|
|
359
|
+
"JcsEd25519Signature2020",
|
|
360
|
+
"BbsBlsSignatureProof2020",
|
|
361
|
+
"BbsBlsBoundSignatureProof2020",
|
|
362
|
+
"JwtProof2020",
|
|
363
|
+
"SdJwtProof2024",
|
|
364
|
+
"MsoMdocProof2024"
|
|
365
|
+
]
|
|
366
|
+
},
|
|
367
|
+
"IProofPurpose": {
|
|
368
|
+
"type": "string",
|
|
369
|
+
"enum": [
|
|
370
|
+
"verificationMethod",
|
|
371
|
+
"assertionMethod",
|
|
372
|
+
"authentication",
|
|
373
|
+
"keyAgreement",
|
|
374
|
+
"contactAgreement",
|
|
375
|
+
"capabilityInvocation",
|
|
376
|
+
"capabilityDelegation"
|
|
377
|
+
]
|
|
378
|
+
},
|
|
379
|
+
"ICredentialContextType": {
|
|
380
|
+
"anyOf": [
|
|
381
|
+
{
|
|
382
|
+
"type": "object",
|
|
383
|
+
"properties": {
|
|
384
|
+
"name": {
|
|
385
|
+
"type": "string"
|
|
386
|
+
},
|
|
387
|
+
"did": {
|
|
388
|
+
"type": "string"
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"type": "string"
|
|
394
|
+
}
|
|
395
|
+
]
|
|
396
|
+
},
|
|
397
|
+
"ICredentialSchemaType": {
|
|
398
|
+
"anyOf": [
|
|
399
|
+
{
|
|
400
|
+
"$ref": "#/components/schemas/ICredentialSchema"
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
"type": "string"
|
|
404
|
+
}
|
|
405
|
+
]
|
|
406
|
+
},
|
|
407
|
+
"ICredentialSchema": {
|
|
408
|
+
"type": "object",
|
|
409
|
+
"properties": {
|
|
410
|
+
"id": {
|
|
411
|
+
"type": "string"
|
|
412
|
+
},
|
|
413
|
+
"type": {
|
|
414
|
+
"type": "string"
|
|
415
|
+
}
|
|
416
|
+
},
|
|
417
|
+
"required": [
|
|
418
|
+
"id"
|
|
419
|
+
]
|
|
420
|
+
},
|
|
421
|
+
"IIssuerId": {
|
|
422
|
+
"type": "string"
|
|
423
|
+
},
|
|
424
|
+
"IIssuer": {
|
|
425
|
+
"type": "object",
|
|
426
|
+
"properties": {
|
|
427
|
+
"id": {
|
|
428
|
+
"type": "string"
|
|
429
|
+
}
|
|
430
|
+
},
|
|
431
|
+
"required": [
|
|
432
|
+
"id"
|
|
433
|
+
]
|
|
434
|
+
},
|
|
435
|
+
"ICredentialStatus": {
|
|
436
|
+
"type": "object",
|
|
437
|
+
"properties": {
|
|
438
|
+
"id": {
|
|
439
|
+
"type": "string"
|
|
440
|
+
},
|
|
441
|
+
"type": {
|
|
442
|
+
"type": "string"
|
|
443
|
+
}
|
|
444
|
+
},
|
|
445
|
+
"required": [
|
|
446
|
+
"id",
|
|
447
|
+
"type"
|
|
448
|
+
]
|
|
449
|
+
},
|
|
450
|
+
"CompactJWT": {
|
|
451
|
+
"type": "string",
|
|
452
|
+
"description": "Represents a Json Web Token in compact form."
|
|
453
|
+
},
|
|
454
|
+
"JwtDecodedVerifiableCredential": {
|
|
455
|
+
"type": "object",
|
|
456
|
+
"properties": {
|
|
457
|
+
"vc": {
|
|
458
|
+
"$ref": "#/components/schemas/IVerifiableCredential"
|
|
459
|
+
},
|
|
460
|
+
"exp": {
|
|
461
|
+
"type": "string"
|
|
462
|
+
},
|
|
463
|
+
"iss": {
|
|
464
|
+
"type": "string"
|
|
465
|
+
},
|
|
466
|
+
"nbf": {
|
|
467
|
+
"type": "string"
|
|
468
|
+
},
|
|
469
|
+
"sub": {
|
|
470
|
+
"type": "string"
|
|
471
|
+
},
|
|
472
|
+
"jti": {
|
|
473
|
+
"type": "string"
|
|
474
|
+
}
|
|
475
|
+
},
|
|
476
|
+
"required": [
|
|
477
|
+
"vc",
|
|
478
|
+
"exp",
|
|
479
|
+
"iss",
|
|
480
|
+
"nbf",
|
|
481
|
+
"sub",
|
|
482
|
+
"jti"
|
|
483
|
+
]
|
|
484
|
+
},
|
|
485
|
+
"WrappedSdJwtVerifiableCredential": {
|
|
486
|
+
"type": "object",
|
|
487
|
+
"properties": {
|
|
488
|
+
"original": {
|
|
489
|
+
"anyOf": [
|
|
490
|
+
{
|
|
491
|
+
"$ref": "#/components/schemas/SdJwtDecodedVerifiableCredential"
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
"$ref": "#/components/schemas/CompactSdJwtVc"
|
|
495
|
+
}
|
|
496
|
+
],
|
|
497
|
+
"description": "Original VC that we've received. Can be either the encoded or decoded variant."
|
|
498
|
+
},
|
|
499
|
+
"decoded": {
|
|
500
|
+
"$ref": "#/components/schemas/SdJwtDecodedVerifiableCredentialPayload",
|
|
501
|
+
"description": "Decoded version of the SD-JWT payload. This is the decoded payload, rather than the whole SD-JWT as the `decoded` property is used in e.g. PEX to check for path filters from fields. The full decoded credential can be found in the `credential` field."
|
|
502
|
+
},
|
|
503
|
+
"type": {
|
|
504
|
+
"anyOf": [
|
|
505
|
+
{
|
|
506
|
+
"type": "string",
|
|
507
|
+
"const": "sd-jwt-vc-decoded"
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
"type": "string",
|
|
511
|
+
"const": "sd-jwt-vc-encoded"
|
|
512
|
+
}
|
|
513
|
+
],
|
|
514
|
+
"description": "Type of this credential."
|
|
515
|
+
},
|
|
516
|
+
"format": {
|
|
517
|
+
"type": "string",
|
|
518
|
+
"const": "vc+sd-jwt",
|
|
519
|
+
"description": "The claim format, typically used during exchange transport protocols"
|
|
520
|
+
},
|
|
521
|
+
"credential": {
|
|
522
|
+
"$ref": "#/components/schemas/SdJwtDecodedVerifiableCredential",
|
|
523
|
+
"description": "Internal stable representation of a Credential"
|
|
524
|
+
}
|
|
525
|
+
},
|
|
526
|
+
"required": [
|
|
527
|
+
"original",
|
|
528
|
+
"decoded",
|
|
529
|
+
"type",
|
|
530
|
+
"format",
|
|
531
|
+
"credential"
|
|
532
|
+
]
|
|
533
|
+
},
|
|
534
|
+
"SdJwtDecodedVerifiableCredential": {
|
|
535
|
+
"type": "object",
|
|
536
|
+
"properties": {
|
|
537
|
+
"compactSdJwtVc": {
|
|
538
|
+
"type": "string",
|
|
539
|
+
"description": "The compact sd jwt is the sd-jwt encoded as string. It is a normal JWT, with the disclosures and kb-jwt appended separated by ~"
|
|
540
|
+
},
|
|
541
|
+
"disclosures": {
|
|
542
|
+
"type": "array",
|
|
543
|
+
"items": {
|
|
544
|
+
"$ref": "#/components/schemas/SdJwtDisclosure"
|
|
545
|
+
},
|
|
546
|
+
"description": "The disclosures included within the SD-JWT in both encoded and decoded format. The digests are also included, and allows the disclosures to be linked against the digests in the signed payload."
|
|
547
|
+
},
|
|
548
|
+
"signedPayload": {
|
|
549
|
+
"type": "object",
|
|
550
|
+
"properties": {
|
|
551
|
+
"vct": {
|
|
552
|
+
"type": "string"
|
|
553
|
+
},
|
|
554
|
+
"iss": {
|
|
555
|
+
"type": "string"
|
|
556
|
+
},
|
|
557
|
+
"iat": {
|
|
558
|
+
"type": "number"
|
|
559
|
+
},
|
|
560
|
+
"nbf": {
|
|
561
|
+
"type": "number"
|
|
562
|
+
},
|
|
563
|
+
"exp": {
|
|
564
|
+
"type": "number"
|
|
565
|
+
},
|
|
566
|
+
"cnf": {
|
|
567
|
+
"type": "object",
|
|
568
|
+
"properties": {
|
|
569
|
+
"jwk": {},
|
|
570
|
+
"kid": {
|
|
571
|
+
"type": "string"
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
},
|
|
575
|
+
"status": {
|
|
576
|
+
"type": "object",
|
|
577
|
+
"properties": {
|
|
578
|
+
"idx": {
|
|
579
|
+
"type": "number"
|
|
580
|
+
},
|
|
581
|
+
"uri": {
|
|
582
|
+
"type": "string"
|
|
583
|
+
}
|
|
584
|
+
},
|
|
585
|
+
"required": [
|
|
586
|
+
"idx",
|
|
587
|
+
"uri"
|
|
588
|
+
]
|
|
589
|
+
},
|
|
590
|
+
"sub": {
|
|
591
|
+
"type": "string"
|
|
592
|
+
},
|
|
593
|
+
"_sd": {
|
|
594
|
+
"type": "array",
|
|
595
|
+
"items": {
|
|
596
|
+
"type": "string"
|
|
597
|
+
}
|
|
598
|
+
},
|
|
599
|
+
"_sd_alg": {
|
|
600
|
+
"type": "string"
|
|
601
|
+
}
|
|
602
|
+
},
|
|
603
|
+
"additionalProperties": {
|
|
604
|
+
"anyOf": [
|
|
605
|
+
{
|
|
606
|
+
"not": {}
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
"not": {}
|
|
610
|
+
},
|
|
611
|
+
{
|
|
612
|
+
"type": [
|
|
613
|
+
"string",
|
|
614
|
+
"number",
|
|
615
|
+
"boolean",
|
|
616
|
+
"object",
|
|
617
|
+
"array"
|
|
618
|
+
]
|
|
619
|
+
}
|
|
620
|
+
]
|
|
621
|
+
},
|
|
622
|
+
"required": [
|
|
623
|
+
"iat",
|
|
624
|
+
"iss",
|
|
625
|
+
"vct"
|
|
626
|
+
],
|
|
627
|
+
"description": "The signed payload is the payload of the sd-jwt that is actually signed, and that includes the `_sd` and `...` digests."
|
|
628
|
+
},
|
|
629
|
+
"decodedPayload": {
|
|
630
|
+
"$ref": "#/components/schemas/SdJwtDecodedVerifiableCredentialPayload",
|
|
631
|
+
"description": "The decoded payload is the payload when all `_sd` and `...` digests have been replaced by the actual values from the disclosures. This format could also be seen as the 'pretty` version of the SD JWT payload.\n\nThis is useful for displaying the contents of the SD JWT VC to the user, or for example for querying the contents of the SD JWT VC using a PEX presentation definition path."
|
|
632
|
+
},
|
|
633
|
+
"kbJwt": {
|
|
634
|
+
"type": "object",
|
|
635
|
+
"properties": {
|
|
636
|
+
"header": {
|
|
637
|
+
"$ref": "#/components/schemas/SdJwtVcKbJwtHeader"
|
|
638
|
+
},
|
|
639
|
+
"payload": {
|
|
640
|
+
"$ref": "#/components/schemas/SdJwtVcKbJwtPayload"
|
|
641
|
+
},
|
|
642
|
+
"compact": {
|
|
643
|
+
"$ref": "#/components/schemas/CompactJWT"
|
|
644
|
+
}
|
|
645
|
+
},
|
|
646
|
+
"required": [
|
|
647
|
+
"header",
|
|
648
|
+
"payload"
|
|
649
|
+
],
|
|
650
|
+
"description": "Key binding JWT"
|
|
651
|
+
}
|
|
652
|
+
},
|
|
653
|
+
"required": [
|
|
654
|
+
"compactSdJwtVc",
|
|
655
|
+
"disclosures",
|
|
656
|
+
"signedPayload",
|
|
657
|
+
"decodedPayload"
|
|
658
|
+
],
|
|
659
|
+
"description": "The decoded SD JWT Verifiable Credential. This representation includes multiple representations of the same SD-JWT, and allows to fully process an SD-JWT, as well as create a presentation SD-JWT (minus the KB-JWT) by removing certain disclosures from the compact SD-JWT.\n\nThis representation is useful as it doesn't require a hasher implementation to match the different digests in the signed SD-JWT payload, with the different disclosures."
|
|
660
|
+
},
|
|
661
|
+
"SdJwtDisclosure": {
|
|
662
|
+
"type": "object",
|
|
663
|
+
"properties": {
|
|
664
|
+
"encoded": {
|
|
665
|
+
"type": "string"
|
|
666
|
+
},
|
|
667
|
+
"decoded": {
|
|
668
|
+
"$ref": "#/components/schemas/SdJwtDecodedDisclosure"
|
|
669
|
+
},
|
|
670
|
+
"digest": {
|
|
671
|
+
"type": "string"
|
|
672
|
+
}
|
|
673
|
+
},
|
|
674
|
+
"required": [
|
|
675
|
+
"encoded",
|
|
676
|
+
"decoded",
|
|
677
|
+
"digest"
|
|
678
|
+
]
|
|
679
|
+
},
|
|
680
|
+
"SdJwtDecodedDisclosure": {
|
|
681
|
+
"anyOf": [
|
|
682
|
+
{
|
|
683
|
+
"type": "array",
|
|
684
|
+
"minItems": 3,
|
|
685
|
+
"items": [
|
|
686
|
+
{
|
|
687
|
+
"type": "string"
|
|
688
|
+
},
|
|
689
|
+
{
|
|
690
|
+
"type": "string"
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
"anyOf": [
|
|
694
|
+
{
|
|
695
|
+
"type": "string"
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
"type": "number"
|
|
699
|
+
},
|
|
700
|
+
{
|
|
701
|
+
"type": "boolean"
|
|
702
|
+
},
|
|
703
|
+
{
|
|
704
|
+
"type": "object",
|
|
705
|
+
"additionalProperties": {
|
|
706
|
+
"anyOf": [
|
|
707
|
+
{
|
|
708
|
+
"$ref": "#/components/schemas/alias-d-jwt-vc.d.ts-158-267-d-jwt-vc.d.ts-0-7939"
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
"not": {}
|
|
712
|
+
}
|
|
713
|
+
]
|
|
714
|
+
}
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
"type": "array",
|
|
718
|
+
"items": {
|
|
719
|
+
"$ref": "#/components/schemas/alias-d-jwt-vc.d.ts-158-267-d-jwt-vc.d.ts-0-7939"
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
]
|
|
723
|
+
}
|
|
724
|
+
],
|
|
725
|
+
"maxItems": 3
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
"type": "array",
|
|
729
|
+
"minItems": 2,
|
|
730
|
+
"items": [
|
|
731
|
+
{
|
|
732
|
+
"type": "string"
|
|
733
|
+
},
|
|
734
|
+
{
|
|
735
|
+
"anyOf": [
|
|
736
|
+
{
|
|
737
|
+
"type": "string"
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
"type": "number"
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
"type": "boolean"
|
|
744
|
+
},
|
|
745
|
+
{
|
|
746
|
+
"type": "object",
|
|
747
|
+
"additionalProperties": {
|
|
748
|
+
"anyOf": [
|
|
749
|
+
{
|
|
750
|
+
"$ref": "#/components/schemas/alias-d-jwt-vc.d.ts-158-267-d-jwt-vc.d.ts-0-7939"
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
"not": {}
|
|
754
|
+
}
|
|
755
|
+
]
|
|
756
|
+
}
|
|
757
|
+
},
|
|
758
|
+
{
|
|
759
|
+
"type": "array",
|
|
760
|
+
"items": {
|
|
761
|
+
"$ref": "#/components/schemas/alias-d-jwt-vc.d.ts-158-267-d-jwt-vc.d.ts-0-7939"
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
]
|
|
765
|
+
}
|
|
766
|
+
],
|
|
767
|
+
"maxItems": 2
|
|
768
|
+
}
|
|
769
|
+
]
|
|
770
|
+
},
|
|
771
|
+
"alias-d-jwt-vc.d.ts-158-267-d-jwt-vc.d.ts-0-7939": {
|
|
772
|
+
"anyOf": [
|
|
773
|
+
{
|
|
774
|
+
"type": "string"
|
|
775
|
+
},
|
|
776
|
+
{
|
|
777
|
+
"type": "number"
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
"type": "boolean"
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
"type": "object",
|
|
784
|
+
"additionalProperties": {
|
|
785
|
+
"anyOf": [
|
|
786
|
+
{
|
|
787
|
+
"$ref": "#/components/schemas/alias-d-jwt-vc.d.ts-158-267-d-jwt-vc.d.ts-0-7939"
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
"not": {}
|
|
791
|
+
}
|
|
792
|
+
]
|
|
793
|
+
}
|
|
794
|
+
},
|
|
795
|
+
{
|
|
796
|
+
"type": "array",
|
|
797
|
+
"items": {
|
|
798
|
+
"$ref": "#/components/schemas/alias-d-jwt-vc.d.ts-158-267-d-jwt-vc.d.ts-0-7939"
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
]
|
|
802
|
+
},
|
|
803
|
+
"SdJwtDecodedVerifiableCredentialPayload": {
|
|
804
|
+
"type": "object",
|
|
805
|
+
"properties": {
|
|
806
|
+
"vct": {
|
|
807
|
+
"type": "string"
|
|
808
|
+
},
|
|
809
|
+
"iss": {
|
|
810
|
+
"type": "string"
|
|
811
|
+
},
|
|
812
|
+
"iat": {
|
|
813
|
+
"type": "number"
|
|
814
|
+
},
|
|
815
|
+
"nbf": {
|
|
816
|
+
"type": "number"
|
|
817
|
+
},
|
|
818
|
+
"exp": {
|
|
819
|
+
"type": "number"
|
|
820
|
+
},
|
|
821
|
+
"cnf": {
|
|
822
|
+
"type": "object",
|
|
823
|
+
"properties": {
|
|
824
|
+
"jwk": {},
|
|
825
|
+
"kid": {
|
|
826
|
+
"type": "string"
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
},
|
|
830
|
+
"status": {
|
|
831
|
+
"type": "object",
|
|
832
|
+
"properties": {
|
|
833
|
+
"idx": {
|
|
834
|
+
"type": "number"
|
|
835
|
+
},
|
|
836
|
+
"uri": {
|
|
837
|
+
"type": "string"
|
|
838
|
+
}
|
|
839
|
+
},
|
|
840
|
+
"required": [
|
|
841
|
+
"idx",
|
|
842
|
+
"uri"
|
|
843
|
+
]
|
|
844
|
+
},
|
|
845
|
+
"sub": {
|
|
846
|
+
"type": "string"
|
|
847
|
+
}
|
|
848
|
+
},
|
|
849
|
+
"required": [
|
|
850
|
+
"vct",
|
|
851
|
+
"iss",
|
|
852
|
+
"iat"
|
|
853
|
+
],
|
|
854
|
+
"additionalProperties": {
|
|
855
|
+
"anyOf": [
|
|
856
|
+
{
|
|
857
|
+
"type": "string"
|
|
858
|
+
},
|
|
859
|
+
{
|
|
860
|
+
"type": "number"
|
|
861
|
+
},
|
|
862
|
+
{
|
|
863
|
+
"type": "boolean"
|
|
864
|
+
},
|
|
865
|
+
{
|
|
866
|
+
"type": "object",
|
|
867
|
+
"additionalProperties": {
|
|
868
|
+
"anyOf": [
|
|
869
|
+
{
|
|
870
|
+
"$ref": "#/components/schemas/alias-d-jwt-vc.d.ts-158-267-d-jwt-vc.d.ts-0-7939"
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
"not": {}
|
|
874
|
+
}
|
|
875
|
+
]
|
|
876
|
+
}
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
"type": "array",
|
|
880
|
+
"items": {
|
|
881
|
+
"$ref": "#/components/schemas/alias-d-jwt-vc.d.ts-158-267-d-jwt-vc.d.ts-0-7939"
|
|
882
|
+
}
|
|
883
|
+
},
|
|
884
|
+
{
|
|
885
|
+
"not": {}
|
|
886
|
+
}
|
|
887
|
+
]
|
|
888
|
+
},
|
|
889
|
+
"description": "Decoded 'pretty' SD JWT Verifiable Credential. This representation has all the `_sd` properties removed, and includes the disclosures directly within the payload."
|
|
890
|
+
},
|
|
891
|
+
"SdJwtVcKbJwtHeader": {
|
|
892
|
+
"type": "object",
|
|
893
|
+
"properties": {
|
|
894
|
+
"typ": {
|
|
895
|
+
"type": "string",
|
|
896
|
+
"const": "kb+jwt"
|
|
897
|
+
},
|
|
898
|
+
"alg": {
|
|
899
|
+
"type": "string"
|
|
900
|
+
}
|
|
901
|
+
},
|
|
902
|
+
"required": [
|
|
903
|
+
"typ",
|
|
904
|
+
"alg"
|
|
905
|
+
]
|
|
906
|
+
},
|
|
907
|
+
"SdJwtVcKbJwtPayload": {
|
|
908
|
+
"type": "object",
|
|
909
|
+
"properties": {
|
|
910
|
+
"iat": {
|
|
911
|
+
"type": "number"
|
|
912
|
+
},
|
|
913
|
+
"aud": {
|
|
914
|
+
"type": "string"
|
|
915
|
+
},
|
|
916
|
+
"nonce": {
|
|
917
|
+
"type": "string"
|
|
918
|
+
},
|
|
919
|
+
"sd_hash": {
|
|
920
|
+
"type": "string"
|
|
921
|
+
}
|
|
922
|
+
},
|
|
923
|
+
"required": [
|
|
924
|
+
"iat",
|
|
925
|
+
"aud",
|
|
926
|
+
"nonce",
|
|
927
|
+
"sd_hash"
|
|
928
|
+
],
|
|
929
|
+
"additionalProperties": {}
|
|
930
|
+
},
|
|
931
|
+
"CompactSdJwtVc": {
|
|
932
|
+
"type": "string",
|
|
933
|
+
"description": "Represents a selective disclosure JWT vc in compact form."
|
|
934
|
+
},
|
|
935
|
+
"WrappedMdocCredential": {
|
|
936
|
+
"type": "object",
|
|
937
|
+
"properties": {
|
|
938
|
+
"original": {
|
|
939
|
+
"anyOf": [
|
|
940
|
+
{
|
|
941
|
+
"$ref": "#/components/schemas/MdocDocument"
|
|
942
|
+
},
|
|
943
|
+
{
|
|
944
|
+
"$ref": "#/components/schemas/MdocOid4vpIssuerSigned"
|
|
945
|
+
}
|
|
946
|
+
],
|
|
947
|
+
"description": "Original IssuerSigned to Mdoc that we've received. Can be either the encoded or decoded variant."
|
|
948
|
+
},
|
|
949
|
+
"decoded": {
|
|
950
|
+
"type": "object",
|
|
951
|
+
"properties": {},
|
|
952
|
+
"description": "Decoded version of the Mdoc payload. We add the record to make sure existing implementations remain happy"
|
|
953
|
+
},
|
|
954
|
+
"type": {
|
|
955
|
+
"anyOf": [
|
|
956
|
+
{
|
|
957
|
+
"type": "string",
|
|
958
|
+
"const": "mso_mdoc-decoded"
|
|
959
|
+
},
|
|
960
|
+
{
|
|
961
|
+
"type": "string",
|
|
962
|
+
"const": "mso_mdoc-encoded"
|
|
963
|
+
}
|
|
964
|
+
],
|
|
965
|
+
"description": "Type of this credential."
|
|
966
|
+
},
|
|
967
|
+
"format": {
|
|
968
|
+
"type": "string",
|
|
969
|
+
"const": "mso_mdoc",
|
|
970
|
+
"description": "The claim format, typically used during exchange transport protocols"
|
|
971
|
+
},
|
|
972
|
+
"credential": {
|
|
973
|
+
"$ref": "#/components/schemas/IVerifiableCredential",
|
|
974
|
+
"description": "Internal stable representation of a Credential"
|
|
975
|
+
}
|
|
976
|
+
},
|
|
977
|
+
"required": [
|
|
978
|
+
"original",
|
|
979
|
+
"decoded",
|
|
980
|
+
"type",
|
|
981
|
+
"format",
|
|
982
|
+
"credential"
|
|
983
|
+
]
|
|
984
|
+
},
|
|
985
|
+
"MdocDocument": {
|
|
986
|
+
"$ref": "#/components/schemas/com.sphereon.mdoc.data.device.DocumentCbor"
|
|
987
|
+
},
|
|
988
|
+
"com.sphereon.mdoc.data.device.DocumentCbor": {
|
|
989
|
+
"type": "object",
|
|
990
|
+
"properties": {}
|
|
991
|
+
},
|
|
992
|
+
"MdocOid4vpIssuerSigned": {
|
|
993
|
+
"type": "string",
|
|
994
|
+
"description": "Represents a selective disclosure JWT vc in compact form."
|
|
995
|
+
},
|
|
996
|
+
"WrappedVerifiablePresentation": {
|
|
997
|
+
"anyOf": [
|
|
998
|
+
{
|
|
999
|
+
"$ref": "#/components/schemas/WrappedW3CVerifiablePresentation"
|
|
1000
|
+
},
|
|
1001
|
+
{
|
|
1002
|
+
"$ref": "#/components/schemas/WrappedSdJwtVerifiablePresentation"
|
|
1003
|
+
},
|
|
1004
|
+
{
|
|
1005
|
+
"$ref": "#/components/schemas/WrappedMdocPresentation"
|
|
1006
|
+
}
|
|
1007
|
+
]
|
|
1008
|
+
},
|
|
1009
|
+
"WrappedW3CVerifiablePresentation": {
|
|
1010
|
+
"type": "object",
|
|
1011
|
+
"properties": {
|
|
1012
|
+
"original": {
|
|
1013
|
+
"anyOf": [
|
|
1014
|
+
{
|
|
1015
|
+
"$ref": "#/components/schemas/W3CVerifiablePresentation"
|
|
1016
|
+
},
|
|
1017
|
+
{
|
|
1018
|
+
"$ref": "#/components/schemas/JwtDecodedVerifiablePresentation"
|
|
1019
|
+
}
|
|
1020
|
+
],
|
|
1021
|
+
"description": "Original VP that we've received"
|
|
1022
|
+
},
|
|
1023
|
+
"decoded": {
|
|
1024
|
+
"anyOf": [
|
|
1025
|
+
{
|
|
1026
|
+
"$ref": "#/components/schemas/JwtDecodedVerifiablePresentation"
|
|
1027
|
+
},
|
|
1028
|
+
{
|
|
1029
|
+
"$ref": "#/components/schemas/IVerifiablePresentation"
|
|
1030
|
+
}
|
|
1031
|
+
],
|
|
1032
|
+
"description": "In case of JWT VP it will be the decoded version. In other cases it will be the same as original one"
|
|
1033
|
+
},
|
|
1034
|
+
"type": {
|
|
1035
|
+
"anyOf": [
|
|
1036
|
+
{
|
|
1037
|
+
"type": "string",
|
|
1038
|
+
"const": "json-ld"
|
|
1039
|
+
},
|
|
1040
|
+
{
|
|
1041
|
+
"type": "string",
|
|
1042
|
+
"const": "jwt-encoded"
|
|
1043
|
+
},
|
|
1044
|
+
{
|
|
1045
|
+
"type": "string",
|
|
1046
|
+
"const": "jwt-decoded"
|
|
1047
|
+
}
|
|
1048
|
+
],
|
|
1049
|
+
"description": "Type of this Presentation. Supported types are json-ld and jwt (decoded/encoded) and sd-jwt-vc (decoded/encoded)"
|
|
1050
|
+
},
|
|
1051
|
+
"format": {
|
|
1052
|
+
"type": "string",
|
|
1053
|
+
"enum": [
|
|
1054
|
+
"jwt_vp",
|
|
1055
|
+
"ldp_vp"
|
|
1056
|
+
],
|
|
1057
|
+
"description": "The claim format, typically used during exchange transport protocols"
|
|
1058
|
+
},
|
|
1059
|
+
"presentation": {
|
|
1060
|
+
"$ref": "#/components/schemas/UniformVerifiablePresentation",
|
|
1061
|
+
"description": "Internal stable representation of a Presentation without proofs, created based on https://www.w3.org/TR/vc-data-model/#jwt-decoding"
|
|
1062
|
+
},
|
|
1063
|
+
"vcs": {
|
|
1064
|
+
"type": "array",
|
|
1065
|
+
"items": {
|
|
1066
|
+
"$ref": "#/components/schemas/WrappedW3CVerifiableCredential"
|
|
1067
|
+
},
|
|
1068
|
+
"description": "Wrapped Verifiable Credentials belonging to the Presentation"
|
|
1069
|
+
}
|
|
1070
|
+
},
|
|
1071
|
+
"required": [
|
|
1072
|
+
"original",
|
|
1073
|
+
"decoded",
|
|
1074
|
+
"type",
|
|
1075
|
+
"format",
|
|
1076
|
+
"presentation",
|
|
1077
|
+
"vcs"
|
|
1078
|
+
]
|
|
1079
|
+
},
|
|
1080
|
+
"W3CVerifiablePresentation": {
|
|
1081
|
+
"anyOf": [
|
|
1082
|
+
{
|
|
1083
|
+
"$ref": "#/components/schemas/IVerifiablePresentation"
|
|
1084
|
+
},
|
|
1085
|
+
{
|
|
1086
|
+
"$ref": "#/components/schemas/CompactJWT"
|
|
1087
|
+
}
|
|
1088
|
+
],
|
|
1089
|
+
"description": "Represents a signed Verifiable Presentation (includes proof), in either JSON or compact JWT format. See {@link https://www.w3.org/TR/vc-data-model/#presentations | VC data model } See {@link https://www.w3.org/TR/vc-data-model/#proof-formats | proof formats }"
|
|
1090
|
+
},
|
|
1091
|
+
"IVerifiablePresentation": {
|
|
1092
|
+
"type": "object",
|
|
1093
|
+
"properties": {
|
|
1094
|
+
"proof": {
|
|
1095
|
+
"anyOf": [
|
|
1096
|
+
{
|
|
1097
|
+
"$ref": "#/components/schemas/IProof"
|
|
1098
|
+
},
|
|
1099
|
+
{
|
|
1100
|
+
"type": "array",
|
|
1101
|
+
"items": {
|
|
1102
|
+
"$ref": "#/components/schemas/IProof"
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
]
|
|
1106
|
+
},
|
|
1107
|
+
"id": {
|
|
1108
|
+
"type": "string"
|
|
1109
|
+
},
|
|
1110
|
+
"@context": {
|
|
1111
|
+
"anyOf": [
|
|
1112
|
+
{
|
|
1113
|
+
"$ref": "#/components/schemas/ICredentialContextType"
|
|
1114
|
+
},
|
|
1115
|
+
{
|
|
1116
|
+
"type": "array",
|
|
1117
|
+
"items": {
|
|
1118
|
+
"$ref": "#/components/schemas/ICredentialContextType"
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
]
|
|
1122
|
+
},
|
|
1123
|
+
"type": {
|
|
1124
|
+
"anyOf": [
|
|
1125
|
+
{
|
|
1126
|
+
"type": "string"
|
|
1127
|
+
},
|
|
1128
|
+
{
|
|
1129
|
+
"type": "array",
|
|
1130
|
+
"items": {
|
|
1131
|
+
"type": "string"
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
]
|
|
1135
|
+
},
|
|
1136
|
+
"verifiableCredential": {
|
|
1137
|
+
"type": "array",
|
|
1138
|
+
"items": {
|
|
1139
|
+
"$ref": "#/components/schemas/W3CVerifiableCredential"
|
|
1140
|
+
}
|
|
1141
|
+
},
|
|
1142
|
+
"presentation_submission": {
|
|
1143
|
+
"$ref": "#/components/schemas/PresentationSubmission"
|
|
1144
|
+
},
|
|
1145
|
+
"holder": {
|
|
1146
|
+
"type": "string"
|
|
1147
|
+
},
|
|
1148
|
+
"verifier": {
|
|
1149
|
+
"type": "string"
|
|
1150
|
+
}
|
|
1151
|
+
},
|
|
1152
|
+
"required": [
|
|
1153
|
+
"@context",
|
|
1154
|
+
"proof"
|
|
1155
|
+
]
|
|
1156
|
+
},
|
|
1157
|
+
"PresentationSubmission": {
|
|
1158
|
+
"type": "object",
|
|
1159
|
+
"properties": {
|
|
1160
|
+
"id": {
|
|
1161
|
+
"type": "string",
|
|
1162
|
+
"description": "A UUID or some other unique ID to identify this Presentation Submission"
|
|
1163
|
+
},
|
|
1164
|
+
"definition_id": {
|
|
1165
|
+
"type": "string",
|
|
1166
|
+
"description": "A UUID or some other unique ID to identify this Presentation Definition"
|
|
1167
|
+
},
|
|
1168
|
+
"descriptor_map": {
|
|
1169
|
+
"type": "array",
|
|
1170
|
+
"items": {
|
|
1171
|
+
"$ref": "#/components/schemas/Descriptor"
|
|
1172
|
+
},
|
|
1173
|
+
"description": "List of descriptors of how the claims are being mapped to presentation definition"
|
|
1174
|
+
}
|
|
1175
|
+
},
|
|
1176
|
+
"required": [
|
|
1177
|
+
"id",
|
|
1178
|
+
"definition_id",
|
|
1179
|
+
"descriptor_map"
|
|
1180
|
+
],
|
|
1181
|
+
"description": "It expresses how the inputs are presented as proofs to a Verifier."
|
|
1182
|
+
},
|
|
1183
|
+
"Descriptor": {
|
|
1184
|
+
"type": "object",
|
|
1185
|
+
"properties": {
|
|
1186
|
+
"id": {
|
|
1187
|
+
"type": "string",
|
|
1188
|
+
"description": "ID to identify the descriptor from Presentation Definition Input Descriptor it coresponds to."
|
|
1189
|
+
},
|
|
1190
|
+
"path": {
|
|
1191
|
+
"type": "string",
|
|
1192
|
+
"description": "The path where the verifiable credential is located in the presentation submission json"
|
|
1193
|
+
},
|
|
1194
|
+
"path_nested": {
|
|
1195
|
+
"$ref": "#/components/schemas/Descriptor"
|
|
1196
|
+
},
|
|
1197
|
+
"format": {
|
|
1198
|
+
"type": "string",
|
|
1199
|
+
"description": "The Proof or JWT algorith that the proof is in"
|
|
1200
|
+
}
|
|
1201
|
+
},
|
|
1202
|
+
"required": [
|
|
1203
|
+
"id",
|
|
1204
|
+
"path",
|
|
1205
|
+
"format"
|
|
1206
|
+
],
|
|
1207
|
+
"description": "descriptor map laying out the structure of the presentation submission."
|
|
1208
|
+
},
|
|
1209
|
+
"JwtDecodedVerifiablePresentation": {
|
|
1210
|
+
"type": "object",
|
|
1211
|
+
"properties": {
|
|
1212
|
+
"vp": {
|
|
1213
|
+
"$ref": "#/components/schemas/IVerifiablePresentation"
|
|
1214
|
+
},
|
|
1215
|
+
"exp": {
|
|
1216
|
+
"type": "string"
|
|
1217
|
+
},
|
|
1218
|
+
"iss": {
|
|
1219
|
+
"type": "string"
|
|
1220
|
+
},
|
|
1221
|
+
"nbf": {
|
|
1222
|
+
"type": "string"
|
|
1223
|
+
},
|
|
1224
|
+
"sub": {
|
|
1225
|
+
"type": "string"
|
|
1226
|
+
},
|
|
1227
|
+
"jti": {
|
|
1228
|
+
"type": "string"
|
|
1229
|
+
},
|
|
1230
|
+
"aud": {
|
|
1231
|
+
"type": "string"
|
|
1232
|
+
},
|
|
1233
|
+
"iat": {
|
|
1234
|
+
"type": "string"
|
|
1235
|
+
}
|
|
1236
|
+
},
|
|
1237
|
+
"required": [
|
|
1238
|
+
"vp",
|
|
1239
|
+
"exp",
|
|
1240
|
+
"iss",
|
|
1241
|
+
"nbf",
|
|
1242
|
+
"sub",
|
|
1243
|
+
"jti",
|
|
1244
|
+
"aud",
|
|
1245
|
+
"iat"
|
|
1246
|
+
]
|
|
1247
|
+
},
|
|
1248
|
+
"UniformVerifiablePresentation": {
|
|
1249
|
+
"type": "object",
|
|
1250
|
+
"properties": {
|
|
1251
|
+
"@context": {
|
|
1252
|
+
"anyOf": [
|
|
1253
|
+
{
|
|
1254
|
+
"$ref": "#/components/schemas/ICredentialContextType"
|
|
1255
|
+
},
|
|
1256
|
+
{
|
|
1257
|
+
"type": "array",
|
|
1258
|
+
"items": {
|
|
1259
|
+
"$ref": "#/components/schemas/ICredentialContextType"
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
]
|
|
1263
|
+
},
|
|
1264
|
+
"type": {
|
|
1265
|
+
"anyOf": [
|
|
1266
|
+
{
|
|
1267
|
+
"type": "string"
|
|
1268
|
+
},
|
|
1269
|
+
{
|
|
1270
|
+
"type": "array",
|
|
1271
|
+
"items": {
|
|
1272
|
+
"type": "string"
|
|
1273
|
+
}
|
|
1274
|
+
}
|
|
1275
|
+
]
|
|
1276
|
+
},
|
|
1277
|
+
"verifiableCredential": {
|
|
1278
|
+
"type": "array",
|
|
1279
|
+
"items": {
|
|
1280
|
+
"$ref": "#/components/schemas/WrappedW3CVerifiableCredential"
|
|
1281
|
+
}
|
|
1282
|
+
},
|
|
1283
|
+
"presentation_submission": {
|
|
1284
|
+
"$ref": "#/components/schemas/PresentationSubmission"
|
|
1285
|
+
},
|
|
1286
|
+
"holder": {
|
|
1287
|
+
"type": "string"
|
|
1288
|
+
}
|
|
1289
|
+
},
|
|
1290
|
+
"required": [
|
|
1291
|
+
"@context",
|
|
1292
|
+
"type",
|
|
1293
|
+
"verifiableCredential"
|
|
1294
|
+
]
|
|
1295
|
+
},
|
|
1296
|
+
"WrappedSdJwtVerifiablePresentation": {
|
|
1297
|
+
"type": "object",
|
|
1298
|
+
"properties": {
|
|
1299
|
+
"original": {
|
|
1300
|
+
"anyOf": [
|
|
1301
|
+
{
|
|
1302
|
+
"$ref": "#/components/schemas/SdJwtDecodedVerifiableCredential"
|
|
1303
|
+
},
|
|
1304
|
+
{
|
|
1305
|
+
"$ref": "#/components/schemas/CompactSdJwtVc"
|
|
1306
|
+
}
|
|
1307
|
+
],
|
|
1308
|
+
"description": "Original VP that we've received. Can be either the encoded or decoded variant."
|
|
1309
|
+
},
|
|
1310
|
+
"decoded": {
|
|
1311
|
+
"$ref": "#/components/schemas/SdJwtDecodedVerifiableCredentialPayload",
|
|
1312
|
+
"description": "Decoded version of the SD-JWT payload. This is the decoded payload, rather than the whole SD-JWT."
|
|
1313
|
+
},
|
|
1314
|
+
"type": {
|
|
1315
|
+
"anyOf": [
|
|
1316
|
+
{
|
|
1317
|
+
"type": "string",
|
|
1318
|
+
"const": "sd-jwt-vc-decoded"
|
|
1319
|
+
},
|
|
1320
|
+
{
|
|
1321
|
+
"type": "string",
|
|
1322
|
+
"const": "sd-jwt-vc-encoded"
|
|
1323
|
+
}
|
|
1324
|
+
],
|
|
1325
|
+
"description": "Type of this Presentation."
|
|
1326
|
+
},
|
|
1327
|
+
"format": {
|
|
1328
|
+
"type": "string",
|
|
1329
|
+
"const": "vc+sd-jwt",
|
|
1330
|
+
"description": "The claim format, typically used during exchange transport protocols"
|
|
1331
|
+
},
|
|
1332
|
+
"presentation": {
|
|
1333
|
+
"$ref": "#/components/schemas/SdJwtDecodedVerifiableCredential",
|
|
1334
|
+
"description": "Internal stable representation of a Presentation"
|
|
1335
|
+
},
|
|
1336
|
+
"vcs": {
|
|
1337
|
+
"type": "array",
|
|
1338
|
+
"items": {
|
|
1339
|
+
"$ref": "#/components/schemas/WrappedSdJwtVerifiableCredential"
|
|
1340
|
+
},
|
|
1341
|
+
"minItems": 1,
|
|
1342
|
+
"maxItems": 1,
|
|
1343
|
+
"description": "Wrapped Verifiable Credentials belonging to the Presentation. Will always be an array with a single SdJwtVerifiableCredential entry."
|
|
1344
|
+
}
|
|
1345
|
+
},
|
|
1346
|
+
"required": [
|
|
1347
|
+
"original",
|
|
1348
|
+
"decoded",
|
|
1349
|
+
"type",
|
|
1350
|
+
"format",
|
|
1351
|
+
"presentation",
|
|
1352
|
+
"vcs"
|
|
1353
|
+
]
|
|
1354
|
+
},
|
|
1355
|
+
"WrappedMdocPresentation": {
|
|
1356
|
+
"type": "object",
|
|
1357
|
+
"properties": {
|
|
1358
|
+
"original": {
|
|
1359
|
+
"anyOf": [
|
|
1360
|
+
{
|
|
1361
|
+
"$ref": "#/components/schemas/MdocDeviceResponse"
|
|
1362
|
+
},
|
|
1363
|
+
{
|
|
1364
|
+
"$ref": "#/components/schemas/MdocOid4vpMdocVpToken"
|
|
1365
|
+
}
|
|
1366
|
+
],
|
|
1367
|
+
"description": "Original VP that we've received. Can be either the encoded or decoded variant."
|
|
1368
|
+
},
|
|
1369
|
+
"decoded": {
|
|
1370
|
+
"$ref": "#/components/schemas/MdocDeviceResponse",
|
|
1371
|
+
"description": "Decoded version of the SD-JWT payload. This is the decoded payload, rather than the whole SD-JWT."
|
|
1372
|
+
},
|
|
1373
|
+
"type": {
|
|
1374
|
+
"anyOf": [
|
|
1375
|
+
{
|
|
1376
|
+
"type": "string",
|
|
1377
|
+
"const": "mso_mdoc-encoded"
|
|
1378
|
+
},
|
|
1379
|
+
{
|
|
1380
|
+
"type": "string",
|
|
1381
|
+
"const": "mso_mdoc-decoded"
|
|
1382
|
+
}
|
|
1383
|
+
],
|
|
1384
|
+
"description": "Type of this Presentation."
|
|
1385
|
+
},
|
|
1386
|
+
"format": {
|
|
1387
|
+
"type": "string",
|
|
1388
|
+
"const": "mso_mdoc",
|
|
1389
|
+
"description": "The claim format, typically used during exchange transport protocols"
|
|
1390
|
+
},
|
|
1391
|
+
"presentation": {
|
|
1392
|
+
"$ref": "#/components/schemas/MdocDeviceResponse",
|
|
1393
|
+
"description": "Internal stable representation of a Presentation"
|
|
1394
|
+
},
|
|
1395
|
+
"vcs": {
|
|
1396
|
+
"type": "array",
|
|
1397
|
+
"items": {
|
|
1398
|
+
"$ref": "#/components/schemas/WrappedMdocCredential"
|
|
1399
|
+
},
|
|
1400
|
+
"minItems": 1,
|
|
1401
|
+
"maxItems": 1,
|
|
1402
|
+
"description": "Wrapped Mdocs belonging to the Presentation. ."
|
|
1403
|
+
}
|
|
1404
|
+
},
|
|
1405
|
+
"required": [
|
|
1406
|
+
"original",
|
|
1407
|
+
"decoded",
|
|
1408
|
+
"type",
|
|
1409
|
+
"format",
|
|
1410
|
+
"presentation",
|
|
1411
|
+
"vcs"
|
|
1412
|
+
]
|
|
1413
|
+
},
|
|
1414
|
+
"MdocDeviceResponse": {
|
|
1415
|
+
"$ref": "#/components/schemas/com.sphereon.mdoc.data.device.DeviceResponseCbor"
|
|
1416
|
+
},
|
|
1417
|
+
"com.sphereon.mdoc.data.device.DeviceResponseCbor": {
|
|
1418
|
+
"type": "object",
|
|
1419
|
+
"properties": {}
|
|
1420
|
+
},
|
|
1421
|
+
"MdocOid4vpMdocVpToken": {
|
|
1422
|
+
"type": "string"
|
|
1423
|
+
},
|
|
1424
|
+
"VerificationSubResult": {
|
|
1425
|
+
"type": "object",
|
|
1426
|
+
"properties": {
|
|
1427
|
+
"result": {
|
|
1428
|
+
"type": "boolean"
|
|
1429
|
+
},
|
|
1430
|
+
"error": {
|
|
1431
|
+
"type": "string"
|
|
1432
|
+
},
|
|
1433
|
+
"errorDetails": {
|
|
1434
|
+
"type": "string"
|
|
1435
|
+
}
|
|
1436
|
+
},
|
|
1437
|
+
"required": [
|
|
1438
|
+
"result"
|
|
1439
|
+
]
|
|
1440
|
+
},
|
|
1441
|
+
"VerifyCredentialArgs": {
|
|
1442
|
+
"type": "object",
|
|
1443
|
+
"properties": {
|
|
1444
|
+
"credential": {
|
|
1445
|
+
"type": "string"
|
|
1446
|
+
},
|
|
1447
|
+
"hasher": {
|
|
1448
|
+
"$ref": "#/components/schemas/Hasher"
|
|
1449
|
+
}
|
|
1450
|
+
},
|
|
1451
|
+
"required": [
|
|
1452
|
+
"credential"
|
|
1453
|
+
]
|
|
1454
|
+
},
|
|
1455
|
+
"VerifyMdocCredentialArgs": {
|
|
1456
|
+
"type": "object",
|
|
1457
|
+
"properties": {
|
|
1458
|
+
"credential": {
|
|
1459
|
+
"type": "string"
|
|
1460
|
+
}
|
|
1461
|
+
},
|
|
1462
|
+
"required": [
|
|
1463
|
+
"credential"
|
|
1464
|
+
]
|
|
1465
|
+
},
|
|
1466
|
+
"VerifySDJWTCredentialArgs": {
|
|
1467
|
+
"type": "object",
|
|
1468
|
+
"properties": {
|
|
1469
|
+
"credential": {
|
|
1470
|
+
"type": "string"
|
|
1471
|
+
},
|
|
1472
|
+
"hasher": {
|
|
1473
|
+
"$ref": "#/components/schemas/Hasher"
|
|
1474
|
+
}
|
|
1475
|
+
},
|
|
1476
|
+
"required": [
|
|
1477
|
+
"credential"
|
|
1478
|
+
]
|
|
1479
|
+
},
|
|
1480
|
+
"VerifyW3CCredentialArgs": {
|
|
1481
|
+
"type": "object"
|
|
1482
|
+
}
|
|
1483
|
+
},
|
|
1484
|
+
"methods": {
|
|
1485
|
+
"cvValidateSchema": {
|
|
1486
|
+
"description": "",
|
|
1487
|
+
"arguments": {
|
|
1488
|
+
"$ref": "#/components/schemas/ValidateSchemaArgs"
|
|
1489
|
+
},
|
|
1490
|
+
"returnType": {
|
|
1491
|
+
"$ref": "#/components/schemas/VerificationResult"
|
|
1492
|
+
}
|
|
1493
|
+
},
|
|
1494
|
+
"cvVerifyCredential": {
|
|
1495
|
+
"description": "",
|
|
1496
|
+
"arguments": {
|
|
1497
|
+
"$ref": "#/components/schemas/VerifyCredentialArgs"
|
|
1498
|
+
},
|
|
1499
|
+
"returnType": {
|
|
1500
|
+
"$ref": "#/components/schemas/VerificationResult"
|
|
1501
|
+
}
|
|
1502
|
+
},
|
|
1503
|
+
"cvVerifyMdoc": {
|
|
1504
|
+
"description": "",
|
|
1505
|
+
"arguments": {
|
|
1506
|
+
"$ref": "#/components/schemas/VerifyMdocCredentialArgs"
|
|
1507
|
+
},
|
|
1508
|
+
"returnType": {
|
|
1509
|
+
"$ref": "#/components/schemas/VerificationResult"
|
|
1510
|
+
}
|
|
1511
|
+
},
|
|
1512
|
+
"cvVerifySDJWTCredential": {
|
|
1513
|
+
"description": "",
|
|
1514
|
+
"arguments": {
|
|
1515
|
+
"$ref": "#/components/schemas/VerifySDJWTCredentialArgs"
|
|
1516
|
+
},
|
|
1517
|
+
"returnType": {
|
|
1518
|
+
"$ref": "#/components/schemas/VerificationResult"
|
|
1519
|
+
}
|
|
1520
|
+
},
|
|
1521
|
+
"cvVerifyW3CCredential": {
|
|
1522
|
+
"description": "",
|
|
1523
|
+
"arguments": {
|
|
1524
|
+
"$ref": "#/components/schemas/VerifyW3CCredentialArgs"
|
|
1525
|
+
},
|
|
1526
|
+
"returnType": {
|
|
1527
|
+
"$ref": "#/components/schemas/VerificationResult"
|
|
1528
|
+
}
|
|
1529
|
+
}
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
}
|