@sd-jwt/sd-jwt-vc 0.20.1-next.0 → 0.20.1-next.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/dist/index.d.mts +0 -203
- package/dist/index.d.ts +0 -203
- package/package.json +8 -8
- package/test/tsconfig.json +4 -0
package/dist/index.d.mts
CHANGED
|
@@ -2,9 +2,7 @@ import { SDJWTConfig, Verifier, SdJwtPayload, kbPayload, kbHeader, SDJwtInstance
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
declare const BackgroundImageSchema: z.ZodObject<{
|
|
5
|
-
/** REQUIRED. A URI pointing to the background image. */
|
|
6
5
|
uri: z.ZodString;
|
|
7
|
-
/** OPTIONAL. An "integrity metadata" string as described in Section 7. */
|
|
8
6
|
'uri#integrity': z.ZodOptional<z.ZodString>;
|
|
9
7
|
}, z.core.$loose>;
|
|
10
8
|
type BackgroundImage = z.infer<typeof BackgroundImageSchema>;
|
|
@@ -12,11 +10,8 @@ type BackgroundImage = z.infer<typeof BackgroundImageSchema>;
|
|
|
12
10
|
* Logo metadata used in rendering a credential.
|
|
13
11
|
*/
|
|
14
12
|
declare const LogoSchema: z.ZodObject<{
|
|
15
|
-
/** REQUIRED. A URI pointing to the logo image. */
|
|
16
13
|
uri: z.ZodString;
|
|
17
|
-
/** OPTIONAL. An "integrity metadata" string as described in Section 7. */
|
|
18
14
|
'uri#integrity': z.ZodOptional<z.ZodString>;
|
|
19
|
-
/** OPTIONAL. A string containing alternative text for the logo image. */
|
|
20
15
|
alt_text: z.ZodOptional<z.ZodString>;
|
|
21
16
|
}, z.core.$loose>;
|
|
22
17
|
type Logo = z.infer<typeof LogoSchema>;
|
|
@@ -24,24 +19,15 @@ type Logo = z.infer<typeof LogoSchema>;
|
|
|
24
19
|
* The simple rendering method is intended for applications that do not support SVG.
|
|
25
20
|
*/
|
|
26
21
|
declare const SimpleRenderingSchema: z.ZodObject<{
|
|
27
|
-
/** OPTIONAL. Logo metadata to display for the credential. */
|
|
28
22
|
logo: z.ZodOptional<z.ZodObject<{
|
|
29
|
-
/** REQUIRED. A URI pointing to the logo image. */
|
|
30
23
|
uri: z.ZodString;
|
|
31
|
-
/** OPTIONAL. An "integrity metadata" string as described in Section 7. */
|
|
32
24
|
'uri#integrity': z.ZodOptional<z.ZodString>;
|
|
33
|
-
/** OPTIONAL. A string containing alternative text for the logo image. */
|
|
34
25
|
alt_text: z.ZodOptional<z.ZodString>;
|
|
35
26
|
}, z.core.$loose>>;
|
|
36
|
-
/** OPTIONAL. RGB color value for the credential background (e.g., "#FFFFFF"). */
|
|
37
27
|
background_color: z.ZodOptional<z.ZodString>;
|
|
38
|
-
/** OPTIONAL. RGB color value for the credential text (e.g., "#000000"). */
|
|
39
28
|
text_color: z.ZodOptional<z.ZodString>;
|
|
40
|
-
/** OPTIONAL. An object containing information about the background image to be displayed for the type. */
|
|
41
29
|
background_image: z.ZodOptional<z.ZodObject<{
|
|
42
|
-
/** REQUIRED. A URI pointing to the background image. */
|
|
43
30
|
uri: z.ZodString;
|
|
44
|
-
/** OPTIONAL. An "integrity metadata" string as described in Section 7. */
|
|
45
31
|
'uri#integrity': z.ZodOptional<z.ZodString>;
|
|
46
32
|
}, z.core.$loose>>;
|
|
47
33
|
}, z.core.$loose>;
|
|
@@ -65,17 +51,14 @@ declare const ContrastSchema: z.ZodEnum<{
|
|
|
65
51
|
* Properties that describe the display preferences for an SVG template rendering.
|
|
66
52
|
*/
|
|
67
53
|
declare const SvgTemplatePropertiesSchema: z.ZodObject<{
|
|
68
|
-
/** OPTIONAL. Orientation optimized for the template. */
|
|
69
54
|
orientation: z.ZodOptional<z.ZodEnum<{
|
|
70
55
|
portrait: "portrait";
|
|
71
56
|
landscape: "landscape";
|
|
72
57
|
}>>;
|
|
73
|
-
/** OPTIONAL. Color scheme optimized for the template. */
|
|
74
58
|
color_scheme: z.ZodOptional<z.ZodEnum<{
|
|
75
59
|
light: "light";
|
|
76
60
|
dark: "dark";
|
|
77
61
|
}>>;
|
|
78
|
-
/** OPTIONAL. Contrast level optimized for the template. */
|
|
79
62
|
contrast: z.ZodOptional<z.ZodEnum<{
|
|
80
63
|
normal: "normal";
|
|
81
64
|
high: "high";
|
|
@@ -86,23 +69,17 @@ type SvgTemplateProperties = z.infer<typeof SvgTemplatePropertiesSchema>;
|
|
|
86
69
|
* SVG rendering metadata containing URI and optional integrity and properties.
|
|
87
70
|
*/
|
|
88
71
|
declare const SvgTemplateRenderingSchema: z.ZodObject<{
|
|
89
|
-
/** REQUIRED. A URI pointing to the SVG template. */
|
|
90
72
|
uri: z.ZodString;
|
|
91
|
-
/** OPTIONAL. An "integrity metadata" string as described in Section 7. */
|
|
92
73
|
'uri#integrity': z.ZodOptional<z.ZodString>;
|
|
93
|
-
/** REQUIRED if more than one SVG template is present. */
|
|
94
74
|
properties: z.ZodOptional<z.ZodObject<{
|
|
95
|
-
/** OPTIONAL. Orientation optimized for the template. */
|
|
96
75
|
orientation: z.ZodOptional<z.ZodEnum<{
|
|
97
76
|
portrait: "portrait";
|
|
98
77
|
landscape: "landscape";
|
|
99
78
|
}>>;
|
|
100
|
-
/** OPTIONAL. Color scheme optimized for the template. */
|
|
101
79
|
color_scheme: z.ZodOptional<z.ZodEnum<{
|
|
102
80
|
light: "light";
|
|
103
81
|
dark: "dark";
|
|
104
82
|
}>>;
|
|
105
|
-
/** OPTIONAL. Contrast level optimized for the template. */
|
|
106
83
|
contrast: z.ZodOptional<z.ZodEnum<{
|
|
107
84
|
normal: "normal";
|
|
108
85
|
high: "high";
|
|
@@ -114,76 +91,49 @@ type SvgTemplateRendering = z.infer<typeof SvgTemplateRenderingSchema>;
|
|
|
114
91
|
* Rendering metadata, either simple or SVG-based, for a credential.
|
|
115
92
|
*/
|
|
116
93
|
declare const RenderingSchema: z.ZodPipe<z.ZodObject<{
|
|
117
|
-
/** OPTIONAL. Simple rendering metadata. */
|
|
118
94
|
simple: z.ZodOptional<z.ZodObject<{
|
|
119
|
-
/** OPTIONAL. Logo metadata to display for the credential. */
|
|
120
95
|
logo: z.ZodOptional<z.ZodObject<{
|
|
121
|
-
/** REQUIRED. A URI pointing to the logo image. */
|
|
122
96
|
uri: z.ZodString;
|
|
123
|
-
/** OPTIONAL. An "integrity metadata" string as described in Section 7. */
|
|
124
97
|
'uri#integrity': z.ZodOptional<z.ZodString>;
|
|
125
|
-
/** OPTIONAL. A string containing alternative text for the logo image. */
|
|
126
98
|
alt_text: z.ZodOptional<z.ZodString>;
|
|
127
99
|
}, z.core.$loose>>;
|
|
128
|
-
/** OPTIONAL. RGB color value for the credential background (e.g., "#FFFFFF"). */
|
|
129
100
|
background_color: z.ZodOptional<z.ZodString>;
|
|
130
|
-
/** OPTIONAL. RGB color value for the credential text (e.g., "#000000"). */
|
|
131
101
|
text_color: z.ZodOptional<z.ZodString>;
|
|
132
|
-
/** OPTIONAL. An object containing information about the background image to be displayed for the type. */
|
|
133
102
|
background_image: z.ZodOptional<z.ZodObject<{
|
|
134
|
-
/** REQUIRED. A URI pointing to the background image. */
|
|
135
103
|
uri: z.ZodString;
|
|
136
|
-
/** OPTIONAL. An "integrity metadata" string as described in Section 7. */
|
|
137
104
|
'uri#integrity': z.ZodOptional<z.ZodString>;
|
|
138
105
|
}, z.core.$loose>>;
|
|
139
106
|
}, z.core.$loose>>;
|
|
140
|
-
/** OPTIONAL. Array of SVG template rendering objects. */
|
|
141
107
|
svg_templates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
142
|
-
/** REQUIRED. A URI pointing to the SVG template. */
|
|
143
108
|
uri: z.ZodString;
|
|
144
|
-
/** OPTIONAL. An "integrity metadata" string as described in Section 7. */
|
|
145
109
|
'uri#integrity': z.ZodOptional<z.ZodString>;
|
|
146
|
-
/** REQUIRED if more than one SVG template is present. */
|
|
147
110
|
properties: z.ZodOptional<z.ZodObject<{
|
|
148
|
-
/** OPTIONAL. Orientation optimized for the template. */
|
|
149
111
|
orientation: z.ZodOptional<z.ZodEnum<{
|
|
150
112
|
portrait: "portrait";
|
|
151
113
|
landscape: "landscape";
|
|
152
114
|
}>>;
|
|
153
|
-
/** OPTIONAL. Color scheme optimized for the template. */
|
|
154
115
|
color_scheme: z.ZodOptional<z.ZodEnum<{
|
|
155
116
|
light: "light";
|
|
156
117
|
dark: "dark";
|
|
157
118
|
}>>;
|
|
158
|
-
/** OPTIONAL. Contrast level optimized for the template. */
|
|
159
119
|
contrast: z.ZodOptional<z.ZodEnum<{
|
|
160
120
|
normal: "normal";
|
|
161
121
|
high: "high";
|
|
162
122
|
}>>;
|
|
163
123
|
}, z.core.$loose>>;
|
|
164
124
|
}, z.core.$loose>>>;
|
|
165
|
-
/**
|
|
166
|
-
* OPTIONAL. Array of SVG template rendering objects.
|
|
167
|
-
* @deprecated use `svg_templates` (plural) instead.
|
|
168
|
-
*/
|
|
169
125
|
svg_template: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
170
|
-
/** REQUIRED. A URI pointing to the SVG template. */
|
|
171
126
|
uri: z.ZodString;
|
|
172
|
-
/** OPTIONAL. An "integrity metadata" string as described in Section 7. */
|
|
173
127
|
'uri#integrity': z.ZodOptional<z.ZodString>;
|
|
174
|
-
/** REQUIRED if more than one SVG template is present. */
|
|
175
128
|
properties: z.ZodOptional<z.ZodObject<{
|
|
176
|
-
/** OPTIONAL. Orientation optimized for the template. */
|
|
177
129
|
orientation: z.ZodOptional<z.ZodEnum<{
|
|
178
130
|
portrait: "portrait";
|
|
179
131
|
landscape: "landscape";
|
|
180
132
|
}>>;
|
|
181
|
-
/** OPTIONAL. Color scheme optimized for the template. */
|
|
182
133
|
color_scheme: z.ZodOptional<z.ZodEnum<{
|
|
183
134
|
light: "light";
|
|
184
135
|
dark: "dark";
|
|
185
136
|
}>>;
|
|
186
|
-
/** OPTIONAL. Contrast level optimized for the template. */
|
|
187
137
|
contrast: z.ZodOptional<z.ZodEnum<{
|
|
188
138
|
normal: "normal";
|
|
189
139
|
high: "high";
|
|
@@ -264,92 +214,54 @@ type Rendering = z.infer<typeof RenderingSchema>;
|
|
|
264
214
|
* Display metadata associated with a credential type.
|
|
265
215
|
*/
|
|
266
216
|
declare const DisplaySchema: z.ZodPipe<z.ZodObject<{
|
|
267
|
-
/**
|
|
268
|
-
* Language tag according to RFC 5646 (e.g., "en", "de").
|
|
269
|
-
* @deprecated - use `locale` instead
|
|
270
|
-
*/
|
|
271
217
|
lang: z.ZodOptional<z.ZodString>;
|
|
272
|
-
/**
|
|
273
|
-
* REQUIRED (preferred). Language tag according to RFC 5646.
|
|
274
|
-
* Alias for `lang` - either `lang` or `locale` must be provided.
|
|
275
|
-
*/
|
|
276
218
|
locale: z.ZodOptional<z.ZodString>;
|
|
277
|
-
/** REQUIRED. Human-readable name for the credential type. */
|
|
278
219
|
name: z.ZodString;
|
|
279
|
-
/** OPTIONAL. Description of the credential type for end users. */
|
|
280
220
|
description: z.ZodOptional<z.ZodString>;
|
|
281
|
-
/** OPTIONAL. Rendering information (simple or SVG) for the credential. */
|
|
282
221
|
rendering: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
283
|
-
/** OPTIONAL. Simple rendering metadata. */
|
|
284
222
|
simple: z.ZodOptional<z.ZodObject<{
|
|
285
|
-
/** OPTIONAL. Logo metadata to display for the credential. */
|
|
286
223
|
logo: z.ZodOptional<z.ZodObject<{
|
|
287
|
-
/** REQUIRED. A URI pointing to the logo image. */
|
|
288
224
|
uri: z.ZodString;
|
|
289
|
-
/** OPTIONAL. An "integrity metadata" string as described in Section 7. */
|
|
290
225
|
'uri#integrity': z.ZodOptional<z.ZodString>;
|
|
291
|
-
/** OPTIONAL. A string containing alternative text for the logo image. */
|
|
292
226
|
alt_text: z.ZodOptional<z.ZodString>;
|
|
293
227
|
}, z.core.$loose>>;
|
|
294
|
-
/** OPTIONAL. RGB color value for the credential background (e.g., "#FFFFFF"). */
|
|
295
228
|
background_color: z.ZodOptional<z.ZodString>;
|
|
296
|
-
/** OPTIONAL. RGB color value for the credential text (e.g., "#000000"). */
|
|
297
229
|
text_color: z.ZodOptional<z.ZodString>;
|
|
298
|
-
/** OPTIONAL. An object containing information about the background image to be displayed for the type. */
|
|
299
230
|
background_image: z.ZodOptional<z.ZodObject<{
|
|
300
|
-
/** REQUIRED. A URI pointing to the background image. */
|
|
301
231
|
uri: z.ZodString;
|
|
302
|
-
/** OPTIONAL. An "integrity metadata" string as described in Section 7. */
|
|
303
232
|
'uri#integrity': z.ZodOptional<z.ZodString>;
|
|
304
233
|
}, z.core.$loose>>;
|
|
305
234
|
}, z.core.$loose>>;
|
|
306
|
-
/** OPTIONAL. Array of SVG template rendering objects. */
|
|
307
235
|
svg_templates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
308
|
-
/** REQUIRED. A URI pointing to the SVG template. */
|
|
309
236
|
uri: z.ZodString;
|
|
310
|
-
/** OPTIONAL. An "integrity metadata" string as described in Section 7. */
|
|
311
237
|
'uri#integrity': z.ZodOptional<z.ZodString>;
|
|
312
|
-
/** REQUIRED if more than one SVG template is present. */
|
|
313
238
|
properties: z.ZodOptional<z.ZodObject<{
|
|
314
|
-
/** OPTIONAL. Orientation optimized for the template. */
|
|
315
239
|
orientation: z.ZodOptional<z.ZodEnum<{
|
|
316
240
|
portrait: "portrait";
|
|
317
241
|
landscape: "landscape";
|
|
318
242
|
}>>;
|
|
319
|
-
/** OPTIONAL. Color scheme optimized for the template. */
|
|
320
243
|
color_scheme: z.ZodOptional<z.ZodEnum<{
|
|
321
244
|
light: "light";
|
|
322
245
|
dark: "dark";
|
|
323
246
|
}>>;
|
|
324
|
-
/** OPTIONAL. Contrast level optimized for the template. */
|
|
325
247
|
contrast: z.ZodOptional<z.ZodEnum<{
|
|
326
248
|
normal: "normal";
|
|
327
249
|
high: "high";
|
|
328
250
|
}>>;
|
|
329
251
|
}, z.core.$loose>>;
|
|
330
252
|
}, z.core.$loose>>>;
|
|
331
|
-
/**
|
|
332
|
-
* OPTIONAL. Array of SVG template rendering objects.
|
|
333
|
-
* @deprecated use `svg_templates` (plural) instead.
|
|
334
|
-
*/
|
|
335
253
|
svg_template: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
336
|
-
/** REQUIRED. A URI pointing to the SVG template. */
|
|
337
254
|
uri: z.ZodString;
|
|
338
|
-
/** OPTIONAL. An "integrity metadata" string as described in Section 7. */
|
|
339
255
|
'uri#integrity': z.ZodOptional<z.ZodString>;
|
|
340
|
-
/** REQUIRED if more than one SVG template is present. */
|
|
341
256
|
properties: z.ZodOptional<z.ZodObject<{
|
|
342
|
-
/** OPTIONAL. Orientation optimized for the template. */
|
|
343
257
|
orientation: z.ZodOptional<z.ZodEnum<{
|
|
344
258
|
portrait: "portrait";
|
|
345
259
|
landscape: "landscape";
|
|
346
260
|
}>>;
|
|
347
|
-
/** OPTIONAL. Color scheme optimized for the template. */
|
|
348
261
|
color_scheme: z.ZodOptional<z.ZodEnum<{
|
|
349
262
|
light: "light";
|
|
350
263
|
dark: "dark";
|
|
351
264
|
}>>;
|
|
352
|
-
/** OPTIONAL. Contrast level optimized for the template. */
|
|
353
265
|
contrast: z.ZodOptional<z.ZodEnum<{
|
|
354
266
|
normal: "normal";
|
|
355
267
|
high: "high";
|
|
@@ -505,24 +417,10 @@ type ClaimPath = z.infer<typeof ClaimPathSchema>;
|
|
|
505
417
|
* Display metadata for a specific claim.
|
|
506
418
|
*/
|
|
507
419
|
declare const ClaimDisplaySchema: z.ZodPipe<z.ZodObject<{
|
|
508
|
-
/**
|
|
509
|
-
* Language tag according to RFC 5646.
|
|
510
|
-
* @deprecated - use `locale` instead
|
|
511
|
-
*/
|
|
512
420
|
lang: z.ZodOptional<z.ZodString>;
|
|
513
|
-
/**
|
|
514
|
-
* REQUIRED (preferred). Language tag according to RFC 5646.
|
|
515
|
-
* Alias for `lang` - either `lang` or `locale` must be provided.
|
|
516
|
-
*/
|
|
517
421
|
locale: z.ZodOptional<z.ZodString>;
|
|
518
|
-
/** REQUIRED. Human-readable label for the claim. */
|
|
519
422
|
label: z.ZodOptional<z.ZodString>;
|
|
520
|
-
/**
|
|
521
|
-
* Human-readable label for the claim.
|
|
522
|
-
* @deprecated - use `label` instead
|
|
523
|
-
*/
|
|
524
423
|
name: z.ZodOptional<z.ZodString>;
|
|
525
|
-
/** OPTIONAL. Description of the claim for end users. */
|
|
526
424
|
description: z.ZodOptional<z.ZodString>;
|
|
527
425
|
}, z.core.$loose>, z.ZodTransform<{
|
|
528
426
|
locale: string | undefined;
|
|
@@ -550,31 +448,12 @@ type ClaimSelectiveDisclosure = z.infer<typeof ClaimSelectiveDisclosureSchema>;
|
|
|
550
448
|
* Metadata for individual claims in the credential type.
|
|
551
449
|
*/
|
|
552
450
|
declare const ClaimSchema: z.ZodObject<{
|
|
553
|
-
/**
|
|
554
|
-
* REQUIRED. Array of one or more paths to the claim in the credential subject.
|
|
555
|
-
* Each path is an array of strings (or null for array elements).
|
|
556
|
-
*/
|
|
557
451
|
path: z.ZodArray<z.ZodNullable<z.ZodString>>;
|
|
558
|
-
/** OPTIONAL. Display metadata in multiple languages. */
|
|
559
452
|
display: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
560
|
-
/**
|
|
561
|
-
* Language tag according to RFC 5646.
|
|
562
|
-
* @deprecated - use `locale` instead
|
|
563
|
-
*/
|
|
564
453
|
lang: z.ZodOptional<z.ZodString>;
|
|
565
|
-
/**
|
|
566
|
-
* REQUIRED (preferred). Language tag according to RFC 5646.
|
|
567
|
-
* Alias for `lang` - either `lang` or `locale` must be provided.
|
|
568
|
-
*/
|
|
569
454
|
locale: z.ZodOptional<z.ZodString>;
|
|
570
|
-
/** REQUIRED. Human-readable label for the claim. */
|
|
571
455
|
label: z.ZodOptional<z.ZodString>;
|
|
572
|
-
/**
|
|
573
|
-
* Human-readable label for the claim.
|
|
574
|
-
* @deprecated - use `label` instead
|
|
575
|
-
*/
|
|
576
456
|
name: z.ZodOptional<z.ZodString>;
|
|
577
|
-
/** OPTIONAL. Description of the claim for end users. */
|
|
578
457
|
description: z.ZodOptional<z.ZodString>;
|
|
579
458
|
}, z.core.$loose>, z.ZodTransform<{
|
|
580
459
|
locale: string | undefined;
|
|
@@ -588,21 +467,12 @@ declare const ClaimSchema: z.ZodObject<{
|
|
|
588
467
|
name?: string | undefined;
|
|
589
468
|
description?: string | undefined;
|
|
590
469
|
}>>>>;
|
|
591
|
-
/** OPTIONAL. Controls whether the claim must, may, or must not be selectively disclosed. */
|
|
592
470
|
sd: z.ZodOptional<z.ZodEnum<{
|
|
593
471
|
never: "never";
|
|
594
472
|
always: "always";
|
|
595
473
|
allowed: "allowed";
|
|
596
474
|
}>>;
|
|
597
|
-
/**
|
|
598
|
-
* OPTIONAL. A boolean indicating whether the claim must be present in the Unsecured Payload
|
|
599
|
-
* of the SD-JWT VC. Default is false if not specified.
|
|
600
|
-
*/
|
|
601
475
|
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
602
|
-
/**
|
|
603
|
-
* OPTIONAL. Unique string identifier for referencing the claim in an SVG template.
|
|
604
|
-
* Must consist of alphanumeric characters or underscores and must not start with a digit.
|
|
605
|
-
*/
|
|
606
476
|
svg_id: z.ZodOptional<z.ZodString>;
|
|
607
477
|
}, z.core.$loose>;
|
|
608
478
|
type Claim = z.infer<typeof ClaimSchema>;
|
|
@@ -611,104 +481,60 @@ type Claim = z.infer<typeof ClaimSchema>;
|
|
|
611
481
|
* Reference: https://www.ietf.org/archive/id/draft-ietf-oauth-sd-jwt-vc-13.html#name-type-metadata-format
|
|
612
482
|
*/
|
|
613
483
|
declare const TypeMetadataFormatSchema: z.ZodObject<{
|
|
614
|
-
/** REQUIRED. A URI uniquely identifying the credential type. */
|
|
615
484
|
vct: z.ZodString;
|
|
616
|
-
/** OPTIONAL. Human-readable name for developers. */
|
|
617
485
|
name: z.ZodOptional<z.ZodString>;
|
|
618
|
-
/** OPTIONAL. Human-readable description for developers. */
|
|
619
486
|
description: z.ZodOptional<z.ZodString>;
|
|
620
|
-
/** OPTIONAL. URI of another type that this one extends. */
|
|
621
487
|
extends: z.ZodOptional<z.ZodString>;
|
|
622
|
-
/** OPTIONAL. Integrity metadata for the 'extends' field. */
|
|
623
488
|
'extends#integrity': z.ZodOptional<z.ZodString>;
|
|
624
|
-
/** OPTIONAL. Array of localized display metadata for the type. */
|
|
625
489
|
display: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
626
|
-
/**
|
|
627
|
-
* Language tag according to RFC 5646 (e.g., "en", "de").
|
|
628
|
-
* @deprecated - use `locale` instead
|
|
629
|
-
*/
|
|
630
490
|
lang: z.ZodOptional<z.ZodString>;
|
|
631
|
-
/**
|
|
632
|
-
* REQUIRED (preferred). Language tag according to RFC 5646.
|
|
633
|
-
* Alias for `lang` - either `lang` or `locale` must be provided.
|
|
634
|
-
*/
|
|
635
491
|
locale: z.ZodOptional<z.ZodString>;
|
|
636
|
-
/** REQUIRED. Human-readable name for the credential type. */
|
|
637
492
|
name: z.ZodString;
|
|
638
|
-
/** OPTIONAL. Description of the credential type for end users. */
|
|
639
493
|
description: z.ZodOptional<z.ZodString>;
|
|
640
|
-
/** OPTIONAL. Rendering information (simple or SVG) for the credential. */
|
|
641
494
|
rendering: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
642
|
-
/** OPTIONAL. Simple rendering metadata. */
|
|
643
495
|
simple: z.ZodOptional<z.ZodObject<{
|
|
644
|
-
/** OPTIONAL. Logo metadata to display for the credential. */
|
|
645
496
|
logo: z.ZodOptional<z.ZodObject<{
|
|
646
|
-
/** REQUIRED. A URI pointing to the logo image. */
|
|
647
497
|
uri: z.ZodString;
|
|
648
|
-
/** OPTIONAL. An "integrity metadata" string as described in Section 7. */
|
|
649
498
|
'uri#integrity': z.ZodOptional<z.ZodString>;
|
|
650
|
-
/** OPTIONAL. A string containing alternative text for the logo image. */
|
|
651
499
|
alt_text: z.ZodOptional<z.ZodString>;
|
|
652
500
|
}, z.core.$loose>>;
|
|
653
|
-
/** OPTIONAL. RGB color value for the credential background (e.g., "#FFFFFF"). */
|
|
654
501
|
background_color: z.ZodOptional<z.ZodString>;
|
|
655
|
-
/** OPTIONAL. RGB color value for the credential text (e.g., "#000000"). */
|
|
656
502
|
text_color: z.ZodOptional<z.ZodString>;
|
|
657
|
-
/** OPTIONAL. An object containing information about the background image to be displayed for the type. */
|
|
658
503
|
background_image: z.ZodOptional<z.ZodObject<{
|
|
659
|
-
/** REQUIRED. A URI pointing to the background image. */
|
|
660
504
|
uri: z.ZodString;
|
|
661
|
-
/** OPTIONAL. An "integrity metadata" string as described in Section 7. */
|
|
662
505
|
'uri#integrity': z.ZodOptional<z.ZodString>;
|
|
663
506
|
}, z.core.$loose>>;
|
|
664
507
|
}, z.core.$loose>>;
|
|
665
|
-
/** OPTIONAL. Array of SVG template rendering objects. */
|
|
666
508
|
svg_templates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
667
|
-
/** REQUIRED. A URI pointing to the SVG template. */
|
|
668
509
|
uri: z.ZodString;
|
|
669
|
-
/** OPTIONAL. An "integrity metadata" string as described in Section 7. */
|
|
670
510
|
'uri#integrity': z.ZodOptional<z.ZodString>;
|
|
671
|
-
/** REQUIRED if more than one SVG template is present. */
|
|
672
511
|
properties: z.ZodOptional<z.ZodObject<{
|
|
673
|
-
/** OPTIONAL. Orientation optimized for the template. */
|
|
674
512
|
orientation: z.ZodOptional<z.ZodEnum<{
|
|
675
513
|
portrait: "portrait";
|
|
676
514
|
landscape: "landscape";
|
|
677
515
|
}>>;
|
|
678
|
-
/** OPTIONAL. Color scheme optimized for the template. */
|
|
679
516
|
color_scheme: z.ZodOptional<z.ZodEnum<{
|
|
680
517
|
light: "light";
|
|
681
518
|
dark: "dark";
|
|
682
519
|
}>>;
|
|
683
|
-
/** OPTIONAL. Contrast level optimized for the template. */
|
|
684
520
|
contrast: z.ZodOptional<z.ZodEnum<{
|
|
685
521
|
normal: "normal";
|
|
686
522
|
high: "high";
|
|
687
523
|
}>>;
|
|
688
524
|
}, z.core.$loose>>;
|
|
689
525
|
}, z.core.$loose>>>;
|
|
690
|
-
/**
|
|
691
|
-
* OPTIONAL. Array of SVG template rendering objects.
|
|
692
|
-
* @deprecated use `svg_templates` (plural) instead.
|
|
693
|
-
*/
|
|
694
526
|
svg_template: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
695
|
-
/** REQUIRED. A URI pointing to the SVG template. */
|
|
696
527
|
uri: z.ZodString;
|
|
697
|
-
/** OPTIONAL. An "integrity metadata" string as described in Section 7. */
|
|
698
528
|
'uri#integrity': z.ZodOptional<z.ZodString>;
|
|
699
|
-
/** REQUIRED if more than one SVG template is present. */
|
|
700
529
|
properties: z.ZodOptional<z.ZodObject<{
|
|
701
|
-
/** OPTIONAL. Orientation optimized for the template. */
|
|
702
530
|
orientation: z.ZodOptional<z.ZodEnum<{
|
|
703
531
|
portrait: "portrait";
|
|
704
532
|
landscape: "landscape";
|
|
705
533
|
}>>;
|
|
706
|
-
/** OPTIONAL. Color scheme optimized for the template. */
|
|
707
534
|
color_scheme: z.ZodOptional<z.ZodEnum<{
|
|
708
535
|
light: "light";
|
|
709
536
|
dark: "dark";
|
|
710
537
|
}>>;
|
|
711
|
-
/** OPTIONAL. Contrast level optimized for the template. */
|
|
712
538
|
contrast: z.ZodOptional<z.ZodEnum<{
|
|
713
539
|
normal: "normal";
|
|
714
540
|
high: "high";
|
|
@@ -853,33 +679,13 @@ declare const TypeMetadataFormatSchema: z.ZodObject<{
|
|
|
853
679
|
} | undefined;
|
|
854
680
|
} | undefined;
|
|
855
681
|
}>>>>;
|
|
856
|
-
/** OPTIONAL. Array of claim metadata. */
|
|
857
682
|
claims: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
858
|
-
/**
|
|
859
|
-
* REQUIRED. Array of one or more paths to the claim in the credential subject.
|
|
860
|
-
* Each path is an array of strings (or null for array elements).
|
|
861
|
-
*/
|
|
862
683
|
path: z.ZodArray<z.ZodNullable<z.ZodString>>;
|
|
863
|
-
/** OPTIONAL. Display metadata in multiple languages. */
|
|
864
684
|
display: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
865
|
-
/**
|
|
866
|
-
* Language tag according to RFC 5646.
|
|
867
|
-
* @deprecated - use `locale` instead
|
|
868
|
-
*/
|
|
869
685
|
lang: z.ZodOptional<z.ZodString>;
|
|
870
|
-
/**
|
|
871
|
-
* REQUIRED (preferred). Language tag according to RFC 5646.
|
|
872
|
-
* Alias for `lang` - either `lang` or `locale` must be provided.
|
|
873
|
-
*/
|
|
874
686
|
locale: z.ZodOptional<z.ZodString>;
|
|
875
|
-
/** REQUIRED. Human-readable label for the claim. */
|
|
876
687
|
label: z.ZodOptional<z.ZodString>;
|
|
877
|
-
/**
|
|
878
|
-
* Human-readable label for the claim.
|
|
879
|
-
* @deprecated - use `label` instead
|
|
880
|
-
*/
|
|
881
688
|
name: z.ZodOptional<z.ZodString>;
|
|
882
|
-
/** OPTIONAL. Description of the claim for end users. */
|
|
883
689
|
description: z.ZodOptional<z.ZodString>;
|
|
884
690
|
}, z.core.$loose>, z.ZodTransform<{
|
|
885
691
|
locale: string | undefined;
|
|
@@ -893,21 +699,12 @@ declare const TypeMetadataFormatSchema: z.ZodObject<{
|
|
|
893
699
|
name?: string | undefined;
|
|
894
700
|
description?: string | undefined;
|
|
895
701
|
}>>>>;
|
|
896
|
-
/** OPTIONAL. Controls whether the claim must, may, or must not be selectively disclosed. */
|
|
897
702
|
sd: z.ZodOptional<z.ZodEnum<{
|
|
898
703
|
never: "never";
|
|
899
704
|
always: "always";
|
|
900
705
|
allowed: "allowed";
|
|
901
706
|
}>>;
|
|
902
|
-
/**
|
|
903
|
-
* OPTIONAL. A boolean indicating whether the claim must be present in the Unsecured Payload
|
|
904
|
-
* of the SD-JWT VC. Default is false if not specified.
|
|
905
|
-
*/
|
|
906
707
|
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
907
|
-
/**
|
|
908
|
-
* OPTIONAL. Unique string identifier for referencing the claim in an SVG template.
|
|
909
|
-
* Must consist of alphanumeric characters or underscores and must not start with a digit.
|
|
910
|
-
*/
|
|
911
708
|
svg_id: z.ZodOptional<z.ZodString>;
|
|
912
709
|
}, z.core.$loose>>>;
|
|
913
710
|
}, z.core.$loose>;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,9 +2,7 @@ import { SDJWTConfig, Verifier, SdJwtPayload, kbPayload, kbHeader, SDJwtInstance
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
declare const BackgroundImageSchema: z.ZodObject<{
|
|
5
|
-
/** REQUIRED. A URI pointing to the background image. */
|
|
6
5
|
uri: z.ZodString;
|
|
7
|
-
/** OPTIONAL. An "integrity metadata" string as described in Section 7. */
|
|
8
6
|
'uri#integrity': z.ZodOptional<z.ZodString>;
|
|
9
7
|
}, z.core.$loose>;
|
|
10
8
|
type BackgroundImage = z.infer<typeof BackgroundImageSchema>;
|
|
@@ -12,11 +10,8 @@ type BackgroundImage = z.infer<typeof BackgroundImageSchema>;
|
|
|
12
10
|
* Logo metadata used in rendering a credential.
|
|
13
11
|
*/
|
|
14
12
|
declare const LogoSchema: z.ZodObject<{
|
|
15
|
-
/** REQUIRED. A URI pointing to the logo image. */
|
|
16
13
|
uri: z.ZodString;
|
|
17
|
-
/** OPTIONAL. An "integrity metadata" string as described in Section 7. */
|
|
18
14
|
'uri#integrity': z.ZodOptional<z.ZodString>;
|
|
19
|
-
/** OPTIONAL. A string containing alternative text for the logo image. */
|
|
20
15
|
alt_text: z.ZodOptional<z.ZodString>;
|
|
21
16
|
}, z.core.$loose>;
|
|
22
17
|
type Logo = z.infer<typeof LogoSchema>;
|
|
@@ -24,24 +19,15 @@ type Logo = z.infer<typeof LogoSchema>;
|
|
|
24
19
|
* The simple rendering method is intended for applications that do not support SVG.
|
|
25
20
|
*/
|
|
26
21
|
declare const SimpleRenderingSchema: z.ZodObject<{
|
|
27
|
-
/** OPTIONAL. Logo metadata to display for the credential. */
|
|
28
22
|
logo: z.ZodOptional<z.ZodObject<{
|
|
29
|
-
/** REQUIRED. A URI pointing to the logo image. */
|
|
30
23
|
uri: z.ZodString;
|
|
31
|
-
/** OPTIONAL. An "integrity metadata" string as described in Section 7. */
|
|
32
24
|
'uri#integrity': z.ZodOptional<z.ZodString>;
|
|
33
|
-
/** OPTIONAL. A string containing alternative text for the logo image. */
|
|
34
25
|
alt_text: z.ZodOptional<z.ZodString>;
|
|
35
26
|
}, z.core.$loose>>;
|
|
36
|
-
/** OPTIONAL. RGB color value for the credential background (e.g., "#FFFFFF"). */
|
|
37
27
|
background_color: z.ZodOptional<z.ZodString>;
|
|
38
|
-
/** OPTIONAL. RGB color value for the credential text (e.g., "#000000"). */
|
|
39
28
|
text_color: z.ZodOptional<z.ZodString>;
|
|
40
|
-
/** OPTIONAL. An object containing information about the background image to be displayed for the type. */
|
|
41
29
|
background_image: z.ZodOptional<z.ZodObject<{
|
|
42
|
-
/** REQUIRED. A URI pointing to the background image. */
|
|
43
30
|
uri: z.ZodString;
|
|
44
|
-
/** OPTIONAL. An "integrity metadata" string as described in Section 7. */
|
|
45
31
|
'uri#integrity': z.ZodOptional<z.ZodString>;
|
|
46
32
|
}, z.core.$loose>>;
|
|
47
33
|
}, z.core.$loose>;
|
|
@@ -65,17 +51,14 @@ declare const ContrastSchema: z.ZodEnum<{
|
|
|
65
51
|
* Properties that describe the display preferences for an SVG template rendering.
|
|
66
52
|
*/
|
|
67
53
|
declare const SvgTemplatePropertiesSchema: z.ZodObject<{
|
|
68
|
-
/** OPTIONAL. Orientation optimized for the template. */
|
|
69
54
|
orientation: z.ZodOptional<z.ZodEnum<{
|
|
70
55
|
portrait: "portrait";
|
|
71
56
|
landscape: "landscape";
|
|
72
57
|
}>>;
|
|
73
|
-
/** OPTIONAL. Color scheme optimized for the template. */
|
|
74
58
|
color_scheme: z.ZodOptional<z.ZodEnum<{
|
|
75
59
|
light: "light";
|
|
76
60
|
dark: "dark";
|
|
77
61
|
}>>;
|
|
78
|
-
/** OPTIONAL. Contrast level optimized for the template. */
|
|
79
62
|
contrast: z.ZodOptional<z.ZodEnum<{
|
|
80
63
|
normal: "normal";
|
|
81
64
|
high: "high";
|
|
@@ -86,23 +69,17 @@ type SvgTemplateProperties = z.infer<typeof SvgTemplatePropertiesSchema>;
|
|
|
86
69
|
* SVG rendering metadata containing URI and optional integrity and properties.
|
|
87
70
|
*/
|
|
88
71
|
declare const SvgTemplateRenderingSchema: z.ZodObject<{
|
|
89
|
-
/** REQUIRED. A URI pointing to the SVG template. */
|
|
90
72
|
uri: z.ZodString;
|
|
91
|
-
/** OPTIONAL. An "integrity metadata" string as described in Section 7. */
|
|
92
73
|
'uri#integrity': z.ZodOptional<z.ZodString>;
|
|
93
|
-
/** REQUIRED if more than one SVG template is present. */
|
|
94
74
|
properties: z.ZodOptional<z.ZodObject<{
|
|
95
|
-
/** OPTIONAL. Orientation optimized for the template. */
|
|
96
75
|
orientation: z.ZodOptional<z.ZodEnum<{
|
|
97
76
|
portrait: "portrait";
|
|
98
77
|
landscape: "landscape";
|
|
99
78
|
}>>;
|
|
100
|
-
/** OPTIONAL. Color scheme optimized for the template. */
|
|
101
79
|
color_scheme: z.ZodOptional<z.ZodEnum<{
|
|
102
80
|
light: "light";
|
|
103
81
|
dark: "dark";
|
|
104
82
|
}>>;
|
|
105
|
-
/** OPTIONAL. Contrast level optimized for the template. */
|
|
106
83
|
contrast: z.ZodOptional<z.ZodEnum<{
|
|
107
84
|
normal: "normal";
|
|
108
85
|
high: "high";
|
|
@@ -114,76 +91,49 @@ type SvgTemplateRendering = z.infer<typeof SvgTemplateRenderingSchema>;
|
|
|
114
91
|
* Rendering metadata, either simple or SVG-based, for a credential.
|
|
115
92
|
*/
|
|
116
93
|
declare const RenderingSchema: z.ZodPipe<z.ZodObject<{
|
|
117
|
-
/** OPTIONAL. Simple rendering metadata. */
|
|
118
94
|
simple: z.ZodOptional<z.ZodObject<{
|
|
119
|
-
/** OPTIONAL. Logo metadata to display for the credential. */
|
|
120
95
|
logo: z.ZodOptional<z.ZodObject<{
|
|
121
|
-
/** REQUIRED. A URI pointing to the logo image. */
|
|
122
96
|
uri: z.ZodString;
|
|
123
|
-
/** OPTIONAL. An "integrity metadata" string as described in Section 7. */
|
|
124
97
|
'uri#integrity': z.ZodOptional<z.ZodString>;
|
|
125
|
-
/** OPTIONAL. A string containing alternative text for the logo image. */
|
|
126
98
|
alt_text: z.ZodOptional<z.ZodString>;
|
|
127
99
|
}, z.core.$loose>>;
|
|
128
|
-
/** OPTIONAL. RGB color value for the credential background (e.g., "#FFFFFF"). */
|
|
129
100
|
background_color: z.ZodOptional<z.ZodString>;
|
|
130
|
-
/** OPTIONAL. RGB color value for the credential text (e.g., "#000000"). */
|
|
131
101
|
text_color: z.ZodOptional<z.ZodString>;
|
|
132
|
-
/** OPTIONAL. An object containing information about the background image to be displayed for the type. */
|
|
133
102
|
background_image: z.ZodOptional<z.ZodObject<{
|
|
134
|
-
/** REQUIRED. A URI pointing to the background image. */
|
|
135
103
|
uri: z.ZodString;
|
|
136
|
-
/** OPTIONAL. An "integrity metadata" string as described in Section 7. */
|
|
137
104
|
'uri#integrity': z.ZodOptional<z.ZodString>;
|
|
138
105
|
}, z.core.$loose>>;
|
|
139
106
|
}, z.core.$loose>>;
|
|
140
|
-
/** OPTIONAL. Array of SVG template rendering objects. */
|
|
141
107
|
svg_templates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
142
|
-
/** REQUIRED. A URI pointing to the SVG template. */
|
|
143
108
|
uri: z.ZodString;
|
|
144
|
-
/** OPTIONAL. An "integrity metadata" string as described in Section 7. */
|
|
145
109
|
'uri#integrity': z.ZodOptional<z.ZodString>;
|
|
146
|
-
/** REQUIRED if more than one SVG template is present. */
|
|
147
110
|
properties: z.ZodOptional<z.ZodObject<{
|
|
148
|
-
/** OPTIONAL. Orientation optimized for the template. */
|
|
149
111
|
orientation: z.ZodOptional<z.ZodEnum<{
|
|
150
112
|
portrait: "portrait";
|
|
151
113
|
landscape: "landscape";
|
|
152
114
|
}>>;
|
|
153
|
-
/** OPTIONAL. Color scheme optimized for the template. */
|
|
154
115
|
color_scheme: z.ZodOptional<z.ZodEnum<{
|
|
155
116
|
light: "light";
|
|
156
117
|
dark: "dark";
|
|
157
118
|
}>>;
|
|
158
|
-
/** OPTIONAL. Contrast level optimized for the template. */
|
|
159
119
|
contrast: z.ZodOptional<z.ZodEnum<{
|
|
160
120
|
normal: "normal";
|
|
161
121
|
high: "high";
|
|
162
122
|
}>>;
|
|
163
123
|
}, z.core.$loose>>;
|
|
164
124
|
}, z.core.$loose>>>;
|
|
165
|
-
/**
|
|
166
|
-
* OPTIONAL. Array of SVG template rendering objects.
|
|
167
|
-
* @deprecated use `svg_templates` (plural) instead.
|
|
168
|
-
*/
|
|
169
125
|
svg_template: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
170
|
-
/** REQUIRED. A URI pointing to the SVG template. */
|
|
171
126
|
uri: z.ZodString;
|
|
172
|
-
/** OPTIONAL. An "integrity metadata" string as described in Section 7. */
|
|
173
127
|
'uri#integrity': z.ZodOptional<z.ZodString>;
|
|
174
|
-
/** REQUIRED if more than one SVG template is present. */
|
|
175
128
|
properties: z.ZodOptional<z.ZodObject<{
|
|
176
|
-
/** OPTIONAL. Orientation optimized for the template. */
|
|
177
129
|
orientation: z.ZodOptional<z.ZodEnum<{
|
|
178
130
|
portrait: "portrait";
|
|
179
131
|
landscape: "landscape";
|
|
180
132
|
}>>;
|
|
181
|
-
/** OPTIONAL. Color scheme optimized for the template. */
|
|
182
133
|
color_scheme: z.ZodOptional<z.ZodEnum<{
|
|
183
134
|
light: "light";
|
|
184
135
|
dark: "dark";
|
|
185
136
|
}>>;
|
|
186
|
-
/** OPTIONAL. Contrast level optimized for the template. */
|
|
187
137
|
contrast: z.ZodOptional<z.ZodEnum<{
|
|
188
138
|
normal: "normal";
|
|
189
139
|
high: "high";
|
|
@@ -264,92 +214,54 @@ type Rendering = z.infer<typeof RenderingSchema>;
|
|
|
264
214
|
* Display metadata associated with a credential type.
|
|
265
215
|
*/
|
|
266
216
|
declare const DisplaySchema: z.ZodPipe<z.ZodObject<{
|
|
267
|
-
/**
|
|
268
|
-
* Language tag according to RFC 5646 (e.g., "en", "de").
|
|
269
|
-
* @deprecated - use `locale` instead
|
|
270
|
-
*/
|
|
271
217
|
lang: z.ZodOptional<z.ZodString>;
|
|
272
|
-
/**
|
|
273
|
-
* REQUIRED (preferred). Language tag according to RFC 5646.
|
|
274
|
-
* Alias for `lang` - either `lang` or `locale` must be provided.
|
|
275
|
-
*/
|
|
276
218
|
locale: z.ZodOptional<z.ZodString>;
|
|
277
|
-
/** REQUIRED. Human-readable name for the credential type. */
|
|
278
219
|
name: z.ZodString;
|
|
279
|
-
/** OPTIONAL. Description of the credential type for end users. */
|
|
280
220
|
description: z.ZodOptional<z.ZodString>;
|
|
281
|
-
/** OPTIONAL. Rendering information (simple or SVG) for the credential. */
|
|
282
221
|
rendering: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
283
|
-
/** OPTIONAL. Simple rendering metadata. */
|
|
284
222
|
simple: z.ZodOptional<z.ZodObject<{
|
|
285
|
-
/** OPTIONAL. Logo metadata to display for the credential. */
|
|
286
223
|
logo: z.ZodOptional<z.ZodObject<{
|
|
287
|
-
/** REQUIRED. A URI pointing to the logo image. */
|
|
288
224
|
uri: z.ZodString;
|
|
289
|
-
/** OPTIONAL. An "integrity metadata" string as described in Section 7. */
|
|
290
225
|
'uri#integrity': z.ZodOptional<z.ZodString>;
|
|
291
|
-
/** OPTIONAL. A string containing alternative text for the logo image. */
|
|
292
226
|
alt_text: z.ZodOptional<z.ZodString>;
|
|
293
227
|
}, z.core.$loose>>;
|
|
294
|
-
/** OPTIONAL. RGB color value for the credential background (e.g., "#FFFFFF"). */
|
|
295
228
|
background_color: z.ZodOptional<z.ZodString>;
|
|
296
|
-
/** OPTIONAL. RGB color value for the credential text (e.g., "#000000"). */
|
|
297
229
|
text_color: z.ZodOptional<z.ZodString>;
|
|
298
|
-
/** OPTIONAL. An object containing information about the background image to be displayed for the type. */
|
|
299
230
|
background_image: z.ZodOptional<z.ZodObject<{
|
|
300
|
-
/** REQUIRED. A URI pointing to the background image. */
|
|
301
231
|
uri: z.ZodString;
|
|
302
|
-
/** OPTIONAL. An "integrity metadata" string as described in Section 7. */
|
|
303
232
|
'uri#integrity': z.ZodOptional<z.ZodString>;
|
|
304
233
|
}, z.core.$loose>>;
|
|
305
234
|
}, z.core.$loose>>;
|
|
306
|
-
/** OPTIONAL. Array of SVG template rendering objects. */
|
|
307
235
|
svg_templates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
308
|
-
/** REQUIRED. A URI pointing to the SVG template. */
|
|
309
236
|
uri: z.ZodString;
|
|
310
|
-
/** OPTIONAL. An "integrity metadata" string as described in Section 7. */
|
|
311
237
|
'uri#integrity': z.ZodOptional<z.ZodString>;
|
|
312
|
-
/** REQUIRED if more than one SVG template is present. */
|
|
313
238
|
properties: z.ZodOptional<z.ZodObject<{
|
|
314
|
-
/** OPTIONAL. Orientation optimized for the template. */
|
|
315
239
|
orientation: z.ZodOptional<z.ZodEnum<{
|
|
316
240
|
portrait: "portrait";
|
|
317
241
|
landscape: "landscape";
|
|
318
242
|
}>>;
|
|
319
|
-
/** OPTIONAL. Color scheme optimized for the template. */
|
|
320
243
|
color_scheme: z.ZodOptional<z.ZodEnum<{
|
|
321
244
|
light: "light";
|
|
322
245
|
dark: "dark";
|
|
323
246
|
}>>;
|
|
324
|
-
/** OPTIONAL. Contrast level optimized for the template. */
|
|
325
247
|
contrast: z.ZodOptional<z.ZodEnum<{
|
|
326
248
|
normal: "normal";
|
|
327
249
|
high: "high";
|
|
328
250
|
}>>;
|
|
329
251
|
}, z.core.$loose>>;
|
|
330
252
|
}, z.core.$loose>>>;
|
|
331
|
-
/**
|
|
332
|
-
* OPTIONAL. Array of SVG template rendering objects.
|
|
333
|
-
* @deprecated use `svg_templates` (plural) instead.
|
|
334
|
-
*/
|
|
335
253
|
svg_template: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
336
|
-
/** REQUIRED. A URI pointing to the SVG template. */
|
|
337
254
|
uri: z.ZodString;
|
|
338
|
-
/** OPTIONAL. An "integrity metadata" string as described in Section 7. */
|
|
339
255
|
'uri#integrity': z.ZodOptional<z.ZodString>;
|
|
340
|
-
/** REQUIRED if more than one SVG template is present. */
|
|
341
256
|
properties: z.ZodOptional<z.ZodObject<{
|
|
342
|
-
/** OPTIONAL. Orientation optimized for the template. */
|
|
343
257
|
orientation: z.ZodOptional<z.ZodEnum<{
|
|
344
258
|
portrait: "portrait";
|
|
345
259
|
landscape: "landscape";
|
|
346
260
|
}>>;
|
|
347
|
-
/** OPTIONAL. Color scheme optimized for the template. */
|
|
348
261
|
color_scheme: z.ZodOptional<z.ZodEnum<{
|
|
349
262
|
light: "light";
|
|
350
263
|
dark: "dark";
|
|
351
264
|
}>>;
|
|
352
|
-
/** OPTIONAL. Contrast level optimized for the template. */
|
|
353
265
|
contrast: z.ZodOptional<z.ZodEnum<{
|
|
354
266
|
normal: "normal";
|
|
355
267
|
high: "high";
|
|
@@ -505,24 +417,10 @@ type ClaimPath = z.infer<typeof ClaimPathSchema>;
|
|
|
505
417
|
* Display metadata for a specific claim.
|
|
506
418
|
*/
|
|
507
419
|
declare const ClaimDisplaySchema: z.ZodPipe<z.ZodObject<{
|
|
508
|
-
/**
|
|
509
|
-
* Language tag according to RFC 5646.
|
|
510
|
-
* @deprecated - use `locale` instead
|
|
511
|
-
*/
|
|
512
420
|
lang: z.ZodOptional<z.ZodString>;
|
|
513
|
-
/**
|
|
514
|
-
* REQUIRED (preferred). Language tag according to RFC 5646.
|
|
515
|
-
* Alias for `lang` - either `lang` or `locale` must be provided.
|
|
516
|
-
*/
|
|
517
421
|
locale: z.ZodOptional<z.ZodString>;
|
|
518
|
-
/** REQUIRED. Human-readable label for the claim. */
|
|
519
422
|
label: z.ZodOptional<z.ZodString>;
|
|
520
|
-
/**
|
|
521
|
-
* Human-readable label for the claim.
|
|
522
|
-
* @deprecated - use `label` instead
|
|
523
|
-
*/
|
|
524
423
|
name: z.ZodOptional<z.ZodString>;
|
|
525
|
-
/** OPTIONAL. Description of the claim for end users. */
|
|
526
424
|
description: z.ZodOptional<z.ZodString>;
|
|
527
425
|
}, z.core.$loose>, z.ZodTransform<{
|
|
528
426
|
locale: string | undefined;
|
|
@@ -550,31 +448,12 @@ type ClaimSelectiveDisclosure = z.infer<typeof ClaimSelectiveDisclosureSchema>;
|
|
|
550
448
|
* Metadata for individual claims in the credential type.
|
|
551
449
|
*/
|
|
552
450
|
declare const ClaimSchema: z.ZodObject<{
|
|
553
|
-
/**
|
|
554
|
-
* REQUIRED. Array of one or more paths to the claim in the credential subject.
|
|
555
|
-
* Each path is an array of strings (or null for array elements).
|
|
556
|
-
*/
|
|
557
451
|
path: z.ZodArray<z.ZodNullable<z.ZodString>>;
|
|
558
|
-
/** OPTIONAL. Display metadata in multiple languages. */
|
|
559
452
|
display: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
560
|
-
/**
|
|
561
|
-
* Language tag according to RFC 5646.
|
|
562
|
-
* @deprecated - use `locale` instead
|
|
563
|
-
*/
|
|
564
453
|
lang: z.ZodOptional<z.ZodString>;
|
|
565
|
-
/**
|
|
566
|
-
* REQUIRED (preferred). Language tag according to RFC 5646.
|
|
567
|
-
* Alias for `lang` - either `lang` or `locale` must be provided.
|
|
568
|
-
*/
|
|
569
454
|
locale: z.ZodOptional<z.ZodString>;
|
|
570
|
-
/** REQUIRED. Human-readable label for the claim. */
|
|
571
455
|
label: z.ZodOptional<z.ZodString>;
|
|
572
|
-
/**
|
|
573
|
-
* Human-readable label for the claim.
|
|
574
|
-
* @deprecated - use `label` instead
|
|
575
|
-
*/
|
|
576
456
|
name: z.ZodOptional<z.ZodString>;
|
|
577
|
-
/** OPTIONAL. Description of the claim for end users. */
|
|
578
457
|
description: z.ZodOptional<z.ZodString>;
|
|
579
458
|
}, z.core.$loose>, z.ZodTransform<{
|
|
580
459
|
locale: string | undefined;
|
|
@@ -588,21 +467,12 @@ declare const ClaimSchema: z.ZodObject<{
|
|
|
588
467
|
name?: string | undefined;
|
|
589
468
|
description?: string | undefined;
|
|
590
469
|
}>>>>;
|
|
591
|
-
/** OPTIONAL. Controls whether the claim must, may, or must not be selectively disclosed. */
|
|
592
470
|
sd: z.ZodOptional<z.ZodEnum<{
|
|
593
471
|
never: "never";
|
|
594
472
|
always: "always";
|
|
595
473
|
allowed: "allowed";
|
|
596
474
|
}>>;
|
|
597
|
-
/**
|
|
598
|
-
* OPTIONAL. A boolean indicating whether the claim must be present in the Unsecured Payload
|
|
599
|
-
* of the SD-JWT VC. Default is false if not specified.
|
|
600
|
-
*/
|
|
601
475
|
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
602
|
-
/**
|
|
603
|
-
* OPTIONAL. Unique string identifier for referencing the claim in an SVG template.
|
|
604
|
-
* Must consist of alphanumeric characters or underscores and must not start with a digit.
|
|
605
|
-
*/
|
|
606
476
|
svg_id: z.ZodOptional<z.ZodString>;
|
|
607
477
|
}, z.core.$loose>;
|
|
608
478
|
type Claim = z.infer<typeof ClaimSchema>;
|
|
@@ -611,104 +481,60 @@ type Claim = z.infer<typeof ClaimSchema>;
|
|
|
611
481
|
* Reference: https://www.ietf.org/archive/id/draft-ietf-oauth-sd-jwt-vc-13.html#name-type-metadata-format
|
|
612
482
|
*/
|
|
613
483
|
declare const TypeMetadataFormatSchema: z.ZodObject<{
|
|
614
|
-
/** REQUIRED. A URI uniquely identifying the credential type. */
|
|
615
484
|
vct: z.ZodString;
|
|
616
|
-
/** OPTIONAL. Human-readable name for developers. */
|
|
617
485
|
name: z.ZodOptional<z.ZodString>;
|
|
618
|
-
/** OPTIONAL. Human-readable description for developers. */
|
|
619
486
|
description: z.ZodOptional<z.ZodString>;
|
|
620
|
-
/** OPTIONAL. URI of another type that this one extends. */
|
|
621
487
|
extends: z.ZodOptional<z.ZodString>;
|
|
622
|
-
/** OPTIONAL. Integrity metadata for the 'extends' field. */
|
|
623
488
|
'extends#integrity': z.ZodOptional<z.ZodString>;
|
|
624
|
-
/** OPTIONAL. Array of localized display metadata for the type. */
|
|
625
489
|
display: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
626
|
-
/**
|
|
627
|
-
* Language tag according to RFC 5646 (e.g., "en", "de").
|
|
628
|
-
* @deprecated - use `locale` instead
|
|
629
|
-
*/
|
|
630
490
|
lang: z.ZodOptional<z.ZodString>;
|
|
631
|
-
/**
|
|
632
|
-
* REQUIRED (preferred). Language tag according to RFC 5646.
|
|
633
|
-
* Alias for `lang` - either `lang` or `locale` must be provided.
|
|
634
|
-
*/
|
|
635
491
|
locale: z.ZodOptional<z.ZodString>;
|
|
636
|
-
/** REQUIRED. Human-readable name for the credential type. */
|
|
637
492
|
name: z.ZodString;
|
|
638
|
-
/** OPTIONAL. Description of the credential type for end users. */
|
|
639
493
|
description: z.ZodOptional<z.ZodString>;
|
|
640
|
-
/** OPTIONAL. Rendering information (simple or SVG) for the credential. */
|
|
641
494
|
rendering: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
642
|
-
/** OPTIONAL. Simple rendering metadata. */
|
|
643
495
|
simple: z.ZodOptional<z.ZodObject<{
|
|
644
|
-
/** OPTIONAL. Logo metadata to display for the credential. */
|
|
645
496
|
logo: z.ZodOptional<z.ZodObject<{
|
|
646
|
-
/** REQUIRED. A URI pointing to the logo image. */
|
|
647
497
|
uri: z.ZodString;
|
|
648
|
-
/** OPTIONAL. An "integrity metadata" string as described in Section 7. */
|
|
649
498
|
'uri#integrity': z.ZodOptional<z.ZodString>;
|
|
650
|
-
/** OPTIONAL. A string containing alternative text for the logo image. */
|
|
651
499
|
alt_text: z.ZodOptional<z.ZodString>;
|
|
652
500
|
}, z.core.$loose>>;
|
|
653
|
-
/** OPTIONAL. RGB color value for the credential background (e.g., "#FFFFFF"). */
|
|
654
501
|
background_color: z.ZodOptional<z.ZodString>;
|
|
655
|
-
/** OPTIONAL. RGB color value for the credential text (e.g., "#000000"). */
|
|
656
502
|
text_color: z.ZodOptional<z.ZodString>;
|
|
657
|
-
/** OPTIONAL. An object containing information about the background image to be displayed for the type. */
|
|
658
503
|
background_image: z.ZodOptional<z.ZodObject<{
|
|
659
|
-
/** REQUIRED. A URI pointing to the background image. */
|
|
660
504
|
uri: z.ZodString;
|
|
661
|
-
/** OPTIONAL. An "integrity metadata" string as described in Section 7. */
|
|
662
505
|
'uri#integrity': z.ZodOptional<z.ZodString>;
|
|
663
506
|
}, z.core.$loose>>;
|
|
664
507
|
}, z.core.$loose>>;
|
|
665
|
-
/** OPTIONAL. Array of SVG template rendering objects. */
|
|
666
508
|
svg_templates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
667
|
-
/** REQUIRED. A URI pointing to the SVG template. */
|
|
668
509
|
uri: z.ZodString;
|
|
669
|
-
/** OPTIONAL. An "integrity metadata" string as described in Section 7. */
|
|
670
510
|
'uri#integrity': z.ZodOptional<z.ZodString>;
|
|
671
|
-
/** REQUIRED if more than one SVG template is present. */
|
|
672
511
|
properties: z.ZodOptional<z.ZodObject<{
|
|
673
|
-
/** OPTIONAL. Orientation optimized for the template. */
|
|
674
512
|
orientation: z.ZodOptional<z.ZodEnum<{
|
|
675
513
|
portrait: "portrait";
|
|
676
514
|
landscape: "landscape";
|
|
677
515
|
}>>;
|
|
678
|
-
/** OPTIONAL. Color scheme optimized for the template. */
|
|
679
516
|
color_scheme: z.ZodOptional<z.ZodEnum<{
|
|
680
517
|
light: "light";
|
|
681
518
|
dark: "dark";
|
|
682
519
|
}>>;
|
|
683
|
-
/** OPTIONAL. Contrast level optimized for the template. */
|
|
684
520
|
contrast: z.ZodOptional<z.ZodEnum<{
|
|
685
521
|
normal: "normal";
|
|
686
522
|
high: "high";
|
|
687
523
|
}>>;
|
|
688
524
|
}, z.core.$loose>>;
|
|
689
525
|
}, z.core.$loose>>>;
|
|
690
|
-
/**
|
|
691
|
-
* OPTIONAL. Array of SVG template rendering objects.
|
|
692
|
-
* @deprecated use `svg_templates` (plural) instead.
|
|
693
|
-
*/
|
|
694
526
|
svg_template: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
695
|
-
/** REQUIRED. A URI pointing to the SVG template. */
|
|
696
527
|
uri: z.ZodString;
|
|
697
|
-
/** OPTIONAL. An "integrity metadata" string as described in Section 7. */
|
|
698
528
|
'uri#integrity': z.ZodOptional<z.ZodString>;
|
|
699
|
-
/** REQUIRED if more than one SVG template is present. */
|
|
700
529
|
properties: z.ZodOptional<z.ZodObject<{
|
|
701
|
-
/** OPTIONAL. Orientation optimized for the template. */
|
|
702
530
|
orientation: z.ZodOptional<z.ZodEnum<{
|
|
703
531
|
portrait: "portrait";
|
|
704
532
|
landscape: "landscape";
|
|
705
533
|
}>>;
|
|
706
|
-
/** OPTIONAL. Color scheme optimized for the template. */
|
|
707
534
|
color_scheme: z.ZodOptional<z.ZodEnum<{
|
|
708
535
|
light: "light";
|
|
709
536
|
dark: "dark";
|
|
710
537
|
}>>;
|
|
711
|
-
/** OPTIONAL. Contrast level optimized for the template. */
|
|
712
538
|
contrast: z.ZodOptional<z.ZodEnum<{
|
|
713
539
|
normal: "normal";
|
|
714
540
|
high: "high";
|
|
@@ -853,33 +679,13 @@ declare const TypeMetadataFormatSchema: z.ZodObject<{
|
|
|
853
679
|
} | undefined;
|
|
854
680
|
} | undefined;
|
|
855
681
|
}>>>>;
|
|
856
|
-
/** OPTIONAL. Array of claim metadata. */
|
|
857
682
|
claims: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
858
|
-
/**
|
|
859
|
-
* REQUIRED. Array of one or more paths to the claim in the credential subject.
|
|
860
|
-
* Each path is an array of strings (or null for array elements).
|
|
861
|
-
*/
|
|
862
683
|
path: z.ZodArray<z.ZodNullable<z.ZodString>>;
|
|
863
|
-
/** OPTIONAL. Display metadata in multiple languages. */
|
|
864
684
|
display: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
865
|
-
/**
|
|
866
|
-
* Language tag according to RFC 5646.
|
|
867
|
-
* @deprecated - use `locale` instead
|
|
868
|
-
*/
|
|
869
685
|
lang: z.ZodOptional<z.ZodString>;
|
|
870
|
-
/**
|
|
871
|
-
* REQUIRED (preferred). Language tag according to RFC 5646.
|
|
872
|
-
* Alias for `lang` - either `lang` or `locale` must be provided.
|
|
873
|
-
*/
|
|
874
686
|
locale: z.ZodOptional<z.ZodString>;
|
|
875
|
-
/** REQUIRED. Human-readable label for the claim. */
|
|
876
687
|
label: z.ZodOptional<z.ZodString>;
|
|
877
|
-
/**
|
|
878
|
-
* Human-readable label for the claim.
|
|
879
|
-
* @deprecated - use `label` instead
|
|
880
|
-
*/
|
|
881
688
|
name: z.ZodOptional<z.ZodString>;
|
|
882
|
-
/** OPTIONAL. Description of the claim for end users. */
|
|
883
689
|
description: z.ZodOptional<z.ZodString>;
|
|
884
690
|
}, z.core.$loose>, z.ZodTransform<{
|
|
885
691
|
locale: string | undefined;
|
|
@@ -893,21 +699,12 @@ declare const TypeMetadataFormatSchema: z.ZodObject<{
|
|
|
893
699
|
name?: string | undefined;
|
|
894
700
|
description?: string | undefined;
|
|
895
701
|
}>>>>;
|
|
896
|
-
/** OPTIONAL. Controls whether the claim must, may, or must not be selectively disclosed. */
|
|
897
702
|
sd: z.ZodOptional<z.ZodEnum<{
|
|
898
703
|
never: "never";
|
|
899
704
|
always: "always";
|
|
900
705
|
allowed: "allowed";
|
|
901
706
|
}>>;
|
|
902
|
-
/**
|
|
903
|
-
* OPTIONAL. A boolean indicating whether the claim must be present in the Unsecured Payload
|
|
904
|
-
* of the SD-JWT VC. Default is false if not specified.
|
|
905
|
-
*/
|
|
906
707
|
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
907
|
-
/**
|
|
908
|
-
* OPTIONAL. Unique string identifier for referencing the claim in an SVG template.
|
|
909
|
-
* Must consist of alphanumeric characters or underscores and must not start with a digit.
|
|
910
|
-
*/
|
|
911
708
|
svg_id: z.ZodOptional<z.ZodString>;
|
|
912
709
|
}, z.core.$loose>>>;
|
|
913
710
|
}, z.core.$loose>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sd-jwt/sd-jwt-vc",
|
|
3
|
-
"version": "0.20.1-next.
|
|
3
|
+
"version": "0.20.1-next.1+c95e1ab",
|
|
4
4
|
"description": "sd-jwt draft 7 implementation in typescript",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
},
|
|
39
39
|
"license": "Apache-2.0",
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@owf/token-status-list": "^0.1
|
|
42
|
-
"@sd-jwt/core": "0.20.1-next.
|
|
43
|
-
"zod": "^4.3
|
|
41
|
+
"@owf/token-status-list": "^0.3.1",
|
|
42
|
+
"@sd-jwt/core": "0.20.1-next.1+c95e1ab",
|
|
43
|
+
"zod": "^4.4.3"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@owf/crypto": "^0.1
|
|
47
|
-
"jose": "^6.
|
|
48
|
-
"msw": "^2.
|
|
46
|
+
"@owf/crypto": "^0.3.1",
|
|
47
|
+
"jose": "^6.2.3",
|
|
48
|
+
"msw": "^2.14.6"
|
|
49
49
|
},
|
|
50
50
|
"publishConfig": {
|
|
51
51
|
"access": "public"
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"esm"
|
|
64
64
|
]
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "c95e1abfeb39c2814b874396cb03f1b7ef5d478c"
|
|
67
67
|
}
|