@exodus/web3-ethereum 1.4.4 → 1.4.5

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.
@@ -13,7 +13,9 @@ export function validateRequest(value) {
13
13
  /~\//.test(s) ? `${s}`.replace(/~/g, '~0').replace(/\//g, '~1') : s
14
14
  const pattern1 = new RegExp('^[a-z]+([A-Z][a-z]+)*[A-Z]?$', 'u')
15
15
  const format1 = new RegExp('^0x[a-f0-9]*$', 'i')
16
+ const format2 = new RegExp('^0x[a-f0-9]{40}$', 'i')
16
17
  const pattern2 = new RegExp('^[a-z]+$', 'u')
18
+ const format3 = new RegExp('^(?!_)(\\n|\\r|.)*$', '')
17
19
  const unique = (array) => {
18
20
  if (array.length < 2) return true
19
21
  if (array.length === 2) return !deepEqual(array[0], array[1])
@@ -113,36 +115,60 @@ export function validateRequest(value) {
113
115
  return false
114
116
  return true
115
117
  })()
116
- if (!(sub4 || sub5)) return false
118
+ const sub6 = (() => {
119
+ const err0 = validate.errors
120
+ const res0 = validate(data[i][key1])
121
+ const suberr0 = validate.errors
122
+ validate.errors = err0
123
+ if (!res0) return false
124
+ return true
125
+ })()
126
+ const sub7 = (() => {
127
+ if (!(typeof data[i][key1] === 'string')) return false
128
+ if (!format2.test(data[i][key1])) return false
129
+ return true
130
+ })()
131
+ if (!(sub4 || sub5 || sub6 || sub7)) return false
117
132
  }
118
133
  }
119
134
  return true
120
135
  })()
