MultichainNetworkController Actions
4 actions registered.
| Name | Deprecated |
|---|---|
getNetworksWithTransactionActivityByAccounts | |
getState | |
removeNetwork | |
setActiveNetwork |
MultichainNetworkController:getNetworksWithTransactionActivityByAccounts
Package: @metamask/multichain-network-controller
Returns the active networks for the available EVM addresses (non-EVM networks will be supported in the future). Fetches the data from the API and caches it in state.
Returns: A promise that resolves to the active networks for the available addresses
Handler signature:
() => Promise<ActiveNetworksByAddress>
MultichainNetworkController:getState
Package: @metamask/multichain-network-controller
Returns the state of the MultichainNetworkController.
Handler signature:
() => MultichainNetworkControllerState
MultichainNetworkController:removeNetwork
Package: @metamask/multichain-network-controller
Removes a network from the list of networks. It only supports EVM networks.
Parameters:
| Name | Description |
|---|---|
chainId | The chain ID of the network to remove. |
Returns: - A promise that resolves when the network is removed.
Handler signature:
(chainId: CaipChainId) => Promise<void>
MultichainNetworkController:setActiveNetwork
Package: @metamask/multichain-network-controller
Sets the active network.
Parameters:
| Name | Description |
|---|---|
id | The non-EVM Caip chain ID or EVM client ID of the network to set active. |
Returns: - A promise that resolves when the network is set active.
Handler signature:
(id: SupportedCaipChainId | NetworkClientId) => Promise<void>