@openid4vc/openid4vci 0.3.0-alpha-20250922085649 → 0.3.0-alpha-20251001121503
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 +678 -545
- package/dist/index.d.ts +678 -545
- package/dist/index.js +31 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +31 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -247,14 +247,23 @@ import z5 from "zod";
|
|
|
247
247
|
|
|
248
248
|
// src/metadata/credential-issuer/z-claims-description.ts
|
|
249
249
|
import z2 from "zod";
|
|
250
|
-
var
|
|
250
|
+
var zCredentialConfigurationSupportedClaimsDescriptionDraft14 = z2.object({
|
|
251
251
|
mandatory: z2.boolean().optional(),
|
|
252
252
|
value_type: z2.string().optional(),
|
|
253
|
-
display: z2.
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
253
|
+
display: z2.array(
|
|
254
|
+
z2.object({
|
|
255
|
+
name: z2.string().optional(),
|
|
256
|
+
locale: z2.string().optional()
|
|
257
|
+
}).passthrough()
|
|
258
|
+
).optional()
|
|
257
259
|
}).passthrough();
|
|
260
|
+
var zCredentialConfigurationSupportedClaimsDraft14 = z2.record(
|
|
261
|
+
z2.string(),
|
|
262
|
+
z2.union([
|
|
263
|
+
zCredentialConfigurationSupportedClaimsDescriptionDraft14,
|
|
264
|
+
z2.lazy(() => zCredentialConfigurationSupportedClaimsDraft14)
|
|
265
|
+
])
|
|
266
|
+
);
|
|
258
267
|
var zClaimsDescriptionPath = z2.array(z2.union([z2.string(), z2.number().int().nonnegative(), z2.null()])).nonempty();
|
|
259
268
|
var zMsoMdocClaimsDescriptionPath = z2.tuple([z2.string(), z2.string()], {
|
|
260
269
|
message: "mso_mdoc claims description path MUST be an array with exactly two string elements, pointing to the namespace and element identifier within an mdoc credential"
|
|
@@ -394,7 +403,7 @@ var zMsoMdocCredentialRequestFormatDraft14 = z5.object({
|
|
|
394
403
|
format: zMsoMdocFormatIdentifier,
|
|
395
404
|
doctype: z5.string(),
|
|
396
405
|
// Format based request is removed in Draft 15, so only old claims syntax supported.
|
|
397
|
-
claims:
|
|
406
|
+
claims: zCredentialConfigurationSupportedClaimsDraft14.optional()
|
|
398
407
|
});
|
|
399
408
|
|
|
400
409
|
// src/formats/credential/sd-jwt-vc/z-sd-jwt-vc.ts
|
|
@@ -405,7 +414,7 @@ var zLegacySdJwtVcCredentialIssuerMetadataDraft16 = zCredentialConfigurationSupp
|
|
|
405
414
|
format: zLegacySdJwtVcFormatIdentifier,
|
|
406
415
|
order: z6.optional(z6.array(z6.string())),
|
|
407
416
|
credential_metadata: zCredentialConfigurationSupportedCommonCredentialMetadata.extend({
|
|
408
|
-
claims: z6.array(
|
|
417
|
+
claims: z6.array(zIssuerMetadataClaimsDescription).optional()
|
|
409
418
|
}).optional(),
|
|
410
419
|
credential_definition: z6.optional(z6.never())
|
|
411
420
|
});
|
|
@@ -474,13 +483,13 @@ var zLdpVcCredentialIssuerMetadata = zCredentialConfigurationSupportedCommon.ext
|
|
|
474
483
|
format: zLdpVcFormatIdentifier,
|
|
475
484
|
credential_definition: zW3cVcJsonLdCredentialDefinition,
|
|
476
485
|
credential_metadata: zCredentialConfigurationSupportedCommonCredentialMetadata.extend({
|
|
477
|
-
claims: zIssuerMetadataClaimsDescription.optional()
|
|
486
|
+
claims: z9.array(zIssuerMetadataClaimsDescription).optional()
|
|
478
487
|
}).optional()
|
|
479
488
|
});
|
|
480
489
|
var zLdpVcCredentialIssuerMetadataDraft15 = zCredentialConfigurationSupportedCommonDraft15.extend({
|
|
481
490
|
format: zLdpVcFormatIdentifier,
|
|
482
491
|
credential_definition: zW3cVcJsonLdCredentialDefinition,
|
|
483
|
-
claims: zIssuerMetadataClaimsDescription.optional()
|
|
492
|
+
claims: z9.array(zIssuerMetadataClaimsDescription).optional()
|
|
484
493
|
});
|
|
485
494
|
var zLdpVcCredentialIssuerMetadataDraft14 = zCredentialConfigurationSupportedCommonDraft15.extend({
|
|
486
495
|
format: zLdpVcFormatIdentifier,
|
|
@@ -549,13 +558,13 @@ var zJwtVcJsonLdCredentialIssuerMetadata = zCredentialConfigurationSupportedComm
|
|
|
549
558
|
format: zJwtVcJsonLdFormatIdentifier,
|
|
550
559
|
credential_definition: zW3cVcJsonLdCredentialDefinition,
|
|
551
560
|
credential_metadata: zCredentialConfigurationSupportedCommonCredentialMetadata.extend({
|
|
552
|
-
claims: zIssuerMetadataClaimsDescription.optional()
|
|
561
|
+
claims: z10.array(zIssuerMetadataClaimsDescription).optional()
|
|
553
562
|
}).optional()
|
|
554
563
|
});
|
|
555
564
|
var zJwtVcJsonLdCredentialIssuerMetadataDraft15 = zCredentialConfigurationSupportedCommonDraft15.extend({
|
|
556
565
|
format: zJwtVcJsonLdFormatIdentifier,
|
|
557
566
|
credential_definition: zW3cVcJsonLdCredentialDefinition,
|
|
558
|
-
claims: zIssuerMetadataClaimsDescription.optional()
|
|
567
|
+
claims: z10.array(zIssuerMetadataClaimsDescription).optional()
|
|
559
568
|
});
|
|
560
569
|
var zJwtVcJsonLdCredentialIssuerMetadataDraft14 = zCredentialConfigurationSupportedCommonDraft15.extend({
|
|
561
570
|
format: zJwtVcJsonLdFormatIdentifier,
|
|
@@ -630,13 +639,13 @@ var zJwtVcJsonCredentialIssuerMetadata = zCredentialConfigurationSupportedCommon
|
|
|
630
639
|
format: zJwtVcJsonFormatIdentifier,
|
|
631
640
|
credential_definition: zJwtVcJsonCredentialDefinition,
|
|
632
641
|
credential_metadata: zCredentialConfigurationSupportedCommonCredentialMetadata.extend({
|
|
633
|
-
claims: zIssuerMetadataClaimsDescription.optional()
|
|
642
|
+
claims: z11.array(zIssuerMetadataClaimsDescription).optional()
|
|
634
643
|
}).optional()
|
|
635
644
|
});
|
|
636
645
|
var zJwtVcJsonCredentialIssuerMetadataDraft15 = zCredentialConfigurationSupportedCommonDraft15.extend({
|
|
637
646
|
format: zJwtVcJsonFormatIdentifier,
|
|
638
647
|
credential_definition: zJwtVcJsonCredentialDefinition,
|
|
639
|
-
claims: zIssuerMetadataClaimsDescription.optional()
|
|
648
|
+
claims: z11.array(zIssuerMetadataClaimsDescription).optional()
|
|
640
649
|
});
|
|
641
650
|
var zJwtVcJsonCredentialIssuerMetadataDraft14 = zCredentialConfigurationSupportedCommonDraft15.extend({
|
|
642
651
|
format: zJwtVcJsonFormatIdentifier,
|
|
@@ -705,11 +714,18 @@ var zSdJwtW3VcCredentialIssuerMetadata = zCredentialConfigurationSupportedCommon
|
|
|
705
714
|
format: zSdJwtW3VcFormatIdentifier,
|
|
706
715
|
credential_definition: zSdJwtW3VcCredentialDefinition,
|
|
707
716
|
credential_metadata: zCredentialConfigurationSupportedCommonCredentialMetadata.extend({
|
|
708
|
-
claims: zIssuerMetadataClaimsDescription.optional()
|
|
717
|
+
claims: z12.array(zIssuerMetadataClaimsDescription).optional()
|
|
709
718
|
}).optional(),
|
|
710
719
|
// FIXME(vc+sd-jwt): remove when dropping support for legacy vc+sd-jwt. Allows type narrowing.
|
|
711
720
|
vct: z12.optional(z12.never())
|
|
712
721
|
});
|
|
722
|
+
var zSdJwtW3VcCredentialIssuerMetadataDraft15 = zCredentialConfigurationSupportedCommonDraft15.extend({
|
|
723
|
+
format: zSdJwtW3VcFormatIdentifier,
|
|
724
|
+
credential_definition: zSdJwtW3VcCredentialDefinition,
|
|
725
|
+
claims: z12.array(zIssuerMetadataClaimsDescription).optional(),
|
|
726
|
+
// FIXME(vc+sd-jwt): remove when dropping support for legacy vc+sd-jwt. Allows type narrowing.
|
|
727
|
+
vct: z12.optional(z12.never())
|
|
728
|
+
});
|
|
713
729
|
var zSdJwtW3VcCredentialRequestFormatDraft14 = z12.object({
|
|
714
730
|
format: zSdJwtW3VcFormatIdentifier,
|
|
715
731
|
credential_definition: zSdJwtW3VcCredentialDefinition,
|
|
@@ -725,6 +741,7 @@ var allCredentialIssuerMetadataFormats = [
|
|
|
725
741
|
zLdpVcCredentialIssuerMetadata,
|
|
726
742
|
zJwtVcJsonCredentialIssuerMetadata,
|
|
727
743
|
zSdJwtW3VcCredentialIssuerMetadata,
|
|
744
|
+
zSdJwtW3VcCredentialIssuerMetadataDraft15,
|
|
728
745
|
zLegacySdJwtVcCredentialIssuerMetadataDraft16,
|
|
729
746
|
zSdJwtDcCredentialIssuerMetadataDraft15,
|
|
730
747
|
zMsoMdocCredentialIssuerMetadataDraft15,
|