121
- const sub6 = (() => {
136
+ const sub8 = (() => {
122
137
  if (!(typeof data[i] === 'string')) return false
123
138
  if (!format1.test(data[i])) return false
124
139
  return true
125
140
  })()
126
- const sub7 = (() => {
141
+ const sub9 = (() => {
127
142
  if (!(typeof data[i] === 'string')) return false
128
143
  if (!pattern2.test(data[i])) return false
129
144
  return true
130
145
  })()
131
- const sub8 = (() => {
146
+ const sub10 = (() => {
132
147
  if (!Array.isArray(data[i])) return false
133
148
  if (data[i].length < 1) return false
134
149
  for (let j = 0; j < data[i].length; j++) {
135
150
  if (j in data[i] && hasOwn(data[i], j)) {
136
- if (!(typeof data[i][j] === 'number')) return false
151
+ const sub11 = (() => {
152
+ if (!(typeof data[i][j] === 'number')) return false
153
+ return true
154
+ })()
155
+ const sub12 = (() => {
156
+ if (!(typeof data[i][j] === 'string')) return false
157
+ if (data[i][j].length > 100 && stringLength(data[i][j]) > 100)
158
+ return false
159
+ if (!format3.test(data[i][j])) return false
160
+ return true
161
+ })()
162
+ if (!(sub11 || sub12)) return false
137
163
  }
138
164
  }
139
165
  return true
140
166
  })()
141
- const sub9 = (() => {
167
+ const sub13 = (() => {
142
168
  if (!(Array.isArray(data[i]) && data[i].length === 0)) return false
143
169
  return true
144
170
  })()
145
- if (!(sub2 || sub3 || sub6 || sub7 || sub8 || sub9)) {
171
+ if (!(sub2 || sub3 || sub8 || sub9 || sub10 || sub13)) {
146
172
  validate.errors = [
147
173
  { keywordLocation: '#/items/anyOf', instanceLocation: '#/' + i },
148
174
  ]
@@ -166,7 +192,7 @@ export function validateRequest(value) {
166
192
  keywordLocation: `${schemaBase}${keywordLocation.slice(1)}`,
167
193
  instanceLocation: `${dataBase}${instanceLocation.slice(1)}`,
168
194
  })
169
- const format2 = new RegExp('^0x[0-9a-f]+$', 'i')
195
+ const format4 = new RegExp('^0x[0-9a-f]+$', 'i')
170
196
  const ref2 = function validate(data) {
171
197
  validate.errors = null
172
198
  if (!Array.isArray(data)) {
@@ -186,7 +212,7 @@ export function validateRequest(value) {
186
212
  ]
187
213
  return false
188
214
  }
189
- if (!format2.test(data[0])) {
215
+ if (!format4.test(data[0])) {
190
216
  validate.errors = [
191
217
  { keywordLocation: '#/0/format', instanceLocation: '#/0' },
192
218
  ]
@@ -201,7 +227,6 @@ export function validateRequest(value) {
201
227
  }
202
228
  return true
203
229
  }
204
- const format3 = new RegExp('^0x[a-f0-9]{40}$', 'i')
205
230
  const ref4 = function validate(data) {
206
231
  validate.errors = null
207
232
  if (!(typeof data === 'object' && data && !Array.isArray(data))) {
@@ -216,17 +241,17 @@ export function validateRequest(value) {
216
241
  }
217
242
  if ('chainId' in data && hasOwn(data, 'chainId')) {
218
243
  let passes1 = 0
219
- const sub10 = (() => {
244
+ const sub14 = (() => {
220
245
  if (!(typeof data.chainId === 'string')) return false
221
- if (!format2.test(data.chainId)) return false
246
+ if (!format4.test(data.chainId)) return false
222
247
  return true
223
248
  })()
224
- if (sub10) passes1++
225
- const sub11 = (() => {
249
+ if (sub14) passes1++
250
+ const sub15 = (() => {
226
251
  if (!(typeof data.chainId === 'number')) return false
227
252
  return true
228
253
  })()
229
- if (sub11) passes1++
254
+ if (sub15) passes1++
230
255
  if (passes1 !== 1) {
231
256
  validate.errors = [
232
257
  {
@@ -246,7 +271,7 @@ export function validateRequest(value) {
246
271
  ]
247
272
  return false
248
273
  }
249
- if (!format3.test(data.from)) {
274
+ if (!format2.test(data.from)) {
250
275
  validate.errors = [
251
276
  {
252
277
  keywordLocation: '#/properties/from/format',
@@ -265,7 +290,7 @@ export function validateRequest(value) {
265
290
  ]
266
291
  return false
267
292
  }
268
- if (!format3.test(data.to)) {
293
+ if (!format2.test(data.to)) {
269
294
  validate.errors = [
270
295
  {
271
296
  keywordLocation: '#/properties/to/format',
@@ -285,7 +310,7 @@ export function validateRequest(value) {
285
310
  ]
286
311
  return false
287
312
  }
288
- if (!format2.test(data.gas)) {
313
+ if (!format4.test(data.gas)) {
289
314
  validate.errors = [
290
315
  {
291
316
  keywordLocation: '#/properties/gas/format',
@@ -305,7 +330,7 @@ export function validateRequest(value) {
305
330
  ]
306
331
  return false
307
332
  }
308
- if (!format2.test(data.gasPrice)) {
333
+ if (!format4.test(data.gasPrice)) {
309
334
  validate.errors = [
310
335
  {
311
336
  keywordLocation: '#/properties/gasPrice/format',
@@ -360,17 +385,17 @@ export function validateRequest(value) {
360
385
  hasOwn(data, 'maxPriorityFeePerGas')
361
386
  ) {
362
387
  let passes2 = 0
363
- const sub12 = (() => {
388
+ const sub16 = (() => {
364
389
  if (!(typeof data.maxPriorityFeePerGas === 'string')) return false
365
390
  if (!format1.test(data.maxPriorityFeePerGas)) return false
366
391
  return true
367
392
  })()
368
- if (sub12) passes2++
369
- const sub13 = (() => {
393
+ if (sub16) passes2++
394
+ const sub17 = (() => {
370
395
  if (!(data.maxPriorityFeePerGas === null)) return false
371
396
  return true
372
397
  })()
373
- if (sub13) passes2++
398
+ if (sub17) passes2++
374
399
  if (passes2 !== 1) {
375
400
  validate.errors = [
376
401
  {
@@ -383,17 +408,17 @@ export function validateRequest(value) {
383
408
  }
384
409
  if ('maxFeePerGas' in data && hasOwn(data, 'maxFeePerGas')) {
385
410
  let passes3 = 0
386
- const sub14 = (() => {
411
+ const sub18 = (() => {
387
412
  if (!(typeof data.maxFeePerGas === 'string')) return false
388
413
  if (!format1.test(data.maxFeePerGas)) return false
389
414
  return true
390
415
  })()
391
- if (sub14) passes3++
392
- const sub15 = (() => {
416
+ if (sub18) passes3++
417
+ const sub19 = (() => {
393
418
  if (!(data.maxFeePerGas === null)) return false
394
419
  return true
395
420
  })()
396
- if (sub15) passes3++
421
+ if (sub19) passes3++
397
422
  if (passes3 !== 1) {
398
423
  validate.errors = [
399
424
  {
@@ -433,12 +458,12 @@ export function validateRequest(value) {
433
458
  return false
434
459
  }
435
460
  if (0 in data && hasOwn(data, 0)) {
436
- const err22 = validate.errors
437
- const res22 = ref4(data[0])
438
- const suberr22 = ref4.errors
439
- validate.errors = err22
440
- if (!res22) {
441
- validate.errors = [errorMerge(suberr22[0], '#/0/$ref', '#/0')]
461
+ const err23 = validate.errors
462
+ const res23 = ref4(data[0])
463
+ const suberr23 = ref4.errors
464
+ validate.errors = err23
465
+ if (!res23) {
466
+ validate.errors = [errorMerge(suberr23[0], '#/0/$ref', '#/0')]
442
467
  return false
443
468
  }
444
469
  }
@@ -469,7 +494,7 @@ export function validateRequest(value) {
469
494
  ]
470
495
  return false
471
496
  }
472
- if (!format3.test(data[0])) {
497
+ if (!format2.test(data[0])) {
473
498
  validate.errors = [
474
499
  { keywordLocation: '#/0/format', instanceLocation: '#/0' },
475
500
  ]
@@ -483,7 +508,7 @@ export function validateRequest(value) {
483
508
  ]
484
509
  return false
485
510
  }
486
- if (!format2.test(data[1])) {
511
+ if (!format4.test(data[1])) {
487
512
  validate.errors = [
488
513
  { keywordLocation: '#/1/format', instanceLocation: '#/1' },
489
514
  ]
@@ -511,12 +536,12 @@ export function validateRequest(value) {
511
536
  return false
512
537
  }
513
538
  if (0 in data && hasOwn(data, 0)) {
514
- const err25 = validate.errors
515
- const res25 = ref4(data[0])
516
- const suberr25 = ref4.errors
517
- validate.errors = err25
518
- if (!res25) {
519
- validate.errors = [errorMerge(suberr25[0], '#/0/$ref', '#/0')]
539
+ const err26 = validate.errors
540
+ const res26 = ref4(data[0])
541
+ const suberr26 = ref4.errors
542
+ validate.errors = err26
543
+ if (!res26) {
544
+ validate.errors = [errorMerge(suberr26[0], '#/0/$ref', '#/0')]
520
545
  return false
521
546
  }
522
547
  }
@@ -528,7 +553,6 @@ export function validateRequest(value) {
528
553
  }
529
554
  return true
530
555
  }
531
- const format4 = new RegExp('^(?!_)(\\n|\\r|.)*$', '')
532
556
  const ref7 = function validate(data) {
533
557
  validate.errors = null
534
558
  if (!Array.isArray(data)) {
@@ -548,7 +572,7 @@ export function validateRequest(value) {
548
572
  ]
549
573
  return false
550
574
  }
551
- if (!format3.test(data[0])) {
575
+ if (!format2.test(data[0])) {
552
576
  validate.errors = [
553
577
  { keywordLocation: '#/0/format', instanceLocation: '#/0' },
554
578
  ]
@@ -568,7 +592,7 @@ export function validateRequest(value) {
568
592
  ]
569
593
  return false
570
594
  }
571
- if (!format4.test(data[1])) {
595
+ if (!format3.test(data[1])) {
572
596
  validate.errors = [
573
597
  { keywordLocation: '#/1/format', instanceLocation: '#/1' },
574
598
  ]
@@ -702,7 +726,7 @@ export function validateRequest(value) {
702
726
  ]
703
727
  return false
704
728
  }
705
- if (!format4.test(data[k].value)) {
729
+ if (!format3.test(data[k].value)) {
706
730
  validate.errors = [
707
731
  {
708
732
  keywordLocation: '#/items/properties/value/format',
@@ -739,12 +763,12 @@ export function validateRequest(value) {
739
763
  return false
740
764
  }
741
765
  if (0 in data && hasOwn(data, 0)) {
742
- const err28 = validate.errors
743
- const res28 = ref9(data[0])
744
- const suberr28 = ref9.errors
745
- validate.errors = err28
746
- if (!res28) {
747
- validate.errors = [errorMerge(suberr28[0], '#/0/$ref', '#/0')]
766
+ const err29 = validate.errors
767
+ const res29 = ref9(data[0])
768
+ const suberr29 = ref9.errors
769
+ validate.errors = err29
770
+ if (!res29) {
771
+ validate.errors = [errorMerge(suberr29[0], '#/0/$ref', '#/0')]
748
772
  return false
749
773
  }
750
774
  }
@@ -755,7 +779,7 @@ export function validateRequest(value) {
755
779
  ]
756
780
  return false
757
781
  }
758
- if (!format3.test(data[1])) {
782
+ if (!format2.test(data[1])) {
759
783
  validate.errors = [
760
784
  { keywordLocation: '#/1/format', instanceLocation: '#/1' },
761
785
  ]
@@ -795,7 +819,7 @@ export function validateRequest(value) {
795
819
  ]
796
820
  return false
797
821
  }
798
- if (!format4.test(data[0])) {
822
+ if (!format3.test(data[0])) {
799
823
  validate.errors = [
800
824
  { keywordLocation: '#/0/format', instanceLocation: '#/0' },
801
825
  ]
@@ -809,7 +833,7 @@ export function validateRequest(value) {
809
833
  ]
810
834
  return false
811
835
  }
812
- if (!format3.test(data[1])) {
836
+ if (!format2.test(data[1])) {
813
837
  validate.errors = [
814
838
  { keywordLocation: '#/1/format', instanceLocation: '#/1' },
815
839
  ]
@@ -848,14 +872,14 @@ export function validateRequest(value) {
848
872
  return false
849
873
  }
850
874
  if ('eth_accounts' in data && hasOwn(data, 'eth_accounts')) {
851
- const err34 = validate.errors
852
- const res34 = ref13(data.eth_accounts)
853
- const suberr34 = ref13.errors
854
- validate.errors = err34
855
- if (!res34) {
875
+ const err35 = validate.errors
876
+ const res35 = ref13(data.eth_accounts)
877
+ const suberr35 = ref13.errors
878
+ validate.errors = err35
879
+ if (!res35) {
856
880
  validate.errors = [
857
881
  errorMerge(
858
- suberr34[0],
882
+ suberr35[0],
859
883
  '#/properties/eth_accounts/$ref',
860
884
  '#/eth_accounts',
861
885
  ),
@@ -889,12 +913,12 @@ export function validateRequest(value) {
889
913
  return false
890
914
  }
891
915
  if (0 in data && hasOwn(data, 0)) {
892
- const err35 = validate.errors
893
- const res35 = ref12(data[0])
894
- const suberr35 = ref12.errors
895
- validate.errors = err35
896
- if (!res35) {
897
- validate.errors = [errorMerge(suberr35[0], '#/0/$ref', '#/0')]
916
+ const err36 = validate.errors
917
+ const res36 = ref12(data[0])
918
+ const suberr36 = ref12.errors
919
+ validate.errors = err36
920
+ if (!res36) {
921
+ validate.errors = [errorMerge(suberr36[0], '#/0/$ref', '#/0')]
898
922
  return false
899
923
  }
900
924
  }
@@ -953,7 +977,7 @@ export function validateRequest(value) {
953
977
  ]
954
978
  return false
955
979
  }
956
- if (!format3.test(data.address)) {
980
+ if (!format2.test(data.address)) {
957
981
  validate.errors = [
958
982
  {
959
983
  keywordLocation: '#/properties/address/format',
@@ -1004,21 +1028,21 @@ export function validateRequest(value) {
1004
1028
  }
1005
1029
  if ('image' in data && hasOwn(data, 'image')) {
1006
1030
  let passes4 = 0
1007
- const sub16 = (() => {
1031
+ const sub20 = (() => {
1008
1032
  if (!(typeof data.image === 'string')) return false
1009
1033
  if (!format6.test(data.image)) return false
1010
1034
  return true
1011
1035
  })()
1012
- if (sub16) passes4++
1013
- const sub17 = (() => {
1014
- const err37 = validate.errors
1015
- const res37 = ref16(data.image)
1016
- const suberr37 = ref16.errors
1017
- validate.errors = err37
1018
- if (!res37) return false
1036
+ if (sub20) passes4++
1037
+ const sub21 = (() => {
1038
+ const err38 = validate.errors
1039
+ const res38 = ref16(data.image)
1040
+ const suberr38 = ref16.errors
1041
+ validate.errors = err38
1042
+ if (!res38) return false
1019
1043
  return true
1020
1044
  })()
1021
- if (sub17) passes4++
1045
+ if (sub21) passes4++
1022
1046
  if (passes4 !== 1) {
1023
1047
  validate.errors = [
1024
1048
  {
@@ -1092,13 +1116,13 @@ export function validateRequest(value) {
1092
1116
  ]
1093
1117
  return false
1094
1118
  }
1095
- const err38 = validate.errors
1096
- const res38 = ref15(data.options)
1097
- const suberr38 = ref15.errors
1098
- validate.errors = err38
1099
- if (!res38) {
1119
+ const err39 = validate.errors
1120
+ const res39 = ref15(data.options)
1121
+ const suberr39 = ref15.errors
1122
+ validate.errors = err39
1123
+ if (!res39) {
1100
1124
  validate.errors = [
1101
- errorMerge(suberr38[0], '#/properties/options/$ref', '#/options'),
1125
+ errorMerge(suberr39[0], '#/properties/options/$ref', '#/options'),
1102
1126
  ]
1103
1127
  return false
1104
1128
  }
@@ -1258,14 +1282,14 @@ export function validateRequest(value) {
1258
1282
  ]
1259
1283
  return false
1260
1284
  }
1261
- const err0 = validate.errors
1262
- const res0 = ref1(data.params)
1263
- const suberr0 = ref1.errors
1264
- validate.errors = err0
1265
- if (!res0) {
1285
+ const err1 = validate.errors
1286
+ const res1 = ref1(data.params)
1287
+ const suberr1 = ref1.errors
1288
+ validate.errors = err1
1289
+ if (!res1) {
1266
1290
  validate.errors = [
1267
1291
  errorMerge(
1268
- suberr0[0],
1292
+ suberr1[0],
1269
1293
  '#/oneOf/3/properties/params/$ref',
1270
1294
  '#/params',
1271
1295
  ),
@@ -1303,14 +1327,14 @@ export function validateRequest(value) {
1303
1327
  ]
1304
1328
  return false
1305
1329
  }
1306
- const err1 = validate.errors
1307
- const res1 = ref1(data.params)
1308
- const suberr1 = ref1.errors
1309
- validate.errors = err1
1310
- if (!res1) {
1330
+ const err2 = validate.errors
1331
+ const res2 = ref1(data.params)
1332
+ const suberr2 = ref1.errors
1333
+ validate.errors = err2
1334
+ if (!res2) {
1311
1335
  validate.errors = [
1312
1336
  errorMerge(
1313
- suberr1[0],
1337
+ suberr2[0],
1314
1338
  '#/oneOf/5/properties/params/$ref',
1315
1339
  '#/params',
1316
1340
  ),
@@ -1328,14 +1352,14 @@ export function validateRequest(value) {
1328
1352
  ]
1329
1353
  return false
1330
1354
  }
1331
- const err2 = validate.errors
1332
- const res2 = ref1(data.params)
1333
- const suberr2 = ref1.errors
1334
- validate.errors = err2
1335
- if (!res2) {
1355
+ const err3 = validate.errors
1356
+ const res3 = ref1(data.params)
1357
+ const suberr3 = ref1.errors
1358
+ validate.errors = err3
1359
+ if (!res3) {
1336
1360
  validate.errors = [
1337
1361
  errorMerge(
1338
- suberr2[0],
1362
+ suberr3[0],
1339
1363
  '#/oneOf/6/properties/params/$ref',
1340
1364
  '#/params',
1341
1365
  ),
@@ -1353,14 +1377,14 @@ export function validateRequest(value) {
1353
1377
  ]
1354
1378
  return false
1355
1379
  }
1356
- const err3 = validate.errors
1357
- const res3 = ref1(data.params)
1358
- const suberr3 = ref1.errors
1359
- validate.errors = err3
1360
- if (!res3) {
1380
+ const err4 = validate.errors
1381
+ const res4 = ref1(data.params)
1382
+ const suberr4 = ref1.errors
1383
+ validate.errors = err4
1384
+ if (!res4) {
1361
1385
  validate.errors = [
1362
1386
  errorMerge(
1363
- suberr3[0],
1387
+ suberr4[0],
1364
1388
  '#/oneOf/7/properties/params/$ref',
1365
1389
  '#/params',
1366
1390
  ),
@@ -1398,31 +1422,6 @@ export function validateRequest(value) {
1398
1422
  ]
1399
1423
  return false
1400
1424
  }
1401
- const err4 = validate.errors
1402
- const res4 = ref1(data.params)
1403
- const suberr4 = ref1.errors
1404
- validate.errors = err4
1405
- if (!res4) {
1406
- validate.errors = [
1407
- errorMerge(
1408
- suberr4[0],
1409
- '#/oneOf/9/properties/params/$ref',
1410
- '#/params',
1411
- ),
1412
- ]
1413
- return false
1414
- }
1415
- break
1416
- case 'eth_getBlockByHash':
1417
- if (!('params' in data && hasOwn(data, 'params'))) {
1418
- validate.errors = [
1419
- {
1420
- keywordLocation: '#/oneOf/10/required',
1421
- instanceLocation: '#/params',
1422
- },
1423
- ]
1424
- return false
1425
- }
1426
1425
  const err5 = validate.errors
1427
1426
  const res5 = ref1(data.params)
1428
1427
  const suberr5 = ref1.errors
@@ -1431,18 +1430,18 @@ export function validateRequest(value) {
1431
1430
  validate.errors = [
1432
1431
  errorMerge(
1433
1432
  suberr5[0],
1434
- '#/oneOf/10/properties/params/$ref',
1433
+ '#/oneOf/9/properties/params/$ref',
1435
1434
  '#/params',
1436
1435
  ),
1437
1436
  ]
1438
1437
  return false
1439
1438
  }
1440
1439
  break
1441
- case 'eth_getBlockByNumber':
1440
+ case 'eth_getBlockByHash':
1442
1441
  if (!('params' in data && hasOwn(data, 'params'))) {
1443
1442
  validate.errors = [
1444
1443
  {
1445
- keywordLocation: '#/oneOf/11/required',
1444
+ keywordLocation: '#/oneOf/10/required',
1446
1445
  instanceLocation: '#/params',
1447
1446
  },
1448
1447
  ]
@@ -1456,18 +1455,18 @@ export function validateRequest(value) {
1456
1455
  validate.errors = [
1457
1456
  errorMerge(
1458
1457
  suberr6[0],
1459
- '#/oneOf/11/properties/params/$ref',
1458
+ '#/oneOf/10/properties/params/$ref',
1460
1459
  '#/params',
1461
1460
  ),
1462
1461
  ]
1463
1462
  return false
1464
1463
  }
1465
1464
  break
1466
- case 'eth_getBlockTransactionCountByHash':
1465
+ case 'eth_getBlockByNumber':
1467
1466
  if (!('params' in data && hasOwn(data, 'params'))) {
1468
1467
  validate.errors = [
1469
1468
  {
1470
- keywordLocation: '#/oneOf/12/required',
1469
+ keywordLocation: '#/oneOf/11/required',
1471
1470
  instanceLocation: '#/params',
1472
1471
  },
1473
1472
  ]
@@ -1481,18 +1480,18 @@ export function validateRequest(value) {
1481
1480
  validate.errors = [
1482
1481
  errorMerge(
1483
1482
  suberr7[0],
1484
- '#/oneOf/12/properties/params/$ref',
1483
+ '#/oneOf/11/properties/params/$ref',
1485
1484
  '#/params',
1486
1485
  ),
1487
1486
  ]
1488
1487
  return false
1489
1488
  }
1490
1489
  break
1491
- case 'eth_getBlockTransactionCountByNumber':
1490
+ case 'eth_getBlockTransactionCountByHash':
1492
1491
  if (!('params' in data && hasOwn(data, 'params'))) {
1493
1492
  validate.errors = [
1494
1493
  {
1495
- keywordLocation: '#/oneOf/13/required',
1494
+ keywordLocation: '#/oneOf/12/required',
1496
1495
  instanceLocation: '#/params',
1497
1496
  },
1498
1497
  ]
@@ -1506,18 +1505,18 @@ export function validateRequest(value) {
1506
1505
  validate.errors = [
1507
1506
  errorMerge(
1508
1507
  suberr8[0],
1509
- '#/oneOf/13/properties/params/$ref',
1508
+ '#/oneOf/12/properties/params/$ref',
1510
1509
  '#/params',
1511
1510
  ),
1512
1511
  ]
1513
1512
  return false
1514
1513
  }
1515
1514
  break
1516
- case 'eth_getCode':
1515
+ case 'eth_getBlockTransactionCountByNumber':
1517
1516
  if (!('params' in data && hasOwn(data, 'params'))) {
1518
1517
  validate.errors = [
1519
1518
  {
1520
- keywordLocation: '#/oneOf/14/required',
1519
+ keywordLocation: '#/oneOf/13/required',
1521
1520
  instanceLocation: '#/params',
1522
1521
  },
1523
1522
  ]
@@ -1531,63 +1530,63 @@ export function validateRequest(value) {
1531
1530
  validate.errors = [
1532
1531
  errorMerge(
1533
1532
  suberr9[0],
1534
- '#/oneOf/14/properties/params/$ref',
1533
+ '#/oneOf/13/properties/params/$ref',
1535
1534
  '#/params',
1536
1535
  ),
1537
1536
  ]
1538
1537
  return false
1539
1538
  }
1540
1539
  break
1541
- case 'eth_getCompilers':
1540
+ case 'eth_getCode':
1542
1541
  if (!('params' in data && hasOwn(data, 'params'))) {
1543
1542
  validate.errors = [
1544
1543
  {
1545
- keywordLocation: '#/oneOf/15/required',
1544
+ keywordLocation: '#/oneOf/14/required',
1546
1545
  instanceLocation: '#/params',
1547
1546
  },
1548
1547
  ]
1549
1548
  return false
1550
1549
  }
1551
- if (!(Array.isArray(data.params) && data.params.length === 0)) {
1550
+ const err10 = validate.errors
1551
+ const res10 = ref1(data.params)
1552
+ const suberr10 = ref1.errors
1553
+ validate.errors = err10
1554
+ if (!res10) {
1552
1555
  validate.errors = [
1553
- {
1554
- keywordLocation: '#/oneOf/15/properties/params/const',
1555
- instanceLocation: '#/params',
1556
- },
1556
+ errorMerge(
1557
+ suberr10[0],
1558
+ '#/oneOf/14/properties/params/$ref',
1559
+ '#/params',
1560
+ ),
1557
1561
  ]
1558
1562
  return false
1559
1563
  }
1560
1564
  break
1561
- case 'eth_getLogs':
1565
+ case 'eth_getCompilers':
1562
1566
  if (!('params' in data && hasOwn(data, 'params'))) {
1563
1567
  validate.errors = [
1564
1568
  {
1565
- keywordLocation: '#/oneOf/16/required',
1569
+ keywordLocation: '#/oneOf/15/required',
1566
1570
  instanceLocation: '#/params',
1567
1571
  },
1568
1572
  ]
1569
1573
  return false
1570
1574
  }
1571
- const err10 = validate.errors
1572
- const res10 = ref1(data.params)
1573
- const suberr10 = ref1.errors
1574
- validate.errors = err10
1575
- if (!res10) {
1575
+ if (!(Array.isArray(data.params) && data.params.length === 0)) {
1576
1576
  validate.errors = [
1577
- errorMerge(
1578
- suberr10[0],
1579
- '#/oneOf/16/properties/params/$ref',
1580
- '#/params',
1581
- ),
1577
+ {
1578
+ keywordLocation: '#/oneOf/15/properties/params/const',
1579
+ instanceLocation: '#/params',
1580
+ },
1582
1581
  ]
1583
1582
  return false
1584
1583
  }
1585
1584
  break
1586
- case 'eth_getProof':
1585
+ case 'eth_getLogs':
1587
1586
  if (!('params' in data && hasOwn(data, 'params'))) {
1588
1587
  validate.errors = [
1589
1588
  {
1590
- keywordLocation: '#/oneOf/17/required',
1589
+ keywordLocation: '#/oneOf/16/required',
1591
1590
  instanceLocation: '#/params',
1592
1591
  },
1593
1592
  ]
@@ -1601,18 +1600,18 @@ export function validateRequest(value) {
1601
1600
  validate.errors = [
1602
1601
  errorMerge(
1603
1602
  suberr11[0],
1604
- '#/oneOf/17/properties/params/$ref',
1603
+ '#/oneOf/16/properties/params/$ref',
1605
1604
  '#/params',
1606
1605
  ),
1607
1606
  ]
1608
1607
  return false
1609
1608
  }
1610
1609
  break
1611
- case 'eth_getStorageAt':
1610
+ case 'eth_getProof':
1612
1611
  if (!('params' in data && hasOwn(data, 'params'))) {
1613
1612
  validate.errors = [
1614
1613
  {
1615
- keywordLocation: '#/oneOf/18/required',
1614
+ keywordLocation: '#/oneOf/17/required',
1616
1615
  instanceLocation: '#/params',
1617
1616
  },
1618
1617
  ]
@@ -1626,18 +1625,18 @@ export function validateRequest(value) {
1626
1625
  validate.errors = [
1627
1626
  errorMerge(
1628
1627
  suberr12[0],
1629
- '#/oneOf/18/properties/params/$ref',
1628
+ '#/oneOf/17/properties/params/$ref',
1630
1629
  '#/params',
1631
1630
  ),
1632
1631
  ]
1633
1632
  return false
1634
1633
  }
1635
1634
  break
1636
- case 'eth_getTransactionByBlockHashAndIndex':
1635
+ case 'eth_getStorageAt':
1637
1636
  if (!('params' in data && hasOwn(data, 'params'))) {
1638
1637
  validate.errors = [
1639
1638
  {
1640
- keywordLocation: '#/oneOf/19/required',
1639
+ keywordLocation: '#/oneOf/18/required',
1641
1640
  instanceLocation: '#/params',
1642
1641
  },
1643
1642
  ]
@@ -1651,18 +1650,18 @@ export function validateRequest(value) {
1651
1650
  validate.errors = [
1652
1651
  errorMerge(
1653
1652
  suberr13[0],
1654
- '#/oneOf/19/properties/params/$ref',
1653
+ '#/oneOf/18/properties/params/$ref',
1655
1654
  '#/params',
1656
1655
  ),
1657
1656
  ]
1658
1657
  return false
1659
1658
  }
1660
1659
  break
1661
- case 'eth_getTransactionByBlockNumberAndIndex':
1660
+ case 'eth_getTransactionByBlockHashAndIndex':
1662
1661
  if (!('params' in data && hasOwn(data, 'params'))) {
1663
1662
  validate.errors = [
1664
1663
  {
1665
- keywordLocation: '#/oneOf/20/required',
1664
+ keywordLocation: '#/oneOf/19/required',
1666
1665
  instanceLocation: '#/params',
1667
1666
  },
1668
1667
  ]
@@ -1676,18 +1675,18 @@ export function validateRequest(value) {
1676
1675
  validate.errors = [
1677
1676
  errorMerge(
1678
1677
  suberr14[0],
1679
- '#/oneOf/20/properties/params/$ref',
1678
+ '#/oneOf/19/properties/params/$ref',
1680
1679
  '#/params',
1681
1680
  ),
1682
1681
  ]
1683
1682
  return false
1684
1683
  }
1685
1684
  break
1686
- case 'eth_getTransactionByHash':
1685
+ case 'eth_getTransactionByBlockNumberAndIndex':
1687
1686
  if (!('params' in data && hasOwn(data, 'params'))) {
1688
1687
  validate.errors = [
1689
1688
  {
1690
- keywordLocation: '#/oneOf/21/required',
1689
+ keywordLocation: '#/oneOf/20/required',
1691
1690
  instanceLocation: '#/params',
1692
1691
  },
1693
1692
  ]
@@ -1701,18 +1700,18 @@ export function validateRequest(value) {
1701
1700
  validate.errors = [
1702
1701
  errorMerge(
1703
1702
  suberr15[0],
1704
- '#/oneOf/21/properties/params/$ref',
1703
+ '#/oneOf/20/properties/params/$ref',
1705
1704
  '#/params',
1706
1705
  ),
1707
1706
  ]
1708
1707
  return false
1709
1708
  }
1710
1709
  break
1711
- case 'eth_getTransactionCount':
1710
+ case 'eth_getTransactionByHash':
1712
1711
  if (!('params' in data && hasOwn(data, 'params'))) {
1713
1712
  validate.errors = [
1714
1713
  {
1715
- keywordLocation: '#/oneOf/22/required',
1714
+ keywordLocation: '#/oneOf/21/required',
1716
1715
  instanceLocation: '#/params',
1717
1716
  },
1718
1717
  ]
@@ -1726,18 +1725,18 @@ export function validateRequest(value) {
1726
1725
  validate.errors = [
1727
1726
  errorMerge(
1728
1727
  suberr16[0],
1729
- '#/oneOf/22/properties/params/$ref',
1728
+ '#/oneOf/21/properties/params/$ref',
1730
1729
  '#/params',
1731
1730
  ),
1732
1731
  ]
1733
1732
  return false
1734
1733
  }
1735
1734
  break
1736
- case 'eth_getTransactionReceipt':
1735
+ case 'eth_getTransactionCount':
1737
1736
  if (!('params' in data && hasOwn(data, 'params'))) {
1738
1737
  validate.errors = [
1739
1738
  {
1740
- keywordLocation: '#/oneOf/23/required',
1739
+ keywordLocation: '#/oneOf/22/required',
1741
1740
  instanceLocation: '#/params',
1742
1741
  },
1743
1742
  ]
@@ -1751,18 +1750,18 @@ export function validateRequest(value) {
1751
1750
  validate.errors = [
1752
1751
  errorMerge(
1753
1752
  suberr17[0],
1754
- '#/oneOf/23/properties/params/$ref',
1753
+ '#/oneOf/22/properties/params/$ref',
1755
1754
  '#/params',
1756
1755
  ),
1757
1756
  ]
1758
1757
  return false
1759
1758
  }
1760
1759
  break
1761
- case 'eth_getUncleCountByBlockHash':
1760
+ case 'eth_getTransactionReceipt':
1762
1761
  if (!('params' in data && hasOwn(data, 'params'))) {
1763
1762
  validate.errors = [
1764
1763
  {
1765
- keywordLocation: '#/oneOf/24/required',
1764
+ keywordLocation: '#/oneOf/23/required',
1766
1765
  instanceLocation: '#/params',
1767
1766
  },
1768
1767
  ]
@@ -1776,18 +1775,18 @@ export function validateRequest(value) {
1776
1775
  validate.errors = [
1777
1776
  errorMerge(
1778
1777
  suberr18[0],
1779
- '#/oneOf/24/properties/params/$ref',
1778
+ '#/oneOf/23/properties/params/$ref',
1780
1779
  '#/params',
1781
1780
  ),
1782
1781
  ]
1783
1782
  return false
1784
1783
  }
1785
1784
  break
1786
- case 'eth_getUncleByBlockHashAndIndex':
1785
+ case 'eth_getUncleCountByBlockHash':
1787
1786
  if (!('params' in data && hasOwn(data, 'params'))) {
1788
1787
  validate.errors = [
1789
1788
  {
1790
- keywordLocation: '#/oneOf/25/required',
1789
+ keywordLocation: '#/oneOf/24/required',
1791
1790
  instanceLocation: '#/params',
1792
1791
  },
1793
1792
  ]
@@ -1801,18 +1800,18 @@ export function validateRequest(value) {
1801
1800
  validate.errors = [
1802
1801
  errorMerge(
1803
1802
  suberr19[0],
1804
- '#/oneOf/25/properties/params/$ref',
1803
+ '#/oneOf/24/properties/params/$ref',
1805
1804
  '#/params',
1806
1805
  ),
1807
1806
  ]
1808
1807
  return false
1809
1808
  }
1810
1809
  break
1811
- case 'eth_getUncleByBlockNumberAndIndex':
1810
+ case 'eth_getUncleByBlockHashAndIndex':
1812
1811
  if (!('params' in data && hasOwn(data, 'params'))) {
1813
1812
  validate.errors = [
1814
1813
  {
1815
- keywordLocation: '#/oneOf/26/required',
1814
+ keywordLocation: '#/oneOf/25/required',
1816
1815
  instanceLocation: '#/params',
1817
1816
  },
1818
1817
  ]
@@ -1826,6 +1825,31 @@ export function validateRequest(value) {
1826
1825
  validate.errors = [
1827
1826
  errorMerge(
1828
1827
  suberr20[0],
1828
+ '#/oneOf/25/properties/params/$ref',
1829
+ '#/params',
1830
+ ),
1831
+ ]
1832
+ return false
1833
+ }
1834
+ break
1835
+ case 'eth_getUncleByBlockNumberAndIndex':
1836
+ if (!('params' in data && hasOwn(data, 'params'))) {
1837
+ validate.errors = [
1838
+ {
1839
+ keywordLocation: '#/oneOf/26/required',
1840
+ instanceLocation: '#/params',
1841
+ },
1842
+ ]
1843
+ return false
1844
+ }
1845
+ const err21 = validate.errors
1846
+ const res21 = ref1(data.params)
1847
+ const suberr21 = ref1.errors
1848
+ validate.errors = err21
1849
+ if (!res21) {
1850
+ validate.errors = [
1851
+ errorMerge(
1852
+ suberr21[0],
1829
1853
  '#/oneOf/26/properties/params/$ref',
1830
1854
  '#/params',
1831
1855
  ),
@@ -1923,14 +1947,14 @@ export function validateRequest(value) {
1923
1947
  ]
1924
1948
  return false
1925
1949
  }
1926
- const err21 = validate.errors
1927
- const res21 = ref2(data.params)
1928
- const suberr21 = ref2.errors
1929
- validate.errors = err21
1930
- if (!res21) {
1950
+ const err22 = validate.errors
1951
+ const res22 = ref2(data.params)
1952
+ const suberr22 = ref2.errors
1953
+ validate.errors = err22
1954
+ if (!res22) {
1931
1955
  validate.errors = [
1932
1956
  errorMerge(
1933
- suberr21[0],
1957
+ suberr22[0],
1934
1958
  '#/oneOf/31/properties/params/$ref',
1935
1959
  '#/params',
1936
1960
  ),
@@ -1948,14 +1972,14 @@ export function validateRequest(value) {
1948
1972
  ]
1949
1973
  return false
1950
1974
  }
1951
- const err23 = validate.errors
1952
- const res23 = ref3(data.params)
1953
- const suberr23 = ref3.errors
1954
- validate.errors = err23
1955
- if (!res23) {
1975
+ const err24 = validate.errors
1976
+ const res24 = ref3(data.params)
1977
+ const suberr24 = ref3.errors
1978
+ validate.errors = err24
1979
+ if (!res24) {
1956
1980
  validate.errors = [
1957
1981
  errorMerge(
1958
- suberr23[0],
1982
+ suberr24[0],
1959
1983
  '#/oneOf/32/properties/params/$ref',
1960
1984
  '#/params',
1961
1985
  ),
@@ -1973,14 +1997,14 @@ export function validateRequest(value) {
1973
1997
  ]
1974
1998
  return false
1975
1999
  }
1976
- const err24 = validate.errors
1977
- const res24 = ref5(data.params)
1978
- const suberr24 = ref5.errors
1979
- validate.errors = err24
1980
- if (!res24) {
2000
+ const err25 = validate.errors
2001
+ const res25 = ref5(data.params)
2002
+ const suberr25 = ref5.errors
2003
+ validate.errors = err25
2004
+ if (!res25) {
1981
2005
  validate.errors = [
1982
2006
  errorMerge(
1983
- suberr24[0],
2007
+ suberr25[0],
1984
2008
  '#/oneOf/33/properties/params/$ref',
1985
2009
  '#/params',
1986
2010
  ),
@@ -1998,14 +2022,14 @@ export function validateRequest(value) {
1998
2022
  ]
1999
2023
  return false
2000
2024
  }
2001
- const err26 = validate.errors
2002
- const res26 = ref6(data.params)
2003
- const suberr26 = ref6.errors
2004
- validate.errors = err26
2005
- if (!res26) {
2025
+ const err27 = validate.errors
2026
+ const res27 = ref6(data.params)
2027
+ const suberr27 = ref6.errors
2028
+ validate.errors = err27
2029
+ if (!res27) {
2006
2030
  validate.errors = [
2007
2031
  errorMerge(
2008
- suberr26[0],
2032
+ suberr27[0],
2009
2033
  '#/oneOf/34/properties/params/$ref',
2010
2034
  '#/params',
2011
2035
  ),
@@ -2023,14 +2047,14 @@ export function validateRequest(value) {
2023
2047
  ]
2024
2048
  return false
2025
2049
  }
2026
- const err27 = validate.errors
2027
- const res27 = ref7(data.params)
2028
- const suberr27 = ref7.errors
2029
- validate.errors = err27
2030
- if (!res27) {
2050
+ const err28 = validate.errors
2051
+ const res28 = ref7(data.params)
2052
+ const suberr28 = ref7.errors
2053
+ validate.errors = err28
2054
+ if (!res28) {
2031
2055
  validate.errors = [
2032
2056
  errorMerge(
2033
- suberr27[0],
2057
+ suberr28[0],
2034
2058
  '#/oneOf/35/properties/params/$ref',
2035
2059
  '#/params',
2036
2060
  ),
@@ -2048,14 +2072,14 @@ export function validateRequest(value) {
2048
2072
  ]
2049
2073
  return false
2050
2074
  }
2051
- const err29 = validate.errors
2052
- const res29 = ref8(data.params)
2053
- const suberr29 = ref8.errors
2054
- validate.errors = err29
2055
- if (!res29) {
2075
+ const err30 = validate.errors
2076
+ const res30 = ref8(data.params)
2077
+ const suberr30 = ref8.errors
2078
+ validate.errors = err30
2079
+ if (!res30) {
2056
2080
  validate.errors = [
2057
2081
  errorMerge(
2058
- suberr29[0],
2082
+ suberr30[0],
2059
2083
  '#/oneOf/36/properties/params/$ref',
2060
2084
  '#/params',
2061
2085
  ),
@@ -2073,14 +2097,14 @@ export function validateRequest(value) {
2073
2097
  ]
2074
2098
  return false
2075
2099
  }
2076
- const err30 = validate.errors
2077
- const res30 = ref7(data.params)
2078
- const suberr30 = ref7.errors
2079
- validate.errors = err30
2080
- if (!res30) {
2100
+ const err31 = validate.errors
2101
+ const res31 = ref7(data.params)
2102
+ const suberr31 = ref7.errors
2103
+ validate.errors = err31
2104
+ if (!res31) {
2081
2105
  validate.errors = [
2082
2106
  errorMerge(
2083
- suberr30[0],
2107
+ suberr31[0],
2084
2108
  '#/oneOf/37/properties/params/$ref',
2085
2109
  '#/params',
2086
2110
  ),
@@ -2098,14 +2122,14 @@ export function validateRequest(value) {
2098
2122
  ]
2099
2123
  return false
2100
2124
  }
2101
- const err31 = validate.errors
2102
- const res31 = ref7(data.params)
2103
- const suberr31 = ref7.errors
2104
- validate.errors = err31
2105
- if (!res31) {
2125
+ const err32 = validate.errors
2126
+ const res32 = ref7(data.params)
2127
+ const suberr32 = ref7.errors
2128
+ validate.errors = err32
2129
+ if (!res32) {
2106
2130
  validate.errors = [
2107
2131
  errorMerge(
2108
- suberr31[0],
2132
+ suberr32[0],
2109
2133
  '#/oneOf/38/properties/params/$ref',
2110
2134
  '#/params',
2111
2135
  ),
@@ -2123,14 +2147,14 @@ export function validateRequest(value) {
2123
2147
  ]
2124
2148
  return false
2125
2149
  }
2126
- const err32 = validate.errors
2127
- const res32 = ref1(data.params)
2128
- const suberr32 = ref1.errors
2129
- validate.errors = err32
2130
- if (!res32) {
2150
+ const err33 = validate.errors
2151
+ const res33 = ref1(data.params)
2152
+ const suberr33 = ref1.errors
2153
+ validate.errors = err33
2154
+ if (!res33) {
2131
2155
  validate.errors = [
2132
2156
  errorMerge(
2133
- suberr32[0],
2157
+ suberr33[0],
2134
2158
  '#/oneOf/39/properties/params/$ref',
2135
2159
  '#/params',
2136
2160
  ),
@@ -2148,14 +2172,14 @@ export function validateRequest(value) {
2148
2172
  ]
2149
2173
  return false
2150
2174
  }
2151
- const err33 = validate.errors
2152
- const res33 = ref10(data.params)
2153
- const suberr33 = ref10.errors
2154
- validate.errors = err33
2155
- if (!res33) {
2175
+ const err34 = validate.errors
2176
+ const res34 = ref10(data.params)
2177
+ const suberr34 = ref10.errors
2178
+ validate.errors = err34
2179
+ if (!res34) {
2156
2180
  validate.errors = [
2157
2181
  errorMerge(
2158
- suberr33[0],
2182
+ suberr34[0],
2159
2183
  '#/oneOf/40/properties/params/$ref',
2160
2184
  '#/params',
2161
2185
  ),
@@ -2213,14 +2237,14 @@ export function validateRequest(value) {
2213
2237
  ]
2214
2238
  return false
2215
2239
  }
2216
- const err36 = validate.errors
2217
- const res36 = ref11(data.params)
2218
- const suberr36 = ref11.errors
2219
- validate.errors = err36
2220
- if (!res36) {
2240
+ const err37 = validate.errors
2241
+ const res37 = ref11(data.params)
2242
+ const suberr37 = ref11.errors
2243
+ validate.errors = err37
2244
+ if (!res37) {
2221
2245
  validate.errors = [
2222
2246
  errorMerge(
2223
- suberr36[0],
2247
+ suberr37[0],
2224
2248
  '#/oneOf/43/properties/params/$ref',
2225
2249
  '#/params',
2226
2250
  ),
@@ -2238,14 +2262,14 @@ export function validateRequest(value) {
2238
2262
  ]
2239
2263
  return false
2240
2264
  }
2241
- const err39 = validate.errors
2242
- const res39 = ref14(data.params)
2243
- const suberr39 = ref14.errors
2244
- validate.errors = err39
2245
- if (!res39) {
2265
+ const err40 = validate.errors
2266
+ const res40 = ref14(data.params)
2267
+ const suberr40 = ref14.errors
2268
+ validate.errors = err40
2269
+ if (!res40) {
2246
2270
  validate.errors = [
2247
2271
  errorMerge(
2248
- suberr39[0],
2272
+ suberr40[0],
2249
2273
  '#/oneOf/44/properties/params/$ref',
2250
2274
  '#/params',
2251
2275
  ),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@exodus/web3-ethereum",
3
3
  "description": "Apps connectivity library for EVM-compatible chains.",
4
- "version": "1.4.4",
4
+ "version": "1.4.5",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "module": "lib/index.js",
@@ -44,11 +44,11 @@
44
44
  "@exodus/json-rpc": "^1.11.0",
45
45
  "@exodus/schemasafe": "^1.0.0",
46
46
  "@exodus/web3-types": "^1.10.0",
47
- "@exodus/web3-validation": "^1.29.0",
47
+ "@exodus/web3-validation": "^1.29.1",
48
48
  "@wallet-standard/base": "^1.0.1"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "@exodus/assets": "^8.0.72"
52
52
  },
53
- "gitHead": "4d705ac22b258fc6290d9a643dfab3880605be48"
53
+ "gitHead": "e48f74f32e040de9e86ef77ea48058d5c0b36c86"
54
54
  }