@toruslabs/ethereum-controllers 6.2.4 → 6.3.2
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.
|
@@ -186,22 +186,22 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
186
186
|
validateTypedSignMessageDataV4: () => (/* reexport */ validateTypedSignMessageDataV4)
|
|
187
187
|
});
|
|
188
188
|
|
|
189
|
-
;//
|
|
189
|
+
;// external "@babel/runtime/helpers/objectSpread2"
|
|
190
190
|
const objectSpread2_namespaceObject = require("@babel/runtime/helpers/objectSpread2");
|
|
191
191
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2_namespaceObject);
|
|
192
|
-
;//
|
|
192
|
+
;// external "@babel/runtime/helpers/defineProperty"
|
|
193
193
|
const defineProperty_namespaceObject = require("@babel/runtime/helpers/defineProperty");
|
|
194
194
|
var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty_namespaceObject);
|
|
195
|
-
;//
|
|
195
|
+
;// external "@toruslabs/base-controllers"
|
|
196
196
|
const base_controllers_namespaceObject = require("@toruslabs/base-controllers");
|
|
197
|
-
;//
|
|
197
|
+
;// external "async-mutex"
|
|
198
198
|
const external_async_mutex_namespaceObject = require("async-mutex");
|
|
199
|
-
;//
|
|
199
|
+
;// external "ethers"
|
|
200
200
|
const external_ethers_namespaceObject = require("ethers");
|
|
201
|
-
;//
|
|
201
|
+
;// external "loglevel"
|
|
202
202
|
const external_loglevel_namespaceObject = require("loglevel");
|
|
203
203
|
var external_loglevel_default = /*#__PURE__*/__webpack_require__.n(external_loglevel_namespaceObject);
|
|
204
|
-
;//
|
|
204
|
+
;// ./src/utils/abis.ts
|
|
205
205
|
const erc20Abi = [{
|
|
206
206
|
constant: true,
|
|
207
207
|
inputs: [],
|
|
@@ -705,7 +705,7 @@ const singleBalanceCheckerAbi = [{
|
|
|
705
705
|
stateMutability: "view",
|
|
706
706
|
type: "function"
|
|
707
707
|
}];
|
|
708
|
-
;//
|
|
708
|
+
;// ./src/utils/constants.ts
|
|
709
709
|
|
|
710
710
|
const LOCALHOST = "localhost";
|
|
711
711
|
const CONTRACT_TYPE_ETH = "eth";
|
|
@@ -1026,7 +1026,7 @@ const MessageStatus = {
|
|
|
1026
1026
|
const MESSAGE_EVENTS = {
|
|
1027
1027
|
UNAPPROVED_MESSAGE: "unapprovedMessage"
|
|
1028
1028
|
};
|
|
1029
|
-
;//
|
|
1029
|
+
;// ./src/utils/contractAddresses.ts
|
|
1030
1030
|
|
|
1031
1031
|
const SINGLE_CALL_BALANCES_ADDRESSES = {
|
|
1032
1032
|
[MAINNET_CHAIN_ID]: "0xb1f8e55c7f64d203c1400b9d8555d050f94adf39",
|
|
@@ -1038,7 +1038,7 @@ const SINGLE_CALL_BALANCES_ADDRESSES = {
|
|
|
1038
1038
|
[AVALANCHE_MAINNET_CHAIN_ID]: "0xD023D153a0DFa485130ECFdE2FAA7e612EF94818",
|
|
1039
1039
|
[ARBITRUM_MAINNET_CHAIN_ID]: "0x151E24A486D7258dd7C33Fb67E4bB01919B7B32c"
|
|
1040
1040
|
};
|
|
1041
|
-
;//
|
|
1041
|
+
;// ./src/Account/AccountTrackerController.ts
|
|
1042
1042
|
|
|
1043
1043
|
|
|
1044
1044
|
|
|
@@ -1194,14 +1194,14 @@ class AccountTrackerController extends base_controllers_namespaceObject.BaseCont
|
|
|
1194
1194
|
}
|
|
1195
1195
|
}
|
|
1196
1196
|
}
|
|
1197
|
-
;//
|
|
1197
|
+
;// external "@ethereumjs/util"
|
|
1198
1198
|
const util_namespaceObject = require("@ethereumjs/util");
|
|
1199
|
-
;//
|
|
1199
|
+
;// external "bignumber.js"
|
|
1200
1200
|
const external_bignumber_js_namespaceObject = require("bignumber.js");
|
|
1201
1201
|
var external_bignumber_js_default = /*#__PURE__*/__webpack_require__.n(external_bignumber_js_namespaceObject);
|
|
1202
|
-
;//
|
|
1202
|
+
;// external "@web3auth/auth"
|
|
1203
1203
|
const auth_namespaceObject = require("@web3auth/auth");
|
|
1204
|
-
;//
|
|
1204
|
+
;// ./src/Transaction/TransactionUtils.ts
|
|
1205
1205
|
|
|
1206
1206
|
|
|
1207
1207
|
|
|
@@ -1525,7 +1525,7 @@ async function determineTransactionType(txParams, provider) {
|
|
|
1525
1525
|
getCodeResponse: contractCode
|
|
1526
1526
|
};
|
|
1527
1527
|
}
|
|
1528
|
-
;//
|
|
1528
|
+
;// ./src/utils/helpers.ts
|
|
1529
1529
|
|
|
1530
1530
|
|
|
1531
1531
|
|
|
@@ -1750,7 +1750,7 @@ const addEtherscanTransactions = async params => {
|
|
|
1750
1750
|
}, []);
|
|
1751
1751
|
return finalTxs;
|
|
1752
1752
|
};
|
|
1753
|
-
;//
|
|
1753
|
+
;// ./src/Block/PollingBlockTracker.ts
|
|
1754
1754
|
|
|
1755
1755
|
|
|
1756
1756
|
|
|
@@ -1831,9 +1831,9 @@ class PollingBlockTracker extends base_controllers_namespaceObject.BaseBlockTrac
|
|
|
1831
1831
|
}
|
|
1832
1832
|
}
|
|
1833
1833
|
}
|
|
1834
|
-
;//
|
|
1834
|
+
;// external "@toruslabs/http-helpers"
|
|
1835
1835
|
const http_helpers_namespaceObject = require("@toruslabs/http-helpers");
|
|
1836
|
-
;//
|
|
1836
|
+
;// ./src/Currency/CurrencyController.ts
|
|
1837
1837
|
|
|
1838
1838
|
|
|
1839
1839
|
|
|
@@ -1940,16 +1940,16 @@ class CurrencyController extends base_controllers_namespaceObject.BaseCurrencyCo
|
|
|
1940
1940
|
};
|
|
1941
1941
|
}
|
|
1942
1942
|
}
|
|
1943
|
-
;//
|
|
1943
|
+
;// external "@babel/runtime/helpers/objectDestructuringEmpty"
|
|
1944
1944
|
const objectDestructuringEmpty_namespaceObject = require("@babel/runtime/helpers/objectDestructuringEmpty");
|
|
1945
1945
|
var objectDestructuringEmpty_default = /*#__PURE__*/__webpack_require__.n(objectDestructuringEmpty_namespaceObject);
|
|
1946
|
-
;//
|
|
1946
|
+
;// external "@babel/runtime/helpers/objectWithoutProperties"
|
|
1947
1947
|
const objectWithoutProperties_namespaceObject = require("@babel/runtime/helpers/objectWithoutProperties");
|
|
1948
1948
|
var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties_namespaceObject);
|
|
1949
|
-
;//
|
|
1949
|
+
;// external "bn.js"
|
|
1950
1950
|
const external_bn_js_namespaceObject = require("bn.js");
|
|
1951
1951
|
var external_bn_js_default = /*#__PURE__*/__webpack_require__.n(external_bn_js_namespaceObject);
|
|
1952
|
-
;//
|
|
1952
|
+
;// ./src/utils/conversionUtils.ts
|
|
1953
1953
|
|
|
1954
1954
|
|
|
1955
1955
|
|
|
@@ -2190,7 +2190,7 @@ const hexWEIToDecGWEI = decGWEI => {
|
|
|
2190
2190
|
toDenomination: "GWEI"
|
|
2191
2191
|
});
|
|
2192
2192
|
};
|
|
2193
|
-
;//
|
|
2193
|
+
;// ./src/Gas/gasUtil.ts
|
|
2194
2194
|
|
|
2195
2195
|
|
|
2196
2196
|
|
|
@@ -2329,7 +2329,7 @@ function calculateTimeEstimate(maxPriorityFeePerGas, maxFeePerGas, gasFeeEstimat
|
|
|
2329
2329
|
upperTimeBound
|
|
2330
2330
|
};
|
|
2331
2331
|
}
|
|
2332
|
-
;//
|
|
2332
|
+
;// ./src/Gas/GasFeeController.ts
|
|
2333
2333
|
|
|
2334
2334
|
|
|
2335
2335
|
|
|
@@ -2539,7 +2539,7 @@ class GasFeeController extends base_controllers_namespaceObject.BaseController {
|
|
|
2539
2539
|
return calculateTimeEstimate(maxPriorityFeePerGas, maxFeePerGas, this.state.gasFeeEstimates);
|
|
2540
2540
|
}
|
|
2541
2541
|
}
|
|
2542
|
-
;//
|
|
2542
|
+
;// ./src/Keyring/KeyringController.ts
|
|
2543
2543
|
|
|
2544
2544
|
|
|
2545
2545
|
|
|
@@ -2632,7 +2632,7 @@ class KeyringController extends base_controllers_namespaceObject.BaseKeyringCont
|
|
|
2632
2632
|
return wallet;
|
|
2633
2633
|
}
|
|
2634
2634
|
}
|
|
2635
|
-
;//
|
|
2635
|
+
;// ./src/Message/AbstractMessageController.ts
|
|
2636
2636
|
|
|
2637
2637
|
|
|
2638
2638
|
|
|
@@ -2735,7 +2735,7 @@ class AbstractMessageController extends base_controllers_namespaceObject.BaseCon
|
|
|
2735
2735
|
});
|
|
2736
2736
|
}
|
|
2737
2737
|
}
|
|
2738
|
-
;//
|
|
2738
|
+
;// ./src/Message/utils.ts
|
|
2739
2739
|
|
|
2740
2740
|
|
|
2741
2741
|
const hexRe = /^[0-9A-Fa-f]+$/gu;
|
|
@@ -2838,7 +2838,7 @@ function validateSwitchChainData(data) {
|
|
|
2838
2838
|
throw new Error("Invalid switch chain params: please pass a valid hex chainId in params, for: ex: 0x1");
|
|
2839
2839
|
}
|
|
2840
2840
|
}
|
|
2841
|
-
;//
|
|
2841
|
+
;// ./src/Message/AddChainController.ts
|
|
2842
2842
|
|
|
2843
2843
|
|
|
2844
2844
|
|
|
@@ -2912,7 +2912,7 @@ class AddChainController extends AbstractMessageController {
|
|
|
2912
2912
|
return Promise.resolve(messageParams);
|
|
2913
2913
|
}
|
|
2914
2914
|
}
|
|
2915
|
-
;//
|
|
2915
|
+
;// ./src/Message/MessageController.ts
|
|
2916
2916
|
|
|
2917
2917
|
|
|
2918
2918
|
|
|
@@ -2985,7 +2985,7 @@ class MessageController extends AbstractMessageController {
|
|
|
2985
2985
|
return Promise.resolve(messageParams);
|
|
2986
2986
|
}
|
|
2987
2987
|
}
|
|
2988
|
-
;//
|
|
2988
|
+
;// ./src/Message/PersonalMessageController.ts
|
|
2989
2989
|
|
|
2990
2990
|
|
|
2991
2991
|
|
|
@@ -3058,7 +3058,7 @@ class PersonalMessageController extends AbstractMessageController {
|
|
|
3058
3058
|
return Promise.resolve(messageParams);
|
|
3059
3059
|
}
|
|
3060
3060
|
}
|
|
3061
|
-
;//
|
|
3061
|
+
;// ./src/Message/SwitchChainController.ts
|
|
3062
3062
|
|
|
3063
3063
|
|
|
3064
3064
|
|
|
@@ -3132,7 +3132,7 @@ class SwitchChainController extends AbstractMessageController {
|
|
|
3132
3132
|
return Promise.resolve(messageParams);
|
|
3133
3133
|
}
|
|
3134
3134
|
}
|
|
3135
|
-
;//
|
|
3135
|
+
;// ./src/Message/TypedMessageController.ts
|
|
3136
3136
|
|
|
3137
3137
|
|
|
3138
3138
|
|
|
@@ -3209,7 +3209,7 @@ class TypedMessageController extends AbstractMessageController {
|
|
|
3209
3209
|
return Promise.resolve(messageParams);
|
|
3210
3210
|
}
|
|
3211
3211
|
}
|
|
3212
|
-
;//
|
|
3212
|
+
;// ./src/Network/createEthereumMiddleware.ts
|
|
3213
3213
|
|
|
3214
3214
|
|
|
3215
3215
|
|
|
@@ -3496,10 +3496,10 @@ function createEthereumMiddleware(providerHandlers) {
|
|
|
3496
3496
|
processAddEthereumChain
|
|
3497
3497
|
})]);
|
|
3498
3498
|
}
|
|
3499
|
-
;//
|
|
3499
|
+
;// external "fast-safe-stringify"
|
|
3500
3500
|
const external_fast_safe_stringify_namespaceObject = require("fast-safe-stringify");
|
|
3501
3501
|
var external_fast_safe_stringify_default = /*#__PURE__*/__webpack_require__.n(external_fast_safe_stringify_namespaceObject);
|
|
3502
|
-
;//
|
|
3502
|
+
;// ./src/Network/cacheIdentifier.ts
|
|
3503
3503
|
|
|
3504
3504
|
let CacheStrategy = /*#__PURE__*/function (CacheStrategy) {
|
|
3505
3505
|
CacheStrategy["Block"] = "block";
|
|
@@ -3604,7 +3604,7 @@ function cacheIdentifierForRequest(request, skipBlockRef) {
|
|
|
3604
3604
|
}
|
|
3605
3605
|
return null;
|
|
3606
3606
|
}
|
|
3607
|
-
;//
|
|
3607
|
+
;// ./src/Network/createJsonRpcClient.ts
|
|
3608
3608
|
|
|
3609
3609
|
|
|
3610
3610
|
|
|
@@ -3662,7 +3662,7 @@ function createJsonRpcClient(providerConfig, networkConfig) {
|
|
|
3662
3662
|
blockTracker
|
|
3663
3663
|
};
|
|
3664
3664
|
}
|
|
3665
|
-
;//
|
|
3665
|
+
;// ./src/Network/NetworkController.ts
|
|
3666
3666
|
|
|
3667
3667
|
|
|
3668
3668
|
|
|
@@ -3859,7 +3859,7 @@ class NetworkController extends base_controllers_namespaceObject.BaseController
|
|
|
3859
3859
|
this.lookupNetwork();
|
|
3860
3860
|
}
|
|
3861
3861
|
}
|
|
3862
|
-
;//
|
|
3862
|
+
;// ./src/Nfts/NftHandler.ts
|
|
3863
3863
|
|
|
3864
3864
|
|
|
3865
3865
|
|
|
@@ -4035,10 +4035,10 @@ class NftHandler {
|
|
|
4035
4035
|
return contract[method](tokenId);
|
|
4036
4036
|
}
|
|
4037
4037
|
}
|
|
4038
|
-
;//
|
|
4038
|
+
;// external "deepmerge"
|
|
4039
4039
|
const external_deepmerge_namespaceObject = require("deepmerge");
|
|
4040
4040
|
var external_deepmerge_default = /*#__PURE__*/__webpack_require__.n(external_deepmerge_namespaceObject);
|
|
4041
|
-
;//
|
|
4041
|
+
;// ./src/Nfts/NftsController.ts
|
|
4042
4042
|
|
|
4043
4043
|
|
|
4044
4044
|
|
|
@@ -4247,7 +4247,7 @@ class NftsController extends base_controllers_namespaceObject.BaseController {
|
|
|
4247
4247
|
});
|
|
4248
4248
|
}
|
|
4249
4249
|
}
|
|
4250
|
-
;//
|
|
4250
|
+
;// ./src/Preferences/PreferencesController.ts
|
|
4251
4251
|
|
|
4252
4252
|
|
|
4253
4253
|
|
|
@@ -4728,7 +4728,7 @@ class PreferencesController extends base_controllers_namespaceObject.BasePrefere
|
|
|
4728
4728
|
return pastTx;
|
|
4729
4729
|
}
|
|
4730
4730
|
}
|
|
4731
|
-
;//
|
|
4731
|
+
;// ./src/Tokens/TokenHandler.ts
|
|
4732
4732
|
|
|
4733
4733
|
|
|
4734
4734
|
|
|
@@ -4775,7 +4775,7 @@ class TokenHandler {
|
|
|
4775
4775
|
return balance.toString(16);
|
|
4776
4776
|
}
|
|
4777
4777
|
}
|
|
4778
|
-
;//
|
|
4778
|
+
;// ./src/Tokens/TokenRatesController.ts
|
|
4779
4779
|
|
|
4780
4780
|
|
|
4781
4781
|
|
|
@@ -4882,7 +4882,7 @@ class TokenRatesController extends base_controllers_namespaceObject.BaseControll
|
|
|
4882
4882
|
return newContractExchangeRates;
|
|
4883
4883
|
}
|
|
4884
4884
|
}
|
|
4885
|
-
;//
|
|
4885
|
+
;// ./src/Tokens/TokensController.ts
|
|
4886
4886
|
|
|
4887
4887
|
|
|
4888
4888
|
|
|
@@ -5140,7 +5140,7 @@ class TokensController extends base_controllers_namespaceObject.BaseController {
|
|
|
5140
5140
|
});
|
|
5141
5141
|
}
|
|
5142
5142
|
}
|
|
5143
|
-
;//
|
|
5143
|
+
;// ./src/Transaction/NonceTracker.ts
|
|
5144
5144
|
|
|
5145
5145
|
// import assert from 'assert'
|
|
5146
5146
|
|
|
@@ -5288,7 +5288,7 @@ class NonceTracker {
|
|
|
5288
5288
|
};
|
|
5289
5289
|
}
|
|
5290
5290
|
}
|
|
5291
|
-
;//
|
|
5291
|
+
;// ./src/Transaction/PendingTransactionTracker.ts
|
|
5292
5292
|
|
|
5293
5293
|
|
|
5294
5294
|
|
|
@@ -5506,7 +5506,7 @@ class PendingTransactionTracker extends auth_namespaceObject.SafeEventEmitter {
|
|
|
5506
5506
|
});
|
|
5507
5507
|
}
|
|
5508
5508
|
}
|
|
5509
|
-
;//
|
|
5509
|
+
;// ./src/Transaction/TransactionGasUtil.ts
|
|
5510
5510
|
|
|
5511
5511
|
|
|
5512
5512
|
|
|
@@ -5583,7 +5583,7 @@ class TransactionGasUtil {
|
|
|
5583
5583
|
});
|
|
5584
5584
|
}
|
|
5585
5585
|
}
|
|
5586
|
-
;//
|
|
5586
|
+
;// ./src/utils/lodashUtils.ts
|
|
5587
5587
|
function sortBy(arr, key) {
|
|
5588
5588
|
return arr.slice().sort((a, b) => {
|
|
5589
5589
|
if (a[key] < b[key]) return -1;
|
|
@@ -5603,10 +5603,10 @@ function keyBy(arr, key) {
|
|
|
5603
5603
|
function mapValues(obj, iteratee) {
|
|
5604
5604
|
return Object.fromEntries(Object.entries(obj).map(([key, value]) => [key, iteratee(value, key)]));
|
|
5605
5605
|
}
|
|
5606
|
-
;//
|
|
5606
|
+
;// external "fast-json-patch"
|
|
5607
5607
|
const external_fast_json_patch_namespaceObject = require("fast-json-patch");
|
|
5608
5608
|
var external_fast_json_patch_default = /*#__PURE__*/__webpack_require__.n(external_fast_json_patch_namespaceObject);
|
|
5609
|
-
;//
|
|
5609
|
+
;// ./src/Transaction/TransactionStateHistoryHelper.ts
|
|
5610
5610
|
|
|
5611
5611
|
|
|
5612
5612
|
|
|
@@ -5643,7 +5643,7 @@ function snapshotFromTxMeta(txMeta) {
|
|
|
5643
5643
|
return (0,base_controllers_namespaceObject.cloneDeep)(shallow);
|
|
5644
5644
|
}
|
|
5645
5645
|
|
|
5646
|
-
;//
|
|
5646
|
+
;// ./src/Transaction/TransactionStateManager.ts
|
|
5647
5647
|
|
|
5648
5648
|
|
|
5649
5649
|
|
|
@@ -5935,7 +5935,7 @@ class TransactionStateManager extends base_controllers_namespaceObject.BaseTrans
|
|
|
5935
5935
|
}
|
|
5936
5936
|
}
|
|
5937
5937
|
}
|
|
5938
|
-
;//
|
|
5938
|
+
;// ./src/Transaction/TransactionController.ts
|
|
5939
5939
|
|
|
5940
5940
|
|
|
5941
5941
|
|
|
@@ -6426,7 +6426,7 @@ class TransactionController extends TransactionStateManager {
|
|
|
6426
6426
|
});
|
|
6427
6427
|
}
|
|
6428
6428
|
}
|
|
6429
|
-
;//
|
|
6429
|
+
;// ./src/index.ts
|
|
6430
6430
|
|
|
6431
6431
|
|
|
6432
6432
|
|