@metamask/network-controller
Advanced tools
Comparing version 15.0.0 to 15.1.0
@@ -9,2 +9,13 @@ # Changelog | ||
## [15.1.0] | ||
### Added | ||
- Add new action handlers and associated types ([#1806](https://github.com/MetaMask/core/pull/1806)) | ||
- `NetworkController:setActiveNetwork` / `NetworkControllerSetActiveNetworkAction` | ||
- `NetworkController:setProviderType` / `NetworkControllerSetProviderTypeAction` | ||
- `NetworkController:findNetworkClientByChainId` / `NetworkControllerFindNetworkClientIdByChainIdAction` | ||
- Add `ticker` to `NetworkClientConfiguration` ([#1794](https://github.com/MetaMask/core/pull/1794)) | ||
### Changed | ||
- Bump dependency on `@metamask/eth-json-rpc-provider` to ^2.2.0 ([#1738](https://github.com/MetaMask/core/pull/1738)) | ||
## [15.0.0] | ||
@@ -291,3 +302,4 @@ ### Changed | ||
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/network-controller@15.0.0...HEAD | ||
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/network-controller@15.1.0...HEAD | ||
[15.1.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@15.0.0...@metamask/network-controller@15.1.0 | ||
[15.0.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@14.0.0...@metamask/network-controller@15.0.0 | ||
@@ -294,0 +306,0 @@ [14.0.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@13.0.1...@metamask/network-controller@14.0.0 |
@@ -6,2 +6,3 @@ export * from './NetworkController'; | ||
export { NetworkClientType } from './types'; | ||
export type { NetworkClient } from './create-network-client'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -198,3 +198,15 @@ import type { RestrictedControllerMessenger } from '@metamask/base-controller'; | ||
}; | ||
export declare type NetworkControllerActions = NetworkControllerGetStateAction | NetworkControllerGetProviderConfigAction | NetworkControllerGetEthQueryAction | NetworkControllerGetNetworkClientByIdAction | NetworkControllerGetEIP1559CompatibilityAction; | ||
export declare type NetworkControllerFindNetworkClientIdByChainIdAction = { | ||
type: `NetworkController:findNetworkClientIdByChainId`; | ||
handler: NetworkController['findNetworkClientIdByChainId']; | ||
}; | ||
export declare type NetworkControllerSetProviderTypeAction = { | ||
type: `NetworkController:setProviderType`; | ||
handler: NetworkController['setProviderType']; | ||
}; | ||
export declare type NetworkControllerSetActiveNetworkAction = { | ||
type: `NetworkController:setActiveNetwork`; | ||
handler: NetworkController['setActiveNetwork']; | ||
}; | ||
export declare type NetworkControllerActions = NetworkControllerGetStateAction | NetworkControllerGetProviderConfigAction | NetworkControllerGetEthQueryAction | NetworkControllerGetNetworkClientByIdAction | NetworkControllerGetEIP1559CompatibilityAction | NetworkControllerFindNetworkClientIdByChainIdAction | NetworkControllerSetActiveNetworkAction | NetworkControllerSetProviderTypeAction; | ||
export declare type NetworkControllerMessenger = RestrictedControllerMessenger<typeof name, NetworkControllerActions, NetworkControllerEvents, string, string>; | ||
@@ -201,0 +213,0 @@ export declare type NetworkControllerOptions = { |
@@ -251,2 +251,5 @@ "use strict"; | ||
this.messagingSystem.registerActionHandler(`${this.name}:getEIP1559Compatibility`, this.getEIP1559Compatibility.bind(this)); | ||
this.messagingSystem.registerActionHandler(`${this.name}:setActiveNetwork`, this.setActiveNetwork.bind(this)); | ||
this.messagingSystem.registerActionHandler(`${this.name}:setProviderType`, this.setProviderType.bind(this)); | ||
this.messagingSystem.registerActionHandler(`${this.name}:findNetworkClientIdByChainId`, this.findNetworkClientIdByChainId.bind(this)); | ||
__classPrivateFieldSet(this, _NetworkController_previousProviderConfig, this.state.providerConfig, "f"); | ||
@@ -647,2 +650,3 @@ } | ||
rpcUrl, | ||
ticker, | ||
}); | ||
@@ -807,2 +811,3 @@ } | ||
chainId: controller_utils_1.BUILT_IN_NETWORKS[network].chainId, | ||
ticker: controller_utils_1.BUILT_IN_NETWORKS[network].ticker, | ||
}; | ||
@@ -828,2 +833,3 @@ return [ | ||
rpcUrl: networkConfiguration.rpcUrl, | ||
ticker: networkConfiguration.ticker, | ||
}; | ||
@@ -845,2 +851,3 @@ return [ | ||
type: types_1.NetworkClientType.Custom, | ||
ticker: providerConfig.ticker, | ||
}; | ||
@@ -847,0 +854,0 @@ return [ |
@@ -23,2 +23,3 @@ import type { InfuraNetworkType } from '@metamask/controller-utils'; | ||
rpcUrl: string; | ||
ticker: string; | ||
type: NetworkClientType.Custom; | ||
@@ -34,2 +35,3 @@ }; | ||
infuraProjectId: string; | ||
ticker: string; | ||
type: NetworkClientType.Infura; | ||
@@ -36,0 +38,0 @@ }; |
{ | ||
"name": "@metamask/network-controller", | ||
"version": "15.0.0", | ||
"version": "15.1.0", | ||
"description": "Provides an interface to the currently selected network via a MetaMask-compatible provider object", | ||
@@ -36,3 +36,3 @@ "keywords": [ | ||
"@metamask/eth-json-rpc-middleware": "^12.0.0", | ||
"@metamask/eth-json-rpc-provider": "^2.1.0", | ||
"@metamask/eth-json-rpc-provider": "^2.2.0", | ||
"@metamask/eth-query": "^3.0.1", | ||
@@ -50,3 +50,3 @@ "@metamask/json-rpc-engine": "^7.1.1", | ||
"@json-rpc-specification/meta-schema": "^1.0.6", | ||
"@metamask/auto-changelog": "^3.1.0", | ||
"@metamask/auto-changelog": "^3.4.2", | ||
"@types/jest": "^27.4.1", | ||
@@ -53,0 +53,0 @@ "@types/jest-when": "^2.7.3", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
225011
1787
+ Added@noble/hashes@1.6.0(transitive)
+ Added@types/node@22.9.2(transitive)
+ Addedundici-types@6.19.8(transitive)
- Removed@noble/hashes@1.6.1(transitive)
- Removed@types/node@22.10.0(transitive)
- Removedundici-types@6.20.0(transitive)