@learncard/core 8.2.0 → 8.3.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/core.cjs.development.js +128 -58
- package/dist/core.cjs.development.js.map +4 -4
- package/dist/core.cjs.production.min.js +31 -31
- package/dist/core.cjs.production.min.js.map +4 -4
- package/dist/core.d.ts +58 -32
- package/dist/core.esm.js +127 -59
- package/dist/core.esm.js.map +4 -4
- package/package.json +5 -5
package/dist/core.d.ts
CHANGED
@@ -7,7 +7,10 @@ import { CreateJWEOptions } from 'dids';
|
|
7
7
|
|
8
8
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
9
9
|
declare const UnsignedVCValidator: z.ZodObject<{
|
10
|
-
"@context": z.ZodArray<z.
|
10
|
+
"@context": z.ZodArray<z.ZodUnion<[
|
11
|
+
z.ZodString,
|
12
|
+
z.ZodRecord<z.ZodString, z.ZodAny>
|
13
|
+
]>, "many">;
|
11
14
|
id: z.ZodOptional<z.ZodString>;
|
12
15
|
type: z.ZodArray<z.ZodString, "atleastone">;
|
13
16
|
issuer: z.ZodUnion<[
|
@@ -360,7 +363,7 @@ declare const UnsignedVCValidator: z.ZodObject<{
|
|
360
363
|
string,
|
361
364
|
...string[]
|
362
365
|
];
|
363
|
-
"@context": string[];
|
366
|
+
"@context": (string | Record<string, any>)[];
|
364
367
|
issuer: string | {
|
365
368
|
[x: string]: any;
|
366
369
|
type?: string | [
|
@@ -448,7 +451,7 @@ declare const UnsignedVCValidator: z.ZodObject<{
|
|
448
451
|
string,
|
449
452
|
...string[]
|
450
453
|
];
|
451
|
-
"@context": string[];
|
454
|
+
"@context": (string | Record<string, any>)[];
|
452
455
|
issuer: string | {
|
453
456
|
[x: string]: any;
|
454
457
|
type?: string | [
|
@@ -518,7 +521,10 @@ declare const UnsignedVCValidator: z.ZodObject<{
|
|
518
521
|
}>;
|
519
522
|
export declare type UnsignedVC = z.infer<typeof UnsignedVCValidator>;
|
520
523
|
declare const VCValidator: z.ZodObject<z.extendShape<{
|
521
|
-
"@context": z.ZodArray<z.
|
524
|
+
"@context": z.ZodArray<z.ZodUnion<[
|
525
|
+
z.ZodString,
|
526
|
+
z.ZodRecord<z.ZodString, z.ZodAny>
|
527
|
+
]>, "many">;
|
522
528
|
id: z.ZodOptional<z.ZodString>;
|
523
529
|
type: z.ZodArray<z.ZodString, "atleastone">;
|
524
530
|
issuer: z.ZodUnion<[
|
@@ -934,7 +940,7 @@ declare const VCValidator: z.ZodObject<z.extendShape<{
|
|
934
940
|
string,
|
935
941
|
...string[]
|
936
942
|
];
|
937
|
-
"@context": string[];
|
943
|
+
"@context": (string | Record<string, any>)[];
|
938
944
|
issuer: string | {
|
939
945
|
[x: string]: any;
|
940
946
|
type?: string | [
|
@@ -1043,7 +1049,7 @@ declare const VCValidator: z.ZodObject<z.extendShape<{
|
|
1043
1049
|
string,
|
1044
1050
|
...string[]
|
1045
1051
|
];
|
1046
|
-
"@context": string[];
|
1052
|
+
"@context": (string | Record<string, any>)[];
|
1047
1053
|
issuer: string | {
|
1048
1054
|
[x: string]: any;
|
1049
1055
|
type?: string | [
|
@@ -1134,12 +1140,18 @@ declare const VCValidator: z.ZodObject<z.extendShape<{
|
|
1134
1140
|
}>;
|
1135
1141
|
export declare type VC = z.infer<typeof VCValidator>;
|
1136
1142
|
declare const UnsignedVPValidator: z.ZodObject<{
|
1137
|
-
"@context": z.ZodArray<z.
|
1143
|
+
"@context": z.ZodArray<z.ZodUnion<[
|
1144
|
+
z.ZodString,
|
1145
|
+
z.ZodRecord<z.ZodString, z.ZodAny>
|
1146
|
+
]>, "many">;
|
1138
1147
|
id: z.ZodOptional<z.ZodString>;
|
1139
1148
|
type: z.ZodArray<z.ZodString, "atleastone">;
|
1140
1149
|
verifiableCredential: z.ZodOptional<z.ZodUnion<[
|
1141
1150
|
z.ZodObject<z.extendShape<{
|
1142
|
-
"@context": z.ZodArray<z.
|
1151
|
+
"@context": z.ZodArray<z.ZodUnion<[
|
1152
|
+
z.ZodString,
|
1153
|
+
z.ZodRecord<z.ZodString, z.ZodAny>
|
1154
|
+
]>, "many">;
|
1143
1155
|
id: z.ZodOptional<z.ZodString>;
|
1144
1156
|
type: z.ZodArray<z.ZodString, "atleastone">;
|
1145
1157
|
issuer: z.ZodUnion<[
|
@@ -1555,7 +1567,7 @@ declare const UnsignedVPValidator: z.ZodObject<{
|
|
1555
1567
|
string,
|
1556
1568
|
...string[]
|
1557
1569
|
];
|
1558
|
-
"@context": string[];
|
1570
|
+
"@context": (string | Record<string, any>)[];
|
1559
1571
|
issuer: string | {
|
1560
1572
|
[x: string]: any;
|
1561
1573
|
type?: string | [
|
@@ -1664,7 +1676,7 @@ declare const UnsignedVPValidator: z.ZodObject<{
|
|
1664
1676
|
string,
|
1665
1677
|
...string[]
|
1666
1678
|
];
|
1667
|
-
"@context": string[];
|
1679
|
+
"@context": (string | Record<string, any>)[];
|
1668
1680
|
issuer: string | {
|
1669
1681
|
[x: string]: any;
|
1670
1682
|
type?: string | [
|
@@ -1754,7 +1766,10 @@ declare const UnsignedVPValidator: z.ZodObject<{
|
|
1754
1766
|
}[];
|
1755
1767
|
}>,
|
1756
1768
|
z.ZodArray<z.ZodObject<z.extendShape<{
|
1757
|
-
"@context": z.ZodArray<z.
|
1769
|
+
"@context": z.ZodArray<z.ZodUnion<[
|
1770
|
+
z.ZodString,
|
1771
|
+
z.ZodRecord<z.ZodString, z.ZodAny>
|
1772
|
+
]>, "many">;
|
1758
1773
|
id: z.ZodOptional<z.ZodString>;
|
1759
1774
|
type: z.ZodArray<z.ZodString, "atleastone">;
|
1760
1775
|
issuer: z.ZodUnion<[
|
@@ -2170,7 +2185,7 @@ declare const UnsignedVPValidator: z.ZodObject<{
|
|
2170
2185
|
string,
|
2171
2186
|
...string[]
|
2172
2187
|
];
|
2173
|
-
"@context": string[];
|
2188
|
+
"@context": (string | Record<string, any>)[];
|
2174
2189
|
issuer: string | {
|
2175
2190
|
[x: string]: any;
|
2176
2191
|
type?: string | [
|
@@ -2279,7 +2294,7 @@ declare const UnsignedVPValidator: z.ZodObject<{
|
|
2279
2294
|
string,
|
2280
2295
|
...string[]
|
2281
2296
|
];
|
2282
|
-
"@context": string[];
|
2297
|
+
"@context": (string | Record<string, any>)[];
|
2283
2298
|
issuer: string | {
|
2284
2299
|
[x: string]: any;
|
2285
2300
|
type?: string | [
|
@@ -2394,7 +2409,7 @@ declare const UnsignedVPValidator: z.ZodObject<{
|
|
2394
2409
|
string,
|
2395
2410
|
...string[]
|
2396
2411
|
];
|
2397
|
-
"@context": string[];
|
2412
|
+
"@context": (string | Record<string, any>)[];
|
2398
2413
|
issuer: string | {
|
2399
2414
|
[x: string]: any;
|
2400
2415
|
type?: string | [
|
@@ -2503,7 +2518,7 @@ declare const UnsignedVPValidator: z.ZodObject<{
|
|
2503
2518
|
string,
|
2504
2519
|
...string[]
|
2505
2520
|
];
|
2506
|
-
"@context": string[];
|
2521
|
+
"@context": (string | Record<string, any>)[];
|
2507
2522
|
issuer: string | {
|
2508
2523
|
[x: string]: any;
|
2509
2524
|
type?: string | [
|
@@ -2597,7 +2612,7 @@ declare const UnsignedVPValidator: z.ZodObject<{
|
|
2597
2612
|
string,
|
2598
2613
|
...string[]
|
2599
2614
|
];
|
2600
|
-
"@context": string[];
|
2615
|
+
"@context": (string | Record<string, any>)[];
|
2601
2616
|
}, {
|
2602
2617
|
[x: string]: any;
|
2603
2618
|
id?: string | undefined;
|
@@ -2622,7 +2637,7 @@ declare const UnsignedVPValidator: z.ZodObject<{
|
|
2622
2637
|
string,
|
2623
2638
|
...string[]
|
2624
2639
|
];
|
2625
|
-
"@context": string[];
|
2640
|
+
"@context": (string | Record<string, any>)[];
|
2626
2641
|
issuer: string | {
|
2627
2642
|
[x: string]: any;
|
2628
2643
|
type?: string | [
|
@@ -2731,7 +2746,7 @@ declare const UnsignedVPValidator: z.ZodObject<{
|
|
2731
2746
|
string,
|
2732
2747
|
...string[]
|
2733
2748
|
];
|
2734
|
-
"@context": string[];
|
2749
|
+
"@context": (string | Record<string, any>)[];
|
2735
2750
|
issuer: string | {
|
2736
2751
|
[x: string]: any;
|
2737
2752
|
type?: string | [
|
@@ -2825,16 +2840,22 @@ declare const UnsignedVPValidator: z.ZodObject<{
|
|
2825
2840
|
string,
|
2826
2841
|
...string[]
|
2827
2842
|
];
|
2828
|
-
"@context": string[];
|
2843
|
+
"@context": (string | Record<string, any>)[];
|
2829
2844
|
}>;
|
2830
2845
|
export declare type UnsignedVP = z.infer<typeof UnsignedVPValidator>;
|
2831
2846
|
declare const VPValidator: z.ZodObject<z.extendShape<{
|
2832
|
-
"@context": z.ZodArray<z.
|
2847
|
+
"@context": z.ZodArray<z.ZodUnion<[
|
2848
|
+
z.ZodString,
|
2849
|
+
z.ZodRecord<z.ZodString, z.ZodAny>
|
2850
|
+
]>, "many">;
|
2833
2851
|
id: z.ZodOptional<z.ZodString>;
|
2834
2852
|
type: z.ZodArray<z.ZodString, "atleastone">;
|
2835
2853
|
verifiableCredential: z.ZodOptional<z.ZodUnion<[
|
2836
2854
|
z.ZodObject<z.extendShape<{
|
2837
|
-
"@context": z.ZodArray<z.
|
2855
|
+
"@context": z.ZodArray<z.ZodUnion<[
|
2856
|
+
z.ZodString,
|
2857
|
+
z.ZodRecord<z.ZodString, z.ZodAny>
|
2858
|
+
]>, "many">;
|
2838
2859
|
id: z.ZodOptional<z.ZodString>;
|
2839
2860
|
type: z.ZodArray<z.ZodString, "atleastone">;
|
2840
2861
|
issuer: z.ZodUnion<[
|
@@ -3250,7 +3271,7 @@ declare const VPValidator: z.ZodObject<z.extendShape<{
|
|
3250
3271
|
string,
|
3251
3272
|
...string[]
|
3252
3273
|
];
|
3253
|
-
"@context": string[];
|
3274
|
+
"@context": (string | Record<string, any>)[];
|
3254
3275
|
issuer: string | {
|
3255
3276
|
[x: string]: any;
|
3256
3277
|
type?: string | [
|
@@ -3359,7 +3380,7 @@ declare const VPValidator: z.ZodObject<z.extendShape<{
|
|
3359
3380
|
string,
|
3360
3381
|
...string[]
|
3361
3382
|
];
|
3362
|
-
"@context": string[];
|
3383
|
+
"@context": (string | Record<string, any>)[];
|
3363
3384
|
issuer: string | {
|
3364
3385
|
[x: string]: any;
|
3365
3386
|
type?: string | [
|
@@ -3449,7 +3470,10 @@ declare const VPValidator: z.ZodObject<z.extendShape<{
|
|
3449
3470
|
}[];
|
3450
3471
|
}>,
|
3451
3472
|
z.ZodArray<z.ZodObject<z.extendShape<{
|
3452
|
-
"@context": z.ZodArray<z.
|
3473
|
+
"@context": z.ZodArray<z.ZodUnion<[
|
3474
|
+
z.ZodString,
|
3475
|
+
z.ZodRecord<z.ZodString, z.ZodAny>
|
3476
|
+
]>, "many">;
|
3453
3477
|
id: z.ZodOptional<z.ZodString>;
|
3454
3478
|
type: z.ZodArray<z.ZodString, "atleastone">;
|
3455
3479
|
issuer: z.ZodUnion<[
|
@@ -3865,7 +3889,7 @@ declare const VPValidator: z.ZodObject<z.extendShape<{
|
|
3865
3889
|
string,
|
3866
3890
|
...string[]
|
3867
3891
|
];
|
3868
|
-
"@context": string[];
|
3892
|
+
"@context": (string | Record<string, any>)[];
|
3869
3893
|
issuer: string | {
|
3870
3894
|
[x: string]: any;
|
3871
3895
|
type?: string | [
|
@@ -3974,7 +3998,7 @@ declare const VPValidator: z.ZodObject<z.extendShape<{
|
|
3974
3998
|
string,
|
3975
3999
|
...string[]
|
3976
4000
|
];
|
3977
|
-
"@context": string[];
|
4001
|
+
"@context": (string | Record<string, any>)[];
|
3978
4002
|
issuer: string | {
|
3979
4003
|
[x: string]: any;
|
3980
4004
|
type?: string | [
|
@@ -4152,7 +4176,7 @@ declare const VPValidator: z.ZodObject<z.extendShape<{
|
|
4152
4176
|
string,
|
4153
4177
|
...string[]
|
4154
4178
|
];
|
4155
|
-
"@context": string[];
|
4179
|
+
"@context": (string | Record<string, any>)[];
|
4156
4180
|
issuer: string | {
|
4157
4181
|
[x: string]: any;
|
4158
4182
|
type?: string | [
|
@@ -4261,7 +4285,7 @@ declare const VPValidator: z.ZodObject<z.extendShape<{
|
|
4261
4285
|
string,
|
4262
4286
|
...string[]
|
4263
4287
|
];
|
4264
|
-
"@context": string[];
|
4288
|
+
"@context": (string | Record<string, any>)[];
|
4265
4289
|
issuer: string | {
|
4266
4290
|
[x: string]: any;
|
4267
4291
|
type?: string | [
|
@@ -4355,7 +4379,7 @@ declare const VPValidator: z.ZodObject<z.extendShape<{
|
|
4355
4379
|
string,
|
4356
4380
|
...string[]
|
4357
4381
|
];
|
4358
|
-
"@context": string[];
|
4382
|
+
"@context": (string | Record<string, any>)[];
|
4359
4383
|
proof: {
|
4360
4384
|
[x: string]: any;
|
4361
4385
|
challenge?: string | undefined;
|
@@ -4401,7 +4425,7 @@ declare const VPValidator: z.ZodObject<z.extendShape<{
|
|
4401
4425
|
string,
|
4402
4426
|
...string[]
|
4403
4427
|
];
|
4404
|
-
"@context": string[];
|
4428
|
+
"@context": (string | Record<string, any>)[];
|
4405
4429
|
issuer: string | {
|
4406
4430
|
[x: string]: any;
|
4407
4431
|
type?: string | [
|
@@ -4510,7 +4534,7 @@ declare const VPValidator: z.ZodObject<z.extendShape<{
|
|
4510
4534
|
string,
|
4511
4535
|
...string[]
|
4512
4536
|
];
|
4513
|
-
"@context": string[];
|
4537
|
+
"@context": (string | Record<string, any>)[];
|
4514
4538
|
issuer: string | {
|
4515
4539
|
[x: string]: any;
|
4516
4540
|
type?: string | [
|
@@ -4604,7 +4628,7 @@ declare const VPValidator: z.ZodObject<z.extendShape<{
|
|
4604
4628
|
string,
|
4605
4629
|
...string[]
|
4606
4630
|
];
|
4607
|
-
"@context": string[];
|
4631
|
+
"@context": (string | Record<string, any>)[];
|
4608
4632
|
proof: {
|
4609
4633
|
[x: string]: any;
|
4610
4634
|
challenge?: string | undefined;
|
@@ -5962,6 +5986,8 @@ export declare const expirationPlugin: (learnCard: LearnCard<any, any, VerifyExt
|
|
5962
5986
|
export declare const getIDXPlugin: <URI extends string = "">(learnCard: LearnCard<any, "read", IDXPluginDependentMethods<URI>>, { modelData, credentialAlias }: IDXArgs) => Promise<IDXPlugin>;
|
5963
5987
|
export declare type TestCachePlugin = Plugin<"Test Cache", "cache">;
|
5964
5988
|
export declare const getTestCache: () => TestCachePlugin;
|
5989
|
+
export declare type TestStoragePlugin = Plugin<"Test Storage", "read" | "store" | "index">;
|
5990
|
+
export declare const getTestStorage: () => TestStoragePlugin;
|
5965
5991
|
/**
|
5966
5992
|
* @group Plugins
|
5967
5993
|
*/
|