@exodus/web3-ethereum 1.4.4 → 1.4.6

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,64 @@ 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 = (() => {
147
+ if (!(data[i] === null)) return false
148
+ return true
149
+ })()
150
+ const sub11 = (() => {
132
151
  if (!Array.isArray(data[i])) return false
133
152
  if (data[i].length < 1) return false
134
153
  for (let j = 0; j < data[i].length; j++) {
135
154
  if (j in data[i] && hasOwn(data[i], j)) {
136
- if (!(typeof data[i][j] === 'number')) return false
155
+ const sub12 = (() => {
156
+ if (!(typeof data[i][j] === 'number')) return false
157
+ return true
158
+ })()
159
+ const sub13 = (() => {
160
+ if (!(typeof data[i][j] === 'string')) return false
161
+ if (data[i][j].length > 100 && stringLength(data[i][j]) > 100)
162
+ return false
163
+ if (!format3.test(data[i][j])) return false
164
+ return true
165
+ })()
166
+ if (!(sub12 || sub13)) return false
137
167
  }
138
168
  }
139
169
  return true
140
170
  })()
141
- const sub9 = (() => {
171
+ const sub14 = (() => {
142
172
  if (!(Array.isArray(data[i]) && data[i].length === 0)) return false
143
173
  return true
144
174
  })()
145
- if (!(sub2 || sub3 || sub6 || sub7 || sub8 || sub9)) {
175
+ if (!(sub2 || sub3 || sub8 || sub9 || sub10 || sub11 || sub14)) {
146
176
  validate.errors = [
147
177
  { keywordLocation: '#/items/anyOf', instanceLocation: '#/' + i },
148
178
  ]
@@ -166,7 +196,7 @@ export function validateRequest(value) {
166
196
  keywordLocation: `${schemaBase}${keywordLocation.slice(1)}`,
167
197
  instanceLocation: `${dataBase}${instanceLocation.slice(1)}`,
168
198
  })
169
- const format2 = new RegExp('^0x[0-9a-f]+$', 'i')
199
+ const format4 = new RegExp('^0x[0-9a-f]+$', 'i')
170
200
  const ref2 = function validate(data) {
171
201
  validate.errors = null
172
202
  if (!Array.isArray(data)) {
@@ -186,7 +216,7 @@ export function validateRequest(value) {
186
216
  ]
187
217
  return false
188
218
  }
189
- if (!format2.test(data[0])) {
219
+ if (!format4.test(data[0])) {
190
220
  validate.errors = [
191
221
  { keywordLocation: '#/0/format', instanceLocation: '#/0' },
192
222
  ]
@@ -201,7 +231,6 @@ export function validateRequest(value) {
201
231
  }
202
232
  return true
203
233
  }
204
- const format3 = new RegExp('^0x[a-f0-9]{40}$', 'i')
205
234
  const ref4 = function validate(data) {
206
235
  validate.errors = null
207
236
  if (!(typeof data === 'object' && data && !Array.isArray(data))) {
@@ -216,17 +245,17 @@ export function validateRequest(value) {
216
245
  }
217
246
  if ('chainId' in data && hasOwn(data, 'chainId')) {
218
247
  let passes1 = 0
219
- const sub10 = (() => {
248
+ const sub15 = (() => {
220
249
  if (!(typeof data.chainId === 'string')) return false
221
- if (!format2.test(data.chainId)) return false
250
+ if (!format4.test(data.chainId)) return false
222
251
  return true
223
252
  })()
224
- if (sub10) passes1++
225
- const sub11 = (() => {
253
+ if (sub15) passes1++
254
+ const sub16 = (() => {
226
255
  if (!(typeof data.chainId === 'number')) return false
227
256
  return true
228
257
  })()
229
- if (sub11) passes1++
258
+ if (sub16) passes1++
230
259
  if (passes1 !== 1) {
231
260
  validate.errors = [
232
261
  {
@@ -246,7 +275,7 @@ export function validateRequest(value) {
246
275
  ]
247
276
  return false
248
277
  }
249
- if (!format3.test(data.from)) {
278
+ if (!format2.test(data.from)) {
250
279
  validate.errors = [
251
280
  {
252
281
  keywordLocation: '#/properties/from/format',
@@ -265,7 +294,7 @@ export function validateRequest(value) {
265
294
  ]
266
295
  return false
267
296
  }
268
- if (!format3.test(data.to)) {
297
+ if (!format2.test(data.to)) {
269
298
  validate.errors = [
270
299
  {
271
300
  keywordLocation: '#/properties/to/format',
@@ -285,7 +314,7 @@ export function validateRequest(value) {
285
314
  ]
286
315
  return false
287
316
  }
288
- if (!format2.test(data.gas)) {
317
+ if (!format4.test(data.gas)) {
289
318
  validate.errors = [
290
319
  {
291
320
  keywordLocation: '#/properties/gas/format',
@@ -305,7 +334,7 @@ export function validateRequest(value) {
305
334
  ]
306
335
  return false
307
336
  }
308
- if (!format2.test(data.gasPrice)) {
337
+ if (!format4.test(data.gasPrice)) {
309
338
  validate.errors = [
310
339
  {
311
340
  keywordLocation: '#/properties/gasPrice/format',
@@ -360,17 +389,17 @@ export function validateRequest(value) {
360
389
  hasOwn(data, 'maxPriorityFeePerGas')
361
390
  ) {
362
391
  let passes2 = 0
363
- const sub12 = (() => {
392
+ const sub17 = (() => {
364
393
  if (!(typeof data.maxPriorityFeePerGas === 'string')) return false
365
394
  if (!format1.test(data.maxPriorityFeePerGas)) return false
366
395
  return true
367
396
  })()
368
- if (sub12) passes2++
369
- const sub13 = (() => {
397
+ if (sub17) passes2++
398
+ const sub18 = (() => {
370
399
  if (!(data.maxPriorityFeePerGas === null)) return false
371
400
  return true
372
401
  })()
373
- if (sub13) passes2++
402
+ if (sub18) passes2++
374
403
  if (passes2 !== 1) {
375
404
  validate.errors = [
376
405
  {
@@ -383,17 +412,17 @@ export function validateRequest(value) {
383
412
  }
384
413
  if ('maxFeePerGas' in data && hasOwn(data, 'maxFeePerGas')) {
385
414
  let passes3 = 0
386
- const sub14 = (() => {
415
+ const sub19 = (() => {
387
416
  if (!(typeof data.maxFeePerGas === 'string')) return false
388
417
  if (!format1.test(data.maxFeePerGas)) return false
389
418
  return true
390
419
  })()
391
- if (sub14) passes3++
392
- const sub15 = (() => {
420
+ if (sub19) passes3++
421
+ const sub20 = (() => {
393
422
  if (!(data.maxFeePerGas === null)) return false
394
423
  return true
395
424
  })()
396
- if (sub15) passes3++
425
+ if (sub20) passes3++
397
426
  if (passes3 !== 1) {
398
427
  validate.errors = [
399
428
  {
@@ -433,12 +462,12 @@ export function validateRequest(value) {
433
462
  return false
434
463
  }
435
464
  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')]
465
+ const err23 = validate.errors
466
+ const res23 = ref4(data[0])
467
+ const suberr23 = ref4.errors
468
+ validate.errors = err23
469
+ if (!res23) {
470
+ validate.errors = [errorMerge(suberr23[0], '#/0/$ref', '#/0')]
442
471
  return false
443
472
  }
444
473
  }
@@ -469,7 +498,7 @@ export function validateRequest(value) {
469
498
  ]
470
499
  return false
471
500
  }
472
- if (!format3.test(data[0])) {
501
+ if (!format2.test(data[0])) {
473
502
  validate.errors = [
474
503
  { keywordLocation: '#/0/format', instanceLocation: '#/0' },
475
504
  ]
@@ -483,7 +512,7 @@ export function validateRequest(value) {
483
512
  ]
484
513
  return false
485
514
  }
486
- if (!format2.test(data[1])) {
515
+ if (!format4.test(data[1])) {
487
516
  validate.errors = [
488
517
  { keywordLocation: '#/1/format', instanceLocation: '#/1' },
489
518
  ]
@@ -511,12 +540,12 @@ export function validateRequest(value) {
511
540
  return false
512
541
  }
513
542
  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')]
543
+ const err26 = validate.errors
544
+ const res26 = ref4(data[0])
545
+ const suberr26 = ref4.errors
546
+ validate.errors = err26
547
+ if (!res26) {
548
+ validate.errors = [errorMerge(suberr26[0], '#/0/$ref', '#/0')]
520
549
  return false
521
550
  }
522
551
  }
@@ -528,7 +557,6 @@ export function validateRequest(value) {
528
557
  }
529
558
  return true
530
559
  }
531
- const format4 = new RegExp('^(?!_)(\\n|\\r|.)*$', '')
532
560
  const ref7 = function validate(data) {
533
561
  validate.errors = null
534
562
  if (!Array.isArray(data)) {
@@ -548,7 +576,7 @@ export function validateRequest(value) {
548
576
  ]
549
577
  return false
550
578
  }
551
- if (!format3.test(data[0])) {
579
+ if (!format2.test(data[0])) {
552
580
  validate.errors = [
553
581
  { keywordLocation: '#/0/format', instanceLocation: '#/0' },
554
582
  ]
@@ -568,7 +596,7 @@ export function validateRequest(value) {
568
596
  ]
569
597
  return false
570
598
  }
571
- if (!format4.test(data[1])) {
599
+ if (!format3.test(data[1])) {
572
600
  validate.errors = [
573
601
  { keywordLocation: '#/1/format', instanceLocation: '#/1' },
574
602
  ]
@@ -702,7 +730,7 @@ export function validateRequest(value) {
702
730
  ]
703
731
  return false
704
732
  }
705
- if (!format4.test(data[k].value)) {
733
+ if (!format3.test(data[k].value)) {
706
734
  validate.errors = [
707
735
  {
708
736
  keywordLocation: '#/items/properties/value/format',
@@ -739,12 +767,12 @@ export function validateRequest(value) {
739
767
  return false
740
768
  }
741
769
  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')]
770
+ const err29 = validate.errors
771
+ const res29 = ref9(data[0])
772
+ const suberr29 = ref9.errors
773
+ validate.errors = err29
774
+ if (!res29) {
775
+ validate.errors = [errorMerge(suberr29[0], '#/0/$ref', '#/0')]
748
776
  return false
749
777
  }
750
778
  }
@@ -755,7 +783,7 @@ export function validateRequest(value) {
755
783
  ]
756
784
  return false
757
785
  }
758
- if (!format3.test(data[1])) {
786
+ if (!format2.test(data[1])) {
759
787
  validate.errors = [
760
788
  { keywordLocation: '#/1/format', instanceLocation: '#/1' },
761
789
  ]
@@ -795,7 +823,7 @@ export function validateRequest(value) {
795
823
  ]
796
824
  return false
797
825
  }
798
- if (!format4.test(data[0])) {
826
+ if (!format3.test(data[0])) {
799
827
  validate.errors = [
800
828
  { keywordLocation: '#/0/format', instanceLocation: '#/0' },
801
829
  ]
@@ -809,7 +837,7 @@ export function validateRequest(value) {
809
837
  ]
810
838
  return false
811
839
  }
812
- if (!format3.test(data[1])) {
840
+ if (!format2.test(data[1])) {
813
841
  validate.errors = [
814
842
  { keywordLocation: '#/1/format', instanceLocation: '#/1' },
815
843
  ]
@@ -848,14 +876,14 @@ export function validateRequest(value) {
848
876
  return false
849
877
  }
850
878
  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) {
879
+ const err35 = validate.errors
880
+ const res35 = ref13(data.eth_accounts)
881
+ const suberr35 = ref13.errors
882
+ validate.errors = err35
883
+ if (!res35) {
856
884
  validate.errors = [
857
885
  errorMerge(
858
- suberr34[0],
886
+ suberr35[0],
859
887
  '#/properties/eth_accounts/$ref',
860
888
  '#/eth_accounts',
861
889
  ),
@@ -889,12 +917,12 @@ export function validateRequest(value) {
889
917
  return false
890
918
  }
891
919
  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')]
920
+ const err36 = validate.errors
921
+ const res36 = ref12(data[0])
922
+ const suberr36 = ref12.errors
923
+ validate.errors = err36
924
+ if (!res36) {
925
+ validate.errors = [errorMerge(suberr36[0], '#/0/$ref', '#/0')]
898
926
  return false
899
927
  }
900
928
  }
@@ -953,7 +981,7 @@ export function validateRequest(value) {
953
981
  ]
954
982
  return false
955
983
  }
956
- if (!format3.test(data.address)) {
984
+ if (!format2.test(data.address)) {
957
985
  validate.errors = [
958
986
  {
959
987
  keywordLocation: '#/properties/address/format',
@@ -1004,21 +1032,21 @@ export function validateRequest(value) {
1004
1032
  }
1005
1033
  if ('image' in data && hasOwn(data, 'image')) {
1006
1034
  let passes4 = 0
1007
- const sub16 = (() => {
1035
+ const sub21 = (() => {
1008
1036
  if (!(typeof data.image === 'string')) return false
1009
1037
  if (!format6.test(data.image)) return false
1010
1038
  return true
1011
1039
  })()
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
1040
+ if (sub21) passes4++
1041
+ const sub22 = (() => {
1042
+ const err38 = validate.errors
1043
+ const res38 = ref16(data.image)
1044
+ const suberr38 = ref16.errors
1045
+ validate.errors = err38
1046
+ if (!res38) return false
1019
1047
  return true
1020
1048
  })()
1021
- if (sub17) passes4++
1049
+ if (sub22) passes4++
1022
1050
  if (passes4 !== 1) {
1023
1051
  validate.errors = [
1024
1052
  {
@@ -1092,13 +1120,13 @@ export function validateRequest(value) {
1092
1120
  ]
1093
1121
  return false
1094
1122
  }
1095
- const err38 = validate.errors
1096
- const res38 = ref15(data.options)
1097
- const suberr38 = ref15.errors
1098
- validate.errors = err38
1099
- if (!res38) {
1123
+ const err39 = validate.errors
1124
+ const res39 = ref15(data.options)
1125
+ const suberr39 = ref15.errors
1126
+ validate.errors = err39
1127
+ if (!res39) {
1100
1128
  validate.errors = [
1101
- errorMerge(suberr38[0], '#/properties/options/$ref', '#/options'),
1129
+ errorMerge(suberr39[0], '#/properties/options/$ref', '#/options'),
1102
1130
  ]
1103
1131
  return false
1104
1132
  }
@@ -1258,14 +1286,14 @@ export function validateRequest(value) {
1258
1286
  ]
1259
1287
  return false
1260
1288
  }
1261
- const err0 = validate.errors
1262
- const res0 = ref1(data.params)
1263
- const suberr0 = ref1.errors
1264
- validate.errors = err0
1265
- if (!res0) {
1289
+ const err1 = validate.errors
1290
+ const res1 = ref1(data.params)
1291
+ const suberr1 = ref1.errors
1292
+ validate.errors = err1
1293
+ if (!res1) {
1266
1294
  validate.errors = [
1267
1295
  errorMerge(
1268
- suberr0[0],
1296
+ suberr1[0],
1269
1297
  '#/oneOf/3/properties/params/$ref',
1270
1298
  '#/params',
1271
1299
  ),
@@ -1303,14 +1331,14 @@ export function validateRequest(value) {
1303
1331
  ]
1304
1332
  return false
1305
1333
  }
1306
- const err1 = validate.errors
1307
- const res1 = ref1(data.params)
1308
- const suberr1 = ref1.errors
1309
- validate.errors = err1
1310
- if (!res1) {
1334
+ const err2 = validate.errors
1335
+ const res2 = ref1(data.params)
1336
+ const suberr2 = ref1.errors
1337
+ validate.errors = err2
1338
+ if (!res2) {
1311
1339
  validate.errors = [
1312
1340
  errorMerge(
1313
- suberr1[0],
1341
+ suberr2[0],
1314
1342
  '#/oneOf/5/properties/params/$ref',
1315
1343
  '#/params',
1316
1344
  ),
@@ -1328,14 +1356,14 @@ export function validateRequest(value) {
1328
1356
  ]
1329
1357
  return false
1330
1358
  }
1331
- const err2 = validate.errors
1332
- const res2 = ref1(data.params)
1333
- const suberr2 = ref1.errors
1334
- validate.errors = err2
1335
- if (!res2) {
1359
+ const err3 = validate.errors
1360
+ const res3 = ref1(data.params)
1361
+ const suberr3 = ref1.errors
1362
+ validate.errors = err3
1363
+ if (!res3) {
1336
1364
  validate.errors = [
1337
1365
  errorMerge(
1338
- suberr2[0],
1366
+ suberr3[0],
1339
1367
  '#/oneOf/6/properties/params/$ref',
1340
1368
  '#/params',
1341
1369
  ),
@@ -1353,14 +1381,14 @@ export function validateRequest(value) {
1353
1381
  ]
1354
1382
  return false
1355
1383
  }
1356
- const err3 = validate.errors
1357
- const res3 = ref1(data.params)
1358
- const suberr3 = ref1.errors
1359
- validate.errors = err3
1360
- if (!res3) {
1384
+ const err4 = validate.errors
1385
+ const res4 = ref1(data.params)
1386
+ const suberr4 = ref1.errors
1387
+ validate.errors = err4
1388
+ if (!res4) {
1361
1389
  validate.errors = [
1362
1390
  errorMerge(
1363
- suberr3[0],
1391
+ suberr4[0],
1364
1392
  '#/oneOf/7/properties/params/$ref',
1365
1393
  '#/params',
1366
1394
  ),
@@ -1398,31 +1426,6 @@ export function validateRequest(value) {
1398
1426
  ]
1399
1427
  return false
1400
1428
  }
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
1429
  const err5 = validate.errors
1427
1430
  const res5 = ref1(data.params)
1428
1431
  const suberr5 = ref1.errors
@@ -1431,18 +1434,18 @@ export function validateRequest(value) {
1431
1434
  validate.errors = [
1432
1435
  errorMerge(
1433
1436
  suberr5[0],
1434
- '#/oneOf/10/properties/params/$ref',
1437
+ '#/oneOf/9/properties/params/$ref',
1435
1438
  '#/params',
1436
1439
  ),
1437
1440
  ]
1438
1441
  return false
1439
1442
  }
1440
1443
  break
1441
- case 'eth_getBlockByNumber':
1444
+ case 'eth_getBlockByHash':
1442
1445
  if (!('params' in data && hasOwn(data, 'params'))) {
1443
1446
  validate.errors = [
1444
1447
  {
1445
- keywordLocation: '#/oneOf/11/required',
1448
+ keywordLocation: '#/oneOf/10/required',
1446
1449
  instanceLocation: '#/params',
1447
1450
  },
1448
1451
  ]
@@ -1456,18 +1459,18 @@ export function validateRequest(value) {
1456
1459
  validate.errors = [
1457
1460
  errorMerge(
1458
1461
  suberr6[0],
1459
- '#/oneOf/11/properties/params/$ref',
1462
+ '#/oneOf/10/properties/params/$ref',
1460
1463
  '#/params',
1461
1464
  ),
1462
1465
  ]
1463
1466
  return false
1464
1467
  }
1465
1468
  break
1466
- case 'eth_getBlockTransactionCountByHash':
1469
+ case 'eth_getBlockByNumber':
1467
1470
  if (!('params' in data && hasOwn(data, 'params'))) {
1468
1471
  validate.errors = [
1469
1472
  {
1470
- keywordLocation: '#/oneOf/12/required',
1473
+ keywordLocation: '#/oneOf/11/required',
1471
1474
  instanceLocation: '#/params',
1472
1475
  },
1473
1476
  ]
@@ -1481,18 +1484,18 @@ export function validateRequest(value) {
1481
1484
  validate.errors = [
1482
1485
  errorMerge(
1483
1486
  suberr7[0],
1484
- '#/oneOf/12/properties/params/$ref',
1487
+ '#/oneOf/11/properties/params/$ref',
1485
1488
  '#/params',
1486
1489
  ),
1487
1490
  ]
1488
1491
  return false
1489
1492
  }
1490
1493
  break
1491
- case 'eth_getBlockTransactionCountByNumber':
1494
+ case 'eth_getBlockTransactionCountByHash':
1492
1495
  if (!('params' in data && hasOwn(data, 'params'))) {
1493
1496
  validate.errors = [
1494
1497
  {
1495
- keywordLocation: '#/oneOf/13/required',
1498
+ keywordLocation: '#/oneOf/12/required',
1496
1499
  instanceLocation: '#/params',
1497
1500
  },
1498
1501
  ]
@@ -1506,18 +1509,18 @@ export function validateRequest(value) {
1506
1509
  validate.errors = [
1507
1510
  errorMerge(
1508
1511
  suberr8[0],
1509
- '#/oneOf/13/properties/params/$ref',
1512
+ '#/oneOf/12/properties/params/$ref',
1510
1513
  '#/params',
1511
1514
  ),
1512
1515
  ]
1513
1516
  return false
1514
1517
  }
1515
1518
  break
1516
- case 'eth_getCode':
1519
+ case 'eth_getBlockTransactionCountByNumber':
1517
1520
  if (!('params' in data && hasOwn(data, 'params'))) {
1518
1521
  validate.errors = [
1519
1522
  {
1520
- keywordLocation: '#/oneOf/14/required',
1523
+ keywordLocation: '#/oneOf/13/required',
1521
1524
  instanceLocation: '#/params',
1522
1525
  },
1523
1526
  ]
@@ -1531,63 +1534,63 @@ export function validateRequest(value) {
1531
1534
  validate.errors = [
1532
1535
  errorMerge(
1533
1536
  suberr9[0],
1534
- '#/oneOf/14/properties/params/$ref',
1537
+ '#/oneOf/13/properties/params/$ref',
1535
1538
  '#/params',
1536
1539
  ),
1537
1540
  ]
1538
1541
  return false
1539
1542
  }
1540
1543
  break
1541
- case 'eth_getCompilers':
1544
+ case 'eth_getCode':
1542
1545
  if (!('params' in data && hasOwn(data, 'params'))) {
1543
1546
  validate.errors = [
1544
1547
  {
1545
- keywordLocation: '#/oneOf/15/required',
1548
+ keywordLocation: '#/oneOf/14/required',
1546
1549
  instanceLocation: '#/params',
1547
1550
  },
1548
1551
  ]
1549
1552
  return false
1550
1553
  }
1551
- if (!(Array.isArray(data.params) && data.params.length === 0)) {
1554
+ const err10 = validate.errors
1555
+ const res10 = ref1(data.params)
1556
+ const suberr10 = ref1.errors
1557
+ validate.errors = err10
1558
+ if (!res10) {
1552
1559
  validate.errors = [
1553
- {
1554
- keywordLocation: '#/oneOf/15/properties/params/const',
1555
- instanceLocation: '#/params',
1556
- },
1560
+ errorMerge(
1561
+ suberr10[0],
1562
+ '#/oneOf/14/properties/params/$ref',
1563
+ '#/params',
1564
+ ),
1557
1565
  ]
1558
1566
  return false
1559
1567
  }
1560
1568
  break
1561
- case 'eth_getLogs':
1569
+ case 'eth_getCompilers':
1562
1570
  if (!('params' in data && hasOwn(data, 'params'))) {
1563
1571
  validate.errors = [
1564
1572
  {
1565
- keywordLocation: '#/oneOf/16/required',
1573
+ keywordLocation: '#/oneOf/15/required',
1566
1574
  instanceLocation: '#/params',
1567
1575
  },
1568
1576
  ]
1569
1577
  return false
1570
1578
  }
1571
- const err10 = validate.errors
1572
- const res10 = ref1(data.params)
1573
- const suberr10 = ref1.errors
1574
- validate.errors = err10
1575
- if (!res10) {
1579
+ if (!(Array.isArray(data.params) && data.params.length === 0)) {
1576
1580
  validate.errors = [
1577
- errorMerge(
1578
- suberr10[0],
1579
- '#/oneOf/16/properties/params/$ref',
1580
- '#/params',
1581
- ),
1581
+ {
1582
+ keywordLocation: '#/oneOf/15/properties/params/const',
1583
+ instanceLocation: '#/params',
1584
+ },
1582
1585
  ]
1583
1586
  return false
1584
1587
  }
1585
1588
  break
1586
- case 'eth_getProof':
1589
+ case 'eth_getLogs':
1587
1590
  if (!('params' in data && hasOwn(data, 'params'))) {
1588
1591
  validate.errors = [
1589
1592
  {
1590
- keywordLocation: '#/oneOf/17/required',
1593
+ keywordLocation: '#/oneOf/16/required',
1591
1594
  instanceLocation: '#/params',
1592
1595
  },
1593
1596
  ]
@@ -1601,18 +1604,18 @@ export function validateRequest(value) {
1601
1604
  validate.errors = [
1602
1605
  errorMerge(
1603
1606
  suberr11[0],
1604
- '#/oneOf/17/properties/params/$ref',
1607
+ '#/oneOf/16/properties/params/$ref',
1605
1608
  '#/params',
1606
1609
  ),
1607
1610
  ]
1608
1611
  return false
1609
1612
  }
1610
1613
  break
1611
- case 'eth_getStorageAt':
1614
+ case 'eth_getProof':
1612
1615
  if (!('params' in data && hasOwn(data, 'params'))) {
1613
1616
  validate.errors = [
1614
1617
  {
1615
- keywordLocation: '#/oneOf/18/required',
1618
+ keywordLocation: '#/oneOf/17/required',
1616
1619
  instanceLocation: '#/params',
1617
1620
  },
1618
1621
  ]
@@ -1626,18 +1629,18 @@ export function validateRequest(value) {
1626
1629
  validate.errors = [
1627
1630
  errorMerge(
1628
1631
  suberr12[0],
1629
- '#/oneOf/18/properties/params/$ref',
1632
+ '#/oneOf/17/properties/params/$ref',
1630
1633
  '#/params',
1631
1634
  ),
1632
1635
  ]
1633
1636
  return false
1634
1637
  }
1635
1638
  break
1636
- case 'eth_getTransactionByBlockHashAndIndex':
1639
+ case 'eth_getStorageAt':
1637
1640
  if (!('params' in data && hasOwn(data, 'params'))) {
1638
1641
  validate.errors = [
1639
1642
  {
1640
- keywordLocation: '#/oneOf/19/required',
1643
+ keywordLocation: '#/oneOf/18/required',
1641
1644
  instanceLocation: '#/params',
1642
1645
  },
1643
1646
  ]
@@ -1651,18 +1654,18 @@ export function validateRequest(value) {
1651
1654
  validate.errors = [
1652
1655
  errorMerge(
1653
1656
  suberr13[0],
1654
- '#/oneOf/19/properties/params/$ref',
1657
+ '#/oneOf/18/properties/params/$ref',
1655
1658
  '#/params',
1656
1659
  ),
1657
1660
  ]
1658
1661
  return false
1659
1662
  }
1660
1663
  break
1661
- case 'eth_getTransactionByBlockNumberAndIndex':
1664
+ case 'eth_getTransactionByBlockHashAndIndex':
1662
1665
  if (!('params' in data && hasOwn(data, 'params'))) {
1663
1666
  validate.errors = [
1664
1667
  {
1665
- keywordLocation: '#/oneOf/20/required',
1668
+ keywordLocation: '#/oneOf/19/required',
1666
1669
  instanceLocation: '#/params',
1667
1670
  },
1668
1671
  ]
@@ -1676,18 +1679,18 @@ export function validateRequest(value) {
1676
1679
  validate.errors = [
1677
1680
  errorMerge(
1678
1681
  suberr14[0],
1679
- '#/oneOf/20/properties/params/$ref',
1682
+ '#/oneOf/19/properties/params/$ref',
1680
1683
  '#/params',
1681
1684
  ),
1682
1685
  ]
1683
1686
  return false
1684
1687
  }
1685
1688
  break
1686
- case 'eth_getTransactionByHash':
1689
+ case 'eth_getTransactionByBlockNumberAndIndex':
1687
1690
  if (!('params' in data && hasOwn(data, 'params'))) {
1688
1691
  validate.errors = [
1689
1692
  {
1690
- keywordLocation: '#/oneOf/21/required',
1693
+ keywordLocation: '#/oneOf/20/required',
1691
1694
  instanceLocation: '#/params',
1692
1695
  },
1693
1696
  ]
@@ -1701,18 +1704,18 @@ export function validateRequest(value) {
1701
1704
  validate.errors = [
1702
1705
  errorMerge(
1703
1706
  suberr15[0],
1704
- '#/oneOf/21/properties/params/$ref',
1707
+ '#/oneOf/20/properties/params/$ref',
1705
1708
  '#/params',
1706
1709
  ),
1707
1710
  ]
1708
1711
  return false
1709
1712
  }
1710
1713
  break
1711
- case 'eth_getTransactionCount':
1714
+ case 'eth_getTransactionByHash':
1712
1715
  if (!('params' in data && hasOwn(data, 'params'))) {
1713
1716
  validate.errors = [
1714
1717
  {
1715
- keywordLocation: '#/oneOf/22/required',
1718
+ keywordLocation: '#/oneOf/21/required',
1716
1719
  instanceLocation: '#/params',
1717
1720
  },
1718
1721
  ]
@@ -1726,18 +1729,18 @@ export function validateRequest(value) {
1726
1729
  validate.errors = [
1727
1730
  errorMerge(
1728
1731
  suberr16[0],
1729
- '#/oneOf/22/properties/params/$ref',
1732
+ '#/oneOf/21/properties/params/$ref',
1730
1733
  '#/params',
1731
1734
  ),
1732
1735
  ]
1733
1736
  return false
1734
1737
  }
1735
1738
  break
1736
- case 'eth_getTransactionReceipt':
1739
+ case 'eth_getTransactionCount':
1737
1740
  if (!('params' in data && hasOwn(data, 'params'))) {
1738
1741
  validate.errors = [
1739
1742
  {
1740
- keywordLocation: '#/oneOf/23/required',
1743
+ keywordLocation: '#/oneOf/22/required',
1741
1744
  instanceLocation: '#/params',
1742
1745
  },
1743
1746
  ]
@@ -1751,18 +1754,18 @@ export function validateRequest(value) {
1751
1754
  validate.errors = [
1752
1755
  errorMerge(
1753
1756
  suberr17[0],
1754
- '#/oneOf/23/properties/params/$ref',
1757
+ '#/oneOf/22/properties/params/$ref',
1755
1758
  '#/params',
1756
1759
  ),
1757
1760
  ]
1758
1761
  return false
1759
1762
  }
1760
1763
  break
1761
- case 'eth_getUncleCountByBlockHash':
1764
+ case 'eth_getTransactionReceipt':
1762
1765
  if (!('params' in data && hasOwn(data, 'params'))) {
1763
1766
  validate.errors = [
1764
1767
  {
1765
- keywordLocation: '#/oneOf/24/required',
1768
+ keywordLocation: '#/oneOf/23/required',
1766
1769
  instanceLocation: '#/params',
1767
1770
  },
1768
1771
  ]
@@ -1776,18 +1779,18 @@ export function validateRequest(value) {
1776
1779
  validate.errors = [
1777
1780
  errorMerge(
1778
1781
  suberr18[0],
1779
- '#/oneOf/24/properties/params/$ref',
1782
+ '#/oneOf/23/properties/params/$ref',
1780
1783
  '#/params',
1781
1784
  ),
1782
1785
  ]
1783
1786
  return false
1784
1787
  }
1785
1788
  break
1786
- case 'eth_getUncleByBlockHashAndIndex':
1789
+ case 'eth_getUncleCountByBlockHash':
1787
1790
  if (!('params' in data && hasOwn(data, 'params'))) {
1788
1791
  validate.errors = [
1789
1792
  {
1790
- keywordLocation: '#/oneOf/25/required',
1793
+ keywordLocation: '#/oneOf/24/required',
1791
1794
  instanceLocation: '#/params',
1792
1795
  },
1793
1796
  ]
@@ -1801,18 +1804,18 @@ export function validateRequest(value) {
1801
1804
  validate.errors = [
1802
1805
  errorMerge(
1803
1806
  suberr19[0],
1804
- '#/oneOf/25/properties/params/$ref',
1807
+ '#/oneOf/24/properties/params/$ref',
1805
1808
  '#/params',
1806
1809
  ),
1807
1810
  ]
1808
1811
  return false
1809
1812
  }
1810
1813
  break
1811
- case 'eth_getUncleByBlockNumberAndIndex':
1814
+ case 'eth_getUncleByBlockHashAndIndex':
1812
1815
  if (!('params' in data && hasOwn(data, 'params'))) {
1813
1816
  validate.errors = [
1814
1817
  {
1815
- keywordLocation: '#/oneOf/26/required',
1818
+ keywordLocation: '#/oneOf/25/required',
1816
1819
  instanceLocation: '#/params',
1817
1820
  },
1818
1821
  ]
@@ -1826,6 +1829,31 @@ export function validateRequest(value) {
1826
1829
  validate.errors = [
1827
1830
  errorMerge(
1828
1831
  suberr20[0],
1832
+ '#/oneOf/25/properties/params/$ref',
1833
+ '#/params',
1834
+ ),
1835
+ ]
1836
+ return false
1837
+ }
1838
+ break
1839
+ case 'eth_getUncleByBlockNumberAndIndex':
1840
+ if (!('params' in data && hasOwn(data, 'params'))) {
1841
+ validate.errors = [
1842
+ {
1843
+ keywordLocation: '#/oneOf/26/required',
1844
+ instanceLocation: '#/params',
1845
+ },
1846
+ ]
1847
+ return false
1848
+ }
1849
+ const err21 = validate.errors
1850
+ const res21 = ref1(data.params)
1851
+ const suberr21 = ref1.errors
1852
+ validate.errors = err21
1853
+ if (!res21) {
1854
+ validate.errors = [
1855
+ errorMerge(
1856
+ suberr21[0],
1829
1857
  '#/oneOf/26/properties/params/$ref',
1830
1858
  '#/params',
1831
1859
  ),
@@ -1923,14 +1951,14 @@ export function validateRequest(value) {
1923
1951
  ]
1924
1952
  return false
1925
1953
  }
1926
- const err21 = validate.errors
1927
- const res21 = ref2(data.params)
1928
- const suberr21 = ref2.errors
1929
- validate.errors = err21
1930
- if (!res21) {
1954
+ const err22 = validate.errors
1955
+ const res22 = ref2(data.params)
1956
+ const suberr22 = ref2.errors
1957
+ validate.errors = err22
1958
+ if (!res22) {
1931
1959
  validate.errors = [
1932
1960
  errorMerge(
1933
- suberr21[0],
1961
+ suberr22[0],
1934
1962
  '#/oneOf/31/properties/params/$ref',
1935
1963
  '#/params',
1936
1964
  ),
@@ -1948,14 +1976,14 @@ export function validateRequest(value) {
1948
1976
  ]
1949
1977
  return false
1950
1978
  }
1951
- const err23 = validate.errors
1952
- const res23 = ref3(data.params)
1953
- const suberr23 = ref3.errors
1954
- validate.errors = err23
1955
- if (!res23) {
1979
+ const err24 = validate.errors
1980
+ const res24 = ref3(data.params)
1981
+ const suberr24 = ref3.errors
1982
+ validate.errors = err24
1983
+ if (!res24) {
1956
1984
  validate.errors = [
1957
1985
  errorMerge(
1958
- suberr23[0],
1986
+ suberr24[0],
1959
1987
  '#/oneOf/32/properties/params/$ref',
1960
1988
  '#/params',
1961
1989
  ),
@@ -1973,14 +2001,14 @@ export function validateRequest(value) {
1973
2001
  ]
1974
2002
  return false
1975
2003
  }
1976
- const err24 = validate.errors
1977
- const res24 = ref5(data.params)
1978
- const suberr24 = ref5.errors
1979
- validate.errors = err24
1980
- if (!res24) {
2004
+ const err25 = validate.errors
2005
+ const res25 = ref5(data.params)
2006
+ const suberr25 = ref5.errors
2007
+ validate.errors = err25
2008
+ if (!res25) {
1981
2009
  validate.errors = [
1982
2010
  errorMerge(
1983
- suberr24[0],
2011
+ suberr25[0],
1984
2012
  '#/oneOf/33/properties/params/$ref',
1985
2013
  '#/params',
1986
2014
  ),
@@ -1998,14 +2026,14 @@ export function validateRequest(value) {
1998
2026
  ]
1999
2027
  return false
2000
2028
  }
2001
- const err26 = validate.errors
2002
- const res26 = ref6(data.params)
2003
- const suberr26 = ref6.errors
2004
- validate.errors = err26
2005
- if (!res26) {
2029
+ const err27 = validate.errors
2030
+ const res27 = ref6(data.params)
2031
+ const suberr27 = ref6.errors
2032
+ validate.errors = err27
2033
+ if (!res27) {
2006
2034
  validate.errors = [
2007
2035
  errorMerge(
2008
- suberr26[0],
2036
+ suberr27[0],
2009
2037
  '#/oneOf/34/properties/params/$ref',
2010
2038
  '#/params',
2011
2039
  ),
@@ -2023,14 +2051,14 @@ export function validateRequest(value) {
2023
2051
  ]
2024
2052
  return false
2025
2053
  }
2026
- const err27 = validate.errors
2027
- const res27 = ref7(data.params)
2028
- const suberr27 = ref7.errors
2029
- validate.errors = err27
2030
- if (!res27) {
2054
+ const err28 = validate.errors
2055
+ const res28 = ref7(data.params)
2056
+ const suberr28 = ref7.errors
2057
+ validate.errors = err28
2058
+ if (!res28) {
2031
2059
  validate.errors = [
2032
2060
  errorMerge(
2033
- suberr27[0],
2061
+ suberr28[0],
2034
2062
  '#/oneOf/35/properties/params/$ref',
2035
2063
  '#/params',
2036
2064
  ),
@@ -2048,14 +2076,14 @@ export function validateRequest(value) {
2048
2076
  ]
2049
2077
  return false
2050
2078
  }
2051
- const err29 = validate.errors
2052
- const res29 = ref8(data.params)
2053
- const suberr29 = ref8.errors
2054
- validate.errors = err29
2055
- if (!res29) {
2079
+ const err30 = validate.errors
2080
+ const res30 = ref8(data.params)
2081
+ const suberr30 = ref8.errors
2082
+ validate.errors = err30
2083
+ if (!res30) {
2056
2084
  validate.errors = [
2057
2085
  errorMerge(
2058
- suberr29[0],
2086
+ suberr30[0],
2059
2087
  '#/oneOf/36/properties/params/$ref',
2060
2088
  '#/params',
2061
2089
  ),
@@ -2073,14 +2101,14 @@ export function validateRequest(value) {
2073
2101
  ]
2074
2102
  return false
2075
2103
  }
2076
- const err30 = validate.errors
2077
- const res30 = ref7(data.params)
2078
- const suberr30 = ref7.errors
2079
- validate.errors = err30
2080
- if (!res30) {
2104
+ const err31 = validate.errors
2105
+ const res31 = ref7(data.params)
2106
+ const suberr31 = ref7.errors
2107
+ validate.errors = err31
2108
+ if (!res31) {
2081
2109
  validate.errors = [
2082
2110
  errorMerge(
2083
- suberr30[0],
2111
+ suberr31[0],
2084
2112
  '#/oneOf/37/properties/params/$ref',
2085
2113
  '#/params',
2086
2114
  ),
@@ -2098,14 +2126,14 @@ export function validateRequest(value) {
2098
2126
  ]
2099
2127
  return false
2100
2128
  }
2101
- const err31 = validate.errors
2102
- const res31 = ref7(data.params)
2103
- const suberr31 = ref7.errors
2104
- validate.errors = err31
2105
- if (!res31) {
2129
+ const err32 = validate.errors
2130
+ const res32 = ref7(data.params)
2131
+ const suberr32 = ref7.errors
2132
+ validate.errors = err32
2133
+ if (!res32) {
2106
2134
  validate.errors = [
2107
2135
  errorMerge(
2108
- suberr31[0],
2136
+ suberr32[0],
2109
2137
  '#/oneOf/38/properties/params/$ref',
2110
2138
  '#/params',
2111
2139
  ),
@@ -2123,14 +2151,14 @@ export function validateRequest(value) {
2123
2151
  ]
2124
2152
  return false
2125
2153
  }
2126
- const err32 = validate.errors
2127
- const res32 = ref1(data.params)
2128
- const suberr32 = ref1.errors
2129
- validate.errors = err32
2130
- if (!res32) {
2154
+ const err33 = validate.errors
2155
+ const res33 = ref1(data.params)
2156
+ const suberr33 = ref1.errors
2157
+ validate.errors = err33
2158
+ if (!res33) {
2131
2159
  validate.errors = [
2132
2160
  errorMerge(
2133
- suberr32[0],
2161
+ suberr33[0],
2134
2162
  '#/oneOf/39/properties/params/$ref',
2135
2163
  '#/params',
2136
2164
  ),
@@ -2148,14 +2176,14 @@ export function validateRequest(value) {
2148
2176
  ]
2149
2177
  return false
2150
2178
  }
2151
- const err33 = validate.errors
2152
- const res33 = ref10(data.params)
2153
- const suberr33 = ref10.errors
2154
- validate.errors = err33
2155
- if (!res33) {
2179
+ const err34 = validate.errors
2180
+ const res34 = ref10(data.params)
2181
+ const suberr34 = ref10.errors
2182
+ validate.errors = err34
2183
+ if (!res34) {
2156
2184
  validate.errors = [
2157
2185
  errorMerge(
2158
- suberr33[0],
2186
+ suberr34[0],
2159
2187
  '#/oneOf/40/properties/params/$ref',
2160
2188
  '#/params',
2161
2189
  ),
@@ -2213,14 +2241,14 @@ export function validateRequest(value) {
2213
2241
  ]
2214
2242
  return false
2215
2243
  }
2216
- const err36 = validate.errors
2217
- const res36 = ref11(data.params)
2218
- const suberr36 = ref11.errors
2219
- validate.errors = err36
2220
- if (!res36) {
2244
+ const err37 = validate.errors
2245
+ const res37 = ref11(data.params)
2246
+ const suberr37 = ref11.errors
2247
+ validate.errors = err37
2248
+ if (!res37) {
2221
2249
  validate.errors = [
2222
2250
  errorMerge(
2223
- suberr36[0],
2251
+ suberr37[0],
2224
2252
  '#/oneOf/43/properties/params/$ref',
2225
2253
  '#/params',
2226
2254
  ),
@@ -2238,14 +2266,14 @@ export function validateRequest(value) {
2238
2266
  ]
2239
2267
  return false
2240
2268
  }
2241
- const err39 = validate.errors
2242
- const res39 = ref14(data.params)
2243
- const suberr39 = ref14.errors
2244
- validate.errors = err39
2245
- if (!res39) {
2269
+ const err40 = validate.errors
2270
+ const res40 = ref14(data.params)
2271
+ const suberr40 = ref14.errors
2272
+ validate.errors = err40
2273
+ if (!res40) {
2246
2274
  validate.errors = [
2247
2275
  errorMerge(
2248
- suberr39[0],
2276
+ suberr40[0],
2249
2277
  '#/oneOf/44/properties/params/$ref',
2250
2278
  '#/params',
2251
2279
  ),
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.6",
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.2",
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": "4d9d6eed59fbe201c1e6f2abb4b50f1f336bc690"
54
54
  }