@metamask/assets-controllers 101.0.1 → 102.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 +35 -1
- package/dist/AccountTrackerController-method-action-types.cjs +1 -1
- package/dist/AccountTrackerController-method-action-types.cjs.map +1 -1
- package/dist/AccountTrackerController-method-action-types.d.cts +1 -1
- package/dist/AccountTrackerController-method-action-types.d.mts +1 -1
- package/dist/AccountTrackerController-method-action-types.mjs +1 -1
- package/dist/AccountTrackerController-method-action-types.mjs.map +1 -1
- package/dist/AssetsContractController-method-action-types.cjs +1 -1
- package/dist/AssetsContractController-method-action-types.cjs.map +1 -1
- package/dist/AssetsContractController-method-action-types.d.cts +1 -1
- package/dist/AssetsContractController-method-action-types.d.mts +1 -1
- package/dist/AssetsContractController-method-action-types.mjs +1 -1
- package/dist/AssetsContractController-method-action-types.mjs.map +1 -1
- package/dist/MultichainAssetsController/MultichainAssetsController-method-action-types.cjs +1 -1
- package/dist/MultichainAssetsController/MultichainAssetsController-method-action-types.cjs.map +1 -1
- package/dist/MultichainAssetsController/MultichainAssetsController-method-action-types.d.cts +1 -1
- package/dist/MultichainAssetsController/MultichainAssetsController-method-action-types.d.mts +1 -1
- package/dist/MultichainAssetsController/MultichainAssetsController-method-action-types.mjs +1 -1
- package/dist/MultichainAssetsController/MultichainAssetsController-method-action-types.mjs.map +1 -1
- package/dist/MultichainAssetsRatesController/MultichainAssetsRatesController-method-action-types.cjs +1 -1
- package/dist/MultichainAssetsRatesController/MultichainAssetsRatesController-method-action-types.cjs.map +1 -1
- package/dist/MultichainAssetsRatesController/MultichainAssetsRatesController-method-action-types.d.cts +1 -1
- package/dist/MultichainAssetsRatesController/MultichainAssetsRatesController-method-action-types.d.mts +1 -1
- package/dist/MultichainAssetsRatesController/MultichainAssetsRatesController-method-action-types.mjs +1 -1
- package/dist/MultichainAssetsRatesController/MultichainAssetsRatesController-method-action-types.mjs.map +1 -1
- package/dist/TokenBalancesController-method-action-types.cjs +1 -1
- package/dist/TokenBalancesController-method-action-types.cjs.map +1 -1
- package/dist/TokenBalancesController-method-action-types.d.cts +1 -1
- package/dist/TokenBalancesController-method-action-types.d.mts +1 -1
- package/dist/TokenBalancesController-method-action-types.mjs +1 -1
- package/dist/TokenBalancesController-method-action-types.mjs.map +1 -1
- package/dist/TokenDetectionController-method-action-types.cjs +1 -1
- package/dist/TokenDetectionController-method-action-types.cjs.map +1 -1
- package/dist/TokenDetectionController-method-action-types.d.cts +1 -1
- package/dist/TokenDetectionController-method-action-types.d.mts +1 -1
- package/dist/TokenDetectionController-method-action-types.mjs +1 -1
- package/dist/TokenDetectionController-method-action-types.mjs.map +1 -1
- package/dist/TokensController-method-action-types.cjs +1 -1
- package/dist/TokensController-method-action-types.cjs.map +1 -1
- package/dist/TokensController-method-action-types.d.cts +1 -1
- package/dist/TokensController-method-action-types.d.mts +1 -1
- package/dist/TokensController-method-action-types.mjs +1 -1
- package/dist/TokensController-method-action-types.mjs.map +1 -1
- package/dist/multicall.cjs +2 -0
- package/dist/multicall.cjs.map +1 -1
- package/dist/multicall.d.cts.map +1 -1
- package/dist/multicall.d.mts.map +1 -1
- package/dist/multicall.mjs +2 -0
- package/dist/multicall.mjs.map +1 -1
- package/dist/selectors/token-selectors.cjs +2 -3
- package/dist/selectors/token-selectors.cjs.map +1 -1
- package/dist/selectors/token-selectors.d.cts +4 -42
- package/dist/selectors/token-selectors.d.cts.map +1 -1
- package/dist/selectors/token-selectors.d.mts +4 -42
- package/dist/selectors/token-selectors.d.mts.map +1 -1
- package/dist/selectors/token-selectors.mjs +2 -3
- package/dist/selectors/token-selectors.mjs.map +1 -1
- package/dist/token-prices-service/codefi-v2.cjs +9 -5
- package/dist/token-prices-service/codefi-v2.cjs.map +1 -1
- package/dist/token-prices-service/codefi-v2.d.cts +4 -2
- package/dist/token-prices-service/codefi-v2.d.cts.map +1 -1
- package/dist/token-prices-service/codefi-v2.d.mts +4 -2
- package/dist/token-prices-service/codefi-v2.d.mts.map +1 -1
- package/dist/token-prices-service/codefi-v2.mjs +9 -5
- package/dist/token-prices-service/codefi-v2.mjs.map +1 -1
- package/package.json +19 -19
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,39 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [102.0.0]
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Add Tempo Mainnet (`4217`/`0x1079`) and Tempo Moderato Testnet (`42431`/`0xa5bf`) support ([#8258](https://github.com/MetaMask/core/pull/8258))
|
|
15
|
+
- Add `0x1079` and `0xa5bf` to `SPOT_PRICES_SUPPORT_INFO` in `codefi-v2.ts`
|
|
16
|
+
- Add `0x1079` and `0xa5bf` to `chainIdToNativeTokenAddress` in `codefi-v2.ts`
|
|
17
|
+
- Add `0xa5bf` (only Tempo Testnet) to `MULTICALL_CONTRACT_BY_CHAINID` in `multicall.ts`
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- **BREAKING:** `AssetListState` type now requires a top-level `selectedAccountGroup` property, matching the updated `AccountTreeControllerState` shape where `selectedAccountGroup` was moved out of `accountTree` ([#8245](https://github.com/MetaMask/core/pull/8245))
|
|
22
|
+
- Bump `@metamask/keyring-api` from `^21.5.0` to `^21.6.0` ([#8259](https://github.com/MetaMask/core/pull/8259))
|
|
23
|
+
- Bump `@metamask/account-tree-controller` from `^5.0.1` to `^6.0.0` ([#8317](https://github.com/MetaMask/core/pull/8317))
|
|
24
|
+
- Bump `@metamask/accounts-controller` from `^37.0.0` to `^37.1.0` ([#8317](https://github.com/MetaMask/core/pull/8317))
|
|
25
|
+
- Bump `@metamask/approval-controller` from `^9.0.0` to `^9.0.1` ([#8317](https://github.com/MetaMask/core/pull/8317))
|
|
26
|
+
- Bump `@metamask/base-controller` from `^9.0.0` to `^9.0.1` ([#8317](https://github.com/MetaMask/core/pull/8317))
|
|
27
|
+
- Bump `@metamask/core-backend` from `^6.2.0` to `^6.2.1` ([#8317](https://github.com/MetaMask/core/pull/8317))
|
|
28
|
+
- Bump `@metamask/keyring-controller` from `^25.1.0` to `^25.1.1` ([#8317](https://github.com/MetaMask/core/pull/8317))
|
|
29
|
+
- Bump `@metamask/messenger` from `^0.3.0` to `^1.0.0` ([#8317](https://github.com/MetaMask/core/pull/8317))
|
|
30
|
+
- Bump `@metamask/multichain-account-service` from `^7.1.0` to `^8.0.0` ([#8317](https://github.com/MetaMask/core/pull/8317))
|
|
31
|
+
- Bump `@metamask/network-controller` from `^30.0.0` to `^30.0.1` ([#8317](https://github.com/MetaMask/core/pull/8317))
|
|
32
|
+
- Bump `@metamask/network-enablement-controller` from `^5.0.0` to `^5.0.1` ([#8317](https://github.com/MetaMask/core/pull/8317))
|
|
33
|
+
- Bump `@metamask/permission-controller` from `^12.2.1` to `^12.3.0` ([#8317](https://github.com/MetaMask/core/pull/8317))
|
|
34
|
+
- Bump `@metamask/phishing-controller` from `^17.0.0` to `^17.1.0` ([#8317](https://github.com/MetaMask/core/pull/8317))
|
|
35
|
+
- Bump `@metamask/polling-controller` from `^16.0.3` to `^16.0.4` ([#8317](https://github.com/MetaMask/core/pull/8317))
|
|
36
|
+
- Bump `@metamask/preferences-controller` from `^23.0.0` to `^23.1.0` ([#8317](https://github.com/MetaMask/core/pull/8317))
|
|
37
|
+
- Bump `@metamask/profile-sync-controller` from `^28.0.0` to `^28.0.1` ([#8317](https://github.com/MetaMask/core/pull/8317))
|
|
38
|
+
- Bump `@metamask/storage-service` from `^1.0.0` to `^1.0.1` ([#8317](https://github.com/MetaMask/core/pull/8317))
|
|
39
|
+
- `fetchTokenPrices` to use `SPOT_PRICES_SUPPORT_INFO` as override - use if defined - instead of fallback for native token price ([#8258](https://github.com/MetaMask/core/pull/8258))
|
|
40
|
+
- Bump `@metamask/transaction-controller` from `^63.0.0` to `^63.3.1` ([#8272](https://github.com/MetaMask/core/pull/8272), [#8301](https://github.com/MetaMask/core/pull/8301), [#8313](https://github.com/MetaMask/core/pull/8313), [#8317](https://github.com/MetaMask/core/pull/8317))
|
|
41
|
+
- Changed INK native asset to `slip44:60` (ETH) in `codefi-v2.ts` ([#8303](https://github.com/MetaMask/core/pull/8303))
|
|
42
|
+
|
|
10
43
|
## [101.0.1]
|
|
11
44
|
|
|
12
45
|
### Changed
|
|
@@ -2843,7 +2876,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
2843
2876
|
|
|
2844
2877
|
- Use Ethers for AssetsContractController ([#845](https://github.com/MetaMask/core/pull/845))
|
|
2845
2878
|
|
|
2846
|
-
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@
|
|
2879
|
+
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@102.0.0...HEAD
|
|
2880
|
+
[102.0.0]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@101.0.1...@metamask/assets-controllers@102.0.0
|
|
2847
2881
|
[101.0.1]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@101.0.0...@metamask/assets-controllers@101.0.1
|
|
2848
2882
|
[101.0.0]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@100.2.1...@metamask/assets-controllers@101.0.0
|
|
2849
2883
|
[100.2.1]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@100.2.0...@metamask/assets-controllers@100.2.1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountTrackerController-method-action-types.cjs","sourceRoot":"","sources":["../src/AccountTrackerController-method-action-types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated
|
|
1
|
+
{"version":3,"file":"AccountTrackerController-method-action-types.cjs","sourceRoot":"","sources":["../src/AccountTrackerController-method-action-types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { AccountTrackerController } from './AccountTrackerController';\n\n/**\n * Updates the balances of multiple native tokens in a single batch operation.\n * This is more efficient than calling updateNativeToken multiple times as it\n * triggers only one state update.\n *\n * @param balances - Array of balance updates, each containing address, chainId, and balance.\n */\nexport type AccountTrackerControllerUpdateNativeBalancesAction = {\n type: `AccountTrackerController:updateNativeBalances`;\n handler: AccountTrackerController['updateNativeBalances'];\n};\n\n/**\n * Updates the staked balances of multiple accounts in a single batch operation.\n * This is more efficient than updating staked balances individually as it\n * triggers only one state update.\n *\n * @param stakedBalances - Array of staked balance updates, each containing address, chainId, and stakedBalance.\n */\nexport type AccountTrackerControllerUpdateStakedBalancesAction = {\n type: `AccountTrackerController:updateStakedBalances`;\n handler: AccountTrackerController['updateStakedBalances'];\n};\n\n/**\n * Union of all AccountTrackerController action types.\n */\nexport type AccountTrackerControllerMethodActions =\n | AccountTrackerControllerUpdateNativeBalancesAction\n | AccountTrackerControllerUpdateStakedBalancesAction;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountTrackerController-method-action-types.mjs","sourceRoot":"","sources":["../src/AccountTrackerController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated
|
|
1
|
+
{"version":3,"file":"AccountTrackerController-method-action-types.mjs","sourceRoot":"","sources":["../src/AccountTrackerController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { AccountTrackerController } from './AccountTrackerController';\n\n/**\n * Updates the balances of multiple native tokens in a single batch operation.\n * This is more efficient than calling updateNativeToken multiple times as it\n * triggers only one state update.\n *\n * @param balances - Array of balance updates, each containing address, chainId, and balance.\n */\nexport type AccountTrackerControllerUpdateNativeBalancesAction = {\n type: `AccountTrackerController:updateNativeBalances`;\n handler: AccountTrackerController['updateNativeBalances'];\n};\n\n/**\n * Updates the staked balances of multiple accounts in a single batch operation.\n * This is more efficient than updating staked balances individually as it\n * triggers only one state update.\n *\n * @param stakedBalances - Array of staked balance updates, each containing address, chainId, and stakedBalance.\n */\nexport type AccountTrackerControllerUpdateStakedBalancesAction = {\n type: `AccountTrackerController:updateStakedBalances`;\n handler: AccountTrackerController['updateStakedBalances'];\n};\n\n/**\n * Union of all AccountTrackerController action types.\n */\nexport type AccountTrackerControllerMethodActions =\n | AccountTrackerControllerUpdateNativeBalancesAction\n | AccountTrackerControllerUpdateStakedBalancesAction;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssetsContractController-method-action-types.cjs","sourceRoot":"","sources":["../src/AssetsContractController-method-action-types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated
|
|
1
|
+
{"version":3,"file":"AssetsContractController-method-action-types.cjs","sourceRoot":"","sources":["../src/AssetsContractController-method-action-types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { AssetsContractController } from './AssetsContractController';\n\n/**\n * Get a ERC20Standard instance using the relevant provider instance.\n *\n * @param networkClientId - Network Client ID used to get the provider.\n * @returns ERC20Standard instance.\n */\nexport type AssetsContractControllerGetERC20StandardAction = {\n type: `AssetsContractController:getERC20Standard`;\n handler: AssetsContractController['getERC20Standard'];\n};\n\n/**\n * Get a ERC721Standard instance using the relevant provider instance.\n *\n * @param networkClientId - Network Client ID used to get the provider.\n * @returns ERC721Standard instance.\n */\nexport type AssetsContractControllerGetERC721StandardAction = {\n type: `AssetsContractController:getERC721Standard`;\n handler: AssetsContractController['getERC721Standard'];\n};\n\n/**\n * Get a ERC1155Standard instance using the relevant provider instance.\n *\n * @param networkClientId - Network Client ID used to get the provider.\n * @returns ERC1155Standard instance.\n */\nexport type AssetsContractControllerGetERC1155StandardAction = {\n type: `AssetsContractController:getERC1155Standard`;\n handler: AssetsContractController['getERC1155Standard'];\n};\n\n/**\n * Get balance or count for current account on specific asset contract.\n *\n * @param address - Asset ERC20 contract address.\n * @param selectedAddress - Current account public address.\n * @param networkClientId - Network Client ID to fetch the provider with.\n * @returns Promise resolving to BN object containing balance for current account on specific asset contract.\n */\nexport type AssetsContractControllerGetERC20BalanceOfAction = {\n type: `AssetsContractController:getERC20BalanceOf`;\n handler: AssetsContractController['getERC20BalanceOf'];\n};\n\n/**\n * Query for the decimals for a given ERC20 asset.\n *\n * @param address - ERC20 asset contract address.\n * @param networkClientId - Network Client ID to fetch the provider with.\n * @returns Promise resolving to the 'decimals'.\n */\nexport type AssetsContractControllerGetERC20TokenDecimalsAction = {\n type: `AssetsContractController:getERC20TokenDecimals`;\n handler: AssetsContractController['getERC20TokenDecimals'];\n};\n\n/**\n * Query for the name for a given ERC20 asset.\n *\n * @param address - ERC20 asset contract address.\n * @param networkClientId - Network Client ID to fetch the provider with.\n * @returns Promise resolving to the 'decimals'.\n */\nexport type AssetsContractControllerGetERC20TokenNameAction = {\n type: `AssetsContractController:getERC20TokenName`;\n handler: AssetsContractController['getERC20TokenName'];\n};\n\n/**\n * Enumerate assets assigned to an owner.\n *\n * @param address - ERC721 asset contract address.\n * @param selectedAddress - Current account public address.\n * @param index - An NFT counter less than `balanceOf(selectedAddress)`.\n * @param networkClientId - Network Client ID to fetch the provider with.\n * @returns Promise resolving to token identifier for the 'index'th asset assigned to 'selectedAddress'.\n */\nexport type AssetsContractControllerGetERC721NftTokenIdAction = {\n type: `AssetsContractController:getERC721NftTokenId`;\n handler: AssetsContractController['getERC721NftTokenId'];\n};\n\n/**\n * Enumerate assets assigned to an owner.\n *\n * @param tokenAddress - ERC721 asset contract address.\n * @param userAddress - Current account public address.\n * @param tokenId - ERC721 asset identifier.\n * @param networkClientId - Network Client ID to fetch the provider with.\n * @returns Promise resolving to an object containing the token standard and a set of details which depend on which standard the token supports.\n */\nexport type AssetsContractControllerGetTokenStandardAndDetailsAction = {\n type: `AssetsContractController:getTokenStandardAndDetails`;\n handler: AssetsContractController['getTokenStandardAndDetails'];\n};\n\n/**\n * Query for tokenURI for a given ERC721 asset.\n *\n * @param address - ERC721 asset contract address.\n * @param tokenId - ERC721 asset identifier.\n * @param networkClientId - Network Client ID to fetch the provider with.\n * @returns Promise resolving to the 'tokenURI'.\n */\nexport type AssetsContractControllerGetERC721TokenURIAction = {\n type: `AssetsContractController:getERC721TokenURI`;\n handler: AssetsContractController['getERC721TokenURI'];\n};\n\n/**\n * Query for name for a given asset.\n *\n * @param address - ERC721 or ERC20 asset contract address.\n * @param networkClientId - Network Client ID to fetch the provider with.\n * @returns Promise resolving to the 'name'.\n */\nexport type AssetsContractControllerGetERC721AssetNameAction = {\n type: `AssetsContractController:getERC721AssetName`;\n handler: AssetsContractController['getERC721AssetName'];\n};\n\n/**\n * Query for symbol for a given asset.\n *\n * @param address - ERC721 or ERC20 asset contract address.\n * @param networkClientId - Network Client ID to fetch the provider with.\n * @returns Promise resolving to the 'symbol'.\n */\nexport type AssetsContractControllerGetERC721AssetSymbolAction = {\n type: `AssetsContractController:getERC721AssetSymbol`;\n handler: AssetsContractController['getERC721AssetSymbol'];\n};\n\n/**\n * Query for owner for a given ERC721 asset.\n *\n * @param address - ERC721 asset contract address.\n * @param tokenId - ERC721 asset identifier.\n * @param networkClientId - Network Client ID to fetch the provider with.\n * @returns Promise resolving to the owner address.\n */\nexport type AssetsContractControllerGetERC721OwnerOfAction = {\n type: `AssetsContractController:getERC721OwnerOf`;\n handler: AssetsContractController['getERC721OwnerOf'];\n};\n\n/**\n * Query for tokenURI for a given asset.\n *\n * @param address - ERC1155 asset contract address.\n * @param tokenId - ERC1155 asset identifier.\n * @param networkClientId - Network Client ID to fetch the provider with.\n * @returns Promise resolving to the 'tokenURI'.\n */\nexport type AssetsContractControllerGetERC1155TokenURIAction = {\n type: `AssetsContractController:getERC1155TokenURI`;\n handler: AssetsContractController['getERC1155TokenURI'];\n};\n\n/**\n * Query for balance of a given ERC 1155 token.\n *\n * @param userAddress - Wallet public address.\n * @param nftAddress - ERC1155 asset contract address.\n * @param nftId - ERC1155 asset identifier.\n * @param networkClientId - Network Client ID to fetch the provider with.\n * @returns Promise resolving to the 'balanceOf'.\n */\nexport type AssetsContractControllerGetERC1155BalanceOfAction = {\n type: `AssetsContractController:getERC1155BalanceOf`;\n handler: AssetsContractController['getERC1155BalanceOf'];\n};\n\n/**\n * Transfer single ERC1155 token.\n *\n * @param nftAddress - ERC1155 token address.\n * @param senderAddress - ERC1155 token sender.\n * @param recipientAddress - ERC1155 token recipient.\n * @param nftId - ERC1155 token id.\n * @param qty - Quantity of tokens to be sent.\n * @param networkClientId - Network Client ID to fetch the provider with.\n * @returns Promise resolving to the 'transferSingle' ERC1155 token.\n */\nexport type AssetsContractControllerTransferSingleERC1155Action = {\n type: `AssetsContractController:transferSingleERC1155`;\n handler: AssetsContractController['transferSingleERC1155'];\n};\n\n/**\n * Get the token balance for a list of token addresses in a single call. Only non-zero balances\n * are returned.\n *\n * @param selectedAddress - The address to check token balances for.\n * @param tokensToDetect - The token addresses to detect balances for.\n * @param networkClientId - Network Client ID to fetch the provider with.\n * @returns The list of non-zero token balances.\n */\nexport type AssetsContractControllerGetBalancesInSingleCallAction = {\n type: `AssetsContractController:getBalancesInSingleCall`;\n handler: AssetsContractController['getBalancesInSingleCall'];\n};\n\n/**\n * Get the staked ethereum balance for multiple addresses in a single call.\n *\n * @param addresses - The addresses to check staked ethereum balance for.\n * @param networkClientId - Network Client ID to fetch the provider with.\n * @returns The hex staked ethereum balance for address.\n */\nexport type AssetsContractControllerGetStakedBalanceForChainAction = {\n type: `AssetsContractController:getStakedBalanceForChain`;\n handler: AssetsContractController['getStakedBalanceForChain'];\n};\n\n/**\n * Union of all AssetsContractController action types.\n */\nexport type AssetsContractControllerMethodActions =\n | AssetsContractControllerGetERC20StandardAction\n | AssetsContractControllerGetERC721StandardAction\n | AssetsContractControllerGetERC1155StandardAction\n | AssetsContractControllerGetERC20BalanceOfAction\n | AssetsContractControllerGetERC20TokenDecimalsAction\n | AssetsContractControllerGetERC20TokenNameAction\n | AssetsContractControllerGetERC721NftTokenIdAction\n | AssetsContractControllerGetTokenStandardAndDetailsAction\n | AssetsContractControllerGetERC721TokenURIAction\n | AssetsContractControllerGetERC721AssetNameAction\n | AssetsContractControllerGetERC721AssetSymbolAction\n | AssetsContractControllerGetERC721OwnerOfAction\n | AssetsContractControllerGetERC1155TokenURIAction\n | AssetsContractControllerGetERC1155BalanceOfAction\n | AssetsContractControllerTransferSingleERC1155Action\n | AssetsContractControllerGetBalancesInSingleCallAction\n | AssetsContractControllerGetStakedBalanceForChainAction;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssetsContractController-method-action-types.mjs","sourceRoot":"","sources":["../src/AssetsContractController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated
|
|
1
|
+
{"version":3,"file":"AssetsContractController-method-action-types.mjs","sourceRoot":"","sources":["../src/AssetsContractController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { AssetsContractController } from './AssetsContractController';\n\n/**\n * Get a ERC20Standard instance using the relevant provider instance.\n *\n * @param networkClientId - Network Client ID used to get the provider.\n * @returns ERC20Standard instance.\n */\nexport type AssetsContractControllerGetERC20StandardAction = {\n type: `AssetsContractController:getERC20Standard`;\n handler: AssetsContractController['getERC20Standard'];\n};\n\n/**\n * Get a ERC721Standard instance using the relevant provider instance.\n *\n * @param networkClientId - Network Client ID used to get the provider.\n * @returns ERC721Standard instance.\n */\nexport type AssetsContractControllerGetERC721StandardAction = {\n type: `AssetsContractController:getERC721Standard`;\n handler: AssetsContractController['getERC721Standard'];\n};\n\n/**\n * Get a ERC1155Standard instance using the relevant provider instance.\n *\n * @param networkClientId - Network Client ID used to get the provider.\n * @returns ERC1155Standard instance.\n */\nexport type AssetsContractControllerGetERC1155StandardAction = {\n type: `AssetsContractController:getERC1155Standard`;\n handler: AssetsContractController['getERC1155Standard'];\n};\n\n/**\n * Get balance or count for current account on specific asset contract.\n *\n * @param address - Asset ERC20 contract address.\n * @param selectedAddress - Current account public address.\n * @param networkClientId - Network Client ID to fetch the provider with.\n * @returns Promise resolving to BN object containing balance for current account on specific asset contract.\n */\nexport type AssetsContractControllerGetERC20BalanceOfAction = {\n type: `AssetsContractController:getERC20BalanceOf`;\n handler: AssetsContractController['getERC20BalanceOf'];\n};\n\n/**\n * Query for the decimals for a given ERC20 asset.\n *\n * @param address - ERC20 asset contract address.\n * @param networkClientId - Network Client ID to fetch the provider with.\n * @returns Promise resolving to the 'decimals'.\n */\nexport type AssetsContractControllerGetERC20TokenDecimalsAction = {\n type: `AssetsContractController:getERC20TokenDecimals`;\n handler: AssetsContractController['getERC20TokenDecimals'];\n};\n\n/**\n * Query for the name for a given ERC20 asset.\n *\n * @param address - ERC20 asset contract address.\n * @param networkClientId - Network Client ID to fetch the provider with.\n * @returns Promise resolving to the 'decimals'.\n */\nexport type AssetsContractControllerGetERC20TokenNameAction = {\n type: `AssetsContractController:getERC20TokenName`;\n handler: AssetsContractController['getERC20TokenName'];\n};\n\n/**\n * Enumerate assets assigned to an owner.\n *\n * @param address - ERC721 asset contract address.\n * @param selectedAddress - Current account public address.\n * @param index - An NFT counter less than `balanceOf(selectedAddress)`.\n * @param networkClientId - Network Client ID to fetch the provider with.\n * @returns Promise resolving to token identifier for the 'index'th asset assigned to 'selectedAddress'.\n */\nexport type AssetsContractControllerGetERC721NftTokenIdAction = {\n type: `AssetsContractController:getERC721NftTokenId`;\n handler: AssetsContractController['getERC721NftTokenId'];\n};\n\n/**\n * Enumerate assets assigned to an owner.\n *\n * @param tokenAddress - ERC721 asset contract address.\n * @param userAddress - Current account public address.\n * @param tokenId - ERC721 asset identifier.\n * @param networkClientId - Network Client ID to fetch the provider with.\n * @returns Promise resolving to an object containing the token standard and a set of details which depend on which standard the token supports.\n */\nexport type AssetsContractControllerGetTokenStandardAndDetailsAction = {\n type: `AssetsContractController:getTokenStandardAndDetails`;\n handler: AssetsContractController['getTokenStandardAndDetails'];\n};\n\n/**\n * Query for tokenURI for a given ERC721 asset.\n *\n * @param address - ERC721 asset contract address.\n * @param tokenId - ERC721 asset identifier.\n * @param networkClientId - Network Client ID to fetch the provider with.\n * @returns Promise resolving to the 'tokenURI'.\n */\nexport type AssetsContractControllerGetERC721TokenURIAction = {\n type: `AssetsContractController:getERC721TokenURI`;\n handler: AssetsContractController['getERC721TokenURI'];\n};\n\n/**\n * Query for name for a given asset.\n *\n * @param address - ERC721 or ERC20 asset contract address.\n * @param networkClientId - Network Client ID to fetch the provider with.\n * @returns Promise resolving to the 'name'.\n */\nexport type AssetsContractControllerGetERC721AssetNameAction = {\n type: `AssetsContractController:getERC721AssetName`;\n handler: AssetsContractController['getERC721AssetName'];\n};\n\n/**\n * Query for symbol for a given asset.\n *\n * @param address - ERC721 or ERC20 asset contract address.\n * @param networkClientId - Network Client ID to fetch the provider with.\n * @returns Promise resolving to the 'symbol'.\n */\nexport type AssetsContractControllerGetERC721AssetSymbolAction = {\n type: `AssetsContractController:getERC721AssetSymbol`;\n handler: AssetsContractController['getERC721AssetSymbol'];\n};\n\n/**\n * Query for owner for a given ERC721 asset.\n *\n * @param address - ERC721 asset contract address.\n * @param tokenId - ERC721 asset identifier.\n * @param networkClientId - Network Client ID to fetch the provider with.\n * @returns Promise resolving to the owner address.\n */\nexport type AssetsContractControllerGetERC721OwnerOfAction = {\n type: `AssetsContractController:getERC721OwnerOf`;\n handler: AssetsContractController['getERC721OwnerOf'];\n};\n\n/**\n * Query for tokenURI for a given asset.\n *\n * @param address - ERC1155 asset contract address.\n * @param tokenId - ERC1155 asset identifier.\n * @param networkClientId - Network Client ID to fetch the provider with.\n * @returns Promise resolving to the 'tokenURI'.\n */\nexport type AssetsContractControllerGetERC1155TokenURIAction = {\n type: `AssetsContractController:getERC1155TokenURI`;\n handler: AssetsContractController['getERC1155TokenURI'];\n};\n\n/**\n * Query for balance of a given ERC 1155 token.\n *\n * @param userAddress - Wallet public address.\n * @param nftAddress - ERC1155 asset contract address.\n * @param nftId - ERC1155 asset identifier.\n * @param networkClientId - Network Client ID to fetch the provider with.\n * @returns Promise resolving to the 'balanceOf'.\n */\nexport type AssetsContractControllerGetERC1155BalanceOfAction = {\n type: `AssetsContractController:getERC1155BalanceOf`;\n handler: AssetsContractController['getERC1155BalanceOf'];\n};\n\n/**\n * Transfer single ERC1155 token.\n *\n * @param nftAddress - ERC1155 token address.\n * @param senderAddress - ERC1155 token sender.\n * @param recipientAddress - ERC1155 token recipient.\n * @param nftId - ERC1155 token id.\n * @param qty - Quantity of tokens to be sent.\n * @param networkClientId - Network Client ID to fetch the provider with.\n * @returns Promise resolving to the 'transferSingle' ERC1155 token.\n */\nexport type AssetsContractControllerTransferSingleERC1155Action = {\n type: `AssetsContractController:transferSingleERC1155`;\n handler: AssetsContractController['transferSingleERC1155'];\n};\n\n/**\n * Get the token balance for a list of token addresses in a single call. Only non-zero balances\n * are returned.\n *\n * @param selectedAddress - The address to check token balances for.\n * @param tokensToDetect - The token addresses to detect balances for.\n * @param networkClientId - Network Client ID to fetch the provider with.\n * @returns The list of non-zero token balances.\n */\nexport type AssetsContractControllerGetBalancesInSingleCallAction = {\n type: `AssetsContractController:getBalancesInSingleCall`;\n handler: AssetsContractController['getBalancesInSingleCall'];\n};\n\n/**\n * Get the staked ethereum balance for multiple addresses in a single call.\n *\n * @param addresses - The addresses to check staked ethereum balance for.\n * @param networkClientId - Network Client ID to fetch the provider with.\n * @returns The hex staked ethereum balance for address.\n */\nexport type AssetsContractControllerGetStakedBalanceForChainAction = {\n type: `AssetsContractController:getStakedBalanceForChain`;\n handler: AssetsContractController['getStakedBalanceForChain'];\n};\n\n/**\n * Union of all AssetsContractController action types.\n */\nexport type AssetsContractControllerMethodActions =\n | AssetsContractControllerGetERC20StandardAction\n | AssetsContractControllerGetERC721StandardAction\n | AssetsContractControllerGetERC1155StandardAction\n | AssetsContractControllerGetERC20BalanceOfAction\n | AssetsContractControllerGetERC20TokenDecimalsAction\n | AssetsContractControllerGetERC20TokenNameAction\n | AssetsContractControllerGetERC721NftTokenIdAction\n | AssetsContractControllerGetTokenStandardAndDetailsAction\n | AssetsContractControllerGetERC721TokenURIAction\n | AssetsContractControllerGetERC721AssetNameAction\n | AssetsContractControllerGetERC721AssetSymbolAction\n | AssetsContractControllerGetERC721OwnerOfAction\n | AssetsContractControllerGetERC1155TokenURIAction\n | AssetsContractControllerGetERC1155BalanceOfAction\n | AssetsContractControllerTransferSingleERC1155Action\n | AssetsContractControllerGetBalancesInSingleCallAction\n | AssetsContractControllerGetStakedBalanceForChainAction;\n"]}
|
package/dist/MultichainAssetsController/MultichainAssetsController-method-action-types.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultichainAssetsController-method-action-types.cjs","sourceRoot":"","sources":["../../src/MultichainAssetsController/MultichainAssetsController-method-action-types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated
|
|
1
|
+
{"version":3,"file":"MultichainAssetsController-method-action-types.cjs","sourceRoot":"","sources":["../../src/MultichainAssetsController/MultichainAssetsController-method-action-types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { MultichainAssetsController } from './MultichainAssetsController';\n\n/**\n * Returns the metadata for the given asset\n *\n * @param asset - The asset to get metadata for\n * @returns The metadata for the asset or undefined if not found.\n */\nexport type MultichainAssetsControllerGetAssetMetadataAction = {\n type: `MultichainAssetsController:getAssetMetadata`;\n handler: MultichainAssetsController['getAssetMetadata'];\n};\n\n/**\n * Ignores a batch of assets for a specific account.\n *\n * @param assetsToIgnore - Array of asset IDs to ignore.\n * @param accountId - The account ID to ignore assets for.\n */\nexport type MultichainAssetsControllerIgnoreAssetsAction = {\n type: `MultichainAssetsController:ignoreAssets`;\n handler: MultichainAssetsController['ignoreAssets'];\n};\n\n/**\n * Adds multiple assets to the stored asset list for a specific account.\n * All assets must belong to the same chain.\n *\n * @param assetIds - Array of CAIP asset IDs to add (must be from same chain).\n * @param accountId - The account ID to add the assets to.\n * @returns The updated asset list for the account.\n * @throws Error if assets are from different chains.\n */\nexport type MultichainAssetsControllerAddAssetsAction = {\n type: `MultichainAssetsController:addAssets`;\n handler: MultichainAssetsController['addAssets'];\n};\n\n/**\n * Union of all MultichainAssetsController action types.\n */\nexport type MultichainAssetsControllerMethodActions =\n | MultichainAssetsControllerGetAssetMetadataAction\n | MultichainAssetsControllerIgnoreAssetsAction\n | MultichainAssetsControllerAddAssetsAction;\n"]}
|
package/dist/MultichainAssetsController/MultichainAssetsController-method-action-types.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultichainAssetsController-method-action-types.mjs","sourceRoot":"","sources":["../../src/MultichainAssetsController/MultichainAssetsController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated
|
|
1
|
+
{"version":3,"file":"MultichainAssetsController-method-action-types.mjs","sourceRoot":"","sources":["../../src/MultichainAssetsController/MultichainAssetsController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { MultichainAssetsController } from './MultichainAssetsController';\n\n/**\n * Returns the metadata for the given asset\n *\n * @param asset - The asset to get metadata for\n * @returns The metadata for the asset or undefined if not found.\n */\nexport type MultichainAssetsControllerGetAssetMetadataAction = {\n type: `MultichainAssetsController:getAssetMetadata`;\n handler: MultichainAssetsController['getAssetMetadata'];\n};\n\n/**\n * Ignores a batch of assets for a specific account.\n *\n * @param assetsToIgnore - Array of asset IDs to ignore.\n * @param accountId - The account ID to ignore assets for.\n */\nexport type MultichainAssetsControllerIgnoreAssetsAction = {\n type: `MultichainAssetsController:ignoreAssets`;\n handler: MultichainAssetsController['ignoreAssets'];\n};\n\n/**\n * Adds multiple assets to the stored asset list for a specific account.\n * All assets must belong to the same chain.\n *\n * @param assetIds - Array of CAIP asset IDs to add (must be from same chain).\n * @param accountId - The account ID to add the assets to.\n * @returns The updated asset list for the account.\n * @throws Error if assets are from different chains.\n */\nexport type MultichainAssetsControllerAddAssetsAction = {\n type: `MultichainAssetsController:addAssets`;\n handler: MultichainAssetsController['addAssets'];\n};\n\n/**\n * Union of all MultichainAssetsController action types.\n */\nexport type MultichainAssetsControllerMethodActions =\n | MultichainAssetsControllerGetAssetMetadataAction\n | MultichainAssetsControllerIgnoreAssetsAction\n | MultichainAssetsControllerAddAssetsAction;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultichainAssetsRatesController-method-action-types.cjs","sourceRoot":"","sources":["../../src/MultichainAssetsRatesController/MultichainAssetsRatesController-method-action-types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated
|
|
1
|
+
{"version":3,"file":"MultichainAssetsRatesController-method-action-types.cjs","sourceRoot":"","sources":["../../src/MultichainAssetsRatesController/MultichainAssetsRatesController-method-action-types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { MultichainAssetsRatesController } from './MultichainAssetsRatesController';\n\n/**\n * Updates token conversion rates for each non-EVM account.\n *\n * @returns A promise that resolves when the rates are updated.\n */\nexport type MultichainAssetsRatesControllerUpdateAssetsRatesAction = {\n type: `MultichainAssetsRatesController:updateAssetsRates`;\n handler: MultichainAssetsRatesController['updateAssetsRates'];\n};\n\n/**\n * Fetches historical prices for the current account\n *\n * @param asset - The asset to fetch historical prices for.\n * @param account - optional account to fetch historical prices for\n * @returns The historical prices.\n */\nexport type MultichainAssetsRatesControllerFetchHistoricalPricesForAssetAction =\n {\n type: `MultichainAssetsRatesController:fetchHistoricalPricesForAsset`;\n handler: MultichainAssetsRatesController['fetchHistoricalPricesForAsset'];\n };\n\n/**\n * Union of all MultichainAssetsRatesController action types.\n */\nexport type MultichainAssetsRatesControllerMethodActions =\n | MultichainAssetsRatesControllerUpdateAssetsRatesAction\n | MultichainAssetsRatesControllerFetchHistoricalPricesForAssetAction;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultichainAssetsRatesController-method-action-types.mjs","sourceRoot":"","sources":["../../src/MultichainAssetsRatesController/MultichainAssetsRatesController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated
|
|
1
|
+
{"version":3,"file":"MultichainAssetsRatesController-method-action-types.mjs","sourceRoot":"","sources":["../../src/MultichainAssetsRatesController/MultichainAssetsRatesController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { MultichainAssetsRatesController } from './MultichainAssetsRatesController';\n\n/**\n * Updates token conversion rates for each non-EVM account.\n *\n * @returns A promise that resolves when the rates are updated.\n */\nexport type MultichainAssetsRatesControllerUpdateAssetsRatesAction = {\n type: `MultichainAssetsRatesController:updateAssetsRates`;\n handler: MultichainAssetsRatesController['updateAssetsRates'];\n};\n\n/**\n * Fetches historical prices for the current account\n *\n * @param asset - The asset to fetch historical prices for.\n * @param account - optional account to fetch historical prices for\n * @returns The historical prices.\n */\nexport type MultichainAssetsRatesControllerFetchHistoricalPricesForAssetAction =\n {\n type: `MultichainAssetsRatesController:fetchHistoricalPricesForAsset`;\n handler: MultichainAssetsRatesController['fetchHistoricalPricesForAsset'];\n };\n\n/**\n * Union of all MultichainAssetsRatesController action types.\n */\nexport type MultichainAssetsRatesControllerMethodActions =\n | MultichainAssetsRatesControllerUpdateAssetsRatesAction\n | MultichainAssetsRatesControllerFetchHistoricalPricesForAssetAction;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenBalancesController-method-action-types.cjs","sourceRoot":"","sources":["../src/TokenBalancesController-method-action-types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated
|
|
1
|
+
{"version":3,"file":"TokenBalancesController-method-action-types.cjs","sourceRoot":"","sources":["../src/TokenBalancesController-method-action-types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { TokenBalancesController } from './TokenBalancesController';\n\nexport type TokenBalancesControllerGetChainPollingConfigAction = {\n type: `TokenBalancesController:getChainPollingConfig`;\n handler: TokenBalancesController['getChainPollingConfig'];\n};\n\nexport type TokenBalancesControllerUpdateChainPollingConfigsAction = {\n type: `TokenBalancesController:updateChainPollingConfigs`;\n handler: TokenBalancesController['updateChainPollingConfigs'];\n};\n\n/**\n * Union of all TokenBalancesController action types.\n */\nexport type TokenBalancesControllerMethodActions =\n | TokenBalancesControllerGetChainPollingConfigAction\n | TokenBalancesControllerUpdateChainPollingConfigsAction;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenBalancesController-method-action-types.mjs","sourceRoot":"","sources":["../src/TokenBalancesController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated
|
|
1
|
+
{"version":3,"file":"TokenBalancesController-method-action-types.mjs","sourceRoot":"","sources":["../src/TokenBalancesController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { TokenBalancesController } from './TokenBalancesController';\n\nexport type TokenBalancesControllerGetChainPollingConfigAction = {\n type: `TokenBalancesController:getChainPollingConfig`;\n handler: TokenBalancesController['getChainPollingConfig'];\n};\n\nexport type TokenBalancesControllerUpdateChainPollingConfigsAction = {\n type: `TokenBalancesController:updateChainPollingConfigs`;\n handler: TokenBalancesController['updateChainPollingConfigs'];\n};\n\n/**\n * Union of all TokenBalancesController action types.\n */\nexport type TokenBalancesControllerMethodActions =\n | TokenBalancesControllerGetChainPollingConfigAction\n | TokenBalancesControllerUpdateChainPollingConfigsAction;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenDetectionController-method-action-types.cjs","sourceRoot":"","sources":["../src/TokenDetectionController-method-action-types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated
|
|
1
|
+
{"version":3,"file":"TokenDetectionController-method-action-types.cjs","sourceRoot":"","sources":["../src/TokenDetectionController-method-action-types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { TokenDetectionController } from './TokenDetectionController';\n\n/**\n * Allows controller to make active and passive polling requests\n */\nexport type TokenDetectionControllerEnableAction = {\n type: `TokenDetectionController:enable`;\n handler: TokenDetectionController['enable'];\n};\n\n/**\n * Blocks controller from making network calls\n */\nexport type TokenDetectionControllerDisableAction = {\n type: `TokenDetectionController:disable`;\n handler: TokenDetectionController['disable'];\n};\n\n/**\n * Start polling for detected tokens.\n */\nexport type TokenDetectionControllerStartAction = {\n type: `TokenDetectionController:start`;\n handler: TokenDetectionController['start'];\n};\n\n/**\n * Stop polling for detected tokens.\n */\nexport type TokenDetectionControllerStopAction = {\n type: `TokenDetectionController:stop`;\n handler: TokenDetectionController['stop'];\n};\n\n/**\n * For each token in the token list provided by the TokenListController, checks the token's balance for the selected account address on the active network.\n * On mainnet, if token detection is disabled in preferences, ERC20 token auto detection will be triggered for each contract address in the legacy token list from the @metamask/contract-metadata repo.\n *\n * @param options - Options for token detection.\n * @param options.chainIds - The chain IDs of the network client to use.\n * @param options.selectedAddress - the selectedAddress against which to detect for token balances.\n * @param options.forceRpc - Force RPC-based token detection for all specified chains,\n * bypassing external services check and ensuring RPC is used even for chains\n * that might otherwise be handled by the Accounts API.\n */\nexport type TokenDetectionControllerDetectTokensAction = {\n type: `TokenDetectionController:detectTokens`;\n handler: TokenDetectionController['detectTokens'];\n};\n\n/**\n * Add tokens detected from websocket balance updates\n * This method:\n * - Checks if useTokenDetection preference is enabled (skips if disabled)\n * - Checks if external services are enabled (skips if disabled)\n * - Tokens are expected to be in the tokensChainsCache with full metadata\n * - Balance fetching is skipped since balances are provided by the websocket\n * - Ignored tokens have been filtered out by the caller\n *\n * @param options - The options object\n * @param options.tokensSlice - Array of token addresses detected from websocket (already filtered to exclude ignored tokens)\n * @param options.chainId - Hex chain ID\n * @returns Promise that resolves when tokens are added\n */\nexport type TokenDetectionControllerAddDetectedTokensViaWsAction = {\n type: `TokenDetectionController:addDetectedTokensViaWs`;\n handler: TokenDetectionController['addDetectedTokensViaWs'];\n};\n\n/**\n * Add tokens detected from polling balance updates\n * This method:\n * - Checks if useTokenDetection preference is enabled (skips if disabled)\n * - Checks if external services are enabled (skips if disabled)\n * - Filters out tokens already in allTokens or allIgnoredTokens\n * - Tokens are expected to be in the tokensChainsCache with full metadata\n * - Balance fetching is skipped since balances are provided by the caller\n *\n * @param options - The options object\n * @param options.tokensSlice - Array of token addresses detected from polling\n * @param options.chainId - Hex chain ID\n * @returns Promise that resolves when tokens are added\n */\nexport type TokenDetectionControllerAddDetectedTokensViaPollingAction = {\n type: `TokenDetectionController:addDetectedTokensViaPolling`;\n handler: TokenDetectionController['addDetectedTokensViaPolling'];\n};\n\n/**\n * Union of all TokenDetectionController action types.\n */\nexport type TokenDetectionControllerMethodActions =\n | TokenDetectionControllerEnableAction\n | TokenDetectionControllerDisableAction\n | TokenDetectionControllerStartAction\n | TokenDetectionControllerStopAction\n | TokenDetectionControllerDetectTokensAction\n | TokenDetectionControllerAddDetectedTokensViaWsAction\n | TokenDetectionControllerAddDetectedTokensViaPollingAction;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenDetectionController-method-action-types.mjs","sourceRoot":"","sources":["../src/TokenDetectionController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated
|
|
1
|
+
{"version":3,"file":"TokenDetectionController-method-action-types.mjs","sourceRoot":"","sources":["../src/TokenDetectionController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { TokenDetectionController } from './TokenDetectionController';\n\n/**\n * Allows controller to make active and passive polling requests\n */\nexport type TokenDetectionControllerEnableAction = {\n type: `TokenDetectionController:enable`;\n handler: TokenDetectionController['enable'];\n};\n\n/**\n * Blocks controller from making network calls\n */\nexport type TokenDetectionControllerDisableAction = {\n type: `TokenDetectionController:disable`;\n handler: TokenDetectionController['disable'];\n};\n\n/**\n * Start polling for detected tokens.\n */\nexport type TokenDetectionControllerStartAction = {\n type: `TokenDetectionController:start`;\n handler: TokenDetectionController['start'];\n};\n\n/**\n * Stop polling for detected tokens.\n */\nexport type TokenDetectionControllerStopAction = {\n type: `TokenDetectionController:stop`;\n handler: TokenDetectionController['stop'];\n};\n\n/**\n * For each token in the token list provided by the TokenListController, checks the token's balance for the selected account address on the active network.\n * On mainnet, if token detection is disabled in preferences, ERC20 token auto detection will be triggered for each contract address in the legacy token list from the @metamask/contract-metadata repo.\n *\n * @param options - Options for token detection.\n * @param options.chainIds - The chain IDs of the network client to use.\n * @param options.selectedAddress - the selectedAddress against which to detect for token balances.\n * @param options.forceRpc - Force RPC-based token detection for all specified chains,\n * bypassing external services check and ensuring RPC is used even for chains\n * that might otherwise be handled by the Accounts API.\n */\nexport type TokenDetectionControllerDetectTokensAction = {\n type: `TokenDetectionController:detectTokens`;\n handler: TokenDetectionController['detectTokens'];\n};\n\n/**\n * Add tokens detected from websocket balance updates\n * This method:\n * - Checks if useTokenDetection preference is enabled (skips if disabled)\n * - Checks if external services are enabled (skips if disabled)\n * - Tokens are expected to be in the tokensChainsCache with full metadata\n * - Balance fetching is skipped since balances are provided by the websocket\n * - Ignored tokens have been filtered out by the caller\n *\n * @param options - The options object\n * @param options.tokensSlice - Array of token addresses detected from websocket (already filtered to exclude ignored tokens)\n * @param options.chainId - Hex chain ID\n * @returns Promise that resolves when tokens are added\n */\nexport type TokenDetectionControllerAddDetectedTokensViaWsAction = {\n type: `TokenDetectionController:addDetectedTokensViaWs`;\n handler: TokenDetectionController['addDetectedTokensViaWs'];\n};\n\n/**\n * Add tokens detected from polling balance updates\n * This method:\n * - Checks if useTokenDetection preference is enabled (skips if disabled)\n * - Checks if external services are enabled (skips if disabled)\n * - Filters out tokens already in allTokens or allIgnoredTokens\n * - Tokens are expected to be in the tokensChainsCache with full metadata\n * - Balance fetching is skipped since balances are provided by the caller\n *\n * @param options - The options object\n * @param options.tokensSlice - Array of token addresses detected from polling\n * @param options.chainId - Hex chain ID\n * @returns Promise that resolves when tokens are added\n */\nexport type TokenDetectionControllerAddDetectedTokensViaPollingAction = {\n type: `TokenDetectionController:addDetectedTokensViaPolling`;\n handler: TokenDetectionController['addDetectedTokensViaPolling'];\n};\n\n/**\n * Union of all TokenDetectionController action types.\n */\nexport type TokenDetectionControllerMethodActions =\n | TokenDetectionControllerEnableAction\n | TokenDetectionControllerDisableAction\n | TokenDetectionControllerStartAction\n | TokenDetectionControllerStopAction\n | TokenDetectionControllerDetectTokensAction\n | TokenDetectionControllerAddDetectedTokensViaWsAction\n | TokenDetectionControllerAddDetectedTokensViaPollingAction;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokensController-method-action-types.cjs","sourceRoot":"","sources":["../src/TokensController-method-action-types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated
|
|
1
|
+
{"version":3,"file":"TokensController-method-action-types.cjs","sourceRoot":"","sources":["../src/TokensController-method-action-types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { TokensController } from './TokensController';\n\n/**\n * Adds a token to the stored token list.\n *\n * @param options - The method argument object.\n * @param options.address - Hex address of the token contract.\n * @param options.symbol - Symbol of the token.\n * @param options.decimals - Number of decimals the token uses.\n * @param options.name - Name of the token.\n * @param options.image - Image of the token.\n * @param options.interactingAddress - The address of the account to add a token to.\n * @param options.networkClientId - Network Client ID.\n * @param options.rwaData - Optional RWA data for the token.\n * @returns Current token list.\n */\nexport type TokensControllerAddTokenAction = {\n type: `TokensController:addToken`;\n handler: TokensController['addToken'];\n};\n\n/**\n * Add a batch of tokens.\n *\n * @param tokensToImport - Array of tokens to import.\n * @param networkClientId - Optional network client ID used to determine interacting chain ID.\n */\nexport type TokensControllerAddTokensAction = {\n type: `TokensController:addTokens`;\n handler: TokensController['addTokens'];\n};\n\n/**\n * Ignore a batch of tokens.\n *\n * @param tokenAddressesToIgnore - Array of token addresses to ignore.\n * @param networkClientId - Optional network client ID used to determine interacting chain ID.\n */\nexport type TokensControllerIgnoreTokensAction = {\n type: `TokensController:ignoreTokens`;\n handler: TokensController['ignoreTokens'];\n};\n\n/**\n * Adds a batch of detected tokens to the stored token list.\n *\n * @param incomingDetectedTokens - Array of detected tokens to be added or updated.\n * @param detectionDetails - An object containing the chain ID and address of the currently selected network on which the incomingDetectedTokens were detected.\n * @param detectionDetails.selectedAddress - the account address on which the incomingDetectedTokens were detected.\n * @param detectionDetails.chainId - the chainId on which the incomingDetectedTokens were detected.\n */\nexport type TokensControllerAddDetectedTokensAction = {\n type: `TokensController:addDetectedTokens`;\n handler: TokensController['addDetectedTokens'];\n};\n\n/**\n * Adds isERC721 field to token object. This is called when a user attempts to add tokens that\n * were previously added which do not yet had isERC721 field.\n *\n * @param tokenAddress - The contract address of the token requiring the isERC721 field added.\n * @param networkClientId - The network client ID of the network on which the token is detected.\n * @returns The new token object with the added isERC721 field.\n */\nexport type TokensControllerUpdateTokenTypeAction = {\n type: `TokensController:updateTokenType`;\n handler: TokensController['updateTokenType'];\n};\n\n/**\n * Adds a new suggestedAsset to the list of watched assets.\n * Parameters will be validated according to the asset type being watched.\n *\n * @param options - The method options.\n * @param options.asset - The asset to be watched. For now only ERC20 tokens are accepted.\n * @param options.type - The asset type.\n * @param options.interactingAddress - The address of the account that is requesting to watch the asset.\n * @param options.networkClientId - Network Client ID.\n * @param options.origin - The origin to set on the approval request.\n * @param options.pageMeta - The metadata for the page initiating the request.\n * @param options.requestMetadata - Metadata for the request, including pageMeta and origin.\n * @returns A promise that resolves if the asset was watched successfully, and rejects otherwise.\n */\nexport type TokensControllerWatchAssetAction = {\n type: `TokensController:watchAsset`;\n handler: TokensController['watchAsset'];\n};\n\n/**\n * Removes all tokens from the ignored list.\n */\nexport type TokensControllerClearIgnoredTokensAction = {\n type: `TokensController:clearIgnoredTokens`;\n handler: TokensController['clearIgnoredTokens'];\n};\n\n/**\n * Reset the controller state to the default state.\n */\nexport type TokensControllerResetStateAction = {\n type: `TokensController:resetState`;\n handler: TokensController['resetState'];\n};\n\n/**\n * Union of all TokensController action types.\n */\nexport type TokensControllerMethodActions =\n | TokensControllerAddTokenAction\n | TokensControllerAddTokensAction\n | TokensControllerIgnoreTokensAction\n | TokensControllerAddDetectedTokensAction\n | TokensControllerUpdateTokenTypeAction\n | TokensControllerWatchAssetAction\n | TokensControllerClearIgnoredTokensAction\n | TokensControllerResetStateAction;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokensController-method-action-types.mjs","sourceRoot":"","sources":["../src/TokensController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated
|
|
1
|
+
{"version":3,"file":"TokensController-method-action-types.mjs","sourceRoot":"","sources":["../src/TokensController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { TokensController } from './TokensController';\n\n/**\n * Adds a token to the stored token list.\n *\n * @param options - The method argument object.\n * @param options.address - Hex address of the token contract.\n * @param options.symbol - Symbol of the token.\n * @param options.decimals - Number of decimals the token uses.\n * @param options.name - Name of the token.\n * @param options.image - Image of the token.\n * @param options.interactingAddress - The address of the account to add a token to.\n * @param options.networkClientId - Network Client ID.\n * @param options.rwaData - Optional RWA data for the token.\n * @returns Current token list.\n */\nexport type TokensControllerAddTokenAction = {\n type: `TokensController:addToken`;\n handler: TokensController['addToken'];\n};\n\n/**\n * Add a batch of tokens.\n *\n * @param tokensToImport - Array of tokens to import.\n * @param networkClientId - Optional network client ID used to determine interacting chain ID.\n */\nexport type TokensControllerAddTokensAction = {\n type: `TokensController:addTokens`;\n handler: TokensController['addTokens'];\n};\n\n/**\n * Ignore a batch of tokens.\n *\n * @param tokenAddressesToIgnore - Array of token addresses to ignore.\n * @param networkClientId - Optional network client ID used to determine interacting chain ID.\n */\nexport type TokensControllerIgnoreTokensAction = {\n type: `TokensController:ignoreTokens`;\n handler: TokensController['ignoreTokens'];\n};\n\n/**\n * Adds a batch of detected tokens to the stored token list.\n *\n * @param incomingDetectedTokens - Array of detected tokens to be added or updated.\n * @param detectionDetails - An object containing the chain ID and address of the currently selected network on which the incomingDetectedTokens were detected.\n * @param detectionDetails.selectedAddress - the account address on which the incomingDetectedTokens were detected.\n * @param detectionDetails.chainId - the chainId on which the incomingDetectedTokens were detected.\n */\nexport type TokensControllerAddDetectedTokensAction = {\n type: `TokensController:addDetectedTokens`;\n handler: TokensController['addDetectedTokens'];\n};\n\n/**\n * Adds isERC721 field to token object. This is called when a user attempts to add tokens that\n * were previously added which do not yet had isERC721 field.\n *\n * @param tokenAddress - The contract address of the token requiring the isERC721 field added.\n * @param networkClientId - The network client ID of the network on which the token is detected.\n * @returns The new token object with the added isERC721 field.\n */\nexport type TokensControllerUpdateTokenTypeAction = {\n type: `TokensController:updateTokenType`;\n handler: TokensController['updateTokenType'];\n};\n\n/**\n * Adds a new suggestedAsset to the list of watched assets.\n * Parameters will be validated according to the asset type being watched.\n *\n * @param options - The method options.\n * @param options.asset - The asset to be watched. For now only ERC20 tokens are accepted.\n * @param options.type - The asset type.\n * @param options.interactingAddress - The address of the account that is requesting to watch the asset.\n * @param options.networkClientId - Network Client ID.\n * @param options.origin - The origin to set on the approval request.\n * @param options.pageMeta - The metadata for the page initiating the request.\n * @param options.requestMetadata - Metadata for the request, including pageMeta and origin.\n * @returns A promise that resolves if the asset was watched successfully, and rejects otherwise.\n */\nexport type TokensControllerWatchAssetAction = {\n type: `TokensController:watchAsset`;\n handler: TokensController['watchAsset'];\n};\n\n/**\n * Removes all tokens from the ignored list.\n */\nexport type TokensControllerClearIgnoredTokensAction = {\n type: `TokensController:clearIgnoredTokens`;\n handler: TokensController['clearIgnoredTokens'];\n};\n\n/**\n * Reset the controller state to the default state.\n */\nexport type TokensControllerResetStateAction = {\n type: `TokensController:resetState`;\n handler: TokensController['resetState'];\n};\n\n/**\n * Union of all TokensController action types.\n */\nexport type TokensControllerMethodActions =\n | TokensControllerAddTokenAction\n | TokensControllerAddTokensAction\n | TokensControllerIgnoreTokensAction\n | TokensControllerAddDetectedTokensAction\n | TokensControllerUpdateTokenTypeAction\n | TokensControllerWatchAssetAction\n | TokensControllerClearIgnoredTokensAction\n | TokensControllerResetStateAction;\n"]}
|