@openid4vc/openid4vci 0.3.0-alpha-20250813113255 → 0.3.0-alpha-20250820113635
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/dist/index.d.mts +16262 -3061
- package/dist/index.d.ts +16262 -3061
- package/dist/index.js +113 -86
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +113 -86
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -312,25 +312,24 @@ var zKeyAttestationJwtPayloadForUse = (use) => z3.object({
|
|
|
312
312
|
}).passthrough();
|
|
313
313
|
|
|
314
314
|
// src/metadata/credential-issuer/z-credential-configuration-supported-common.ts
|
|
315
|
+
var zCredentialConfigurationSupportedDisplayEntry = z4.object({
|
|
316
|
+
name: z4.string(),
|
|
317
|
+
locale: z4.string().optional(),
|
|
318
|
+
logo: z4.object({
|
|
319
|
+
// FIXME: make required again, but need to support draft 11 first
|
|
320
|
+
uri: z4.string().optional(),
|
|
321
|
+
alt_text: z4.string().optional()
|
|
322
|
+
}).passthrough().optional(),
|
|
323
|
+
description: z4.string().optional(),
|
|
324
|
+
background_color: z4.string().optional(),
|
|
325
|
+
background_image: z4.object({
|
|
326
|
+
// TODO: should be required, but paradym's metadata is wrong here.
|
|
327
|
+
uri: z4.string().optional()
|
|
328
|
+
}).passthrough().optional(),
|
|
329
|
+
text_color: z4.string().optional()
|
|
330
|
+
}).passthrough();
|
|
315
331
|
var zCredentialConfigurationSupportedCommonCredentialMetadata = z4.object({
|
|
316
|
-
display: z4.array(
|
|
317
|
-
z4.object({
|
|
318
|
-
name: z4.string(),
|
|
319
|
-
locale: z4.string().optional(),
|
|
320
|
-
logo: z4.object({
|
|
321
|
-
// FIXME: make required again, but need to support draft 11 first
|
|
322
|
-
uri: z4.string().optional(),
|
|
323
|
-
alt_text: z4.string().optional()
|
|
324
|
-
}).passthrough().optional(),
|
|
325
|
-
description: z4.string().optional(),
|
|
326
|
-
background_color: z4.string().optional(),
|
|
327
|
-
background_image: z4.object({
|
|
328
|
-
// TODO: should be required, but paradym's metadata is wrong here.
|
|
329
|
-
uri: z4.string().optional()
|
|
330
|
-
}).passthrough().optional(),
|
|
331
|
-
text_color: z4.string().optional()
|
|
332
|
-
}).passthrough()
|
|
333
|
-
).optional()
|
|
332
|
+
display: z4.array(zCredentialConfigurationSupportedDisplayEntry).optional()
|
|
334
333
|
});
|
|
335
334
|
var zCredentialConfigurationSupportedCommon = z4.object({
|
|
336
335
|
format: z4.string(),
|
|
@@ -347,24 +346,45 @@ var zCredentialConfigurationSupportedCommon = z4.object({
|
|
|
347
346
|
}).passthrough().optional()
|
|
348
347
|
})
|
|
349
348
|
).optional(),
|
|
350
|
-
credential_metadata: zCredentialConfigurationSupportedCommonCredentialMetadata.optional()
|
|
349
|
+
credential_metadata: zCredentialConfigurationSupportedCommonCredentialMetadata.optional(),
|
|
350
|
+
// For typing purposes. Can be removed once we drop support for draft <= 15.
|
|
351
|
+
claims: z4.optional(z4.never())
|
|
352
|
+
}).passthrough();
|
|
353
|
+
var zCredentialConfigurationSupportedCommonDraft15 = z4.object({
|
|
354
|
+
format: z4.string(),
|
|
355
|
+
scope: z4.string().optional(),
|
|
356
|
+
cryptographic_binding_methods_supported: z4.array(z4.string()).optional(),
|
|
357
|
+
credential_signing_alg_values_supported: z4.array(z4.string()).or(z4.array(z4.number())).optional(),
|
|
358
|
+
proof_types_supported: z4.record(
|
|
359
|
+
z4.union([z4.literal("jwt"), z4.literal("attestation"), z4.string()]),
|
|
360
|
+
z4.object({
|
|
361
|
+
proof_signing_alg_values_supported: z4.array(z4.string()),
|
|
362
|
+
key_attestations_required: z4.object({
|
|
363
|
+
key_storage: zIso18045OrStringArray.optional(),
|
|
364
|
+
user_authentication: zIso18045OrStringArray.optional()
|
|
365
|
+
}).passthrough().optional()
|
|
366
|
+
})
|
|
367
|
+
).optional(),
|
|
368
|
+
display: z4.array(zCredentialConfigurationSupportedDisplayEntry).optional(),
|
|
369
|
+
// For typing purposes.
|
|
370
|
+
credential_metadata: z4.optional(z4.never())
|
|
351
371
|
}).passthrough();
|
|
352
372
|
|
|
353
373
|
// src/formats/credential/mso-mdoc/z-mso-mdoc.ts
|
|
354
374
|
var zMsoMdocFormatIdentifier = z5.literal("mso_mdoc");
|
|
355
|
-
var zMsoMdocCredentialIssuerMetadata =
|
|
375
|
+
var zMsoMdocCredentialIssuerMetadata = zCredentialConfigurationSupportedCommon.extend({
|
|
356
376
|
format: zMsoMdocFormatIdentifier,
|
|
357
377
|
doctype: z5.string(),
|
|
358
378
|
credential_metadata: zCredentialConfigurationSupportedCommonCredentialMetadata.extend({
|
|
359
379
|
claims: z5.array(zMsoMdocIssuerMetadataClaimsDescription).optional()
|
|
360
380
|
}).optional()
|
|
361
381
|
});
|
|
362
|
-
var zMsoMdocCredentialIssuerMetadataDraft15 =
|
|
382
|
+
var zMsoMdocCredentialIssuerMetadataDraft15 = zCredentialConfigurationSupportedCommonDraft15.extend({
|
|
363
383
|
format: zMsoMdocFormatIdentifier,
|
|
364
384
|
doctype: z5.string(),
|
|
365
385
|
claims: z5.array(zMsoMdocIssuerMetadataClaimsDescription).optional()
|
|
366
386
|
});
|
|
367
|
-
var zMsoMdocCredentialIssuerMetadataDraft14 =
|
|
387
|
+
var zMsoMdocCredentialIssuerMetadataDraft14 = zCredentialConfigurationSupportedCommonDraft15.extend({
|
|
368
388
|
format: zMsoMdocFormatIdentifier,
|
|
369
389
|
doctype: z5.string(),
|
|
370
390
|
claims: zCredentialConfigurationSupportedClaimsDraft14.optional(),
|
|
@@ -380,7 +400,15 @@ var zMsoMdocCredentialRequestFormatDraft14 = z5.object({
|
|
|
380
400
|
// src/formats/credential/sd-jwt-vc/z-sd-jwt-vc.ts
|
|
381
401
|
import z6 from "zod";
|
|
382
402
|
var zSdJwtVcFormatIdentifier = z6.literal("vc+sd-jwt");
|
|
383
|
-
var
|
|
403
|
+
var zSdJwtVcCredentialIssuerMetadataDraft16 = zCredentialConfigurationSupportedCommon.extend({
|
|
404
|
+
vct: z6.string(),
|
|
405
|
+
format: zSdJwtVcFormatIdentifier,
|
|
406
|
+
order: z6.optional(z6.array(z6.string())),
|
|
407
|
+
credential_metadata: zCredentialConfigurationSupportedCommonCredentialMetadata.extend({
|
|
408
|
+
claims: z6.array(zCredentialConfigurationSupportedClaimsDraft14).optional()
|
|
409
|
+
}).optional()
|
|
410
|
+
});
|
|
411
|
+
var zSdJwtVcCredentialIssuerMetadataDraft14 = zCredentialConfigurationSupportedCommonDraft15.extend({
|
|
384
412
|
vct: z6.string(),
|
|
385
413
|
format: zSdJwtVcFormatIdentifier,
|
|
386
414
|
claims: z6.optional(zCredentialConfigurationSupportedClaimsDraft14),
|
|
@@ -395,14 +423,14 @@ var zSdJwtVcCredentialRequestFormatDraft14 = z6.object({
|
|
|
395
423
|
// src/formats/credential/sd-jwt-dc/z-sd-jwt-dc.ts
|
|
396
424
|
import z7 from "zod";
|
|
397
425
|
var zSdJwtDcFormatIdentifier = z7.literal("dc+sd-jwt");
|
|
398
|
-
var zSdJwtDcCredentialIssuerMetadata =
|
|
426
|
+
var zSdJwtDcCredentialIssuerMetadata = zCredentialConfigurationSupportedCommon.extend({
|
|
399
427
|
vct: z7.string(),
|
|
400
428
|
format: zSdJwtDcFormatIdentifier,
|
|
401
429
|
credential_metadata: zCredentialConfigurationSupportedCommonCredentialMetadata.extend({
|
|
402
430
|
claims: z7.array(zIssuerMetadataClaimsDescription).optional()
|
|
403
431
|
}).optional()
|
|
404
432
|
});
|
|
405
|
-
var zSdJwtDcCredentialIssuerMetadataDraft15 =
|
|
433
|
+
var zSdJwtDcCredentialIssuerMetadataDraft15 = zCredentialConfigurationSupportedCommonDraft15.extend({
|
|
406
434
|
vct: z7.string(),
|
|
407
435
|
format: zSdJwtDcFormatIdentifier,
|
|
408
436
|
claims: z7.array(zIssuerMetadataClaimsDescription).optional()
|
|
@@ -439,19 +467,19 @@ var zW3cVcJsonLdCredentialDefinitionDraft14 = zW3cVcJsonLdCredentialDefinition.e
|
|
|
439
467
|
|
|
440
468
|
// src/formats/credential/w3c-vc/z-w3c-ldp-vc.ts
|
|
441
469
|
var zLdpVcFormatIdentifier = z9.literal("ldp_vc");
|
|
442
|
-
var zLdpVcCredentialIssuerMetadata =
|
|
470
|
+
var zLdpVcCredentialIssuerMetadata = zCredentialConfigurationSupportedCommon.extend({
|
|
443
471
|
format: zLdpVcFormatIdentifier,
|
|
444
472
|
credential_definition: zW3cVcJsonLdCredentialDefinition,
|
|
445
473
|
credential_metadata: zCredentialConfigurationSupportedCommonCredentialMetadata.extend({
|
|
446
474
|
claims: zIssuerMetadataClaimsDescription.optional()
|
|
447
475
|
}).optional()
|
|
448
476
|
});
|
|
449
|
-
var zLdpVcCredentialIssuerMetadataDraft15 =
|
|
477
|
+
var zLdpVcCredentialIssuerMetadataDraft15 = zCredentialConfigurationSupportedCommonDraft15.extend({
|
|
450
478
|
format: zLdpVcFormatIdentifier,
|
|
451
479
|
credential_definition: zW3cVcJsonLdCredentialDefinition,
|
|
452
480
|
claims: zIssuerMetadataClaimsDescription.optional()
|
|
453
481
|
});
|
|
454
|
-
var zLdpVcCredentialIssuerMetadataDraft14 =
|
|
482
|
+
var zLdpVcCredentialIssuerMetadataDraft14 = zCredentialConfigurationSupportedCommonDraft15.extend({
|
|
455
483
|
format: zLdpVcFormatIdentifier,
|
|
456
484
|
credential_definition: zW3cVcJsonLdCredentialDefinitionDraft14,
|
|
457
485
|
order: z9.array(z9.string()).optional()
|
|
@@ -514,19 +542,19 @@ var zLdpVcCredentialRequestDraft14To11 = zLdpVcCredentialRequestFormatDraft14.pa
|
|
|
514
542
|
// src/formats/credential/w3c-vc/z-w3c-jwt-vc-json-ld.ts
|
|
515
543
|
import z10 from "zod";
|
|
516
544
|
var zJwtVcJsonLdFormatIdentifier = z10.literal("jwt_vc_json-ld");
|
|
517
|
-
var zJwtVcJsonLdCredentialIssuerMetadata =
|
|
545
|
+
var zJwtVcJsonLdCredentialIssuerMetadata = zCredentialConfigurationSupportedCommon.extend({
|
|
518
546
|
format: zJwtVcJsonLdFormatIdentifier,
|
|
519
547
|
credential_definition: zW3cVcJsonLdCredentialDefinition,
|
|
520
548
|
credential_metadata: zCredentialConfigurationSupportedCommonCredentialMetadata.extend({
|
|
521
549
|
claims: zIssuerMetadataClaimsDescription.optional()
|
|
522
550
|
}).optional()
|
|
523
551
|
});
|
|
524
|
-
var zJwtVcJsonLdCredentialIssuerMetadataDraft15 =
|
|
552
|
+
var zJwtVcJsonLdCredentialIssuerMetadataDraft15 = zCredentialConfigurationSupportedCommonDraft15.extend({
|
|
525
553
|
format: zJwtVcJsonLdFormatIdentifier,
|
|
526
554
|
credential_definition: zW3cVcJsonLdCredentialDefinition,
|
|
527
555
|
claims: zIssuerMetadataClaimsDescription.optional()
|
|
528
556
|
});
|
|
529
|
-
var zJwtVcJsonLdCredentialIssuerMetadataDraft14 =
|
|
557
|
+
var zJwtVcJsonLdCredentialIssuerMetadataDraft14 = zCredentialConfigurationSupportedCommonDraft15.extend({
|
|
530
558
|
format: zJwtVcJsonLdFormatIdentifier,
|
|
531
559
|
credential_definition: zW3cVcJsonLdCredentialDefinitionDraft14,
|
|
532
560
|
order: z10.optional(z10.array(z10.string()))
|
|
@@ -595,19 +623,19 @@ var zJwtVcJsonCredentialDefinition = z11.object({
|
|
|
595
623
|
var zJwtVcJsonCredentialDefinitionDraft14 = zJwtVcJsonCredentialDefinition.extend({
|
|
596
624
|
credentialSubject: zW3cVcCredentialSubjectDraft14.optional()
|
|
597
625
|
});
|
|
598
|
-
var zJwtVcJsonCredentialIssuerMetadata =
|
|
626
|
+
var zJwtVcJsonCredentialIssuerMetadata = zCredentialConfigurationSupportedCommon.extend({
|
|
599
627
|
format: zJwtVcJsonFormatIdentifier,
|
|
600
628
|
credential_definition: zJwtVcJsonCredentialDefinition,
|
|
601
629
|
credential_metadata: zCredentialConfigurationSupportedCommonCredentialMetadata.extend({
|
|
602
630
|
claims: zIssuerMetadataClaimsDescription.optional()
|
|
603
631
|
}).optional()
|
|
604
632
|
});
|
|
605
|
-
var zJwtVcJsonCredentialIssuerMetadataDraft15 =
|
|
633
|
+
var zJwtVcJsonCredentialIssuerMetadataDraft15 = zCredentialConfigurationSupportedCommonDraft15.extend({
|
|
606
634
|
format: zJwtVcJsonFormatIdentifier,
|
|
607
635
|
credential_definition: zJwtVcJsonCredentialDefinition,
|
|
608
636
|
claims: zIssuerMetadataClaimsDescription.optional()
|
|
609
637
|
});
|
|
610
|
-
var zJwtVcJsonCredentialIssuerMetadataDraft14 =
|
|
638
|
+
var zJwtVcJsonCredentialIssuerMetadataDraft14 = zCredentialConfigurationSupportedCommonDraft15.extend({
|
|
611
639
|
format: zJwtVcJsonFormatIdentifier,
|
|
612
640
|
credential_definition: zJwtVcJsonCredentialDefinitionDraft14,
|
|
613
641
|
order: z11.array(z11.string()).optional()
|
|
@@ -671,6 +699,7 @@ var allCredentialIssuerMetadataFormats = [
|
|
|
671
699
|
zJwtVcJsonLdCredentialIssuerMetadata,
|
|
672
700
|
zLdpVcCredentialIssuerMetadata,
|
|
673
701
|
zJwtVcJsonCredentialIssuerMetadata,
|
|
702
|
+
zSdJwtVcCredentialIssuerMetadataDraft16,
|
|
674
703
|
zSdJwtDcCredentialIssuerMetadataDraft15,
|
|
675
704
|
zMsoMdocCredentialIssuerMetadataDraft15,
|
|
676
705
|
zJwtVcJsonLdCredentialIssuerMetadataDraft15,
|
|
@@ -685,32 +714,24 @@ var allCredentialIssuerMetadataFormats = [
|
|
|
685
714
|
var allCredentialIssuerMetadataFormatIdentifiers = allCredentialIssuerMetadataFormats.map(
|
|
686
715
|
(format) => format.shape.format.value
|
|
687
716
|
);
|
|
688
|
-
var zCredentialConfigurationSupportedWithFormats = zCredentialConfigurationSupportedCommon.transform(
|
|
689
|
-
(data
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
{}
|
|
701
|
-
)[data.format];
|
|
702
|
-
const result = z12.object({}).passthrough().and(
|
|
703
|
-
validators.length > 1 ? z12.union(validators) : validators[0]
|
|
704
|
-
).safeParse(data);
|
|
705
|
-
if (result.success) {
|
|
706
|
-
return result.data;
|
|
707
|
-
}
|
|
708
|
-
for (const issue of result.error.issues) {
|
|
709
|
-
ctx.addIssue(issue);
|
|
710
|
-
}
|
|
711
|
-
return z12.NEVER;
|
|
717
|
+
var zCredentialConfigurationSupportedWithFormats = z12.union([zCredentialConfigurationSupportedCommon, zCredentialConfigurationSupportedCommonDraft15]).transform((data, ctx) => {
|
|
718
|
+
if (!allCredentialIssuerMetadataFormatIdentifiers.includes(data.format)) return data;
|
|
719
|
+
const validators = allCredentialIssuerMetadataFormats.filter(
|
|
720
|
+
(formatValidator) => formatValidator.shape.format.value === data.format
|
|
721
|
+
);
|
|
722
|
+
const result = z12.object({}).passthrough().and(
|
|
723
|
+
validators.length > 1 ? z12.union(
|
|
724
|
+
validators
|
|
725
|
+
) : validators[0]
|
|
726
|
+
).safeParse(data);
|
|
727
|
+
if (result.success) {
|
|
728
|
+
return result.data;
|
|
712
729
|
}
|
|
713
|
-
)
|
|
730
|
+
for (const issue of result.error.issues) {
|
|
731
|
+
ctx.addIssue(issue);
|
|
732
|
+
}
|
|
733
|
+
return z12.NEVER;
|
|
734
|
+
});
|
|
714
735
|
var zCredentialIssuerMetadataDisplayEntry = z12.object({
|
|
715
736
|
name: z12.string().optional(),
|
|
716
737
|
locale: z12.string().optional(),
|
|
@@ -740,7 +761,7 @@ var zCredentialIssuerMetadataDraft14Draft15Draft16 = z12.object({
|
|
|
740
761
|
display: z12.array(zCredentialIssuerMetadataDisplayEntry).optional(),
|
|
741
762
|
credential_configurations_supported: z12.record(z12.string(), zCredentialConfigurationSupportedWithFormats)
|
|
742
763
|
}).passthrough();
|
|
743
|
-
var
|
|
764
|
+
var zCredentialConfigurationSupportedDraft11To16 = z12.object({
|
|
744
765
|
id: z12.string().optional(),
|
|
745
766
|
format: z12.string(),
|
|
746
767
|
cryptographic_suites_supported: z12.array(z12.string()).optional(),
|
|
@@ -753,30 +774,36 @@ var zCredentialConfigurationSupportedDraft11To14 = z12.object({
|
|
|
753
774
|
url: z12.string().url().optional()
|
|
754
775
|
}).passthrough().optional()
|
|
755
776
|
}).passthrough()
|
|
756
|
-
).optional()
|
|
757
|
-
|
|
777
|
+
).optional(),
|
|
778
|
+
claims: z12.any().optional()
|
|
779
|
+
}).passthrough().transform(({ cryptographic_suites_supported, display, claims, id, ...rest }) => ({
|
|
758
780
|
...rest,
|
|
759
781
|
...cryptographic_suites_supported ? { credential_signing_alg_values_supported: cryptographic_suites_supported } : {},
|
|
760
|
-
...display ? {
|
|
761
|
-
|
|
762
|
-
...
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
782
|
+
...claims || display ? {
|
|
783
|
+
credential_metadata: {
|
|
784
|
+
...claims ? { claims } : {},
|
|
785
|
+
...display ? {
|
|
786
|
+
display: display.map(({ logo, background_image, ...displayRest }) => ({
|
|
787
|
+
...displayRest,
|
|
788
|
+
// url became uri and also required
|
|
789
|
+
// so if there's no url in the logo, we remove the whole logo object
|
|
790
|
+
...logo?.url ? {
|
|
791
|
+
// TODO: we should add the other params from logo as well
|
|
792
|
+
logo: {
|
|
793
|
+
uri: logo.url
|
|
794
|
+
}
|
|
795
|
+
} : {},
|
|
796
|
+
// TODO: we should add the other params from background_image as well
|
|
797
|
+
// url became uri and also required
|
|
798
|
+
// so if there's no url in the background_image, we remove the whole logo object
|
|
799
|
+
...background_image?.url ? {
|
|
800
|
+
background_image: {
|
|
801
|
+
uri: background_image.url
|
|
802
|
+
}
|
|
803
|
+
} : {}
|
|
804
|
+
}))
|
|
778
805
|
} : {}
|
|
779
|
-
}
|
|
806
|
+
}
|
|
780
807
|
} : {}
|
|
781
808
|
})).transform((data, ctx) => {
|
|
782
809
|
const formatSpecificTransformations = {
|
|
@@ -799,7 +826,7 @@ var zCredentialConfigurationSupportedDraft16To15 = zCredentialConfigurationSuppo
|
|
|
799
826
|
...rest
|
|
800
827
|
})
|
|
801
828
|
);
|
|
802
|
-
var
|
|
829
|
+
var zCredentialConfigurationSupportedDraft16To11 = zCredentialConfigurationSupportedDraft16To15.and(
|
|
803
830
|
z12.object({
|
|
804
831
|
id: z12.string()
|
|
805
832
|
}).passthrough()
|
|
@@ -858,7 +885,7 @@ var zCredentialIssuerMetadataDraft11To16 = z12.object({
|
|
|
858
885
|
}).pipe(
|
|
859
886
|
z12.object({
|
|
860
887
|
// Update from v11 structure to v14 structure
|
|
861
|
-
credential_configurations_supported: z12.record(z12.string(),
|
|
888
|
+
credential_configurations_supported: z12.record(z12.string(), zCredentialConfigurationSupportedDraft11To16)
|
|
862
889
|
}).passthrough()
|
|
863
890
|
).pipe(zCredentialIssuerMetadataDraft14Draft15Draft16);
|
|
864
891
|
var zCredentialIssuerMetadataWithDraft11 = zCredentialIssuerMetadataDraft14Draft15Draft16.transform((issuerMetadata) => ({
|
|
@@ -870,7 +897,7 @@ var zCredentialIssuerMetadataWithDraft11 = zCredentialIssuerMetadataDraft14Draft
|
|
|
870
897
|
}))
|
|
871
898
|
})).pipe(
|
|
872
899
|
zCredentialIssuerMetadataDraft14Draft15Draft16.extend({
|
|
873
|
-
credentials_supported: z12.array(
|
|
900
|
+
credentials_supported: z12.array(zCredentialConfigurationSupportedDraft16To11)
|
|
874
901
|
})
|
|
875
902
|
);
|
|
876
903
|
var zCredentialIssuerMetadata = z12.union([
|
|
@@ -1076,7 +1103,7 @@ function credentialsSupportedToCredentialConfigurationsSupported(credentialsSupp
|
|
|
1076
1103
|
`Credential supported at index '${index}' does not have an 'id' property. Credential configuration requires the 'id' property as key`
|
|
1077
1104
|
);
|
|
1078
1105
|
}
|
|
1079
|
-
const parseResult =
|
|
1106
|
+
const parseResult = zCredentialConfigurationSupportedDraft11To16.safeParse(credentialSupported);
|
|
1080
1107
|
if (!parseResult.success) {
|
|
1081
1108
|
throw new ValidationError2(
|
|
1082
1109
|
`Error transforming credential supported with id '${credentialSupported.id}' to credential configuration supported format`,
|
|
@@ -1106,7 +1133,7 @@ function getCredentialRequestFormatPayloadForCredentialConfigurationId(options)
|
|
|
1106
1133
|
options.issuerMetadata.credentialIssuer.credential_configurations_supported,
|
|
1107
1134
|
options.credentialConfigurationId
|
|
1108
1135
|
);
|
|
1109
|
-
if (zIs(zSdJwtVcCredentialIssuerMetadataDraft14, credentialConfiguration)) {
|
|
1136
|
+
if (zIs(zSdJwtVcCredentialIssuerMetadataDraft16, credentialConfiguration) || zIs(zSdJwtVcCredentialIssuerMetadataDraft14, credentialConfiguration)) {
|
|
1110
1137
|
return {
|
|
1111
1138
|
format: credentialConfiguration.format,
|
|
1112
1139
|
vct: credentialConfiguration.vct
|