@learncard/core 8.3.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 +62 -51
- 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 +56 -32
- package/dist/core.esm.js +61 -52
- package/dist/core.esm.js.map +4 -4
- package/package.json +2 -2
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;
|
package/dist/core.esm.js
CHANGED
@@ -11429,7 +11429,7 @@ var require_sha256 = __commonJS({
|
|
11429
11429
|
var d3 = v[3];
|
11430
11430
|
var e2 = v[4];
|
11431
11431
|
var f = v[5];
|
11432
|
-
var
|
11432
|
+
var g2 = v[6];
|
11433
11433
|
var h3 = v[7];
|
11434
11434
|
for (var i2 = 0; i2 < 16; i2++) {
|
11435
11435
|
var j = pos + i2 * 4;
|
@@ -11443,10 +11443,10 @@ var require_sha256 = __commonJS({
|
|
11443
11443
|
w2[i2] = (t1 + w2[i2 - 7] | 0) + (t2 + w2[i2 - 16] | 0);
|
11444
11444
|
}
|
11445
11445
|
for (var i2 = 0; i2 < 64; i2++) {
|
11446
|
-
var t1 = (((e2 >>> 6 | e2 << 32 - 6) ^ (e2 >>> 11 | e2 << 32 - 11) ^ (e2 >>> 25 | e2 << 32 - 25)) + (e2 & f ^ ~e2 &
|
11446
|
+
var t1 = (((e2 >>> 6 | e2 << 32 - 6) ^ (e2 >>> 11 | e2 << 32 - 11) ^ (e2 >>> 25 | e2 << 32 - 25)) + (e2 & f ^ ~e2 & g2) | 0) + (h3 + (K2[i2] + w2[i2] | 0) | 0) | 0;
|
11447
11447
|
var t2 = ((a3 >>> 2 | a3 << 32 - 2) ^ (a3 >>> 13 | a3 << 32 - 13) ^ (a3 >>> 22 | a3 << 32 - 22)) + (a3 & b2 ^ a3 & c2 ^ b2 & c2) | 0;
|
11448
|
-
h3 =
|
11449
|
-
|
11448
|
+
h3 = g2;
|
11449
|
+
g2 = f;
|
11450
11450
|
f = e2;
|
11451
11451
|
e2 = d3 + t1 | 0;
|
11452
11452
|
d3 = c2;
|
@@ -11460,7 +11460,7 @@ var require_sha256 = __commonJS({
|
|
11460
11460
|
v[3] += d3;
|
11461
11461
|
v[4] += e2;
|
11462
11462
|
v[5] += f;
|
11463
|
-
v[6] +=
|
11463
|
+
v[6] += g2;
|
11464
11464
|
v[7] += h3;
|
11465
11465
|
pos += 64;
|
11466
11466
|
len -= 64;
|
@@ -14316,11 +14316,11 @@ var require_bn = __commonJS({
|
|
14316
14316
|
var B2 = new BN3(0);
|
14317
14317
|
var C = new BN3(0);
|
14318
14318
|
var D2 = new BN3(1);
|
14319
|
-
var
|
14319
|
+
var g2 = 0;
|
14320
14320
|
while (x2.isEven() && y3.isEven()) {
|
14321
14321
|
x2.iushrn(1);
|
14322
14322
|
y3.iushrn(1);
|
14323
|
-
++
|
14323
|
+
++g2;
|
14324
14324
|
}
|
14325
14325
|
var yp = y3.clone();
|
14326
14326
|
var xp = x2.clone();
|
@@ -14364,7 +14364,7 @@ var require_bn = __commonJS({
|
|
14364
14364
|
return {
|
14365
14365
|
a: C,
|
14366
14366
|
b: D2,
|
14367
|
-
gcd: y3.iushln(
|
14367
|
+
gcd: y3.iushln(g2)
|
14368
14368
|
};
|
14369
14369
|
}, "egcd");
|
14370
14370
|
BN3.prototype._invmp = /* @__PURE__ */ __name(function _invmp(p) {
|
@@ -16632,13 +16632,13 @@ var require_edwards = __commonJS({
|
|
16632
16632
|
c2 = c2.redIAdd(c2);
|
16633
16633
|
var d3 = this.curve._mulA(a3);
|
16634
16634
|
var e2 = this.x.redAdd(this.y).redSqr().redISub(a3).redISub(b2);
|
16635
|
-
var
|
16636
|
-
var f =
|
16635
|
+
var g2 = d3.redAdd(b2);
|
16636
|
+
var f = g2.redSub(c2);
|
16637
16637
|
var h3 = d3.redSub(b2);
|
16638
16638
|
var nx = e2.redMul(f);
|
16639
|
-
var ny =
|
16639
|
+
var ny = g2.redMul(h3);
|
16640
16640
|
var nt = e2.redMul(h3);
|
16641
|
-
var nz = f.redMul(
|
16641
|
+
var nz = f.redMul(g2);
|
16642
16642
|
return this.curve.point(nx, ny, nz, nt);
|
16643
16643
|
}, "_extDbl");
|
16644
16644
|
Point2.prototype._projDbl = /* @__PURE__ */ __name(function _projDbl() {
|
@@ -16690,12 +16690,12 @@ var require_edwards = __commonJS({
|
|
16690
16690
|
var d3 = this.z.redMul(p.z.redAdd(p.z));
|
16691
16691
|
var e2 = b2.redSub(a3);
|
16692
16692
|
var f = d3.redSub(c2);
|
16693
|
-
var
|
16693
|
+
var g2 = d3.redAdd(c2);
|
16694
16694
|
var h3 = b2.redAdd(a3);
|
16695
16695
|
var nx = e2.redMul(f);
|
16696
|
-
var ny =
|
16696
|
+
var ny = g2.redMul(h3);
|
16697
16697
|
var nt = e2.redMul(h3);
|
16698
|
-
var nz = f.redMul(
|
16698
|
+
var nz = f.redMul(g2);
|
16699
16699
|
return this.curve.point(nx, ny, nz, nt);
|
16700
16700
|
}, "_extAdd");
|
16701
16701
|
Point2.prototype._projAdd = /* @__PURE__ */ __name(function _projAdd(p) {
|
@@ -16705,17 +16705,17 @@ var require_edwards = __commonJS({
|
|
16705
16705
|
var d3 = this.y.redMul(p.y);
|
16706
16706
|
var e2 = this.curve.d.redMul(c2).redMul(d3);
|
16707
16707
|
var f = b2.redSub(e2);
|
16708
|
-
var
|
16708
|
+
var g2 = b2.redAdd(e2);
|
16709
16709
|
var tmp = this.x.redAdd(this.y).redMul(p.x.redAdd(p.y)).redISub(c2).redISub(d3);
|
16710
16710
|
var nx = a3.redMul(f).redMul(tmp);
|
16711
16711
|
var ny;
|
16712
16712
|
var nz;
|
16713
16713
|
if (this.curve.twisted) {
|
16714
|
-
ny = a3.redMul(
|
16715
|
-
nz = f.redMul(
|
16714
|
+
ny = a3.redMul(g2).redMul(d3.redSub(this.curve._mulA(c2)));
|
16715
|
+
nz = f.redMul(g2);
|
16716
16716
|
} else {
|
16717
|
-
ny = a3.redMul(
|
16718
|
-
nz = this.curve._mulC(f).redMul(
|
16717
|
+
ny = a3.redMul(g2).redMul(d3.redSub(c2));
|
16718
|
+
nz = this.curve._mulC(f).redMul(g2);
|
16719
16719
|
}
|
16720
16720
|
return this.curve.point(nx, ny, nz);
|
16721
16721
|
}, "_projAdd");
|
@@ -17402,14 +17402,14 @@ var require__2 = __commonJS({
|
|
17402
17402
|
var d3 = this.h[3];
|
17403
17403
|
var e2 = this.h[4];
|
17404
17404
|
var f = this.h[5];
|
17405
|
-
var
|
17405
|
+
var g2 = this.h[6];
|
17406
17406
|
var h3 = this.h[7];
|
17407
17407
|
assert2(this.k.length === W.length);
|
17408
17408
|
for (i2 = 0; i2 < W.length; i2++) {
|
17409
|
-
var T1 = sum32_5(h3, s1_256(e2), ch32(e2, f,
|
17409
|
+
var T1 = sum32_5(h3, s1_256(e2), ch32(e2, f, g2), this.k[i2], W[i2]);
|
17410
17410
|
var T2 = sum32(s0_256(a3), maj32(a3, b2, c2));
|
17411
|
-
h3 =
|
17412
|
-
|
17411
|
+
h3 = g2;
|
17412
|
+
g2 = f;
|
17413
17413
|
f = e2;
|
17414
17414
|
e2 = sum32(d3, T1);
|
17415
17415
|
d3 = c2;
|
@@ -17423,7 +17423,7 @@ var require__2 = __commonJS({
|
|
17423
17423
|
this.h[3] = sum32(this.h[3], d3);
|
17424
17424
|
this.h[4] = sum32(this.h[4], e2);
|
17425
17425
|
this.h[5] = sum32(this.h[5], f);
|
17426
|
-
this.h[6] = sum32(this.h[6],
|
17426
|
+
this.h[6] = sum32(this.h[6], g2);
|
17427
17427
|
this.h[7] = sum32(this.h[7], h3);
|
17428
17428
|
}, "_update");
|
17429
17429
|
SHA256.prototype._digest = /* @__PURE__ */ __name(function digest2(enc) {
|
@@ -21639,7 +21639,7 @@ var require_ed25519 = __commonJS({
|
|
21639
21639
|
}
|
21640
21640
|
__name(pow2523, "pow2523");
|
21641
21641
|
function edadd(p, q2) {
|
21642
|
-
const a3 = gf(), b2 = gf(), c2 = gf(), d3 = gf(), e2 = gf(), f = gf(),
|
21642
|
+
const a3 = gf(), b2 = gf(), c2 = gf(), d3 = gf(), e2 = gf(), f = gf(), g2 = gf(), h3 = gf(), t2 = gf();
|
21643
21643
|
sub(a3, p[1], p[0]);
|
21644
21644
|
sub(t2, q2[1], q2[0]);
|
21645
21645
|
mul3(a3, a3, t2);
|
@@ -21652,11 +21652,11 @@ var require_ed25519 = __commonJS({
|
|
21652
21652
|
add3(d3, d3, d3);
|
21653
21653
|
sub(e2, b2, a3);
|
21654
21654
|
sub(f, d3, c2);
|
21655
|
-
add3(
|
21655
|
+
add3(g2, d3, c2);
|
21656
21656
|
add3(h3, b2, a3);
|
21657
21657
|
mul3(p[0], e2, f);
|
21658
|
-
mul3(p[1], h3,
|
21659
|
-
mul3(p[2],
|
21658
|
+
mul3(p[1], h3, g2);
|
21659
|
+
mul3(p[2], g2, f);
|
21660
21660
|
mul3(p[3], e2, h3);
|
21661
21661
|
}
|
21662
21662
|
__name(edadd, "edadd");
|
@@ -23276,7 +23276,7 @@ var require_poly1305 = __commonJS({
|
|
23276
23276
|
if (macpos === void 0) {
|
23277
23277
|
macpos = 0;
|
23278
23278
|
}
|
23279
|
-
var
|
23279
|
+
var g2 = new Uint16Array(10);
|
23280
23280
|
var c2;
|
23281
23281
|
var mask;
|
23282
23282
|
var f;
|
@@ -23304,22 +23304,22 @@ var require_poly1305 = __commonJS({
|
|
23304
23304
|
c2 = this._h[1] >>> 13;
|
23305
23305
|
this._h[1] &= 8191;
|
23306
23306
|
this._h[2] += c2;
|
23307
|
-
|
23308
|
-
c2 =
|
23309
|
-
|
23307
|
+
g2[0] = this._h[0] + 5;
|
23308
|
+
c2 = g2[0] >>> 13;
|
23309
|
+
g2[0] &= 8191;
|
23310
23310
|
for (i2 = 1; i2 < 10; i2++) {
|
23311
|
-
|
23312
|
-
c2 =
|
23313
|
-
|
23311
|
+
g2[i2] = this._h[i2] + c2;
|
23312
|
+
c2 = g2[i2] >>> 13;
|
23313
|
+
g2[i2] &= 8191;
|
23314
23314
|
}
|
23315
|
-
|
23315
|
+
g2[9] -= 1 << 13;
|
23316
23316
|
mask = (c2 ^ 1) - 1;
|
23317
23317
|
for (i2 = 0; i2 < 10; i2++) {
|
23318
|
-
|
23318
|
+
g2[i2] &= mask;
|
23319
23319
|
}
|
23320
23320
|
mask = ~mask;
|
23321
23321
|
for (i2 = 0; i2 < 10; i2++) {
|
23322
|
-
this._h[i2] = this._h[i2] & mask |
|
23322
|
+
this._h[i2] = this._h[i2] & mask | g2[i2];
|
23323
23323
|
}
|
23324
23324
|
this._h[0] = (this._h[0] | this._h[1] << 13) & 65535;
|
23325
23325
|
this._h[1] = (this._h[1] >>> 3 | this._h[2] << 10) & 65535;
|
@@ -34970,11 +34970,11 @@ var require_bn2 = __commonJS({
|
|
34970
34970
|
var B2 = new BN3(0);
|
34971
34971
|
var C = new BN3(0);
|
34972
34972
|
var D2 = new BN3(1);
|
34973
|
-
var
|
34973
|
+
var g2 = 0;
|
34974
34974
|
while (x2.isEven() && y3.isEven()) {
|
34975
34975
|
x2.iushrn(1);
|
34976
34976
|
y3.iushrn(1);
|
34977
|
-
++
|
34977
|
+
++g2;
|
34978
34978
|
}
|
34979
34979
|
var yp = y3.clone();
|
34980
34980
|
var xp = x2.clone();
|
@@ -35018,7 +35018,7 @@ var require_bn2 = __commonJS({
|
|
35018
35018
|
return {
|
35019
35019
|
a: C,
|
35020
35020
|
b: D2,
|
35021
|
-
gcd: y3.iushln(
|
35021
|
+
gcd: y3.iushln(g2)
|
35022
35022
|
};
|
35023
35023
|
}, "egcd");
|
35024
35024
|
BN3.prototype._invmp = /* @__PURE__ */ __name(function _invmp(p) {
|
@@ -36921,10 +36921,10 @@ var require_tslib = __commonJS({
|
|
36921
36921
|
if (t2[0] & 1)
|
36922
36922
|
throw t2[1];
|
36923
36923
|
return t2[1];
|
36924
|
-
}, trys: [], ops: [] }, f, y3, t2,
|
36925
|
-
return
|
36924
|
+
}, trys: [], ops: [] }, f, y3, t2, g2;
|
36925
|
+
return g2 = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g2[Symbol.iterator] = function() {
|
36926
36926
|
return this;
|
36927
|
-
}),
|
36927
|
+
}), g2;
|
36928
36928
|
function verb(n) {
|
36929
36929
|
return function(v) {
|
36930
36930
|
return step([n, v]);
|
@@ -36934,7 +36934,7 @@ var require_tslib = __commonJS({
|
|
36934
36934
|
function step(op) {
|
36935
36935
|
if (f)
|
36936
36936
|
throw new TypeError("Generator is already executing.");
|
36937
|
-
while (
|
36937
|
+
while (g2 && (g2 = 0, op[0] && (_2 = 0)), _2)
|
36938
36938
|
try {
|
36939
36939
|
if (f = 1, y3 && (t2 = op[0] & 2 ? y3["return"] : op[0] ? y3["throw"] || ((t2 = y3["return"]) && t2.call(y3), 0) : y3.next) && !(t2 = t2.call(y3, op[1])).done)
|
36940
36940
|
return t2;
|
@@ -37079,12 +37079,12 @@ var require_tslib = __commonJS({
|
|
37079
37079
|
__asyncGenerator2 = /* @__PURE__ */ __name(function(thisArg, _arguments, generator) {
|
37080
37080
|
if (!Symbol.asyncIterator)
|
37081
37081
|
throw new TypeError("Symbol.asyncIterator is not defined.");
|
37082
|
-
var
|
37082
|
+
var g2 = generator.apply(thisArg, _arguments || []), i2, q2 = [];
|
37083
37083
|
return i2 = {}, verb("next"), verb("throw"), verb("return"), i2[Symbol.asyncIterator] = function() {
|
37084
37084
|
return this;
|
37085
37085
|
}, i2;
|
37086
37086
|
function verb(n) {
|
37087
|
-
if (
|
37087
|
+
if (g2[n])
|
37088
37088
|
i2[n] = function(v) {
|
37089
37089
|
return new Promise(function(a3, b2) {
|
37090
37090
|
q2.push([n, v, a3, b2]) > 1 || resume(n, v);
|
@@ -37094,7 +37094,7 @@ var require_tslib = __commonJS({
|
|
37094
37094
|
__name(verb, "verb");
|
37095
37095
|
function resume(n, v) {
|
37096
37096
|
try {
|
37097
|
-
step(
|
37097
|
+
step(g2[n](v));
|
37098
37098
|
} catch (e2) {
|
37099
37099
|
settle(q2[0][3], e2);
|
37100
37100
|
}
|
@@ -46173,10 +46173,19 @@ var require_base32_decode = __commonJS({
|
|
46173
46173
|
}
|
46174
46174
|
});
|
46175
46175
|
|
46176
|
-
// src/
|
46176
|
+
// src/polyfills.ts
|
46177
46177
|
var import_promise = __toESM(require_promise3());
|
46178
46178
|
import "isomorphic-fetch";
|
46179
|
-
import "abort-controller/
|
46179
|
+
import * as ac from "abort-controller/dist/abort-controller.js";
|
46180
|
+
var g = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : void 0;
|
46181
|
+
if (g) {
|
46182
|
+
if (typeof g.AbortController === "undefined") {
|
46183
|
+
g.AbortController = ac.AbortController;
|
46184
|
+
}
|
46185
|
+
if (typeof g.AbortSignal === "undefined") {
|
46186
|
+
g.AbortSignal = ac.AbortSignal;
|
46187
|
+
}
|
46188
|
+
}
|
46180
46189
|
|
46181
46190
|
// src/wallet/base/helpers.ts
|
46182
46191
|
var findFirstResult = /* @__PURE__ */ __name((array, callback) => {
|
@@ -51963,7 +51972,7 @@ var mod = /* @__PURE__ */ Object.freeze({
|
|
51963
51972
|
});
|
51964
51973
|
|
51965
51974
|
// ../learn-card-types/dist/types.esm.js
|
51966
|
-
var ContextValidator = mod.string().
|
51975
|
+
var ContextValidator = mod.array(mod.string().or(mod.record(mod.any())));
|
51967
51976
|
var AchievementCriteriaValidator = mod.object({
|
51968
51977
|
type: mod.string().optional(),
|
51969
51978
|
narrative: mod.string().optional()
|