@aztec/node-keystore 2.1.6 → 2.1.7
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/dest/schemas.d.ts +39 -39
- package/dest/schemas.d.ts.map +1 -1
- package/dest/schemas.js +8 -8
- package/package.json +4 -4
- package/src/schemas.ts +53 -38
package/dest/schemas.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export declare const keystoreSchema: z.ZodEffects<z.ZodObject<{
|
|
|
11
11
|
remoteSignerUrl: z.ZodString;
|
|
12
12
|
certPath: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
13
13
|
certPass: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
14
|
-
}, "
|
|
14
|
+
}, "strict", z.ZodTypeAny, {
|
|
15
15
|
remoteSignerUrl: string;
|
|
16
16
|
address: import("@aztec/foundation/schemas").EthAddress;
|
|
17
17
|
certPath?: string | undefined;
|
|
@@ -24,7 +24,7 @@ export declare const keystoreSchema: z.ZodEffects<z.ZodObject<{
|
|
|
24
24
|
}>]>, z.ZodObject<{
|
|
25
25
|
path: z.ZodString;
|
|
26
26
|
password: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
27
|
-
}, "
|
|
27
|
+
}, "strict", z.ZodTypeAny, {
|
|
28
28
|
path: string;
|
|
29
29
|
password?: string | undefined;
|
|
30
30
|
}, {
|
|
@@ -36,7 +36,7 @@ export declare const keystoreSchema: z.ZodEffects<z.ZodObject<{
|
|
|
36
36
|
remoteSignerUrl: z.ZodString;
|
|
37
37
|
certPath: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
38
38
|
certPass: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
39
|
-
}, "
|
|
39
|
+
}, "strict", z.ZodTypeAny, {
|
|
40
40
|
remoteSignerUrl: string;
|
|
41
41
|
address: import("@aztec/foundation/schemas").EthAddress;
|
|
42
42
|
certPath?: string | undefined;
|
|
@@ -49,7 +49,7 @@ export declare const keystoreSchema: z.ZodEffects<z.ZodObject<{
|
|
|
49
49
|
}>]>, z.ZodObject<{
|
|
50
50
|
path: z.ZodString;
|
|
51
51
|
password: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
52
|
-
}, "
|
|
52
|
+
}, "strict", z.ZodTypeAny, {
|
|
53
53
|
path: string;
|
|
54
54
|
password?: string | undefined;
|
|
55
55
|
}, {
|
|
@@ -59,14 +59,14 @@ export declare const keystoreSchema: z.ZodEffects<z.ZodObject<{
|
|
|
59
59
|
bls: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, BLSPrivateKey, string>, z.ZodObject<{
|
|
60
60
|
path: z.ZodString;
|
|
61
61
|
password: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
62
|
-
}, "
|
|
62
|
+
}, "strict", z.ZodTypeAny, {
|
|
63
63
|
path: string;
|
|
64
64
|
password?: string | undefined;
|
|
65
65
|
}, {
|
|
66
66
|
path: string;
|
|
67
67
|
password?: string | undefined;
|
|
68
68
|
}>]>>;
|
|
69
|
-
}, "
|
|
69
|
+
}, "strict", z.ZodTypeAny, {
|
|
70
70
|
eth: EthPrivateKey | import("@aztec/foundation/schemas").EthAddress | {
|
|
71
71
|
remoteSignerUrl: string;
|
|
72
72
|
address: import("@aztec/foundation/schemas").EthAddress;
|
|
@@ -99,7 +99,7 @@ export declare const keystoreSchema: z.ZodEffects<z.ZodObject<{
|
|
|
99
99
|
remoteSignerUrl: z.ZodString;
|
|
100
100
|
certPath: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
101
101
|
certPass: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
102
|
-
}, "
|
|
102
|
+
}, "strict", z.ZodTypeAny, {
|
|
103
103
|
remoteSignerUrl: string;
|
|
104
104
|
address: import("@aztec/foundation/schemas").EthAddress;
|
|
105
105
|
certPath?: string | undefined;
|
|
@@ -112,7 +112,7 @@ export declare const keystoreSchema: z.ZodEffects<z.ZodObject<{
|
|
|
112
112
|
}>]>, z.ZodObject<{
|
|
113
113
|
path: z.ZodString;
|
|
114
114
|
password: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
115
|
-
}, "
|
|
115
|
+
}, "strict", z.ZodTypeAny, {
|
|
116
116
|
path: string;
|
|
117
117
|
password?: string | undefined;
|
|
118
118
|
}, {
|
|
@@ -124,7 +124,7 @@ export declare const keystoreSchema: z.ZodEffects<z.ZodObject<{
|
|
|
124
124
|
remoteSignerUrl: z.ZodString;
|
|
125
125
|
certPath: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
126
126
|
certPass: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
127
|
-
}, "
|
|
127
|
+
}, "strict", z.ZodTypeAny, {
|
|
128
128
|
remoteSignerUrl: string;
|
|
129
129
|
address: import("@aztec/foundation/schemas").EthAddress;
|
|
130
130
|
certPath?: string | undefined;
|
|
@@ -137,7 +137,7 @@ export declare const keystoreSchema: z.ZodEffects<z.ZodObject<{
|
|
|
137
137
|
}>]>, z.ZodObject<{
|
|
138
138
|
path: z.ZodString;
|
|
139
139
|
password: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
140
|
-
}, "
|
|
140
|
+
}, "strict", z.ZodTypeAny, {
|
|
141
141
|
path: string;
|
|
142
142
|
password?: string | undefined;
|
|
143
143
|
}, {
|
|
@@ -147,14 +147,14 @@ export declare const keystoreSchema: z.ZodEffects<z.ZodObject<{
|
|
|
147
147
|
bls: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, BLSPrivateKey, string>, z.ZodObject<{
|
|
148
148
|
path: z.ZodString;
|
|
149
149
|
password: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
150
|
-
}, "
|
|
150
|
+
}, "strict", z.ZodTypeAny, {
|
|
151
151
|
path: string;
|
|
152
152
|
password?: string | undefined;
|
|
153
153
|
}, {
|
|
154
154
|
path: string;
|
|
155
155
|
password?: string | undefined;
|
|
156
156
|
}>]>>;
|
|
157
|
-
}, "
|
|
157
|
+
}, "strict", z.ZodTypeAny, {
|
|
158
158
|
eth: EthPrivateKey | import("@aztec/foundation/schemas").EthAddress | {
|
|
159
159
|
remoteSignerUrl: string;
|
|
160
160
|
address: import("@aztec/foundation/schemas").EthAddress;
|
|
@@ -188,7 +188,7 @@ export declare const keystoreSchema: z.ZodEffects<z.ZodObject<{
|
|
|
188
188
|
accountIndex: z.ZodDefault<z.ZodNumber>;
|
|
189
189
|
addressCount: z.ZodDefault<z.ZodNumber>;
|
|
190
190
|
accountCount: z.ZodDefault<z.ZodNumber>;
|
|
191
|
-
}, "
|
|
191
|
+
}, "strict", z.ZodTypeAny, {
|
|
192
192
|
mnemonic: string;
|
|
193
193
|
addressIndex: number;
|
|
194
194
|
accountIndex: number;
|
|
@@ -207,7 +207,7 @@ export declare const keystoreSchema: z.ZodEffects<z.ZodObject<{
|
|
|
207
207
|
remoteSignerUrl: z.ZodString;
|
|
208
208
|
certPath: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
209
209
|
certPass: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
210
|
-
}, "
|
|
210
|
+
}, "strict", z.ZodTypeAny, {
|
|
211
211
|
remoteSignerUrl: string;
|
|
212
212
|
address: import("@aztec/foundation/schemas").EthAddress;
|
|
213
213
|
certPath?: string | undefined;
|
|
@@ -220,7 +220,7 @@ export declare const keystoreSchema: z.ZodEffects<z.ZodObject<{
|
|
|
220
220
|
}>]>, z.ZodObject<{
|
|
221
221
|
path: z.ZodString;
|
|
222
222
|
password: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
223
|
-
}, "
|
|
223
|
+
}, "strict", z.ZodTypeAny, {
|
|
224
224
|
path: string;
|
|
225
225
|
password?: string | undefined;
|
|
226
226
|
}, {
|
|
@@ -231,7 +231,7 @@ export declare const keystoreSchema: z.ZodEffects<z.ZodObject<{
|
|
|
231
231
|
remoteSignerUrl: z.ZodString;
|
|
232
232
|
certPath: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
233
233
|
certPass: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
234
|
-
}, "
|
|
234
|
+
}, "strict", z.ZodTypeAny, {
|
|
235
235
|
remoteSignerUrl: string;
|
|
236
236
|
address: import("@aztec/foundation/schemas").EthAddress;
|
|
237
237
|
certPath?: string | undefined;
|
|
@@ -244,7 +244,7 @@ export declare const keystoreSchema: z.ZodEffects<z.ZodObject<{
|
|
|
244
244
|
}>]>, z.ZodObject<{
|
|
245
245
|
path: z.ZodString;
|
|
246
246
|
password: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
247
|
-
}, "
|
|
247
|
+
}, "strict", z.ZodTypeAny, {
|
|
248
248
|
path: string;
|
|
249
249
|
password?: string | undefined;
|
|
250
250
|
}, {
|
|
@@ -256,7 +256,7 @@ export declare const keystoreSchema: z.ZodEffects<z.ZodObject<{
|
|
|
256
256
|
accountIndex: z.ZodDefault<z.ZodNumber>;
|
|
257
257
|
addressCount: z.ZodDefault<z.ZodNumber>;
|
|
258
258
|
accountCount: z.ZodDefault<z.ZodNumber>;
|
|
259
|
-
}, "
|
|
259
|
+
}, "strict", z.ZodTypeAny, {
|
|
260
260
|
mnemonic: string;
|
|
261
261
|
addressIndex: number;
|
|
262
262
|
accountIndex: number;
|
|
@@ -274,7 +274,7 @@ export declare const keystoreSchema: z.ZodEffects<z.ZodObject<{
|
|
|
274
274
|
remoteSignerUrl: z.ZodString;
|
|
275
275
|
certPath: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
276
276
|
certPass: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
277
|
-
}, "
|
|
277
|
+
}, "strict", z.ZodTypeAny, {
|
|
278
278
|
remoteSignerUrl: string;
|
|
279
279
|
certPath?: string | undefined;
|
|
280
280
|
certPass?: string | undefined;
|
|
@@ -288,7 +288,7 @@ export declare const keystoreSchema: z.ZodEffects<z.ZodObject<{
|
|
|
288
288
|
remoteSignerUrl: z.ZodString;
|
|
289
289
|
certPath: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
290
290
|
certPass: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
291
|
-
}, "
|
|
291
|
+
}, "strict", z.ZodTypeAny, {
|
|
292
292
|
remoteSignerUrl: string;
|
|
293
293
|
address: import("@aztec/foundation/schemas").EthAddress;
|
|
294
294
|
certPath?: string | undefined;
|
|
@@ -301,14 +301,14 @@ export declare const keystoreSchema: z.ZodEffects<z.ZodObject<{
|
|
|
301
301
|
}>]>, z.ZodObject<{
|
|
302
302
|
path: z.ZodString;
|
|
303
303
|
password: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
304
|
-
}, "
|
|
304
|
+
}, "strict", z.ZodTypeAny, {
|
|
305
305
|
path: string;
|
|
306
306
|
password?: string | undefined;
|
|
307
307
|
}, {
|
|
308
308
|
path: string;
|
|
309
309
|
password?: string | undefined;
|
|
310
310
|
}>]>>;
|
|
311
|
-
}, "
|
|
311
|
+
}, "strict", z.ZodTypeAny, {
|
|
312
312
|
attester: EthPrivateKey | import("@aztec/foundation/schemas").EthAddress | {
|
|
313
313
|
remoteSignerUrl: string;
|
|
314
314
|
address: import("@aztec/foundation/schemas").EthAddress;
|
|
@@ -496,7 +496,7 @@ export declare const keystoreSchema: z.ZodEffects<z.ZodObject<{
|
|
|
496
496
|
remoteSignerUrl: z.ZodString;
|
|
497
497
|
certPath: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
498
498
|
certPass: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
499
|
-
}, "
|
|
499
|
+
}, "strict", z.ZodTypeAny, {
|
|
500
500
|
remoteSignerUrl: string;
|
|
501
501
|
address: import("@aztec/foundation/schemas").EthAddress;
|
|
502
502
|
certPath?: string | undefined;
|
|
@@ -509,7 +509,7 @@ export declare const keystoreSchema: z.ZodEffects<z.ZodObject<{
|
|
|
509
509
|
}>]>, z.ZodObject<{
|
|
510
510
|
path: z.ZodString;
|
|
511
511
|
password: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
512
|
-
}, "
|
|
512
|
+
}, "strict", z.ZodTypeAny, {
|
|
513
513
|
path: string;
|
|
514
514
|
password?: string | undefined;
|
|
515
515
|
}, {
|
|
@@ -520,7 +520,7 @@ export declare const keystoreSchema: z.ZodEffects<z.ZodObject<{
|
|
|
520
520
|
remoteSignerUrl: z.ZodString;
|
|
521
521
|
certPath: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
522
522
|
certPass: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
523
|
-
}, "
|
|
523
|
+
}, "strict", z.ZodTypeAny, {
|
|
524
524
|
remoteSignerUrl: string;
|
|
525
525
|
address: import("@aztec/foundation/schemas").EthAddress;
|
|
526
526
|
certPath?: string | undefined;
|
|
@@ -533,7 +533,7 @@ export declare const keystoreSchema: z.ZodEffects<z.ZodObject<{
|
|
|
533
533
|
}>]>, z.ZodObject<{
|
|
534
534
|
path: z.ZodString;
|
|
535
535
|
password: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
536
|
-
}, "
|
|
536
|
+
}, "strict", z.ZodTypeAny, {
|
|
537
537
|
path: string;
|
|
538
538
|
password?: string | undefined;
|
|
539
539
|
}, {
|
|
@@ -545,7 +545,7 @@ export declare const keystoreSchema: z.ZodEffects<z.ZodObject<{
|
|
|
545
545
|
accountIndex: z.ZodDefault<z.ZodNumber>;
|
|
546
546
|
addressCount: z.ZodDefault<z.ZodNumber>;
|
|
547
547
|
accountCount: z.ZodDefault<z.ZodNumber>;
|
|
548
|
-
}, "
|
|
548
|
+
}, "strict", z.ZodTypeAny, {
|
|
549
549
|
mnemonic: string;
|
|
550
550
|
addressIndex: number;
|
|
551
551
|
accountIndex: number;
|
|
@@ -562,7 +562,7 @@ export declare const keystoreSchema: z.ZodEffects<z.ZodObject<{
|
|
|
562
562
|
remoteSignerUrl: z.ZodString;
|
|
563
563
|
certPath: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
564
564
|
certPass: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
565
|
-
}, "
|
|
565
|
+
}, "strict", z.ZodTypeAny, {
|
|
566
566
|
remoteSignerUrl: string;
|
|
567
567
|
certPath?: string | undefined;
|
|
568
568
|
certPass?: string | undefined;
|
|
@@ -576,7 +576,7 @@ export declare const keystoreSchema: z.ZodEffects<z.ZodObject<{
|
|
|
576
576
|
remoteSignerUrl: z.ZodString;
|
|
577
577
|
certPath: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
578
578
|
certPass: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
579
|
-
}, "
|
|
579
|
+
}, "strict", z.ZodTypeAny, {
|
|
580
580
|
remoteSignerUrl: string;
|
|
581
581
|
address: import("@aztec/foundation/schemas").EthAddress;
|
|
582
582
|
certPath?: string | undefined;
|
|
@@ -589,7 +589,7 @@ export declare const keystoreSchema: z.ZodEffects<z.ZodObject<{
|
|
|
589
589
|
}>]>, z.ZodObject<{
|
|
590
590
|
path: z.ZodString;
|
|
591
591
|
password: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
592
|
-
}, "
|
|
592
|
+
}, "strict", z.ZodTypeAny, {
|
|
593
593
|
path: string;
|
|
594
594
|
password?: string | undefined;
|
|
595
595
|
}, {
|
|
@@ -602,7 +602,7 @@ export declare const keystoreSchema: z.ZodEffects<z.ZodObject<{
|
|
|
602
602
|
remoteSignerUrl: z.ZodString;
|
|
603
603
|
certPath: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
604
604
|
certPass: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
605
|
-
}, "
|
|
605
|
+
}, "strict", z.ZodTypeAny, {
|
|
606
606
|
remoteSignerUrl: string;
|
|
607
607
|
address: import("@aztec/foundation/schemas").EthAddress;
|
|
608
608
|
certPath?: string | undefined;
|
|
@@ -615,7 +615,7 @@ export declare const keystoreSchema: z.ZodEffects<z.ZodObject<{
|
|
|
615
615
|
}>]>, z.ZodObject<{
|
|
616
616
|
path: z.ZodString;
|
|
617
617
|
password: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
618
|
-
}, "
|
|
618
|
+
}, "strict", z.ZodTypeAny, {
|
|
619
619
|
path: string;
|
|
620
620
|
password?: string | undefined;
|
|
621
621
|
}, {
|
|
@@ -626,7 +626,7 @@ export declare const keystoreSchema: z.ZodEffects<z.ZodObject<{
|
|
|
626
626
|
remoteSignerUrl: z.ZodString;
|
|
627
627
|
certPath: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
628
628
|
certPass: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
629
|
-
}, "
|
|
629
|
+
}, "strict", z.ZodTypeAny, {
|
|
630
630
|
remoteSignerUrl: string;
|
|
631
631
|
address: import("@aztec/foundation/schemas").EthAddress;
|
|
632
632
|
certPath?: string | undefined;
|
|
@@ -639,7 +639,7 @@ export declare const keystoreSchema: z.ZodEffects<z.ZodObject<{
|
|
|
639
639
|
}>]>, z.ZodObject<{
|
|
640
640
|
path: z.ZodString;
|
|
641
641
|
password: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
642
|
-
}, "
|
|
642
|
+
}, "strict", z.ZodTypeAny, {
|
|
643
643
|
path: string;
|
|
644
644
|
password?: string | undefined;
|
|
645
645
|
}, {
|
|
@@ -651,7 +651,7 @@ export declare const keystoreSchema: z.ZodEffects<z.ZodObject<{
|
|
|
651
651
|
accountIndex: z.ZodDefault<z.ZodNumber>;
|
|
652
652
|
addressCount: z.ZodDefault<z.ZodNumber>;
|
|
653
653
|
accountCount: z.ZodDefault<z.ZodNumber>;
|
|
654
|
-
}, "
|
|
654
|
+
}, "strict", z.ZodTypeAny, {
|
|
655
655
|
mnemonic: string;
|
|
656
656
|
addressIndex: number;
|
|
657
657
|
accountIndex: number;
|
|
@@ -664,7 +664,7 @@ export declare const keystoreSchema: z.ZodEffects<z.ZodObject<{
|
|
|
664
664
|
addressCount?: number | undefined;
|
|
665
665
|
accountCount?: number | undefined;
|
|
666
666
|
}>]>;
|
|
667
|
-
}, "
|
|
667
|
+
}, "strict", z.ZodTypeAny, {
|
|
668
668
|
id: import("@aztec/foundation/schemas").EthAddress;
|
|
669
669
|
publisher: EthPrivateKey | import("@aztec/foundation/schemas").EthAddress | {
|
|
670
670
|
remoteSignerUrl: string;
|
|
@@ -720,7 +720,7 @@ export declare const keystoreSchema: z.ZodEffects<z.ZodObject<{
|
|
|
720
720
|
remoteSignerUrl: z.ZodString;
|
|
721
721
|
certPath: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
722
722
|
certPass: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
723
|
-
}, "
|
|
723
|
+
}, "strict", z.ZodTypeAny, {
|
|
724
724
|
remoteSignerUrl: string;
|
|
725
725
|
address: import("@aztec/foundation/schemas").EthAddress;
|
|
726
726
|
certPath?: string | undefined;
|
|
@@ -733,14 +733,14 @@ export declare const keystoreSchema: z.ZodEffects<z.ZodObject<{
|
|
|
733
733
|
}>]>, z.ZodObject<{
|
|
734
734
|
path: z.ZodString;
|
|
735
735
|
password: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodString>;
|
|
736
|
-
}, "
|
|
736
|
+
}, "strict", z.ZodTypeAny, {
|
|
737
737
|
path: string;
|
|
738
738
|
password?: string | undefined;
|
|
739
739
|
}, {
|
|
740
740
|
path: string;
|
|
741
741
|
password?: string | undefined;
|
|
742
742
|
}>]>>;
|
|
743
|
-
}, "
|
|
743
|
+
}, "strict", z.ZodTypeAny, {
|
|
744
744
|
schemaVersion: 1;
|
|
745
745
|
remoteSigner?: string | {
|
|
746
746
|
remoteSignerUrl: string;
|
package/dest/schemas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG/D,eAAO,MAAM,mBAAmB,kDAGK,CAAC;AACtC,eAAO,MAAM,mBAAmB,kDAGK,CAAC;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG/D,eAAO,MAAM,mBAAmB,kDAGK,CAAC;AACtC,eAAO,MAAM,mBAAmB,kDAGK,CAAC;AA8FtC,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAavB,CAAC"}
|
package/dest/schemas.js
CHANGED
|
@@ -14,7 +14,7 @@ const remoteSignerConfigSchema = z.union([
|
|
|
14
14
|
remoteSignerUrl: urlSchema,
|
|
15
15
|
certPath: optional(z.string()),
|
|
16
16
|
certPass: optional(z.string())
|
|
17
|
-
})
|
|
17
|
+
}).strict()
|
|
18
18
|
]);
|
|
19
19
|
// Remote signer account schema
|
|
20
20
|
const remoteSignerAccountSchema = z.union([
|
|
@@ -24,13 +24,13 @@ const remoteSignerAccountSchema = z.union([
|
|
|
24
24
|
remoteSignerUrl: urlSchema,
|
|
25
25
|
certPath: optional(z.string()),
|
|
26
26
|
certPass: optional(z.string())
|
|
27
|
-
})
|
|
27
|
+
}).strict()
|
|
28
28
|
]);
|
|
29
29
|
// Encrypted keystore file schema (used for both JSON V3 ETH keys and EIP-2335 BLS keys)
|
|
30
30
|
const encryptedKeyFileSchema = z.object({
|
|
31
31
|
path: z.string(),
|
|
32
32
|
password: optional(z.string())
|
|
33
|
-
});
|
|
33
|
+
}).strict();
|
|
34
34
|
// Mnemonic config schema
|
|
35
35
|
const mnemonicConfigSchema = z.object({
|
|
36
36
|
mnemonic: z.string().min(1, 'Mnemonic cannot be empty'),
|
|
@@ -38,7 +38,7 @@ const mnemonicConfigSchema = z.object({
|
|
|
38
38
|
accountIndex: z.number().int().min(0).default(0),
|
|
39
39
|
addressCount: z.number().int().min(1).default(1),
|
|
40
40
|
accountCount: z.number().int().min(1).default(1)
|
|
41
|
-
});
|
|
41
|
+
}).strict();
|
|
42
42
|
// EthAccount schema
|
|
43
43
|
const ethAccountSchema = z.union([
|
|
44
44
|
ethPrivateKeySchema,
|
|
@@ -62,7 +62,7 @@ const attesterAccountSchema = z.union([
|
|
|
62
62
|
z.object({
|
|
63
63
|
eth: ethAccountSchema,
|
|
64
64
|
bls: optional(blsAccountSchema)
|
|
65
|
-
})
|
|
65
|
+
}).strict()
|
|
66
66
|
]);
|
|
67
67
|
// AttesterAccounts schema: AttesterAccount | AttesterAccount[] | MnemonicConfig
|
|
68
68
|
const attesterAccountsSchema = z.union([
|
|
@@ -76,7 +76,7 @@ const proverKeyStoreSchema = z.union([
|
|
|
76
76
|
z.object({
|
|
77
77
|
id: schemas.EthAddress,
|
|
78
78
|
publisher: ethAccountsSchema
|
|
79
|
-
})
|
|
79
|
+
}).strict()
|
|
80
80
|
]);
|
|
81
81
|
// Validator keystore schema
|
|
82
82
|
const validatorKeyStoreSchema = z.object({
|
|
@@ -86,7 +86,7 @@ const validatorKeyStoreSchema = z.object({
|
|
|
86
86
|
feeRecipient: AztecAddress.schema,
|
|
87
87
|
remoteSigner: optional(remoteSignerConfigSchema),
|
|
88
88
|
fundingAccount: optional(ethAccountSchema)
|
|
89
|
-
});
|
|
89
|
+
}).strict();
|
|
90
90
|
// Main keystore schema
|
|
91
91
|
export const keystoreSchema = z.object({
|
|
92
92
|
schemaVersion: z.literal(1),
|
|
@@ -95,7 +95,7 @@ export const keystoreSchema = z.object({
|
|
|
95
95
|
remoteSigner: optional(remoteSignerConfigSchema),
|
|
96
96
|
prover: optional(proverKeyStoreSchema),
|
|
97
97
|
fundingAccount: optional(ethAccountSchema)
|
|
98
|
-
}).refine((data)=>data.validators || data.prover, {
|
|
98
|
+
}).strict().refine((data)=>data.validators || data.prover, {
|
|
99
99
|
message: 'Keystore must have at least validators or prover configuration',
|
|
100
100
|
path: [
|
|
101
101
|
'root'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/node-keystore",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/index.js",
|
|
@@ -62,9 +62,9 @@
|
|
|
62
62
|
]
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@aztec/ethereum": "2.1.
|
|
66
|
-
"@aztec/foundation": "2.1.
|
|
67
|
-
"@aztec/stdlib": "2.1.
|
|
65
|
+
"@aztec/ethereum": "2.1.7",
|
|
66
|
+
"@aztec/foundation": "2.1.7",
|
|
67
|
+
"@aztec/stdlib": "2.1.7",
|
|
68
68
|
"@ethersproject/wallet": "^5.7.0",
|
|
69
69
|
"tslib": "^2.4.0",
|
|
70
70
|
"viem": "npm:@spalladino/viem@2.38.2-eip7594.2",
|
package/src/schemas.ts
CHANGED
|
@@ -22,38 +22,46 @@ const urlSchema = z.string().url('Invalid URL');
|
|
|
22
22
|
// Remote signer config schema
|
|
23
23
|
const remoteSignerConfigSchema = z.union([
|
|
24
24
|
urlSchema,
|
|
25
|
-
z
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
z
|
|
26
|
+
.object({
|
|
27
|
+
remoteSignerUrl: urlSchema,
|
|
28
|
+
certPath: optional(z.string()),
|
|
29
|
+
certPass: optional(z.string()),
|
|
30
|
+
})
|
|
31
|
+
.strict(),
|
|
30
32
|
]);
|
|
31
33
|
|
|
32
34
|
// Remote signer account schema
|
|
33
35
|
const remoteSignerAccountSchema = z.union([
|
|
34
36
|
schemas.EthAddress,
|
|
35
|
-
z
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
z
|
|
38
|
+
.object({
|
|
39
|
+
address: schemas.EthAddress,
|
|
40
|
+
remoteSignerUrl: urlSchema,
|
|
41
|
+
certPath: optional(z.string()),
|
|
42
|
+
certPass: optional(z.string()),
|
|
43
|
+
})
|
|
44
|
+
.strict(),
|
|
41
45
|
]);
|
|
42
46
|
|
|
43
47
|
// Encrypted keystore file schema (used for both JSON V3 ETH keys and EIP-2335 BLS keys)
|
|
44
|
-
const encryptedKeyFileSchema = z
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
+
const encryptedKeyFileSchema = z
|
|
49
|
+
.object({
|
|
50
|
+
path: z.string(),
|
|
51
|
+
password: optional(z.string()),
|
|
52
|
+
})
|
|
53
|
+
.strict();
|
|
48
54
|
|
|
49
55
|
// Mnemonic config schema
|
|
50
|
-
const mnemonicConfigSchema = z
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
const mnemonicConfigSchema = z
|
|
57
|
+
.object({
|
|
58
|
+
mnemonic: z.string().min(1, 'Mnemonic cannot be empty'),
|
|
59
|
+
addressIndex: z.number().int().min(0).default(0),
|
|
60
|
+
accountIndex: z.number().int().min(0).default(0),
|
|
61
|
+
addressCount: z.number().int().min(1).default(1),
|
|
62
|
+
accountCount: z.number().int().min(1).default(1),
|
|
63
|
+
})
|
|
64
|
+
.strict();
|
|
57
65
|
|
|
58
66
|
// EthAccount schema
|
|
59
67
|
const ethAccountSchema = z.union([ethPrivateKeySchema, remoteSignerAccountSchema, encryptedKeyFileSchema]);
|
|
@@ -67,10 +75,12 @@ const blsAccountSchema = z.union([blsPrivateKeySchema, encryptedKeyFileSchema]);
|
|
|
67
75
|
// AttesterAccount schema: either EthAccount or { eth: EthAccount, bls?: BLSAccount }
|
|
68
76
|
const attesterAccountSchema = z.union([
|
|
69
77
|
ethAccountSchema,
|
|
70
|
-
z
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
78
|
+
z
|
|
79
|
+
.object({
|
|
80
|
+
eth: ethAccountSchema,
|
|
81
|
+
bls: optional(blsAccountSchema),
|
|
82
|
+
})
|
|
83
|
+
.strict(),
|
|
74
84
|
]);
|
|
75
85
|
|
|
76
86
|
// AttesterAccounts schema: AttesterAccount | AttesterAccount[] | MnemonicConfig
|
|
@@ -79,21 +89,25 @@ const attesterAccountsSchema = z.union([attesterAccountSchema, z.array(attesterA
|
|
|
79
89
|
// Prover keystore schema
|
|
80
90
|
const proverKeyStoreSchema = z.union([
|
|
81
91
|
ethAccountSchema,
|
|
82
|
-
z
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
92
|
+
z
|
|
93
|
+
.object({
|
|
94
|
+
id: schemas.EthAddress,
|
|
95
|
+
publisher: ethAccountsSchema,
|
|
96
|
+
})
|
|
97
|
+
.strict(),
|
|
86
98
|
]);
|
|
87
99
|
|
|
88
100
|
// Validator keystore schema
|
|
89
|
-
const validatorKeyStoreSchema = z
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
101
|
+
const validatorKeyStoreSchema = z
|
|
102
|
+
.object({
|
|
103
|
+
attester: attesterAccountsSchema,
|
|
104
|
+
coinbase: optional(schemas.EthAddress),
|
|
105
|
+
publisher: optional(ethAccountsSchema),
|
|
106
|
+
feeRecipient: AztecAddress.schema,
|
|
107
|
+
remoteSigner: optional(remoteSignerConfigSchema),
|
|
108
|
+
fundingAccount: optional(ethAccountSchema),
|
|
109
|
+
})
|
|
110
|
+
.strict();
|
|
97
111
|
|
|
98
112
|
// Main keystore schema
|
|
99
113
|
export const keystoreSchema = z
|
|
@@ -105,6 +119,7 @@ export const keystoreSchema = z
|
|
|
105
119
|
prover: optional(proverKeyStoreSchema),
|
|
106
120
|
fundingAccount: optional(ethAccountSchema),
|
|
107
121
|
})
|
|
122
|
+
.strict()
|
|
108
123
|
.refine(data => data.validators || data.prover, {
|
|
109
124
|
message: 'Keystore must have at least validators or prover configuration',
|
|
110
125
|
path: ['root'],
|