@toruslabs/ethereum-controllers 7.2.1 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ethereumControllers.umd.min.js +1 -1
- package/dist/lib.cjs/Account/AccountTrackerController.js +3 -2
- package/dist/lib.cjs/AccountAbstraction/AccountAbstractionController.js +0 -2
- package/dist/lib.cjs/Block/PollingBlockTracker.js +1 -3
- package/dist/lib.cjs/Currency/CurrencyController.js +0 -2
- package/dist/lib.cjs/Gas/GasFeeController.js +1 -3
- package/dist/lib.cjs/Gas/gasUtil.js +0 -1
- package/dist/lib.cjs/Keyring/KeyringController.js +0 -2
- package/dist/lib.cjs/Message/utils.js +4 -2
- package/dist/lib.cjs/Network/NetworkController.js +0 -4
- package/dist/lib.cjs/Network/cacheIdentifier.js +20 -14
- package/dist/lib.cjs/Nfts/NftsController.js +0 -1
- package/dist/lib.cjs/Preferences/PreferencesController.js +7 -10
- package/dist/lib.cjs/Tokens/TokenRatesController.js +0 -1
- package/dist/lib.cjs/Tokens/TokensController.js +24 -34
- package/dist/lib.cjs/Transaction/NonceTracker.js +2 -4
- package/dist/lib.cjs/Transaction/PendingTransactionTracker.js +3 -10
- package/dist/lib.cjs/Transaction/TransactionController.js +0 -6
- package/dist/lib.cjs/Transaction/TransactionGasUtil.js +0 -4
- package/dist/lib.cjs/Transaction/TransactionStateHistoryHelper.js +0 -1
- package/dist/lib.cjs/Transaction/TransactionStateManager.js +3 -11
- package/dist/lib.cjs/Transaction/TransactionUtils.js +1 -14
- package/dist/lib.cjs/index.js +10 -10
- package/dist/{types → lib.cjs/types}/Keyring/KeyringController.d.ts +1 -1
- package/dist/{types → lib.cjs/types}/Tokens/TokensController.d.ts +1 -1
- package/dist/lib.cjs/utils/constants.js +0 -1
- package/dist/lib.cjs/utils/conversionUtils.js +0 -4
- package/dist/lib.cjs/utils/helpers.js +0 -1
- package/dist/lib.esm/Account/AccountTrackerController.js +3 -1
- package/dist/lib.esm/Block/PollingBlockTracker.js +1 -1
- package/dist/lib.esm/Gas/GasFeeController.js +1 -1
- package/dist/lib.esm/Message/utils.js +4 -2
- package/dist/lib.esm/Network/cacheIdentifier.js +12 -0
- package/dist/lib.esm/Preferences/PreferencesController.js +7 -7
- package/dist/lib.esm/Tokens/TokenRatesController.js +3 -0
- package/dist/lib.esm/Tokens/TokensController.js +25 -33
- package/dist/lib.esm/Transaction/TransactionStateManager.js +1 -2
- package/dist/lib.esm/Transaction/TransactionUtils.js +2 -2
- package/dist/lib.esm/utils/contractAddresses.js +1 -1
- package/dist/lib.esm/utils/helpers.js +2 -2
- package/package.json +20 -18
- package/dist/757.ethereumControllers.cjs.js +0 -226
- package/dist/ethereumControllers.cjs.js +0 -24043
- package/dist/ethereumControllers.esm.js +0 -6314
- package/dist/lib.cjs/utils/lodashUtils.js +0 -25
- package/dist/lib.esm/utils/lodashUtils.js +0 -21
- package/dist/types/utils/lodashUtils.d.ts +0 -5
- /package/dist/{types → lib.cjs/types}/Account/AccountTrackerController.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/AccountAbstraction/AccountAbstractionController.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/AccountAbstraction/smartAccounts/BiconomySmartAccount.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/AccountAbstraction/smartAccounts/KernelSmartAccount.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/AccountAbstraction/smartAccounts/LightSmartAccount.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/AccountAbstraction/smartAccounts/NexusSmartAccount.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/AccountAbstraction/smartAccounts/SafeSmartAccount.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/AccountAbstraction/smartAccounts/SimpleSmartAccount.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/AccountAbstraction/smartAccounts/TrustSmartAccount.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/AccountAbstraction/smartAccounts/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/Block/PollingBlockTracker.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/Currency/CurrencyController.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/Gas/GasFeeController.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/Gas/IGasFeeController.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/Gas/gasUtil.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/Message/AddChainController.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/Message/MessageController.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/Message/PersonalMessageController.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/Message/SwitchChainController.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/Message/TypedMessageController.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/Message/types.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/Message/utils.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/Network/NetworkController.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/Network/cacheIdentifier.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/Network/createEthereumMiddleware.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/Network/createJsonRpcClient.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/Nfts/INftsController.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/Nfts/NftHandler.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/Nfts/NftsController.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/Preferences/IPreferencesController.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/Preferences/PreferencesController.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/Tokens/ITokensController.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/Tokens/TokenHandler.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/Tokens/TokenRatesController.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/Transaction/NonceTracker.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/Transaction/PendingTransactionTracker.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/Transaction/TransactionController.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/Transaction/TransactionGasUtil.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/Transaction/TransactionStateHistoryHelper.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/Transaction/TransactionStateManager.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/Transaction/TransactionUtils.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/utils/abis.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/utils/constants.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/utils/contractAddresses.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/utils/conversionUtils.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/utils/helpers.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/utils/interfaces.d.ts +0 -0
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function sortBy(arr, key) {
|
|
4
|
-
return arr.slice().sort((a, b) => {
|
|
5
|
-
if (a[key] < b[key]) return -1;
|
|
6
|
-
if (a[key] > b[key]) return 1;
|
|
7
|
-
return 0;
|
|
8
|
-
});
|
|
9
|
-
}
|
|
10
|
-
function keyBy(arr, key) {
|
|
11
|
-
return arr.reduce((acc, item) => {
|
|
12
|
-
const keyValue = item[key];
|
|
13
|
-
if (typeof keyValue === "string" || typeof keyValue === "number") {
|
|
14
|
-
acc[keyValue.toString()] = item;
|
|
15
|
-
}
|
|
16
|
-
return acc;
|
|
17
|
-
}, {});
|
|
18
|
-
}
|
|
19
|
-
function mapValues(obj, iteratee) {
|
|
20
|
-
return Object.fromEntries(Object.entries(obj).map(([key, value]) => [key, iteratee(value, key)]));
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
exports.keyBy = keyBy;
|
|
24
|
-
exports.mapValues = mapValues;
|
|
25
|
-
exports.sortBy = sortBy;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
function sortBy(arr, key) {
|
|
2
|
-
return arr.slice().sort((a, b) => {
|
|
3
|
-
if (a[key] < b[key]) return -1;
|
|
4
|
-
if (a[key] > b[key]) return 1;
|
|
5
|
-
return 0;
|
|
6
|
-
});
|
|
7
|
-
}
|
|
8
|
-
function keyBy(arr, key) {
|
|
9
|
-
return arr.reduce((acc, item) => {
|
|
10
|
-
const keyValue = item[key];
|
|
11
|
-
if (typeof keyValue === "string" || typeof keyValue === "number") {
|
|
12
|
-
acc[keyValue.toString()] = item;
|
|
13
|
-
}
|
|
14
|
-
return acc;
|
|
15
|
-
}, {});
|
|
16
|
-
}
|
|
17
|
-
function mapValues(obj, iteratee) {
|
|
18
|
-
return Object.fromEntries(Object.entries(obj).map(([key, value]) => [key, iteratee(value, key)]));
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export { keyBy, mapValues, sortBy };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare function sortBy<T>(arr: T[], key: keyof T): T[];
|
|
2
|
-
export declare function keyBy<T>(arr: T[], key: keyof T): Record<string, T>;
|
|
3
|
-
export declare function mapValues<T extends object, U>(obj: T, iteratee: (value: T[keyof T], key: keyof T) => U): {
|
|
4
|
-
[K in keyof T]: U;
|
|
5
|
-
};
|
|
File without changes
|
|
File without changes
|
/package/dist/{types → lib.cjs/types}/AccountAbstraction/smartAccounts/BiconomySmartAccount.d.ts
RENAMED
|
File without changes
|
/package/dist/{types → lib.cjs/types}/AccountAbstraction/smartAccounts/KernelSmartAccount.d.ts
RENAMED
|
File without changes
|
/package/dist/{types → lib.cjs/types}/AccountAbstraction/smartAccounts/LightSmartAccount.d.ts
RENAMED
|
File without changes
|
/package/dist/{types → lib.cjs/types}/AccountAbstraction/smartAccounts/NexusSmartAccount.d.ts
RENAMED
|
File without changes
|
/package/dist/{types → lib.cjs/types}/AccountAbstraction/smartAccounts/SafeSmartAccount.d.ts
RENAMED
|
File without changes
|
/package/dist/{types → lib.cjs/types}/AccountAbstraction/smartAccounts/SimpleSmartAccount.d.ts
RENAMED
|
File without changes
|
/package/dist/{types → lib.cjs/types}/AccountAbstraction/smartAccounts/TrustSmartAccount.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|