@metamask/assets-controller 0.2.0 → 2.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/CHANGELOG.md +39 -1
- package/dist/AssetsController-method-action-types.cjs +7 -0
- package/dist/AssetsController-method-action-types.cjs.map +1 -0
- package/dist/AssetsController-method-action-types.d.cts +78 -0
- package/dist/AssetsController-method-action-types.d.cts.map +1 -0
- package/dist/AssetsController-method-action-types.d.mts +78 -0
- package/dist/AssetsController-method-action-types.d.mts.map +1 -0
- package/dist/AssetsController-method-action-types.mjs +6 -0
- package/dist/AssetsController-method-action-types.mjs.map +1 -0
- package/dist/AssetsController.cjs +346 -271
- package/dist/AssetsController.cjs.map +1 -1
- package/dist/AssetsController.d.cts +92 -96
- package/dist/AssetsController.d.cts.map +1 -1
- package/dist/AssetsController.d.mts +92 -96
- package/dist/AssetsController.d.mts.map +1 -1
- package/dist/AssetsController.mjs +347 -272
- package/dist/AssetsController.mjs.map +1 -1
- package/dist/data-sources/AbstractDataSource.cjs +8 -0
- package/dist/data-sources/AbstractDataSource.cjs.map +1 -1
- package/dist/data-sources/AbstractDataSource.d.cts +16 -1
- package/dist/data-sources/AbstractDataSource.d.cts.map +1 -1
- package/dist/data-sources/AbstractDataSource.d.mts +16 -1
- package/dist/data-sources/AbstractDataSource.d.mts.map +1 -1
- package/dist/data-sources/AbstractDataSource.mjs +8 -0
- package/dist/data-sources/AbstractDataSource.mjs.map +1 -1
- package/dist/data-sources/AccountsApiDataSource.cjs +92 -111
- package/dist/data-sources/AccountsApiDataSource.cjs.map +1 -1
- package/dist/data-sources/AccountsApiDataSource.d.cts +27 -70
- package/dist/data-sources/AccountsApiDataSource.d.cts.map +1 -1
- package/dist/data-sources/AccountsApiDataSource.d.mts +27 -70
- package/dist/data-sources/AccountsApiDataSource.d.mts.map +1 -1
- package/dist/data-sources/AccountsApiDataSource.mjs +88 -107
- package/dist/data-sources/AccountsApiDataSource.mjs.map +1 -1
- package/dist/data-sources/BackendWebsocketDataSource.cjs +141 -46
- package/dist/data-sources/BackendWebsocketDataSource.cjs.map +1 -1
- package/dist/data-sources/BackendWebsocketDataSource.d.cts +19 -66
- package/dist/data-sources/BackendWebsocketDataSource.d.cts.map +1 -1
- package/dist/data-sources/BackendWebsocketDataSource.d.mts +19 -66
- package/dist/data-sources/BackendWebsocketDataSource.d.mts.map +1 -1
- package/dist/data-sources/BackendWebsocketDataSource.mjs +141 -46
- package/dist/data-sources/BackendWebsocketDataSource.mjs.map +1 -1
- package/dist/data-sources/PriceDataSource.cjs +39 -48
- package/dist/data-sources/PriceDataSource.cjs.map +1 -1
- package/dist/data-sources/PriceDataSource.d.cts +13 -92
- package/dist/data-sources/PriceDataSource.d.cts.map +1 -1
- package/dist/data-sources/PriceDataSource.d.mts +13 -92
- package/dist/data-sources/PriceDataSource.d.mts.map +1 -1
- package/dist/data-sources/PriceDataSource.mjs +39 -48
- package/dist/data-sources/PriceDataSource.mjs.map +1 -1
- package/dist/data-sources/RpcDataSource.cjs +184 -142
- package/dist/data-sources/RpcDataSource.cjs.map +1 -1
- package/dist/data-sources/RpcDataSource.d.cts +29 -114
- package/dist/data-sources/RpcDataSource.d.cts.map +1 -1
- package/dist/data-sources/RpcDataSource.d.mts +29 -114
- package/dist/data-sources/RpcDataSource.d.mts.map +1 -1
- package/dist/data-sources/RpcDataSource.mjs +185 -143
- package/dist/data-sources/RpcDataSource.mjs.map +1 -1
- package/dist/data-sources/SnapDataSource.cjs +53 -39
- package/dist/data-sources/SnapDataSource.cjs.map +1 -1
- package/dist/data-sources/SnapDataSource.d.cts +9 -45
- package/dist/data-sources/SnapDataSource.d.cts.map +1 -1
- package/dist/data-sources/SnapDataSource.d.mts +9 -45
- package/dist/data-sources/SnapDataSource.d.mts.map +1 -1
- package/dist/data-sources/SnapDataSource.mjs +53 -39
- package/dist/data-sources/SnapDataSource.mjs.map +1 -1
- package/dist/data-sources/StakedBalanceDataSource.cjs +609 -0
- package/dist/data-sources/StakedBalanceDataSource.cjs.map +1 -0
- package/dist/data-sources/StakedBalanceDataSource.d.cts +72 -0
- package/dist/data-sources/StakedBalanceDataSource.d.cts.map +1 -0
- package/dist/data-sources/StakedBalanceDataSource.d.mts +72 -0
- package/dist/data-sources/StakedBalanceDataSource.d.mts.map +1 -0
- package/dist/data-sources/StakedBalanceDataSource.mjs +605 -0
- package/dist/data-sources/StakedBalanceDataSource.mjs.map +1 -0
- package/dist/data-sources/TokenDataSource.cjs +15 -21
- package/dist/data-sources/TokenDataSource.cjs.map +1 -1
- package/dist/data-sources/TokenDataSource.d.cts +3 -25
- package/dist/data-sources/TokenDataSource.d.cts.map +1 -1
- package/dist/data-sources/TokenDataSource.d.mts +3 -25
- package/dist/data-sources/TokenDataSource.d.mts.map +1 -1
- package/dist/data-sources/TokenDataSource.mjs +15 -21
- package/dist/data-sources/TokenDataSource.mjs.map +1 -1
- package/dist/data-sources/evm-rpc-services/index.cjs +5 -1
- package/dist/data-sources/evm-rpc-services/index.cjs.map +1 -1
- package/dist/data-sources/evm-rpc-services/index.d.cts +1 -1
- package/dist/data-sources/evm-rpc-services/index.d.cts.map +1 -1
- package/dist/data-sources/evm-rpc-services/index.d.mts +1 -1
- package/dist/data-sources/evm-rpc-services/index.d.mts.map +1 -1
- package/dist/data-sources/evm-rpc-services/index.mjs +1 -1
- package/dist/data-sources/evm-rpc-services/index.mjs.map +1 -1
- package/dist/data-sources/evm-rpc-services/services/StakedBalanceFetcher.cjs +132 -0
- package/dist/data-sources/evm-rpc-services/services/StakedBalanceFetcher.cjs.map +1 -0
- package/dist/data-sources/evm-rpc-services/services/StakedBalanceFetcher.d.cts +78 -0
- package/dist/data-sources/evm-rpc-services/services/StakedBalanceFetcher.d.cts.map +1 -0
- package/dist/data-sources/evm-rpc-services/services/StakedBalanceFetcher.d.mts +78 -0
- package/dist/data-sources/evm-rpc-services/services/StakedBalanceFetcher.d.mts.map +1 -0
- package/dist/data-sources/evm-rpc-services/services/StakedBalanceFetcher.mjs +126 -0
- package/dist/data-sources/evm-rpc-services/services/StakedBalanceFetcher.mjs.map +1 -0
- package/dist/data-sources/evm-rpc-services/services/TokenDetector.cjs +16 -0
- package/dist/data-sources/evm-rpc-services/services/TokenDetector.cjs.map +1 -1
- package/dist/data-sources/evm-rpc-services/services/TokenDetector.d.cts +5 -1
- package/dist/data-sources/evm-rpc-services/services/TokenDetector.d.cts.map +1 -1
- package/dist/data-sources/evm-rpc-services/services/TokenDetector.d.mts +5 -1
- package/dist/data-sources/evm-rpc-services/services/TokenDetector.d.mts.map +1 -1
- package/dist/data-sources/evm-rpc-services/services/TokenDetector.mjs +16 -0
- package/dist/data-sources/evm-rpc-services/services/TokenDetector.mjs.map +1 -1
- package/dist/data-sources/evm-rpc-services/services/index.cjs +6 -1
- package/dist/data-sources/evm-rpc-services/services/index.cjs.map +1 -1
- package/dist/data-sources/evm-rpc-services/services/index.d.cts +1 -0
- package/dist/data-sources/evm-rpc-services/services/index.d.cts.map +1 -1
- package/dist/data-sources/evm-rpc-services/services/index.d.mts +1 -0
- package/dist/data-sources/evm-rpc-services/services/index.d.mts.map +1 -1
- package/dist/data-sources/evm-rpc-services/services/index.mjs +1 -0
- package/dist/data-sources/evm-rpc-services/services/index.mjs.map +1 -1
- package/dist/data-sources/evm-rpc-services/types/services.cjs.map +1 -1
- package/dist/data-sources/evm-rpc-services/types/services.d.cts +4 -0
- package/dist/data-sources/evm-rpc-services/types/services.d.cts.map +1 -1
- package/dist/data-sources/evm-rpc-services/types/services.d.mts +4 -0
- package/dist/data-sources/evm-rpc-services/types/services.d.mts.map +1 -1
- package/dist/data-sources/evm-rpc-services/types/services.mjs.map +1 -1
- package/dist/data-sources/evm-rpc-services/types/state.cjs.map +1 -1
- package/dist/data-sources/evm-rpc-services/types/state.d.cts +3 -3
- package/dist/data-sources/evm-rpc-services/types/state.d.cts.map +1 -1
- package/dist/data-sources/evm-rpc-services/types/state.d.mts +3 -3
- package/dist/data-sources/evm-rpc-services/types/state.d.mts.map +1 -1
- package/dist/data-sources/evm-rpc-services/types/state.mjs.map +1 -1
- package/dist/data-sources/evm-rpc-services/utils/index.cjs +9 -1
- package/dist/data-sources/evm-rpc-services/utils/index.cjs.map +1 -1
- package/dist/data-sources/evm-rpc-services/utils/index.d.cts +2 -0
- package/dist/data-sources/evm-rpc-services/utils/index.d.cts.map +1 -1
- package/dist/data-sources/evm-rpc-services/utils/index.d.mts +2 -0
- package/dist/data-sources/evm-rpc-services/utils/index.d.mts.map +1 -1
- package/dist/data-sources/evm-rpc-services/utils/index.mjs +2 -0
- package/dist/data-sources/evm-rpc-services/utils/index.mjs.map +1 -1
- package/dist/data-sources/evm-rpc-services/utils/parsing.cjs +47 -0
- package/dist/data-sources/evm-rpc-services/utils/parsing.cjs.map +1 -0
- package/dist/data-sources/evm-rpc-services/utils/parsing.d.cts +25 -0
- package/dist/data-sources/evm-rpc-services/utils/parsing.d.cts.map +1 -0
- package/dist/data-sources/evm-rpc-services/utils/parsing.d.mts +25 -0
- package/dist/data-sources/evm-rpc-services/utils/parsing.d.mts.map +1 -0
- package/dist/data-sources/evm-rpc-services/utils/parsing.mjs +39 -0
- package/dist/data-sources/evm-rpc-services/utils/parsing.mjs.map +1 -0
- package/dist/data-sources/evm-rpc-services/utils/staking-contracts.cjs +68 -0
- package/dist/data-sources/evm-rpc-services/utils/staking-contracts.cjs.map +1 -0
- package/dist/data-sources/evm-rpc-services/utils/staking-contracts.d.cts +25 -0
- package/dist/data-sources/evm-rpc-services/utils/staking-contracts.d.cts.map +1 -0
- package/dist/data-sources/evm-rpc-services/utils/staking-contracts.d.mts +25 -0
- package/dist/data-sources/evm-rpc-services/utils/staking-contracts.d.mts.map +1 -0
- package/dist/data-sources/evm-rpc-services/utils/staking-contracts.mjs +62 -0
- package/dist/data-sources/evm-rpc-services/utils/staking-contracts.mjs.map +1 -0
- package/dist/data-sources/index.cjs +3 -6
- package/dist/data-sources/index.cjs.map +1 -1
- package/dist/data-sources/index.d.cts +7 -7
- package/dist/data-sources/index.d.cts.map +1 -1
- package/dist/data-sources/index.d.mts +7 -7
- package/dist/data-sources/index.d.mts.map +1 -1
- package/dist/data-sources/index.mjs +2 -3
- package/dist/data-sources/index.mjs.map +1 -1
- package/dist/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -11
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +11 -11
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/dist/middlewares/DetectionMiddleware.cjs +8 -28
- package/dist/middlewares/DetectionMiddleware.cjs.map +1 -1
- package/dist/middlewares/DetectionMiddleware.d.cts +4 -26
- package/dist/middlewares/DetectionMiddleware.d.cts.map +1 -1
- package/dist/middlewares/DetectionMiddleware.d.mts +4 -26
- package/dist/middlewares/DetectionMiddleware.d.mts.map +1 -1
- package/dist/middlewares/DetectionMiddleware.mjs +8 -28
- package/dist/middlewares/DetectionMiddleware.mjs.map +1 -1
- package/dist/middlewares/index.cjs.map +1 -1
- package/dist/middlewares/index.d.cts +1 -1
- package/dist/middlewares/index.d.cts.map +1 -1
- package/dist/middlewares/index.d.mts +1 -1
- package/dist/middlewares/index.d.mts.map +1 -1
- package/dist/middlewares/index.mjs.map +1 -1
- package/dist/selectors/balance.cjs +306 -0
- package/dist/selectors/balance.cjs.map +1 -0
- package/dist/selectors/balance.d.cts +22 -0
- package/dist/selectors/balance.d.cts.map +1 -0
- package/dist/selectors/balance.d.mts +22 -0
- package/dist/selectors/balance.d.mts.map +1 -0
- package/dist/selectors/balance.mjs +297 -0
- package/dist/selectors/balance.mjs.map +1 -0
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +56 -21
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +56 -21
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs.map +1 -1
- package/package.json +13 -10
- package/dist/data-sources/initDataSources.cjs +0 -215
- package/dist/data-sources/initDataSources.cjs.map +0 -1
- package/dist/data-sources/initDataSources.d.cts +0 -140
- package/dist/data-sources/initDataSources.d.cts.map +0 -1
- package/dist/data-sources/initDataSources.d.mts +0 -140
- package/dist/data-sources/initDataSources.d.mts.map +0 -1
- package/dist/data-sources/initDataSources.mjs +0 -210
- package/dist/data-sources/initDataSources.mjs.map +0 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { isCaipChainId, isStrictHexString, numberToHex, parseCaipChainId } from "@metamask/utils";
|
|
2
|
+
import BigNumberJS from "bignumber.js";
|
|
3
|
+
/**
|
|
4
|
+
* Convert wei to human-readable amount with decimals, trim trailing zeros.
|
|
5
|
+
* Uses BigNumber for precision.
|
|
6
|
+
*
|
|
7
|
+
* Note: `.shiftedBy(-decimals).toFixed()` (no args) rounds to DECIMAL_PLACES (0
|
|
8
|
+
* by default in bignumber.js), producing integers (e.g. 1.5 ETH → "2").
|
|
9
|
+
* We use `.toFixed(decimals)` to preserve fractional precision, then trim
|
|
10
|
+
* trailing zeros so the result is e.g. "1.5" instead of "1.500000000000000000".
|
|
11
|
+
*
|
|
12
|
+
* @param wei - Balance in wei as bigint or decimal string.
|
|
13
|
+
* @param decimals - Token decimals (e.g. 18).
|
|
14
|
+
* @returns Human-readable amount string (e.g. "1.5").
|
|
15
|
+
*/
|
|
16
|
+
export function weiToHumanReadable(wei, decimals) {
|
|
17
|
+
const weiStr = typeof wei === 'bigint' ? wei.toString() : wei;
|
|
18
|
+
const fixed = new BigNumberJS(weiStr).shiftedBy(-decimals).toFixed(decimals);
|
|
19
|
+
const trimmed = fixed.replace(/\.?0+$/u, '');
|
|
20
|
+
return trimmed === '' ? '0' : trimmed;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Normalize chain ID to hex for contract lookup (e.g. eip155:1 -> 0x1).
|
|
24
|
+
* Uses @metamask/utils for CAIP parsing.
|
|
25
|
+
*
|
|
26
|
+
* @param chainId - CAIP-2 or hex chain ID.
|
|
27
|
+
* @returns Hex chain ID for contract map lookup.
|
|
28
|
+
*/
|
|
29
|
+
export function chainIdToHex(chainId) {
|
|
30
|
+
if (isStrictHexString(chainId)) {
|
|
31
|
+
return chainId;
|
|
32
|
+
}
|
|
33
|
+
if (isCaipChainId(chainId)) {
|
|
34
|
+
const { reference } = parseCaipChainId(chainId);
|
|
35
|
+
return numberToHex(parseInt(reference, 10));
|
|
36
|
+
}
|
|
37
|
+
return chainId;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=parsing.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parsing.mjs","sourceRoot":"","sources":["../../../../src/data-sources/evm-rpc-services/utils/parsing.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EACjB,wBAAwB;AAEzB,OAAO,WAAW,qBAAqB;AAIvC;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,kBAAkB,CAChC,GAAoB,EACpB,QAAgB;IAEhB,MAAM,MAAM,GAAG,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;IAC9D,MAAM,KAAK,GAAG,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC7E,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;IAC7C,OAAO,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC;AACxC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAAC,OAA8B;IACzD,IAAI,iBAAiB,CAAC,OAAO,CAAC,EAAE,CAAC;QAC/B,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,IAAI,aAAa,CAAC,OAAO,CAAC,EAAE,CAAC;QAC3B,MAAM,EAAE,SAAS,EAAE,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;QAChD,OAAO,WAAW,CAAC,QAAQ,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,CAAC;IAC9C,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC","sourcesContent":["import {\n isCaipChainId,\n isStrictHexString,\n numberToHex,\n parseCaipChainId,\n} from '@metamask/utils';\nimport type { CaipChainId, Hex } from '@metamask/utils';\nimport BigNumberJS from 'bignumber.js';\n\nimport type { ChainId } from '../types';\n\n/**\n * Convert wei to human-readable amount with decimals, trim trailing zeros.\n * Uses BigNumber for precision.\n *\n * Note: `.shiftedBy(-decimals).toFixed()` (no args) rounds to DECIMAL_PLACES (0\n * by default in bignumber.js), producing integers (e.g. 1.5 ETH → \"2\").\n * We use `.toFixed(decimals)` to preserve fractional precision, then trim\n * trailing zeros so the result is e.g. \"1.5\" instead of \"1.500000000000000000\".\n *\n * @param wei - Balance in wei as bigint or decimal string.\n * @param decimals - Token decimals (e.g. 18).\n * @returns Human-readable amount string (e.g. \"1.5\").\n */\nexport function weiToHumanReadable(\n wei: string | bigint,\n decimals: number,\n): string {\n const weiStr = typeof wei === 'bigint' ? wei.toString() : wei;\n const fixed = new BigNumberJS(weiStr).shiftedBy(-decimals).toFixed(decimals);\n const trimmed = fixed.replace(/\\.?0+$/u, '');\n return trimmed === '' ? '0' : trimmed;\n}\n\n/**\n * Normalize chain ID to hex for contract lookup (e.g. eip155:1 -> 0x1).\n * Uses @metamask/utils for CAIP parsing.\n *\n * @param chainId - CAIP-2 or hex chain ID.\n * @returns Hex chain ID for contract map lookup.\n */\nexport function chainIdToHex(chainId: ChainId | CaipChainId): Hex {\n if (isStrictHexString(chainId)) {\n return chainId;\n }\n if (isCaipChainId(chainId)) {\n const { reference } = parseCaipChainId(chainId);\n return numberToHex(parseInt(reference, 10));\n }\n return chainId;\n}\n"]}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isStakingContractAssetId = exports.getStakingContractAddress = exports.getSupportedStakingChainIds = exports.STAKING_CONTRACT_ADDRESS_BY_CHAINID = void 0;
|
|
4
|
+
const controller_utils_1 = require("@metamask/controller-utils");
|
|
5
|
+
const utils_1 = require("@metamask/utils");
|
|
6
|
+
/** Staking contract addresses by CAIP-2 chain ID (e.g. "eip155:1"). */
|
|
7
|
+
exports.STAKING_CONTRACT_ADDRESS_BY_CHAINID = {
|
|
8
|
+
'eip155:1': '0x4fef9d741011476750a243ac70b9789a63dd47df', // Mainnet
|
|
9
|
+
'eip155:560048': '0xe96ac18cfe5a7af8fe1fe7bc37ff110d88bc67ff', // Hoodi (0x88bb0)
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Normalize chain ID to CAIP-2 for lookup (e.g. "0x1" -> "eip155:1").
|
|
13
|
+
* Uses @metamask/utils for CAIP parsing.
|
|
14
|
+
*
|
|
15
|
+
* @param chainId - Hex chain ID (e.g. "0x1") or CAIP-2 (e.g. "eip155:1").
|
|
16
|
+
* @returns CAIP-2 chain ID.
|
|
17
|
+
*/
|
|
18
|
+
function toCaip2ChainId(chainId) {
|
|
19
|
+
if ((0, utils_1.isCaipChainId)(chainId)) {
|
|
20
|
+
return chainId;
|
|
21
|
+
}
|
|
22
|
+
const reference = (0, utils_1.isStrictHexString)(chainId)
|
|
23
|
+
? (0, controller_utils_1.convertHexToDecimal)(chainId).toString()
|
|
24
|
+
: chainId;
|
|
25
|
+
return (0, utils_1.toCaipChainId)(utils_1.KnownCaipNamespace.Eip155, reference);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Returns the set of CAIP-2 chain IDs that have a known staking contract.
|
|
29
|
+
*
|
|
30
|
+
* @returns Array of CAIP-2 chain IDs.
|
|
31
|
+
*/
|
|
32
|
+
function getSupportedStakingChainIds() {
|
|
33
|
+
return Object.keys(exports.STAKING_CONTRACT_ADDRESS_BY_CHAINID);
|
|
34
|
+
}
|
|
35
|
+
exports.getSupportedStakingChainIds = getSupportedStakingChainIds;
|
|
36
|
+
/**
|
|
37
|
+
* Returns the staking contract address for a chain, or undefined if not supported.
|
|
38
|
+
*
|
|
39
|
+
* @param chainId - Hex chain ID (e.g. "0x1") or CAIP-2 (e.g. "eip155:1").
|
|
40
|
+
* @returns Contract address (checksummed as stored) or undefined.
|
|
41
|
+
*/
|
|
42
|
+
function getStakingContractAddress(chainId) {
|
|
43
|
+
const caip2 = toCaip2ChainId(chainId);
|
|
44
|
+
return exports.STAKING_CONTRACT_ADDRESS_BY_CHAINID[caip2];
|
|
45
|
+
}
|
|
46
|
+
exports.getStakingContractAddress = getStakingContractAddress;
|
|
47
|
+
/**
|
|
48
|
+
* Returns true if the CAIP-19 asset ID is for a known staking contract.
|
|
49
|
+
* Used to skip fetching metadata for staking contracts from the tokens API.
|
|
50
|
+
* Uses @metamask/utils parseCaipAssetType for CAIP-19 parsing.
|
|
51
|
+
*
|
|
52
|
+
* @param assetId - CAIP-19 asset ID (e.g. "eip155:1/erc20:0x4fef9d741011476750a243ac70b9789a63dd47df").
|
|
53
|
+
* @returns True if the asset is a staking contract.
|
|
54
|
+
*/
|
|
55
|
+
function isStakingContractAssetId(assetId) {
|
|
56
|
+
if (!(0, utils_1.isCaipAssetType)(assetId)) {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
const parsed = (0, utils_1.parseCaipAssetType)(assetId);
|
|
60
|
+
if (parsed.assetNamespace !== 'erc20') {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
const address = parsed.assetReference.toLowerCase();
|
|
64
|
+
const stakingAddress = getStakingContractAddress(parsed.chainId)?.toLowerCase();
|
|
65
|
+
return stakingAddress !== undefined && address === stakingAddress;
|
|
66
|
+
}
|
|
67
|
+
exports.isStakingContractAssetId = isStakingContractAssetId;
|
|
68
|
+
//# sourceMappingURL=staking-contracts.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"staking-contracts.cjs","sourceRoot":"","sources":["../../../../src/data-sources/evm-rpc-services/utils/staking-contracts.ts"],"names":[],"mappings":";;;AAAA,iEAAiE;AACjE,2CAOyB;AAEzB,uEAAuE;AAC1D,QAAA,mCAAmC,GAA2B;IACzE,UAAU,EAAE,4CAA4C,EAAE,UAAU;IACpE,eAAe,EAAE,4CAA4C,EAAE,kBAAkB;CAClF,CAAC;AAEF;;;;;;GAMG;AACH,SAAS,cAAc,CAAC,OAAe;IACrC,IAAI,IAAA,qBAAa,EAAC,OAAO,CAAC,EAAE,CAAC;QAC3B,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,MAAM,SAAS,GAAG,IAAA,yBAAiB,EAAC,OAAO,CAAC;QAC1C,CAAC,CAAC,IAAA,sCAAmB,EAAC,OAAO,CAAC,CAAC,QAAQ,EAAE;QACzC,CAAC,CAAC,OAAO,CAAC;IACZ,OAAO,IAAA,qBAAa,EAAC,0BAAkB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AAC7D,CAAC;AAED;;;;GAIG;AACH,SAAgB,2BAA2B;IACzC,OAAO,MAAM,CAAC,IAAI,CAAC,2CAAmC,CAAC,CAAC;AAC1D,CAAC;AAFD,kEAEC;AAED;;;;;GAKG;AACH,SAAgB,yBAAyB,CAAC,OAAe;IACvD,MAAM,KAAK,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;IACtC,OAAO,2CAAmC,CAAC,KAAK,CAAC,CAAC;AACpD,CAAC;AAHD,8DAGC;AAED;;;;;;;GAOG;AACH,SAAgB,wBAAwB,CAAC,OAAe;IACtD,IAAI,CAAC,IAAA,uBAAe,EAAC,OAAO,CAAC,EAAE,CAAC;QAC9B,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,MAAM,GAAG,IAAA,0BAAkB,EAAC,OAAO,CAAC,CAAC;IAC3C,IAAI,MAAM,CAAC,cAAc,KAAK,OAAO,EAAE,CAAC;QACtC,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,OAAO,GAAG,MAAM,CAAC,cAAc,CAAC,WAAW,EAAE,CAAC;IACpD,MAAM,cAAc,GAAG,yBAAyB,CAC9C,MAAM,CAAC,OAAO,CACf,EAAE,WAAW,EAAE,CAAC;IACjB,OAAO,cAAc,KAAK,SAAS,IAAI,OAAO,KAAK,cAAc,CAAC;AACpE,CAAC;AAbD,4DAaC","sourcesContent":["import { convertHexToDecimal } from '@metamask/controller-utils';\nimport {\n isCaipAssetType,\n isCaipChainId,\n isStrictHexString,\n KnownCaipNamespace,\n parseCaipAssetType,\n toCaipChainId,\n} from '@metamask/utils';\n\n/** Staking contract addresses by CAIP-2 chain ID (e.g. \"eip155:1\"). */\nexport const STAKING_CONTRACT_ADDRESS_BY_CHAINID: Record<string, string> = {\n 'eip155:1': '0x4fef9d741011476750a243ac70b9789a63dd47df', // Mainnet\n 'eip155:560048': '0xe96ac18cfe5a7af8fe1fe7bc37ff110d88bc67ff', // Hoodi (0x88bb0)\n};\n\n/**\n * Normalize chain ID to CAIP-2 for lookup (e.g. \"0x1\" -> \"eip155:1\").\n * Uses @metamask/utils for CAIP parsing.\n *\n * @param chainId - Hex chain ID (e.g. \"0x1\") or CAIP-2 (e.g. \"eip155:1\").\n * @returns CAIP-2 chain ID.\n */\nfunction toCaip2ChainId(chainId: string): string {\n if (isCaipChainId(chainId)) {\n return chainId;\n }\n const reference = isStrictHexString(chainId)\n ? convertHexToDecimal(chainId).toString()\n : chainId;\n return toCaipChainId(KnownCaipNamespace.Eip155, reference);\n}\n\n/**\n * Returns the set of CAIP-2 chain IDs that have a known staking contract.\n *\n * @returns Array of CAIP-2 chain IDs.\n */\nexport function getSupportedStakingChainIds(): string[] {\n return Object.keys(STAKING_CONTRACT_ADDRESS_BY_CHAINID);\n}\n\n/**\n * Returns the staking contract address for a chain, or undefined if not supported.\n *\n * @param chainId - Hex chain ID (e.g. \"0x1\") or CAIP-2 (e.g. \"eip155:1\").\n * @returns Contract address (checksummed as stored) or undefined.\n */\nexport function getStakingContractAddress(chainId: string): string | undefined {\n const caip2 = toCaip2ChainId(chainId);\n return STAKING_CONTRACT_ADDRESS_BY_CHAINID[caip2];\n}\n\n/**\n * Returns true if the CAIP-19 asset ID is for a known staking contract.\n * Used to skip fetching metadata for staking contracts from the tokens API.\n * Uses @metamask/utils parseCaipAssetType for CAIP-19 parsing.\n *\n * @param assetId - CAIP-19 asset ID (e.g. \"eip155:1/erc20:0x4fef9d741011476750a243ac70b9789a63dd47df\").\n * @returns True if the asset is a staking contract.\n */\nexport function isStakingContractAssetId(assetId: string): boolean {\n if (!isCaipAssetType(assetId)) {\n return false;\n }\n const parsed = parseCaipAssetType(assetId);\n if (parsed.assetNamespace !== 'erc20') {\n return false;\n }\n const address = parsed.assetReference.toLowerCase();\n const stakingAddress = getStakingContractAddress(\n parsed.chainId,\n )?.toLowerCase();\n return stakingAddress !== undefined && address === stakingAddress;\n}\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** Staking contract addresses by CAIP-2 chain ID (e.g. "eip155:1"). */
|
|
2
|
+
export declare const STAKING_CONTRACT_ADDRESS_BY_CHAINID: Record<string, string>;
|
|
3
|
+
/**
|
|
4
|
+
* Returns the set of CAIP-2 chain IDs that have a known staking contract.
|
|
5
|
+
*
|
|
6
|
+
* @returns Array of CAIP-2 chain IDs.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getSupportedStakingChainIds(): string[];
|
|
9
|
+
/**
|
|
10
|
+
* Returns the staking contract address for a chain, or undefined if not supported.
|
|
11
|
+
*
|
|
12
|
+
* @param chainId - Hex chain ID (e.g. "0x1") or CAIP-2 (e.g. "eip155:1").
|
|
13
|
+
* @returns Contract address (checksummed as stored) or undefined.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getStakingContractAddress(chainId: string): string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Returns true if the CAIP-19 asset ID is for a known staking contract.
|
|
18
|
+
* Used to skip fetching metadata for staking contracts from the tokens API.
|
|
19
|
+
* Uses @metamask/utils parseCaipAssetType for CAIP-19 parsing.
|
|
20
|
+
*
|
|
21
|
+
* @param assetId - CAIP-19 asset ID (e.g. "eip155:1/erc20:0x4fef9d741011476750a243ac70b9789a63dd47df").
|
|
22
|
+
* @returns True if the asset is a staking contract.
|
|
23
|
+
*/
|
|
24
|
+
export declare function isStakingContractAssetId(assetId: string): boolean;
|
|
25
|
+
//# sourceMappingURL=staking-contracts.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"staking-contracts.d.cts","sourceRoot":"","sources":["../../../../src/data-sources/evm-rpc-services/utils/staking-contracts.ts"],"names":[],"mappings":"AAUA,uEAAuE;AACvE,eAAO,MAAM,mCAAmC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAGtE,CAAC;AAmBF;;;;GAIG;AACH,wBAAgB,2BAA2B,IAAI,MAAM,EAAE,CAEtD;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAG7E;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAajE"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** Staking contract addresses by CAIP-2 chain ID (e.g. "eip155:1"). */
|
|
2
|
+
export declare const STAKING_CONTRACT_ADDRESS_BY_CHAINID: Record<string, string>;
|
|
3
|
+
/**
|
|
4
|
+
* Returns the set of CAIP-2 chain IDs that have a known staking contract.
|
|
5
|
+
*
|
|
6
|
+
* @returns Array of CAIP-2 chain IDs.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getSupportedStakingChainIds(): string[];
|
|
9
|
+
/**
|
|
10
|
+
* Returns the staking contract address for a chain, or undefined if not supported.
|
|
11
|
+
*
|
|
12
|
+
* @param chainId - Hex chain ID (e.g. "0x1") or CAIP-2 (e.g. "eip155:1").
|
|
13
|
+
* @returns Contract address (checksummed as stored) or undefined.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getStakingContractAddress(chainId: string): string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Returns true if the CAIP-19 asset ID is for a known staking contract.
|
|
18
|
+
* Used to skip fetching metadata for staking contracts from the tokens API.
|
|
19
|
+
* Uses @metamask/utils parseCaipAssetType for CAIP-19 parsing.
|
|
20
|
+
*
|
|
21
|
+
* @param assetId - CAIP-19 asset ID (e.g. "eip155:1/erc20:0x4fef9d741011476750a243ac70b9789a63dd47df").
|
|
22
|
+
* @returns True if the asset is a staking contract.
|
|
23
|
+
*/
|
|
24
|
+
export declare function isStakingContractAssetId(assetId: string): boolean;
|
|
25
|
+
//# sourceMappingURL=staking-contracts.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"staking-contracts.d.mts","sourceRoot":"","sources":["../../../../src/data-sources/evm-rpc-services/utils/staking-contracts.ts"],"names":[],"mappings":"AAUA,uEAAuE;AACvE,eAAO,MAAM,mCAAmC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAGtE,CAAC;AAmBF;;;;GAIG;AACH,wBAAgB,2BAA2B,IAAI,MAAM,EAAE,CAEtD;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAG7E;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAajE"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { convertHexToDecimal } from "@metamask/controller-utils";
|
|
2
|
+
import { isCaipAssetType, isCaipChainId, isStrictHexString, KnownCaipNamespace, parseCaipAssetType, toCaipChainId } from "@metamask/utils";
|
|
3
|
+
/** Staking contract addresses by CAIP-2 chain ID (e.g. "eip155:1"). */
|
|
4
|
+
export const STAKING_CONTRACT_ADDRESS_BY_CHAINID = {
|
|
5
|
+
'eip155:1': '0x4fef9d741011476750a243ac70b9789a63dd47df', // Mainnet
|
|
6
|
+
'eip155:560048': '0xe96ac18cfe5a7af8fe1fe7bc37ff110d88bc67ff', // Hoodi (0x88bb0)
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Normalize chain ID to CAIP-2 for lookup (e.g. "0x1" -> "eip155:1").
|
|
10
|
+
* Uses @metamask/utils for CAIP parsing.
|
|
11
|
+
*
|
|
12
|
+
* @param chainId - Hex chain ID (e.g. "0x1") or CAIP-2 (e.g. "eip155:1").
|
|
13
|
+
* @returns CAIP-2 chain ID.
|
|
14
|
+
*/
|
|
15
|
+
function toCaip2ChainId(chainId) {
|
|
16
|
+
if (isCaipChainId(chainId)) {
|
|
17
|
+
return chainId;
|
|
18
|
+
}
|
|
19
|
+
const reference = isStrictHexString(chainId)
|
|
20
|
+
? convertHexToDecimal(chainId).toString()
|
|
21
|
+
: chainId;
|
|
22
|
+
return toCaipChainId(KnownCaipNamespace.Eip155, reference);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Returns the set of CAIP-2 chain IDs that have a known staking contract.
|
|
26
|
+
*
|
|
27
|
+
* @returns Array of CAIP-2 chain IDs.
|
|
28
|
+
*/
|
|
29
|
+
export function getSupportedStakingChainIds() {
|
|
30
|
+
return Object.keys(STAKING_CONTRACT_ADDRESS_BY_CHAINID);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Returns the staking contract address for a chain, or undefined if not supported.
|
|
34
|
+
*
|
|
35
|
+
* @param chainId - Hex chain ID (e.g. "0x1") or CAIP-2 (e.g. "eip155:1").
|
|
36
|
+
* @returns Contract address (checksummed as stored) or undefined.
|
|
37
|
+
*/
|
|
38
|
+
export function getStakingContractAddress(chainId) {
|
|
39
|
+
const caip2 = toCaip2ChainId(chainId);
|
|
40
|
+
return STAKING_CONTRACT_ADDRESS_BY_CHAINID[caip2];
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Returns true if the CAIP-19 asset ID is for a known staking contract.
|
|
44
|
+
* Used to skip fetching metadata for staking contracts from the tokens API.
|
|
45
|
+
* Uses @metamask/utils parseCaipAssetType for CAIP-19 parsing.
|
|
46
|
+
*
|
|
47
|
+
* @param assetId - CAIP-19 asset ID (e.g. "eip155:1/erc20:0x4fef9d741011476750a243ac70b9789a63dd47df").
|
|
48
|
+
* @returns True if the asset is a staking contract.
|
|
49
|
+
*/
|
|
50
|
+
export function isStakingContractAssetId(assetId) {
|
|
51
|
+
if (!isCaipAssetType(assetId)) {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
const parsed = parseCaipAssetType(assetId);
|
|
55
|
+
if (parsed.assetNamespace !== 'erc20') {
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
const address = parsed.assetReference.toLowerCase();
|
|
59
|
+
const stakingAddress = getStakingContractAddress(parsed.chainId)?.toLowerCase();
|
|
60
|
+
return stakingAddress !== undefined && address === stakingAddress;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=staking-contracts.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"staking-contracts.mjs","sourceRoot":"","sources":["../../../../src/data-sources/evm-rpc-services/utils/staking-contracts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,mCAAmC;AACjE,OAAO,EACL,eAAe,EACf,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACd,wBAAwB;AAEzB,uEAAuE;AACvE,MAAM,CAAC,MAAM,mCAAmC,GAA2B;IACzE,UAAU,EAAE,4CAA4C,EAAE,UAAU;IACpE,eAAe,EAAE,4CAA4C,EAAE,kBAAkB;CAClF,CAAC;AAEF;;;;;;GAMG;AACH,SAAS,cAAc,CAAC,OAAe;IACrC,IAAI,aAAa,CAAC,OAAO,CAAC,EAAE,CAAC;QAC3B,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,MAAM,SAAS,GAAG,iBAAiB,CAAC,OAAO,CAAC;QAC1C,CAAC,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE;QACzC,CAAC,CAAC,OAAO,CAAC;IACZ,OAAO,aAAa,CAAC,kBAAkB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AAC7D,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,2BAA2B;IACzC,OAAO,MAAM,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC;AAC1D,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,yBAAyB,CAAC,OAAe;IACvD,MAAM,KAAK,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;IACtC,OAAO,mCAAmC,CAAC,KAAK,CAAC,CAAC;AACpD,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,wBAAwB,CAAC,OAAe;IACtD,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,CAAC;QAC9B,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,MAAM,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAC3C,IAAI,MAAM,CAAC,cAAc,KAAK,OAAO,EAAE,CAAC;QACtC,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,OAAO,GAAG,MAAM,CAAC,cAAc,CAAC,WAAW,EAAE,CAAC;IACpD,MAAM,cAAc,GAAG,yBAAyB,CAC9C,MAAM,CAAC,OAAO,CACf,EAAE,WAAW,EAAE,CAAC;IACjB,OAAO,cAAc,KAAK,SAAS,IAAI,OAAO,KAAK,cAAc,CAAC;AACpE,CAAC","sourcesContent":["import { convertHexToDecimal } from '@metamask/controller-utils';\nimport {\n isCaipAssetType,\n isCaipChainId,\n isStrictHexString,\n KnownCaipNamespace,\n parseCaipAssetType,\n toCaipChainId,\n} from '@metamask/utils';\n\n/** Staking contract addresses by CAIP-2 chain ID (e.g. \"eip155:1\"). */\nexport const STAKING_CONTRACT_ADDRESS_BY_CHAINID: Record<string, string> = {\n 'eip155:1': '0x4fef9d741011476750a243ac70b9789a63dd47df', // Mainnet\n 'eip155:560048': '0xe96ac18cfe5a7af8fe1fe7bc37ff110d88bc67ff', // Hoodi (0x88bb0)\n};\n\n/**\n * Normalize chain ID to CAIP-2 for lookup (e.g. \"0x1\" -> \"eip155:1\").\n * Uses @metamask/utils for CAIP parsing.\n *\n * @param chainId - Hex chain ID (e.g. \"0x1\") or CAIP-2 (e.g. \"eip155:1\").\n * @returns CAIP-2 chain ID.\n */\nfunction toCaip2ChainId(chainId: string): string {\n if (isCaipChainId(chainId)) {\n return chainId;\n }\n const reference = isStrictHexString(chainId)\n ? convertHexToDecimal(chainId).toString()\n : chainId;\n return toCaipChainId(KnownCaipNamespace.Eip155, reference);\n}\n\n/**\n * Returns the set of CAIP-2 chain IDs that have a known staking contract.\n *\n * @returns Array of CAIP-2 chain IDs.\n */\nexport function getSupportedStakingChainIds(): string[] {\n return Object.keys(STAKING_CONTRACT_ADDRESS_BY_CHAINID);\n}\n\n/**\n * Returns the staking contract address for a chain, or undefined if not supported.\n *\n * @param chainId - Hex chain ID (e.g. \"0x1\") or CAIP-2 (e.g. \"eip155:1\").\n * @returns Contract address (checksummed as stored) or undefined.\n */\nexport function getStakingContractAddress(chainId: string): string | undefined {\n const caip2 = toCaip2ChainId(chainId);\n return STAKING_CONTRACT_ADDRESS_BY_CHAINID[caip2];\n}\n\n/**\n * Returns true if the CAIP-19 asset ID is for a known staking contract.\n * Used to skip fetching metadata for staking contracts from the tokens API.\n * Uses @metamask/utils parseCaipAssetType for CAIP-19 parsing.\n *\n * @param assetId - CAIP-19 asset ID (e.g. \"eip155:1/erc20:0x4fef9d741011476750a243ac70b9789a63dd47df\").\n * @returns True if the asset is a staking contract.\n */\nexport function isStakingContractAssetId(assetId: string): boolean {\n if (!isCaipAssetType(assetId)) {\n return false;\n }\n const parsed = parseCaipAssetType(assetId);\n if (parsed.assetNamespace !== 'erc20') {\n return false;\n }\n const address = parsed.assetReference.toLowerCase();\n const stakingAddress = getStakingContractAddress(\n parsed.chainId,\n )?.toLowerCase();\n return stakingAddress !== undefined && address === stakingAddress;\n}\n"]}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.StakedBalanceDataSource = exports.extractChainFromAssetId = exports.getChainIdsCaveat = exports.KEYRING_PERMISSION = exports.SNAP_DATA_SOURCE_NAME = exports.createSnapDataSource = exports.SnapDataSource = exports.PriceDataSource = exports.TokenDataSource = exports.createRpcDataSource = exports.RpcDataSource = exports.createBackendWebsocketDataSource = exports.BackendWebsocketDataSource = exports.AccountsApiDataSource = exports.AbstractDataSource = void 0;
|
|
4
4
|
var AbstractDataSource_1 = require("./AbstractDataSource.cjs");
|
|
5
5
|
Object.defineProperty(exports, "AbstractDataSource", { enumerable: true, get: function () { return AbstractDataSource_1.AbstractDataSource; } });
|
|
6
6
|
var AccountsApiDataSource_1 = require("./AccountsApiDataSource.cjs");
|
|
7
7
|
Object.defineProperty(exports, "AccountsApiDataSource", { enumerable: true, get: function () { return AccountsApiDataSource_1.AccountsApiDataSource; } });
|
|
8
|
-
Object.defineProperty(exports, "createAccountsApiDataSource", { enumerable: true, get: function () { return AccountsApiDataSource_1.createAccountsApiDataSource; } });
|
|
9
8
|
var BackendWebsocketDataSource_1 = require("./BackendWebsocketDataSource.cjs");
|
|
10
9
|
Object.defineProperty(exports, "BackendWebsocketDataSource", { enumerable: true, get: function () { return BackendWebsocketDataSource_1.BackendWebsocketDataSource; } });
|
|
11
10
|
Object.defineProperty(exports, "createBackendWebsocketDataSource", { enumerable: true, get: function () { return BackendWebsocketDataSource_1.createBackendWebsocketDataSource; } });
|
|
@@ -26,8 +25,6 @@ Object.defineProperty(exports, "KEYRING_PERMISSION", { enumerable: true, get: fu
|
|
|
26
25
|
// Utility functions
|
|
27
26
|
Object.defineProperty(exports, "getChainIdsCaveat", { enumerable: true, get: function () { return SnapDataSource_1.getChainIdsCaveat; } });
|
|
28
27
|
Object.defineProperty(exports, "extractChainFromAssetId", { enumerable: true, get: function () { return SnapDataSource_1.extractChainFromAssetId; } });
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
Object.defineProperty(exports, "initMessengers", { enumerable: true, get: function () { return initDataSources_1.initMessengers; } });
|
|
32
|
-
Object.defineProperty(exports, "initDataSources", { enumerable: true, get: function () { return initDataSources_1.initDataSources; } });
|
|
28
|
+
var StakedBalanceDataSource_1 = require("./StakedBalanceDataSource.cjs");
|
|
29
|
+
Object.defineProperty(exports, "StakedBalanceDataSource", { enumerable: true, get: function () { return StakedBalanceDataSource_1.StakedBalanceDataSource; } });
|
|
33
30
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../src/data-sources/index.ts"],"names":[],"mappings":";;;AAAA,+DAI8B;AAH5B,wHAAA,kBAAkB,OAAA;AAKpB,
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../src/data-sources/index.ts"],"names":[],"mappings":";;;AAAA,+DAI8B;AAH5B,wHAAA,kBAAkB,OAAA;AAKpB,qEAMiC;AAL/B,8HAAA,qBAAqB,OAAA;AAOvB,+EAOsC;AANpC,wIAAA,0BAA0B,OAAA;AAC1B,8IAAA,gCAAgC,OAAA;AAOlC,qDASyB;AARvB,8GAAA,aAAa,OAAA;AACb,oHAAA,mBAAmB,OAAA;AASrB,yDAI2B;AAHzB,kHAAA,eAAe,OAAA;AAKjB,yDAI2B;AAHzB,kHAAA,eAAe,OAAA;AAKjB,0FAA0F;AAC1F,uDAc0B;AAbxB,gHAAA,cAAc,OAAA;AACd,sHAAA,oBAAoB,OAAA;AACpB,uHAAA,qBAAqB,OAAA;AACrB,YAAY;AACZ,oHAAA,kBAAkB,OAAA;AAClB,oBAAoB;AACpB,mHAAA,iBAAiB,OAAA;AACjB,yHAAA,uBAAuB,OAAA;AAQzB,yEAImC;AAHjC,kIAAA,uBAAuB,OAAA","sourcesContent":["export {\n AbstractDataSource,\n type DataSourceState,\n type SubscriptionRequest,\n} from './AbstractDataSource';\n\nexport {\n AccountsApiDataSource,\n type AccountsApiDataSourceConfig,\n type AccountsApiDataSourceOptions,\n type AccountsApiDataSourceState,\n type AccountsApiDataSourceAllowedActions,\n} from './AccountsApiDataSource';\n\nexport {\n BackendWebsocketDataSource,\n createBackendWebsocketDataSource,\n type BackendWebsocketDataSourceOptions,\n type BackendWebsocketDataSourceState,\n type BackendWebsocketDataSourceAllowedActions,\n type BackendWebsocketDataSourceAllowedEvents,\n} from './BackendWebsocketDataSource';\n\nexport {\n RpcDataSource,\n createRpcDataSource,\n type RpcDataSourceConfig,\n type RpcDataSourceOptions,\n type RpcDataSourceState,\n type RpcDataSourceAllowedActions,\n type RpcDataSourceAllowedEvents,\n type ChainStatus,\n} from './RpcDataSource';\n\nexport {\n TokenDataSource,\n type TokenDataSourceOptions,\n type TokenDataSourceAllowedActions,\n} from './TokenDataSource';\n\nexport {\n PriceDataSource,\n type PriceDataSourceConfig,\n type PriceDataSourceOptions,\n} from './PriceDataSource';\n\n// Unified Snap Data Source (dynamically discovers keyring snaps via PermissionController)\nexport {\n SnapDataSource,\n createSnapDataSource,\n SNAP_DATA_SOURCE_NAME,\n // Constants\n KEYRING_PERMISSION,\n // Utility functions\n getChainIdsCaveat,\n extractChainFromAssetId,\n // Types\n type SnapDataSourceState,\n type SnapDataSourceOptions,\n type SnapDataSourceAllowedActions,\n type SnapDataSourceAllowedEvents,\n} from './SnapDataSource';\n\nexport {\n StakedBalanceDataSource,\n type StakedBalanceDataSourceConfig,\n type StakedBalanceDataSourceOptions,\n} from './StakedBalanceDataSource';\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { AbstractDataSource, type DataSourceState, type SubscriptionRequest, } from "./AbstractDataSource.cjs";
|
|
2
|
-
export { AccountsApiDataSource,
|
|
3
|
-
export { BackendWebsocketDataSource, createBackendWebsocketDataSource, type BackendWebsocketDataSourceOptions, type BackendWebsocketDataSourceState, type
|
|
4
|
-
export { RpcDataSource, createRpcDataSource, type
|
|
5
|
-
export { TokenDataSource, type TokenDataSourceOptions, type
|
|
6
|
-
export { PriceDataSource, type
|
|
7
|
-
export { SnapDataSource, createSnapDataSource, SNAP_DATA_SOURCE_NAME, KEYRING_PERMISSION, getChainIdsCaveat, extractChainFromAssetId, type SnapDataSourceState, type SnapDataSourceOptions, type
|
|
8
|
-
export {
|
|
2
|
+
export { AccountsApiDataSource, type AccountsApiDataSourceConfig, type AccountsApiDataSourceOptions, type AccountsApiDataSourceState, type AccountsApiDataSourceAllowedActions, } from "./AccountsApiDataSource.cjs";
|
|
3
|
+
export { BackendWebsocketDataSource, createBackendWebsocketDataSource, type BackendWebsocketDataSourceOptions, type BackendWebsocketDataSourceState, type BackendWebsocketDataSourceAllowedActions, type BackendWebsocketDataSourceAllowedEvents, } from "./BackendWebsocketDataSource.cjs";
|
|
4
|
+
export { RpcDataSource, createRpcDataSource, type RpcDataSourceConfig, type RpcDataSourceOptions, type RpcDataSourceState, type RpcDataSourceAllowedActions, type RpcDataSourceAllowedEvents, type ChainStatus, } from "./RpcDataSource.cjs";
|
|
5
|
+
export { TokenDataSource, type TokenDataSourceOptions, type TokenDataSourceAllowedActions, } from "./TokenDataSource.cjs";
|
|
6
|
+
export { PriceDataSource, type PriceDataSourceConfig, type PriceDataSourceOptions, } from "./PriceDataSource.cjs";
|
|
7
|
+
export { SnapDataSource, createSnapDataSource, SNAP_DATA_SOURCE_NAME, KEYRING_PERMISSION, getChainIdsCaveat, extractChainFromAssetId, type SnapDataSourceState, type SnapDataSourceOptions, type SnapDataSourceAllowedActions, type SnapDataSourceAllowedEvents, } from "./SnapDataSource.cjs";
|
|
8
|
+
export { StakedBalanceDataSource, type StakedBalanceDataSourceConfig, type StakedBalanceDataSourceOptions, } from "./StakedBalanceDataSource.cjs";
|
|
9
9
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../src/data-sources/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,KAAK,eAAe,EACpB,KAAK,mBAAmB,GACzB,iCAA6B;AAE9B,OAAO,EACL,qBAAqB,EACrB,2BAA2B,
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../src/data-sources/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,KAAK,eAAe,EACpB,KAAK,mBAAmB,GACzB,iCAA6B;AAE9B,OAAO,EACL,qBAAqB,EACrB,KAAK,2BAA2B,EAChC,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,EAC/B,KAAK,mCAAmC,GACzC,oCAAgC;AAEjC,OAAO,EACL,0BAA0B,EAC1B,gCAAgC,EAChC,KAAK,iCAAiC,EACtC,KAAK,+BAA+B,EACpC,KAAK,wCAAwC,EAC7C,KAAK,uCAAuC,GAC7C,yCAAqC;AAEtC,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,EAC/B,KAAK,WAAW,GACjB,4BAAwB;AAEzB,OAAO,EACL,eAAe,EACf,KAAK,sBAAsB,EAC3B,KAAK,6BAA6B,GACnC,8BAA0B;AAE3B,OAAO,EACL,eAAe,EACf,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,GAC5B,8BAA0B;AAG3B,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,qBAAqB,EAErB,kBAAkB,EAElB,iBAAiB,EACjB,uBAAuB,EAEvB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,4BAA4B,EACjC,KAAK,2BAA2B,GACjC,6BAAyB;AAE1B,OAAO,EACL,uBAAuB,EACvB,KAAK,6BAA6B,EAClC,KAAK,8BAA8B,GACpC,sCAAkC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { AbstractDataSource, type DataSourceState, type SubscriptionRequest, } from "./AbstractDataSource.mjs";
|
|
2
|
-
export { AccountsApiDataSource,
|
|
3
|
-
export { BackendWebsocketDataSource, createBackendWebsocketDataSource, type BackendWebsocketDataSourceOptions, type BackendWebsocketDataSourceState, type
|
|
4
|
-
export { RpcDataSource, createRpcDataSource, type
|
|
5
|
-
export { TokenDataSource, type TokenDataSourceOptions, type
|
|
6
|
-
export { PriceDataSource, type
|
|
7
|
-
export { SnapDataSource, createSnapDataSource, SNAP_DATA_SOURCE_NAME, KEYRING_PERMISSION, getChainIdsCaveat, extractChainFromAssetId, type SnapDataSourceState, type SnapDataSourceOptions, type
|
|
8
|
-
export {
|
|
2
|
+
export { AccountsApiDataSource, type AccountsApiDataSourceConfig, type AccountsApiDataSourceOptions, type AccountsApiDataSourceState, type AccountsApiDataSourceAllowedActions, } from "./AccountsApiDataSource.mjs";
|
|
3
|
+
export { BackendWebsocketDataSource, createBackendWebsocketDataSource, type BackendWebsocketDataSourceOptions, type BackendWebsocketDataSourceState, type BackendWebsocketDataSourceAllowedActions, type BackendWebsocketDataSourceAllowedEvents, } from "./BackendWebsocketDataSource.mjs";
|
|
4
|
+
export { RpcDataSource, createRpcDataSource, type RpcDataSourceConfig, type RpcDataSourceOptions, type RpcDataSourceState, type RpcDataSourceAllowedActions, type RpcDataSourceAllowedEvents, type ChainStatus, } from "./RpcDataSource.mjs";
|
|
5
|
+
export { TokenDataSource, type TokenDataSourceOptions, type TokenDataSourceAllowedActions, } from "./TokenDataSource.mjs";
|
|
6
|
+
export { PriceDataSource, type PriceDataSourceConfig, type PriceDataSourceOptions, } from "./PriceDataSource.mjs";
|
|
7
|
+
export { SnapDataSource, createSnapDataSource, SNAP_DATA_SOURCE_NAME, KEYRING_PERMISSION, getChainIdsCaveat, extractChainFromAssetId, type SnapDataSourceState, type SnapDataSourceOptions, type SnapDataSourceAllowedActions, type SnapDataSourceAllowedEvents, } from "./SnapDataSource.mjs";
|
|
8
|
+
export { StakedBalanceDataSource, type StakedBalanceDataSourceConfig, type StakedBalanceDataSourceOptions, } from "./StakedBalanceDataSource.mjs";
|
|
9
9
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/data-sources/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,KAAK,eAAe,EACpB,KAAK,mBAAmB,GACzB,iCAA6B;AAE9B,OAAO,EACL,qBAAqB,EACrB,2BAA2B,
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/data-sources/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,KAAK,eAAe,EACpB,KAAK,mBAAmB,GACzB,iCAA6B;AAE9B,OAAO,EACL,qBAAqB,EACrB,KAAK,2BAA2B,EAChC,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,EAC/B,KAAK,mCAAmC,GACzC,oCAAgC;AAEjC,OAAO,EACL,0BAA0B,EAC1B,gCAAgC,EAChC,KAAK,iCAAiC,EACtC,KAAK,+BAA+B,EACpC,KAAK,wCAAwC,EAC7C,KAAK,uCAAuC,GAC7C,yCAAqC;AAEtC,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,EAC/B,KAAK,WAAW,GACjB,4BAAwB;AAEzB,OAAO,EACL,eAAe,EACf,KAAK,sBAAsB,EAC3B,KAAK,6BAA6B,GACnC,8BAA0B;AAE3B,OAAO,EACL,eAAe,EACf,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,GAC5B,8BAA0B;AAG3B,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,qBAAqB,EAErB,kBAAkB,EAElB,iBAAiB,EACjB,uBAAuB,EAEvB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,4BAA4B,EACjC,KAAK,2BAA2B,GACjC,6BAAyB;AAE1B,OAAO,EACL,uBAAuB,EACvB,KAAK,6BAA6B,EAClC,KAAK,8BAA8B,GACpC,sCAAkC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { AbstractDataSource } from "./AbstractDataSource.mjs";
|
|
2
|
-
export { AccountsApiDataSource
|
|
2
|
+
export { AccountsApiDataSource } from "./AccountsApiDataSource.mjs";
|
|
3
3
|
export { BackendWebsocketDataSource, createBackendWebsocketDataSource } from "./BackendWebsocketDataSource.mjs";
|
|
4
4
|
export { RpcDataSource, createRpcDataSource } from "./RpcDataSource.mjs";
|
|
5
5
|
export { TokenDataSource } from "./TokenDataSource.mjs";
|
|
@@ -10,6 +10,5 @@ export { SnapDataSource, createSnapDataSource, SNAP_DATA_SOURCE_NAME,
|
|
|
10
10
|
KEYRING_PERMISSION,
|
|
11
11
|
// Utility functions
|
|
12
12
|
getChainIdsCaveat, extractChainFromAssetId } from "./SnapDataSource.mjs";
|
|
13
|
-
|
|
14
|
-
export { initMessengers, initDataSources } from "./initDataSources.mjs";
|
|
13
|
+
export { StakedBalanceDataSource } from "./StakedBalanceDataSource.mjs";
|
|
15
14
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/data-sources/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAGnB,iCAA6B;AAE9B,OAAO,EACL,qBAAqB,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/data-sources/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAGnB,iCAA6B;AAE9B,OAAO,EACL,qBAAqB,EAKtB,oCAAgC;AAEjC,OAAO,EACL,0BAA0B,EAC1B,gCAAgC,EAKjC,yCAAqC;AAEtC,OAAO,EACL,aAAa,EACb,mBAAmB,EAOpB,4BAAwB;AAEzB,OAAO,EACL,eAAe,EAGhB,8BAA0B;AAE3B,OAAO,EACL,eAAe,EAGhB,8BAA0B;AAE3B,0FAA0F;AAC1F,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,qBAAqB;AACrB,YAAY;AACZ,kBAAkB;AAClB,oBAAoB;AACpB,iBAAiB,EACjB,uBAAuB,EAMxB,6BAAyB;AAE1B,OAAO,EACL,uBAAuB,EAGxB,sCAAkC","sourcesContent":["export {\n AbstractDataSource,\n type DataSourceState,\n type SubscriptionRequest,\n} from './AbstractDataSource';\n\nexport {\n AccountsApiDataSource,\n type AccountsApiDataSourceConfig,\n type AccountsApiDataSourceOptions,\n type AccountsApiDataSourceState,\n type AccountsApiDataSourceAllowedActions,\n} from './AccountsApiDataSource';\n\nexport {\n BackendWebsocketDataSource,\n createBackendWebsocketDataSource,\n type BackendWebsocketDataSourceOptions,\n type BackendWebsocketDataSourceState,\n type BackendWebsocketDataSourceAllowedActions,\n type BackendWebsocketDataSourceAllowedEvents,\n} from './BackendWebsocketDataSource';\n\nexport {\n RpcDataSource,\n createRpcDataSource,\n type RpcDataSourceConfig,\n type RpcDataSourceOptions,\n type RpcDataSourceState,\n type RpcDataSourceAllowedActions,\n type RpcDataSourceAllowedEvents,\n type ChainStatus,\n} from './RpcDataSource';\n\nexport {\n TokenDataSource,\n type TokenDataSourceOptions,\n type TokenDataSourceAllowedActions,\n} from './TokenDataSource';\n\nexport {\n PriceDataSource,\n type PriceDataSourceConfig,\n type PriceDataSourceOptions,\n} from './PriceDataSource';\n\n// Unified Snap Data Source (dynamically discovers keyring snaps via PermissionController)\nexport {\n SnapDataSource,\n createSnapDataSource,\n SNAP_DATA_SOURCE_NAME,\n // Constants\n KEYRING_PERMISSION,\n // Utility functions\n getChainIdsCaveat,\n extractChainFromAssetId,\n // Types\n type SnapDataSourceState,\n type SnapDataSourceOptions,\n type SnapDataSourceAllowedActions,\n type SnapDataSourceAllowedEvents,\n} from './SnapDataSource';\n\nexport {\n StakedBalanceDataSource,\n type StakedBalanceDataSourceConfig,\n type StakedBalanceDataSourceOptions,\n} from './StakedBalanceDataSource';\n"]}
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getInternalAccountsForGroup = exports.getGroupIdForAccount = exports.getAggregatedBalanceForAccount = exports.normalizeAssetId = exports.DetectionMiddleware = exports.PriceDataSource = exports.TokenDataSource = exports.extractChainFromAssetId = exports.getChainIdsCaveat = exports.KEYRING_PERMISSION = exports.SNAP_DATA_SOURCE_NAME = exports.createSnapDataSource = exports.SnapDataSource = exports.createRpcDataSource = exports.RpcDataSource = exports.createBackendWebsocketDataSource = exports.BackendWebsocketDataSource = exports.AccountsApiDataSource = exports.AbstractDataSource = exports.getDefaultAssetsControllerState = exports.AssetsController = void 0;
|
|
4
4
|
// Main controller export
|
|
5
5
|
var AssetsController_1 = require("./AssetsController.cjs");
|
|
6
6
|
Object.defineProperty(exports, "AssetsController", { enumerable: true, get: function () { return AssetsController_1.AssetsController; } });
|
|
@@ -11,7 +11,6 @@ Object.defineProperty(exports, "AbstractDataSource", { enumerable: true, get: fu
|
|
|
11
11
|
// Data sources - AccountsApi
|
|
12
12
|
var data_sources_2 = require("./data-sources/index.cjs");
|
|
13
13
|
Object.defineProperty(exports, "AccountsApiDataSource", { enumerable: true, get: function () { return data_sources_2.AccountsApiDataSource; } });
|
|
14
|
-
Object.defineProperty(exports, "createAccountsApiDataSource", { enumerable: true, get: function () { return data_sources_2.createAccountsApiDataSource; } });
|
|
15
14
|
// Data sources - BackendWebsocket
|
|
16
15
|
var data_sources_3 = require("./data-sources/index.cjs");
|
|
17
16
|
Object.defineProperty(exports, "BackendWebsocketDataSource", { enumerable: true, get: function () { return data_sources_3.BackendWebsocketDataSource; } });
|
|
@@ -37,11 +36,12 @@ Object.defineProperty(exports, "PriceDataSource", { enumerable: true, get: funct
|
|
|
37
36
|
// Middlewares
|
|
38
37
|
var middlewares_1 = require("./middlewares/index.cjs");
|
|
39
38
|
Object.defineProperty(exports, "DetectionMiddleware", { enumerable: true, get: function () { return middlewares_1.DetectionMiddleware; } });
|
|
40
|
-
// Data source initialization
|
|
41
|
-
var data_sources_7 = require("./data-sources/index.cjs");
|
|
42
|
-
Object.defineProperty(exports, "initMessengers", { enumerable: true, get: function () { return data_sources_7.initMessengers; } });
|
|
43
|
-
Object.defineProperty(exports, "initDataSources", { enumerable: true, get: function () { return data_sources_7.initDataSources; } });
|
|
44
39
|
// Utilities
|
|
45
40
|
var utils_1 = require("./utils.cjs");
|
|
46
41
|
Object.defineProperty(exports, "normalizeAssetId", { enumerable: true, get: function () { return utils_1.normalizeAssetId; } });
|
|
42
|
+
// Selectors
|
|
43
|
+
var balance_1 = require("./selectors/balance.cjs");
|
|
44
|
+
Object.defineProperty(exports, "getAggregatedBalanceForAccount", { enumerable: true, get: function () { return balance_1.getAggregatedBalanceForAccount; } });
|
|
45
|
+
Object.defineProperty(exports, "getGroupIdForAccount", { enumerable: true, get: function () { return balance_1.getGroupIdForAccount; } });
|
|
46
|
+
Object.defineProperty(exports, "getInternalAccountsForGroup", { enumerable: true, get: function () { return balance_1.getInternalAccountsForGroup; } });
|
|
47
47
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,yBAAyB;AACzB,2DAG4B;AAF1B,oHAAA,gBAAgB,OAAA;AAChB,mIAAA,+BAA+B,OAAA;AAkFjC,sCAAsC;AACtC,yDAAoD;AAA3C,kHAAA,kBAAkB,OAAA;AAI3B,6BAA6B;AAC7B,
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,yBAAyB;AACzB,2DAG4B;AAF1B,oHAAA,gBAAgB,OAAA;AAChB,mIAAA,+BAA+B,OAAA;AAkFjC,sCAAsC;AACtC,yDAAoD;AAA3C,kHAAA,kBAAkB,OAAA;AAI3B,6BAA6B;AAC7B,yDAAuD;AAA9C,qHAAA,qBAAqB,OAAA;AAS9B,kCAAkC;AAClC,yDAGwB;AAFtB,0HAAA,0BAA0B,OAAA;AAC1B,gIAAA,gCAAgC,OAAA;AAUlC,qBAAqB;AACrB,yDAAoE;AAA3D,6GAAA,aAAa,OAAA;AAAE,mHAAA,mBAAmB,OAAA;AAW3C,gFAAgF;AAChF,yDASwB;AARtB,8GAAA,cAAc,OAAA;AACd,oHAAA,oBAAoB,OAAA;AACpB,qHAAA,qBAAqB,OAAA;AACrB,YAAY;AACZ,kHAAA,kBAAkB,OAAA;AAClB,oBAAoB;AACpB,iHAAA,iBAAiB,OAAA;AACjB,uHAAA,uBAAuB,OAAA;AAUzB,0BAA0B;AAC1B,yDAAkE;AAAzD,+GAAA,eAAe,OAAA;AAAE,+GAAA,eAAe,OAAA;AASzC,cAAc;AACd,uDAAoD;AAA3C,kHAAA,mBAAmB,OAAA;AAE5B,YAAY;AACZ,qCAA2C;AAAlC,yGAAA,gBAAgB,OAAA;AAEzB,YAAY;AACZ,mDAI6B;AAH3B,yHAAA,8BAA8B,OAAA;AAC9B,+GAAA,oBAAoB,OAAA;AACpB,sHAAA,2BAA2B,OAAA","sourcesContent":["// Main controller export\nexport {\n AssetsController,\n getDefaultAssetsControllerState,\n} from './AssetsController';\n\n// State and messenger types\nexport type {\n AssetsControllerState,\n AssetsControllerMessenger,\n AssetsControllerOptions,\n AssetsControllerFirstInitFetchMetaMetricsPayload,\n AssetsControllerGetStateAction,\n AssetsControllerActions,\n AssetsControllerStateChangeEvent,\n AssetsControllerBalanceChangedEvent,\n AssetsControllerPriceChangedEvent,\n AssetsControllerAssetsDetectedEvent,\n AssetsControllerEvents,\n} from './AssetsController';\nexport type {\n AssetsControllerGetAssetsAction,\n AssetsControllerGetAssetsBalanceAction,\n AssetsControllerGetAssetMetadataAction,\n AssetsControllerGetAssetsPriceAction,\n AssetsControllerAddCustomAssetAction,\n AssetsControllerRemoveCustomAssetAction,\n AssetsControllerGetCustomAssetsAction,\n AssetsControllerHideAssetAction,\n AssetsControllerUnhideAssetAction,\n AssetsControllerMethodActions,\n} from './AssetsController-method-action-types';\n\n// Core types\nexport type {\n // CAIP types\n Caip19AssetId,\n AccountId,\n ChainId,\n // Asset types\n AssetType,\n TokenStandard,\n // Contract data types\n TokenFees,\n HoneypotStatus,\n StorageSlots,\n LocalizedDescription,\n // Metadata types\n BaseAssetMetadata,\n FungibleAssetMetadata,\n ERC721AssetMetadata,\n ERC1155AssetMetadata,\n AssetMetadata,\n // Price types\n BaseAssetPrice,\n FungibleAssetPrice,\n NFTAssetPrice,\n AssetPrice,\n // Balance types\n FungibleAssetBalance,\n ERC721AssetBalance,\n ERC1155AssetBalance,\n AssetBalance,\n // Data source types\n AccountWithSupportedChains,\n DataType,\n DataRequest,\n DataResponse,\n // Middleware types\n Context,\n NextFunction,\n Middleware,\n FetchContext,\n FetchNextFunction,\n FetchMiddleware,\n SubscriptionResponse,\n // Combined asset type\n Asset,\n // Event types\n BalanceChangeEvent,\n PriceChangeEvent,\n MetadataChangeEvent,\n AssetsDetectedEvent,\n} from './types';\n\n// Data sources - base class and types\nexport { AbstractDataSource } from './data-sources';\n\nexport type { DataSourceState, SubscriptionRequest } from './data-sources';\n\n// Data sources - AccountsApi\nexport { AccountsApiDataSource } from './data-sources';\n\nexport type {\n AccountsApiDataSourceConfig,\n AccountsApiDataSourceOptions,\n AccountsApiDataSourceState,\n AccountsApiDataSourceAllowedActions,\n} from './data-sources';\n\n// Data sources - BackendWebsocket\nexport {\n BackendWebsocketDataSource,\n createBackendWebsocketDataSource,\n} from './data-sources';\n\nexport type {\n BackendWebsocketDataSourceOptions,\n BackendWebsocketDataSourceState,\n BackendWebsocketDataSourceAllowedActions,\n BackendWebsocketDataSourceAllowedEvents,\n} from './data-sources';\n\n// Data sources - RPC\nexport { RpcDataSource, createRpcDataSource } from './data-sources';\n\nexport type {\n RpcDataSourceConfig,\n RpcDataSourceOptions,\n RpcDataSourceState,\n RpcDataSourceAllowedActions,\n RpcDataSourceAllowedEvents,\n ChainStatus,\n} from './data-sources';\n\n// Data sources - Unified Snap Data Source (dynamically discovers keyring snaps)\nexport {\n SnapDataSource,\n createSnapDataSource,\n SNAP_DATA_SOURCE_NAME,\n // Constants\n KEYRING_PERMISSION,\n // Utility functions\n getChainIdsCaveat,\n extractChainFromAssetId,\n} from './data-sources';\n\nexport type {\n SnapDataSourceState,\n SnapDataSourceOptions,\n SnapDataSourceAllowedActions,\n SnapDataSourceAllowedEvents,\n} from './data-sources';\n\n// Enrichment data sources\nexport { TokenDataSource, PriceDataSource } from './data-sources';\n\nexport type {\n TokenDataSourceOptions,\n TokenDataSourceAllowedActions,\n PriceDataSourceConfig,\n PriceDataSourceOptions,\n} from './data-sources';\n\n// Middlewares\nexport { DetectionMiddleware } from './middlewares';\n\n// Utilities\nexport { normalizeAssetId } from './utils';\n\n// Selectors\nexport {\n getAggregatedBalanceForAccount,\n getGroupIdForAccount,\n getInternalAccountsForGroup,\n} from './selectors/balance';\n\nexport type {\n AccountsById,\n AggregatedBalanceEntry,\n AggregatedBalanceForAccount,\n EnabledNetworkMap,\n} from './selectors/balance';\n"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
export { AssetsController, getDefaultAssetsControllerState, } from "./AssetsController.cjs";
|
|
2
|
-
export type { AssetsControllerState, AssetsControllerMessenger, AssetsControllerOptions,
|
|
3
|
-
export type {
|
|
2
|
+
export type { AssetsControllerState, AssetsControllerMessenger, AssetsControllerOptions, AssetsControllerFirstInitFetchMetaMetricsPayload, AssetsControllerGetStateAction, AssetsControllerActions, AssetsControllerStateChangeEvent, AssetsControllerBalanceChangedEvent, AssetsControllerPriceChangedEvent, AssetsControllerAssetsDetectedEvent, AssetsControllerEvents, } from "./AssetsController.cjs";
|
|
3
|
+
export type { AssetsControllerGetAssetsAction, AssetsControllerGetAssetsBalanceAction, AssetsControllerGetAssetMetadataAction, AssetsControllerGetAssetsPriceAction, AssetsControllerAddCustomAssetAction, AssetsControllerRemoveCustomAssetAction, AssetsControllerGetCustomAssetsAction, AssetsControllerHideAssetAction, AssetsControllerUnhideAssetAction, AssetsControllerMethodActions, } from "./AssetsController-method-action-types.cjs";
|
|
4
|
+
export type { Caip19AssetId, AccountId, ChainId, AssetType, TokenStandard, TokenFees, HoneypotStatus, StorageSlots, LocalizedDescription, BaseAssetMetadata, FungibleAssetMetadata, ERC721AssetMetadata, ERC1155AssetMetadata, AssetMetadata, BaseAssetPrice, FungibleAssetPrice, NFTAssetPrice, AssetPrice, FungibleAssetBalance, ERC721AssetBalance, ERC1155AssetBalance, AssetBalance, AccountWithSupportedChains, DataType, DataRequest, DataResponse, Context, NextFunction, Middleware, FetchContext, FetchNextFunction, FetchMiddleware, SubscriptionResponse, Asset, BalanceChangeEvent, PriceChangeEvent, MetadataChangeEvent, AssetsDetectedEvent, } from "./types.cjs";
|
|
4
5
|
export { AbstractDataSource } from "./data-sources/index.cjs";
|
|
5
6
|
export type { DataSourceState, SubscriptionRequest } from "./data-sources/index.cjs";
|
|
6
|
-
export { AccountsApiDataSource
|
|
7
|
-
export type { AccountsApiDataSourceOptions, AccountsApiDataSourceState,
|
|
7
|
+
export { AccountsApiDataSource } from "./data-sources/index.cjs";
|
|
8
|
+
export type { AccountsApiDataSourceConfig, AccountsApiDataSourceOptions, AccountsApiDataSourceState, AccountsApiDataSourceAllowedActions, } from "./data-sources/index.cjs";
|
|
8
9
|
export { BackendWebsocketDataSource, createBackendWebsocketDataSource, } from "./data-sources/index.cjs";
|
|
9
|
-
export type { BackendWebsocketDataSourceOptions, BackendWebsocketDataSourceState,
|
|
10
|
+
export type { BackendWebsocketDataSourceOptions, BackendWebsocketDataSourceState, BackendWebsocketDataSourceAllowedActions, BackendWebsocketDataSourceAllowedEvents, } from "./data-sources/index.cjs";
|
|
10
11
|
export { RpcDataSource, createRpcDataSource } from "./data-sources/index.cjs";
|
|
11
|
-
export type { RpcDataSourceOptions, RpcDataSourceState,
|
|
12
|
+
export type { RpcDataSourceConfig, RpcDataSourceOptions, RpcDataSourceState, RpcDataSourceAllowedActions, RpcDataSourceAllowedEvents, ChainStatus, } from "./data-sources/index.cjs";
|
|
12
13
|
export { SnapDataSource, createSnapDataSource, SNAP_DATA_SOURCE_NAME, KEYRING_PERMISSION, getChainIdsCaveat, extractChainFromAssetId, } from "./data-sources/index.cjs";
|
|
13
|
-
export type { SnapDataSourceState, SnapDataSourceOptions,
|
|
14
|
+
export type { SnapDataSourceState, SnapDataSourceOptions, SnapDataSourceAllowedActions, SnapDataSourceAllowedEvents, } from "./data-sources/index.cjs";
|
|
14
15
|
export { TokenDataSource, PriceDataSource } from "./data-sources/index.cjs";
|
|
15
|
-
export type {
|
|
16
|
+
export type { TokenDataSourceOptions, TokenDataSourceAllowedActions, PriceDataSourceConfig, PriceDataSourceOptions, } from "./data-sources/index.cjs";
|
|
16
17
|
export { DetectionMiddleware } from "./middlewares/index.cjs";
|
|
17
|
-
export type { DetectionMiddlewareActions, DetectionMiddlewareMessenger, } from "./middlewares/index.cjs";
|
|
18
|
-
export { initMessengers, initDataSources } from "./data-sources/index.cjs";
|
|
19
|
-
export type { DataSourceMessengers, DataSources, InitMessengersOptions, InitDataSourcesOptions, DataSourceActions, DataSourceEvents, DataSourceAllowedActions, DataSourceAllowedEvents, RootMessenger, } from "./data-sources/index.cjs";
|
|
20
18
|
export { normalizeAssetId } from "./utils.cjs";
|
|
19
|
+
export { getAggregatedBalanceForAccount, getGroupIdForAccount, getInternalAccountsForGroup, } from "./selectors/balance.cjs";
|
|
20
|
+
export type { AccountsById, AggregatedBalanceEntry, AggregatedBalanceForAccount, EnabledNetworkMap, } from "./selectors/balance.cjs";
|
|
21
21
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAChB,+BAA+B,GAChC,+BAA2B;AAG5B,YAAY,EACV,qBAAqB,EACrB,yBAAyB,EACzB,uBAAuB,EACvB,8BAA8B,EAC9B,+BAA+B,EAC/B,sCAAsC,EACtC,sCAAsC,EACtC,oCAAoC,EACpC,
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAChB,+BAA+B,GAChC,+BAA2B;AAG5B,YAAY,EACV,qBAAqB,EACrB,yBAAyB,EACzB,uBAAuB,EACvB,gDAAgD,EAChD,8BAA8B,EAC9B,uBAAuB,EACvB,gCAAgC,EAChC,mCAAmC,EACnC,iCAAiC,EACjC,mCAAmC,EACnC,sBAAsB,GACvB,+BAA2B;AAC5B,YAAY,EACV,+BAA+B,EAC/B,sCAAsC,EACtC,sCAAsC,EACtC,oCAAoC,EACpC,oCAAoC,EACpC,uCAAuC,EACvC,qCAAqC,EACrC,+BAA+B,EAC/B,iCAAiC,EACjC,6BAA6B,GAC9B,mDAA+C;AAGhD,YAAY,EAEV,aAAa,EACb,SAAS,EACT,OAAO,EAEP,SAAS,EACT,aAAa,EAEb,SAAS,EACT,cAAc,EACd,YAAY,EACZ,oBAAoB,EAEpB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,aAAa,EAEb,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,UAAU,EAEV,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,YAAY,EAEZ,0BAA0B,EAC1B,QAAQ,EACR,WAAW,EACX,YAAY,EAEZ,OAAO,EACP,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,oBAAoB,EAEpB,KAAK,EAEL,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,GACpB,oBAAgB;AAGjB,OAAO,EAAE,kBAAkB,EAAE,iCAAuB;AAEpD,YAAY,EAAE,eAAe,EAAE,mBAAmB,EAAE,iCAAuB;AAG3E,OAAO,EAAE,qBAAqB,EAAE,iCAAuB;AAEvD,YAAY,EACV,2BAA2B,EAC3B,4BAA4B,EAC5B,0BAA0B,EAC1B,mCAAmC,GACpC,iCAAuB;AAGxB,OAAO,EACL,0BAA0B,EAC1B,gCAAgC,GACjC,iCAAuB;AAExB,YAAY,EACV,iCAAiC,EACjC,+BAA+B,EAC/B,wCAAwC,EACxC,uCAAuC,GACxC,iCAAuB;AAGxB,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,iCAAuB;AAEpE,YAAY,EACV,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,2BAA2B,EAC3B,0BAA0B,EAC1B,WAAW,GACZ,iCAAuB;AAGxB,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,qBAAqB,EAErB,kBAAkB,EAElB,iBAAiB,EACjB,uBAAuB,GACxB,iCAAuB;AAExB,YAAY,EACV,mBAAmB,EACnB,qBAAqB,EACrB,4BAA4B,EAC5B,2BAA2B,GAC5B,iCAAuB;AAGxB,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,iCAAuB;AAElE,YAAY,EACV,sBAAsB,EACtB,6BAA6B,EAC7B,qBAAqB,EACrB,sBAAsB,GACvB,iCAAuB;AAGxB,OAAO,EAAE,mBAAmB,EAAE,gCAAsB;AAGpD,OAAO,EAAE,gBAAgB,EAAE,oBAAgB;AAG3C,OAAO,EACL,8BAA8B,EAC9B,oBAAoB,EACpB,2BAA2B,GAC5B,gCAA4B;AAE7B,YAAY,EACV,YAAY,EACZ,sBAAsB,EACtB,2BAA2B,EAC3B,iBAAiB,GAClB,gCAA4B"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
export { AssetsController, getDefaultAssetsControllerState, } from "./AssetsController.mjs";
|
|
2
|
-
export type { AssetsControllerState, AssetsControllerMessenger, AssetsControllerOptions,
|
|
3
|
-
export type {
|
|
2
|
+
export type { AssetsControllerState, AssetsControllerMessenger, AssetsControllerOptions, AssetsControllerFirstInitFetchMetaMetricsPayload, AssetsControllerGetStateAction, AssetsControllerActions, AssetsControllerStateChangeEvent, AssetsControllerBalanceChangedEvent, AssetsControllerPriceChangedEvent, AssetsControllerAssetsDetectedEvent, AssetsControllerEvents, } from "./AssetsController.mjs";
|
|
3
|
+
export type { AssetsControllerGetAssetsAction, AssetsControllerGetAssetsBalanceAction, AssetsControllerGetAssetMetadataAction, AssetsControllerGetAssetsPriceAction, AssetsControllerAddCustomAssetAction, AssetsControllerRemoveCustomAssetAction, AssetsControllerGetCustomAssetsAction, AssetsControllerHideAssetAction, AssetsControllerUnhideAssetAction, AssetsControllerMethodActions, } from "./AssetsController-method-action-types.mjs";
|
|
4
|
+
export type { Caip19AssetId, AccountId, ChainId, AssetType, TokenStandard, TokenFees, HoneypotStatus, StorageSlots, LocalizedDescription, BaseAssetMetadata, FungibleAssetMetadata, ERC721AssetMetadata, ERC1155AssetMetadata, AssetMetadata, BaseAssetPrice, FungibleAssetPrice, NFTAssetPrice, AssetPrice, FungibleAssetBalance, ERC721AssetBalance, ERC1155AssetBalance, AssetBalance, AccountWithSupportedChains, DataType, DataRequest, DataResponse, Context, NextFunction, Middleware, FetchContext, FetchNextFunction, FetchMiddleware, SubscriptionResponse, Asset, BalanceChangeEvent, PriceChangeEvent, MetadataChangeEvent, AssetsDetectedEvent, } from "./types.mjs";
|
|
4
5
|
export { AbstractDataSource } from "./data-sources/index.mjs";
|
|
5
6
|
export type { DataSourceState, SubscriptionRequest } from "./data-sources/index.mjs";
|
|
6
|
-
export { AccountsApiDataSource
|
|
7
|
-
export type { AccountsApiDataSourceOptions, AccountsApiDataSourceState,
|
|
7
|
+
export { AccountsApiDataSource } from "./data-sources/index.mjs";
|
|
8
|
+
export type { AccountsApiDataSourceConfig, AccountsApiDataSourceOptions, AccountsApiDataSourceState, AccountsApiDataSourceAllowedActions, } from "./data-sources/index.mjs";
|
|
8
9
|
export { BackendWebsocketDataSource, createBackendWebsocketDataSource, } from "./data-sources/index.mjs";
|
|
9
|
-
export type { BackendWebsocketDataSourceOptions, BackendWebsocketDataSourceState,
|
|
10
|
+
export type { BackendWebsocketDataSourceOptions, BackendWebsocketDataSourceState, BackendWebsocketDataSourceAllowedActions, BackendWebsocketDataSourceAllowedEvents, } from "./data-sources/index.mjs";
|
|
10
11
|
export { RpcDataSource, createRpcDataSource } from "./data-sources/index.mjs";
|
|
11
|
-
export type { RpcDataSourceOptions, RpcDataSourceState,
|
|
12
|
+
export type { RpcDataSourceConfig, RpcDataSourceOptions, RpcDataSourceState, RpcDataSourceAllowedActions, RpcDataSourceAllowedEvents, ChainStatus, } from "./data-sources/index.mjs";
|
|
12
13
|
export { SnapDataSource, createSnapDataSource, SNAP_DATA_SOURCE_NAME, KEYRING_PERMISSION, getChainIdsCaveat, extractChainFromAssetId, } from "./data-sources/index.mjs";
|
|
13
|
-
export type { SnapDataSourceState, SnapDataSourceOptions,
|
|
14
|
+
export type { SnapDataSourceState, SnapDataSourceOptions, SnapDataSourceAllowedActions, SnapDataSourceAllowedEvents, } from "./data-sources/index.mjs";
|
|
14
15
|
export { TokenDataSource, PriceDataSource } from "./data-sources/index.mjs";
|
|
15
|
-
export type {
|
|
16
|
+
export type { TokenDataSourceOptions, TokenDataSourceAllowedActions, PriceDataSourceConfig, PriceDataSourceOptions, } from "./data-sources/index.mjs";
|
|
16
17
|
export { DetectionMiddleware } from "./middlewares/index.mjs";
|
|
17
|
-
export type { DetectionMiddlewareActions, DetectionMiddlewareMessenger, } from "./middlewares/index.mjs";
|
|
18
|
-
export { initMessengers, initDataSources } from "./data-sources/index.mjs";
|
|
19
|
-
export type { DataSourceMessengers, DataSources, InitMessengersOptions, InitDataSourcesOptions, DataSourceActions, DataSourceEvents, DataSourceAllowedActions, DataSourceAllowedEvents, RootMessenger, } from "./data-sources/index.mjs";
|
|
20
18
|
export { normalizeAssetId } from "./utils.mjs";
|
|
19
|
+
export { getAggregatedBalanceForAccount, getGroupIdForAccount, getInternalAccountsForGroup, } from "./selectors/balance.mjs";
|
|
20
|
+
export type { AccountsById, AggregatedBalanceEntry, AggregatedBalanceForAccount, EnabledNetworkMap, } from "./selectors/balance.mjs";
|
|
21
21
|
//# sourceMappingURL=index.d.mts.map
|