@toruslabs/ethereum-controllers 5.5.3 → 5.5.4

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.
Files changed (50) hide show
  1. package/dist/ethereumControllers.cjs.js +3 -12
  2. package/dist/ethereumControllers.esm.js +2 -11
  3. package/dist/ethereumControllers.umd.min.js +1 -2
  4. package/dist/ethereumControllers.umd.min.js.LICENSE.txt +0 -2
  5. package/dist/types/Account/AccountTrackerController.d.ts +1 -1
  6. package/package.json +14 -15
  7. package/dist/ethereumControllers.cjs.js.map +0 -1
  8. package/dist/ethereumControllers.esm.js.map +0 -1
  9. package/dist/ethereumControllers.umd.min.js.map +0 -1
  10. package/src/Account/AccountTrackerController.ts +0 -172
  11. package/src/Block/PollingBlockTracker.ts +0 -89
  12. package/src/Currency/CurrencyController.ts +0 -117
  13. package/src/Gas/GasFeeController.ts +0 -261
  14. package/src/Gas/IGasFeeController.ts +0 -56
  15. package/src/Gas/gasUtil.ts +0 -163
  16. package/src/Keyring/KeyringController.ts +0 -117
  17. package/src/Message/AbstractMessageController.ts +0 -136
  18. package/src/Message/AddChainController.ts +0 -73
  19. package/src/Message/DecryptMessageController.ts +0 -76
  20. package/src/Message/EncryptionPublicKeyController.ts +0 -75
  21. package/src/Message/MessageController.ts +0 -74
  22. package/src/Message/PersonalMessageController.ts +0 -74
  23. package/src/Message/SwitchChainController.ts +0 -74
  24. package/src/Message/TypedMessageController.ts +0 -109
  25. package/src/Message/utils.ts +0 -155
  26. package/src/Network/NetworkController.ts +0 -184
  27. package/src/Network/createEthereumMiddleware.ts +0 -475
  28. package/src/Network/createJsonRpcClient.ts +0 -63
  29. package/src/Nfts/INftsController.ts +0 -13
  30. package/src/Nfts/NftHandler.ts +0 -191
  31. package/src/Nfts/NftsController.ts +0 -216
  32. package/src/Preferences/PreferencesController.ts +0 -473
  33. package/src/Tokens/ITokensController.ts +0 -13
  34. package/src/Tokens/TokenHandler.ts +0 -60
  35. package/src/Tokens/TokenRatesController.ts +0 -134
  36. package/src/Tokens/TokensController.ts +0 -273
  37. package/src/Transaction/NonceTracker.ts +0 -152
  38. package/src/Transaction/PendingTransactionTracker.ts +0 -235
  39. package/src/Transaction/TransactionController.ts +0 -558
  40. package/src/Transaction/TransactionGasUtil.ts +0 -74
  41. package/src/Transaction/TransactionStateHistoryHelper.ts +0 -41
  42. package/src/Transaction/TransactionStateManager.ts +0 -315
  43. package/src/Transaction/TransactionUtils.ts +0 -333
  44. package/src/index.ts +0 -49
  45. package/src/utils/abis.ts +0 -677
  46. package/src/utils/constants.ts +0 -438
  47. package/src/utils/contractAddresses.ts +0 -19
  48. package/src/utils/conversionUtils.ts +0 -269
  49. package/src/utils/helpers.ts +0 -245
  50. package/src/utils/interfaces.ts +0 -519
package/src/index.ts DELETED
@@ -1,49 +0,0 @@
1
- export { default as AccountTrackerController } from "./Account/AccountTrackerController";
2
- export { default as PollingBlockTracker } from "./Block/PollingBlockTracker";
3
- export { default as CurrencyController } from "./Currency/CurrencyController";
4
- export { default as GasFeeController } from "./Gas/GasFeeController";
5
- export * from "./Gas/IGasFeeController";
6
- export { default as KeyringController } from "./Keyring/KeyringController";
7
- export * from "./Message/AbstractMessageController";
8
- export * from "./Message/AddChainController";
9
- export * from "./Message/DecryptMessageController";
10
- export * from "./Message/EncryptionPublicKeyController";
11
- export * from "./Message/MessageController";
12
- export * from "./Message/PersonalMessageController";
13
- export * from "./Message/SwitchChainController";
14
- export * from "./Message/TypedMessageController";
15
- export * from "./Message/utils";
16
- export * from "./Network/createEthereumMiddleware";
17
- export * from "./Network/createJsonRpcClient";
18
- export { default as NetworkController } from "./Network/NetworkController";
19
- export * from "./Nfts/INftsController";
20
- export * from "./Nfts/NftHandler";
21
- export * from "./Nfts/NftsController";
22
- export { default as PreferencesController } from "./Preferences/PreferencesController";
23
- export * from "./Tokens/ITokensController";
24
- export * from "./Tokens/TokenHandler";
25
- export * from "./Tokens/TokenRatesController";
26
- export * from "./Tokens/TokensController";
27
- export { default as NonceTracker } from "./Transaction/NonceTracker";
28
- export { default as PendingTransactionTracker } from "./Transaction/PendingTransactionTracker";
29
- export { default as TransactionController } from "./Transaction/TransactionController";
30
- export { default as TransactionGasUtil } from "./Transaction/TransactionGasUtil";
31
- export * from "./Transaction/TransactionStateHistoryHelper";
32
- export { default as TransactionStateManager } from "./Transaction/TransactionStateManager";
33
- export * from "./Transaction/TransactionUtils";
34
- export * from "./utils/abis";
35
- export * from "./utils/constants";
36
- export * from "./utils/conversionUtils";
37
- export * from "./utils/helpers";
38
- export * from "./utils/interfaces";
39
-
40
- /**
41
- * Pending controllers
42
- * - Transaction Controllers
43
- // * - AA Controller
44
- */
45
-
46
- /**
47
- * Backend apis
48
- * - Preferences Controller
49
- */
package/src/utils/abis.ts DELETED
@@ -1,677 +0,0 @@
1
- export const erc20Abi = [
2
- {
3
- constant: true,
4
- inputs: [],
5
- name: "name",
6
- outputs: [
7
- {
8
- name: "",
9
- type: "string",
10
- },
11
- ],
12
- payable: false,
13
- type: "function",
14
- },
15
- {
16
- constant: false,
17
- inputs: [
18
- {
19
- name: "_spender",
20
- type: "address",
21
- },
22
- {
23
- name: "_value",
24
- type: "uint256",
25
- },
26
- ],
27
- name: "approve",
28
- outputs: [
29
- {
30
- name: "success",
31
- type: "bool",
32
- },
33
- ],
34
- payable: false,
35
- type: "function",
36
- },
37
- {
38
- constant: true,
39
- inputs: [],
40
- name: "totalSupply",
41
- outputs: [
42
- {
43
- name: "",
44
- type: "uint256",
45
- },
46
- ],
47
- payable: false,
48
- type: "function",
49
- },
50
- {
51
- constant: false,
52
- inputs: [
53
- {
54
- name: "_from",
55
- type: "address",
56
- },
57
- {
58
- name: "_to",
59
- type: "address",
60
- },
61
- {
62
- name: "_value",
63
- type: "uint256",
64
- },
65
- ],
66
- name: "transferFrom",
67
- outputs: [
68
- {
69
- name: "success",
70
- type: "bool",
71
- },
72
- ],
73
- payable: false,
74
- type: "function",
75
- },
76
- {
77
- constant: true,
78
- inputs: [],
79
- name: "decimals",
80
- outputs: [
81
- {
82
- name: "",
83
- type: "uint256",
84
- },
85
- ],
86
- payable: false,
87
- type: "function",
88
- },
89
- {
90
- constant: true,
91
- inputs: [
92
- {
93
- name: "_owner",
94
- type: "address",
95
- },
96
- ],
97
- name: "balanceOf",
98
- outputs: [
99
- {
100
- name: "balance",
101
- type: "uint256",
102
- },
103
- ],
104
- payable: false,
105
- type: "function",
106
- },
107
- {
108
- constant: true,
109
- inputs: [],
110
- name: "symbol",
111
- outputs: [
112
- {
113
- name: "",
114
- type: "string",
115
- },
116
- ],
117
- payable: false,
118
- type: "function",
119
- },
120
- {
121
- constant: false,
122
- inputs: [
123
- {
124
- name: "_to",
125
- type: "address",
126
- },
127
- {
128
- name: "_value",
129
- type: "uint256",
130
- },
131
- ],
132
- name: "transfer",
133
- outputs: [
134
- {
135
- name: "success",
136
- type: "bool",
137
- },
138
- ],
139
- payable: false,
140
- type: "function",
141
- },
142
- {
143
- constant: false,
144
- inputs: [
145
- {
146
- name: "_spender",
147
- type: "address",
148
- },
149
- {
150
- name: "_value",
151
- type: "uint256",
152
- },
153
- {
154
- name: "_extraData",
155
- type: "bytes",
156
- },
157
- ],
158
- name: "approveAndCall",
159
- outputs: [
160
- {
161
- name: "success",
162
- type: "bool",
163
- },
164
- ],
165
- payable: false,
166
- type: "function",
167
- },
168
- {
169
- constant: true,
170
- inputs: [
171
- {
172
- name: "_owner",
173
- type: "address",
174
- },
175
- {
176
- name: "_spender",
177
- type: "address",
178
- },
179
- ],
180
- name: "allowance",
181
- outputs: [
182
- {
183
- name: "remaining",
184
- type: "uint256",
185
- },
186
- ],
187
- payable: false,
188
- type: "function",
189
- },
190
- {
191
- inputs: [
192
- {
193
- name: "_initialAmount",
194
- type: "uint256",
195
- },
196
- {
197
- name: "_tokenName",
198
- type: "string",
199
- },
200
- {
201
- name: "_decimalUnits",
202
- type: "uint8",
203
- },
204
- {
205
- name: "_tokenSymbol",
206
- type: "string",
207
- },
208
- ],
209
- type: "constructor",
210
- },
211
- {
212
- payable: false,
213
- type: "fallback",
214
- },
215
- ];
216
-
217
- export const erc721Abi = [
218
- {
219
- constant: true,
220
- inputs: [
221
- {
222
- name: "interfaceID",
223
- type: "bytes4",
224
- },
225
- ],
226
- name: "supportsInterface",
227
- outputs: [
228
- {
229
- name: "",
230
- type: "bool",
231
- },
232
- ],
233
- payable: false,
234
- stateMutability: "view",
235
- type: "function",
236
- },
237
- {
238
- constant: true,
239
- inputs: [],
240
- name: "name",
241
- outputs: [
242
- {
243
- name: "_name",
244
- type: "string",
245
- },
246
- ],
247
- payable: false,
248
- stateMutability: "view",
249
- type: "function",
250
- },
251
- {
252
- constant: true,
253
- inputs: [
254
- {
255
- name: "_tokenId",
256
- type: "uint256",
257
- },
258
- ],
259
- name: "getApproved",
260
- outputs: [
261
- {
262
- name: "",
263
- type: "address",
264
- },
265
- ],
266
- payable: false,
267
- stateMutability: "view",
268
- type: "function",
269
- },
270
- {
271
- constant: false,
272
- inputs: [
273
- {
274
- name: "_approved",
275
- type: "address",
276
- },
277
- {
278
- name: "_tokenId",
279
- type: "uint256",
280
- },
281
- ],
282
- name: "approve",
283
- outputs: [],
284
- payable: true,
285
- stateMutability: "payable",
286
- type: "function",
287
- },
288
- {
289
- constant: true,
290
- inputs: [],
291
- name: "totalSupply",
292
- outputs: [
293
- {
294
- name: "",
295
- type: "uint256",
296
- },
297
- ],
298
- payable: false,
299
- stateMutability: "view",
300
- type: "function",
301
- },
302
- {
303
- constant: false,
304
- inputs: [
305
- {
306
- name: "_from",
307
- type: "address",
308
- },
309
- {
310
- name: "_to",
311
- type: "address",
312
- },
313
- {
314
- name: "_tokenId",
315
- type: "uint256",
316
- },
317
- ],
318
- name: "transferFrom",
319
- outputs: [],
320
- payable: true,
321
- stateMutability: "payable",
322
- type: "function",
323
- },
324
- {
325
- constant: true,
326
- inputs: [
327
- {
328
- name: "_owner",
329
- type: "address",
330
- },
331
- {
332
- name: "_index",
333
- type: "uint256",
334
- },
335
- ],
336
- name: "tokenOfOwnerByIndex",
337
- outputs: [
338
- {
339
- name: "",
340
- type: "uint256",
341
- },
342
- ],
343
- payable: false,
344
- stateMutability: "view",
345
- type: "function",
346
- },
347
- {
348
- constant: false,
349
- inputs: [
350
- {
351
- name: "_from",
352
- type: "address",
353
- },
354
- {
355
- name: "_to",
356
- type: "address",
357
- },
358
- {
359
- name: "_tokenId",
360
- type: "uint256",
361
- },
362
- ],
363
- name: "safeTransferFrom",
364
- outputs: [],
365
- payable: true,
366
- stateMutability: "payable",
367
- type: "function",
368
- },
369
- {
370
- constant: true,
371
- inputs: [
372
- {
373
- name: "_index",
374
- type: "uint256",
375
- },
376
- ],
377
- name: "tokenByIndex",
378
- outputs: [
379
- {
380
- name: "",
381
- type: "uint256",
382
- },
383
- ],
384
- payable: false,
385
- stateMutability: "view",
386
- type: "function",
387
- },
388
- {
389
- constant: true,
390
- inputs: [
391
- {
392
- name: "_tokenId",
393
- type: "uint256",
394
- },
395
- ],
396
- name: "ownerOf",
397
- outputs: [
398
- {
399
- name: "",
400
- type: "address",
401
- },
402
- ],
403
- payable: false,
404
- stateMutability: "view",
405
- type: "function",
406
- },
407
- {
408
- constant: true,
409
- inputs: [
410
- {
411
- name: "_owner",
412
- type: "address",
413
- },
414
- ],
415
- name: "balanceOf",
416
- outputs: [
417
- {
418
- name: "",
419
- type: "uint256",
420
- },
421
- ],
422
- payable: false,
423
- stateMutability: "view",
424
- type: "function",
425
- },
426
- {
427
- constant: true,
428
- inputs: [],
429
- name: "symbol",
430
- outputs: [
431
- {
432
- name: "_symbol",
433
- type: "string",
434
- },
435
- ],
436
- payable: false,
437
- stateMutability: "view",
438
- type: "function",
439
- },
440
- {
441
- constant: true,
442
- inputs: [
443
- {
444
- name: "_tokenId",
445
- type: "uint256",
446
- },
447
- ],
448
- name: "tokenURI",
449
- outputs: [
450
- {
451
- name: "",
452
- type: "string",
453
- },
454
- ],
455
- payable: false,
456
- stateMutability: "view",
457
- type: "function",
458
- },
459
- ];
460
-
461
- export const erc1155Abi = [
462
- {
463
- inputs: [
464
- {
465
- internalType: "address",
466
- name: "_owner",
467
- type: "address",
468
- },
469
- {
470
- internalType: "uint256",
471
- name: "_id",
472
- type: "uint256",
473
- },
474
- ],
475
- name: "balanceOf",
476
- outputs: [
477
- {
478
- internalType: "uint256",
479
- name: "",
480
- type: "uint256",
481
- },
482
- ],
483
- stateMutability: "view",
484
- type: "function",
485
- },
486
- {
487
- inputs: [
488
- {
489
- internalType: "address[]",
490
- name: "_owners",
491
- type: "address[]",
492
- },
493
- {
494
- internalType: "uint256[]",
495
- name: "_ids",
496
- type: "uint256[]",
497
- },
498
- ],
499
- name: "balanceOfBatch",
500
- outputs: [
501
- {
502
- internalType: "uint256[]",
503
- name: "",
504
- type: "uint256[]",
505
- },
506
- ],
507
- stateMutability: "view",
508
- type: "function",
509
- },
510
- {
511
- inputs: [
512
- {
513
- internalType: "address",
514
- name: "_owner",
515
- type: "address",
516
- },
517
- {
518
- internalType: "address",
519
- name: "_operator",
520
- type: "address",
521
- },
522
- ],
523
- name: "isApprovedForAll",
524
- outputs: [
525
- {
526
- internalType: "bool",
527
- name: "isOperator",
528
- type: "bool",
529
- },
530
- ],
531
- stateMutability: "view",
532
- type: "function",
533
- },
534
- {
535
- inputs: [
536
- {
537
- internalType: "address",
538
- name: "_from",
539
- type: "address",
540
- },
541
- {
542
- internalType: "address",
543
- name: "_to",
544
- type: "address",
545
- },
546
- {
547
- internalType: "uint256",
548
- name: "_id",
549
- type: "uint256",
550
- },
551
- {
552
- internalType: "uint256",
553
- name: "_amount",
554
- type: "uint256",
555
- },
556
- {
557
- internalType: "bytes",
558
- name: "_data",
559
- type: "bytes",
560
- },
561
- ],
562
- name: "safeTransferFrom",
563
- outputs: [],
564
- stateMutability: "nonpayable",
565
- type: "function",
566
- },
567
- {
568
- inputs: [
569
- {
570
- internalType: "address",
571
- name: "_operator",
572
- type: "address",
573
- },
574
- {
575
- internalType: "bool",
576
- name: "_approved",
577
- type: "bool",
578
- },
579
- ],
580
- name: "setApprovalForAll",
581
- outputs: [],
582
- stateMutability: "nonpayable",
583
- type: "function",
584
- },
585
- {
586
- inputs: [
587
- {
588
- internalType: "bytes4",
589
- name: "_interfaceID",
590
- type: "bytes4",
591
- },
592
- ],
593
- name: "supportsInterface",
594
- outputs: [
595
- {
596
- internalType: "bool",
597
- name: "",
598
- type: "bool",
599
- },
600
- ],
601
- stateMutability: "pure",
602
- type: "function",
603
- },
604
- {
605
- inputs: [
606
- {
607
- internalType: "uint256",
608
- name: "_id",
609
- type: "uint256",
610
- },
611
- ],
612
- name: "uri",
613
- outputs: [
614
- {
615
- internalType: "string",
616
- name: "",
617
- type: "string",
618
- },
619
- ],
620
- stateMutability: "view",
621
- type: "function",
622
- },
623
- ];
624
-
625
- export const singleBalanceCheckerAbi = [
626
- {
627
- payable: true,
628
- stateMutability: "payable",
629
- type: "fallback",
630
- },
631
- {
632
- constant: true,
633
- inputs: [
634
- {
635
- name: "user",
636
- type: "address",
637
- },
638
- {
639
- name: "token",
640
- type: "address",
641
- },
642
- ],
643
- name: "tokenBalance",
644
- outputs: [
645
- {
646
- name: "",
647
- type: "uint256",
648
- },
649
- ],
650
- payable: false,
651
- stateMutability: "view",
652
- type: "function",
653
- },
654
- {
655
- constant: true,
656
- inputs: [
657
- {
658
- name: "users",
659
- type: "address[]",
660
- },
661
- {
662
- name: "tokens",
663
- type: "address[]",
664
- },
665
- ],
666
- name: "balances",
667
- outputs: [
668
- {
669
- name: "",
670
- type: "uint256[]",
671
- },
672
- ],
673
- payable: false,
674
- stateMutability: "view",
675
- type: "function",
676
- },
677
- ];