@metamask/network-controller 23.1.0 → 23.2.1-backport
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/NetworkController.cjs +68 -9
- package/dist/NetworkController.cjs.map +1 -1
- package/dist/NetworkController.d.cts +20 -5
- package/dist/NetworkController.d.cts.map +1 -1
- package/dist/NetworkController.d.mts +20 -5
- package/dist/NetworkController.d.mts.map +1 -1
- package/dist/NetworkController.mjs +70 -11
- package/dist/NetworkController.mjs.map +1 -1
- package/dist/constants.cjs +7 -1
- package/dist/constants.cjs.map +1 -1
- package/dist/constants.d.cts +6 -0
- package/dist/constants.d.cts.map +1 -1
- package/dist/constants.d.mts +6 -0
- package/dist/constants.d.mts.map +1 -1
- package/dist/constants.mjs +6 -0
- package/dist/constants.mjs.map +1 -1
- package/dist/create-network-client.cjs +1 -1
- package/dist/create-network-client.cjs.map +1 -1
- package/dist/create-network-client.mjs +1 -1
- package/dist/create-network-client.mjs.map +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/rpc-service/rpc-service.cjs +36 -46
- package/dist/rpc-service/rpc-service.cjs.map +1 -1
- package/dist/rpc-service/rpc-service.d.cts.map +1 -1
- package/dist/rpc-service/rpc-service.d.mts.map +1 -1
- package/dist/rpc-service/rpc-service.mjs +37 -47
- package/dist/rpc-service/rpc-service.mjs.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +6 -2
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +6 -2
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs.map +1 -1
- package/package.json +5 -5
- package/CHANGELOG.md +0 -843
package/CHANGELOG.md
DELETED
|
@@ -1,843 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
|
|
5
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
-
|
|
8
|
-
## [Unreleased]
|
|
9
|
-
|
|
10
|
-
## [23.1.0]
|
|
11
|
-
|
|
12
|
-
### Added
|
|
13
|
-
|
|
14
|
-
- The `NetworkController:rpcEndpointDegraded` messenger event now has a new `chainId` property in its data, which is the ID of the chain that the endpoint represents ([#5517](https://github.com/MetaMask/core/pull/5517))
|
|
15
|
-
|
|
16
|
-
## [23.0.0]
|
|
17
|
-
|
|
18
|
-
### Added
|
|
19
|
-
|
|
20
|
-
- Implement circuit breaker pattern when retrying requests to Infura and custom RPC endpoints ([#5290](https://github.com/MetaMask/core/pull/5290))
|
|
21
|
-
- If the network is perceived to be unavailable after 5 attempts, further retries will be paused for 30 seconds.
|
|
22
|
-
- "Unavailable" means the following:
|
|
23
|
-
- A failure to reach the network (exact error depending on platform / HTTP client)
|
|
24
|
-
- The request responds with a non-JSON-parseable or non-JSON-RPC-compatible body
|
|
25
|
-
- The request returns a non-200 response
|
|
26
|
-
- Use exponential backoff / jitter when retrying requests to Infura and custom RPC endpoints ([#5290](https://github.com/MetaMask/core/pull/5290))
|
|
27
|
-
- As requests are retried, the delay between retries will increase exponentially (using random variance to prevent bursts).
|
|
28
|
-
- Add support for automatic failover when Infura is unavailable ([#5360](https://github.com/MetaMask/core/pull/5360))
|
|
29
|
-
- An Infura RPC endpoint can now be configured with a list of failover URLs via `failoverUrls`.
|
|
30
|
-
- If, after many attempts, an Infura network is perceived to be down, the list of failover URLs will be tried in turn.
|
|
31
|
-
- Add messenger action `NetworkController:rpcEndpointUnavailable` for responding to when a RPC endpoint becomes unavailable (see above) ([#5492](https://github.com/MetaMask/core/pull/5492), [#5501](https://github.com/MetaMask/core/pull/5501))
|
|
32
|
-
- Also add associated type `NetworkControllerRpcEndpointUnavailableEvent`.
|
|
33
|
-
- Add messenger action `NetworkController:rpcEndpointDegraded` for responding to when a RPC endpoint becomes degraded ([#5492](https://github.com/MetaMask/core/pull/5492))
|
|
34
|
-
- Also add associated type `NetworkControllerRpcEndpointDegradedEvent`.
|
|
35
|
-
- Add messenger action `NetworkController:rpcEndpointRequestRetried` for responding to when a RPC endpoint is retried following a retriable error ([#5492](https://github.com/MetaMask/core/pull/5492))
|
|
36
|
-
- Also add associated type `NetworkControllerRpcEndpointRequestRetriedEvent`.
|
|
37
|
-
- This is mainly useful for tests when mocking timers.
|
|
38
|
-
- Export `RpcServiceRequestable` type, which was previously named `AbstractRpcService` ([#5492](https://github.com/MetaMask/core/pull/5492))
|
|
39
|
-
- Export `isConnectionError` utility function ([#5501](https://github.com/MetaMask/core/pull/5501))
|
|
40
|
-
|
|
41
|
-
### Changed
|
|
42
|
-
|
|
43
|
-
- **BREAKING:** `NetworkController` constructor now takes a new required option, `getRpcServiceOptions` ([#5290](https://github.com/MetaMask/core/pull/5290), [#5492](https://github.com/MetaMask/core/pull/5492))
|
|
44
|
-
- This can be used to customize how RPC services (which eventually hit RPC endpoints) are constructed.
|
|
45
|
-
- For instance, you could set one `circuitBreakDuration` for one class of endpoints, and another `circuitBreakDuration` for another class.
|
|
46
|
-
- At minimum you will need to pass `fetch` and `btoa`.
|
|
47
|
-
- The `NetworkControllerOptions` also reflects this change.
|
|
48
|
-
- **BREAKING:** Add required property `failoverUrls` to `RpcEndpoint` ([#5360](https://github.com/MetaMask/core/pull/5360))
|
|
49
|
-
- The `NetworkControllerState` and the `state` option to `NetworkController` also reflect this change.
|
|
50
|
-
- **BREAKING:** Add required property `failoverRpcUrls` to `NetworkClientConfiguration` ([#5360](https://github.com/MetaMask/core/pull/5360))
|
|
51
|
-
- The `configuration` property in the `AutoManagedNetworkClient` and `NetworkClient` types also reflect this change.
|
|
52
|
-
- **BREAKING:** The `AbstractRpcService` type now has a non-optional `endpointUrl` property ([#5492](https://github.com/MetaMask/core/pull/5492))
|
|
53
|
-
- The old version of `AbstractRpcService` is now called `RpcServiceRequestable`
|
|
54
|
-
- Synchronize retry logic and error handling behavior between Infura and custom RPC endpoints ([#5290](https://github.com/MetaMask/core/pull/5290))
|
|
55
|
-
- A request to a custom endpoint that returns a 418 response will no longer return a JSON-RPC response with the error "Request is being rate limited".
|
|
56
|
-
- A request to a custom endpoint that returns a 429 response now returns a JSON-RPC response with the error "Request is being rate limited".
|
|
57
|
-
- A request to a custom endpoint that throws an "ECONNRESET" error will now be retried up to 5 times.
|
|
58
|
-
- A request to a Infura endpoint that fails more than 5 times in a row will now respond with a JSON-RPC error that encompasses the failure instead of hiding it as "InfuraProvider - cannot complete request. All retries exhausted".
|
|
59
|
-
- A request to a Infura endpoint that returns a non-retriable, non-2xx response will now respond with a JSON-RPC error that has the underling message "Non-200 status code: '\<code\>'" rather than including the raw response from the endpoint.
|
|
60
|
-
- A request to a custom endpoint that fails with a retriable error more than 5 times in a row will now respond with a JSON-RPC error that encompasses the failure instead of returning an empty response.
|
|
61
|
-
- A "retriable error" is now regarded as the following:
|
|
62
|
-
- A failure to reach the network (exact error depending on platform / HTTP client)
|
|
63
|
-
- The request responds with a non-JSON-parseable or non-JSON-RPC-compatible body
|
|
64
|
-
- The request returns a 503 or 504 response
|
|
65
|
-
- Bump dependencies to support usage of RPC services internally for network requests ([#5290](https://github.com/MetaMask/core/pull/5290))
|
|
66
|
-
- Bump `@metamask/eth-json-rpc-infura` to `^10.1.0`
|
|
67
|
-
- Bump `@metamask/eth-json-rpc-middleware` to `^15.1.0`
|
|
68
|
-
- Bump `@metamask/controller-utils` to `^11.5.0` ([#5439](https://github.com/MetaMask/core/pull/5439))
|
|
69
|
-
- Bump `@metamask/utils` to `^11.2.0` ([#5301](https://github.com/MetaMask/core/pull/5301))
|
|
70
|
-
|
|
71
|
-
### Fixed
|
|
72
|
-
|
|
73
|
-
- Fix `findNetworkClientIdByChainId` to return the network client ID for the chain's configured default RPC endpoint instead of its first listed RPC endpoint ([#5344](https://github.com/MetaMask/core/pull/5344))
|
|
74
|
-
|
|
75
|
-
## [22.2.1]
|
|
76
|
-
|
|
77
|
-
### Changed
|
|
78
|
-
|
|
79
|
-
- Bump `@metamask/base-controller` from `^7.1.1` to `^8.0.0` ([#5305](https://github.com/MetaMask/core/pull/5305))
|
|
80
|
-
|
|
81
|
-
## [22.2.0]
|
|
82
|
-
|
|
83
|
-
### Added
|
|
84
|
-
|
|
85
|
-
- Export `AbstractRpcService` type ([#5263](https://github.com/MetaMask/core/pull/5263))
|
|
86
|
-
|
|
87
|
-
### Changed
|
|
88
|
-
|
|
89
|
-
- Bump `@metamask/base-controller` from `^7.0.0` to `^7.1.1` ([#5079](https://github.com/MetaMask/core/pull/5079), [#5135](https://github.com/MetaMask/core/pull/5135))
|
|
90
|
-
- Bump `@metamask/controller-utils` from `^11.4.4` to `^11.5.0` ([#5135](https://github.com/MetaMask/core/pull/5135), [#5272](https://github.com/MetaMask/core/pull/5272))
|
|
91
|
-
- Bump `@metamask/eth-json-rpc-provider` from `^4.1.6` to `^4.1.8` ([#5082](https://github.com/MetaMask/core/pull/5082), [#5272](https://github.com/MetaMask/core/pull/5272))
|
|
92
|
-
- Bump `@metamask/json-rpc-engine` from `^10.0.1` to `^10.0.3` ([#5082](https://github.com/MetaMask/core/pull/5082), [#5272](https://github.com/MetaMask/core/pull/5272))
|
|
93
|
-
- Bump `@metamask/rpc-errors` from `^7.0.1` to `^7.0.2` ([#5080](https://github.com/MetaMask/core/pull/5080))
|
|
94
|
-
- Bump `@metamask/utils` from `^10.0.0` to `^11.1.0` ([#5080](https://github.com/MetaMask/core/pull/5080), [#5223](https://github.com/MetaMask/core/pull/5223))
|
|
95
|
-
|
|
96
|
-
### Fixed
|
|
97
|
-
|
|
98
|
-
- Fix `lookupNetwork` so that it will no longer throw an error if `networkDidChange` subscriptions have been removed before it returns ([#5116](https://github.com/MetaMask/core/pull/5116))
|
|
99
|
-
- This error could occur if the NetworkController's messenger is cleared of subscriptions, as in a "destroy" step.
|
|
100
|
-
- Fix race condition so that after adding a new RPC endpoint to a network, it is possible to access the new endpoint inside of a `stateChange` event listener via `getNetworkConfigurationByNetworkClientId` ([#5122](https://github.com/MetaMask/core/pull/5122))
|
|
101
|
-
- Fix `selectAvailableNetworkClientIds` so that it is properly memoized ([#5193](https://github.com/MetaMask/core/pull/5193))
|
|
102
|
-
|
|
103
|
-
## [22.1.1]
|
|
104
|
-
|
|
105
|
-
### Changed
|
|
106
|
-
|
|
107
|
-
- Bump `@metamask/eth-json-rpc-middleware` from `^15.0.0` to `^15.0.1` ([#5037](https://github.com/MetaMask/core/pull/5037))
|
|
108
|
-
- Bump `swappable-obj-proxy` from `^2.2.0` to `^2.3.0` ([#5036](https://github.com/MetaMask/core/pull/5036))
|
|
109
|
-
- Bump `@metamask/eth-block-tracker` from `^11.0.2` to `^11.0.3` ([#5025](https://github.com/MetaMask/core/pull/5025))
|
|
110
|
-
|
|
111
|
-
## [22.1.0]
|
|
112
|
-
|
|
113
|
-
### Added
|
|
114
|
-
|
|
115
|
-
- The `NetworkController:networkRemoved` messenger event will now be emitted when a network is removed ([#4698](https://github.com/MetaMask/core/pull/4698))
|
|
116
|
-
- Add messenger actions `NetworkController:addNetwork`, `NetworkController:removeNetwork`, and `NetworkController:updateNetwork` which call the respective controller methods ([#4698](https://github.com/MetaMask/core/pull/4698))
|
|
117
|
-
- Add `lastUpdatedAt` property to network configurations which will be set to the current time on addition or update ([#4652](https://github.com/MetaMask/core/pull/4652))
|
|
118
|
-
- This was added to support the upcoming network syncing feature.
|
|
119
|
-
- This property is optional and will be `undefined` for existing network configurations that have not yet been updated.
|
|
120
|
-
|
|
121
|
-
### Changed
|
|
122
|
-
|
|
123
|
-
- Add dependency `fast-deep-equal` ([#4652](https://github.com/MetaMask/core/pull/4652))
|
|
124
|
-
- Bump `@metamask/controller-utils` from `^11.4.3` to `^11.4.4` ([#5012](https://github.com/MetaMask/core/pull/5012))
|
|
125
|
-
|
|
126
|
-
### Fixed
|
|
127
|
-
|
|
128
|
-
- Remove dependency on Node builtin module `util` to ensure that `@metamask/network-controller` can be used in a strict browser context ([#3672](https://github.com/MetaMask/core/pull/3672))
|
|
129
|
-
- Correct ESM-compatible build so that imports of the following packages that re-export other modules via `export *` are no longer corrupted: ([#5011](https://github.com/MetaMask/core/pull/5011))
|
|
130
|
-
- `@metamask/eth-block-tracker`
|
|
131
|
-
- `@metamask/eth-json-rpc-infura`
|
|
132
|
-
- `@metamask/eth-json-rpc-middleware`
|
|
133
|
-
- `@metamask/eth-query`
|
|
134
|
-
- `@metamask/swappable-obj-proxy`
|
|
135
|
-
- `fast-deep-equal`
|
|
136
|
-
|
|
137
|
-
## [22.0.2]
|
|
138
|
-
|
|
139
|
-
### Changed
|
|
140
|
-
|
|
141
|
-
- `getDefaultNetworkConfigurationsByChainId` returns the updated display names for mainnet and linea. `Ethereum Mainnet` instead of `Mainnet`, and `Linea` instead of `Linea Mainnet`. ([#4865](https://github.com/MetaMask/core/pull/4865))
|
|
142
|
-
- Bump `@metamask/controller-utils` from `^11.4.2` to `^11.4.3` ([#4915](https://github.com/MetaMask/core/pull/4915))
|
|
143
|
-
|
|
144
|
-
## [22.0.1]
|
|
145
|
-
|
|
146
|
-
### Changed
|
|
147
|
-
|
|
148
|
-
- Bump `@metamask/base-controller` from `^7.0.1` to `^7.0.2` ([#4862](https://github.com/MetaMask/core/pull/4862))
|
|
149
|
-
- Bump `@metamask/controller-utils` from `^11.4.0` to `^11.4.2` ([#4862](https://github.com/MetaMask/core/pull/4862), [#4870](https://github.com/MetaMask/core/pull/4870))
|
|
150
|
-
- Bump `@metamask/eth-json-rpc-provider` from `^4.1.5` to `^4.1.6` ([#4862](https://github.com/MetaMask/core/pull/4862))
|
|
151
|
-
- Bump `@metamask/json-rpc-engine` from `^10.0.0` to `^10.0.1` ([#4862](https://github.com/MetaMask/core/pull/4862))
|
|
152
|
-
- Bump `@metamask/rpc-errors` from `^7.0.0` to `^7.0.1` ([#4831](https://github.com/MetaMask/core/pull/4831))
|
|
153
|
-
|
|
154
|
-
## [22.0.0]
|
|
155
|
-
|
|
156
|
-
### Changed
|
|
157
|
-
|
|
158
|
-
- Corrects the previous 21.1.0 release to document breaking changes that were missed:
|
|
159
|
-
- **BREAKING:** Bump `@metamask/eth-block-tracker` from `^10.0.0` to `^11.0.2` ([#4769](https://github.com/MetaMask/core/pull/4769))
|
|
160
|
-
- **BREAKING:** Bump `@metamask/eth-json-rpc-middleware` from `^13.0.0` to `^15.0.0` ([#4769](https://github.com/MetaMask/core/pull/4769))
|
|
161
|
-
- **BREAKING:** Bump `@metamask/json-rpc-engine` from `^9.0.3` to `^10.0.0` ([#4769](https://github.com/MetaMask/core/pull/4769))
|
|
162
|
-
- **BREAKING:** Bump `@metamask/rpc-errors` from `^6.3.1` to `^7.0.0` ([#4769](https://github.com/MetaMask/core/pull/4769))
|
|
163
|
-
- **BREAKING:** Bump `@metamask/eth-json-rpc-infura` from `^9.1.0` to `^10.0.0` ([#4769](https://github.com/MetaMask/core/pull/4769))
|
|
164
|
-
- Bump `@metamask/eth-json-rpc-provider` from `^4.1.4` to `^4.1.5` ([#4798](https://github.com/MetaMask/core/pull/4798))
|
|
165
|
-
- This update was recorded in the v21.1.0 changelog, but is listed here again because that release has been deprecated.
|
|
166
|
-
- Bump `@metamask/controller-utils` from `^11.3.0` to `^11.4.0` ([#4834](https://github.com/MetaMask/core/pull/4834))
|
|
167
|
-
|
|
168
|
-
## [21.1.0] [DEPRECATED]
|
|
169
|
-
|
|
170
|
-
### Changed
|
|
171
|
-
|
|
172
|
-
- Bump `@metamask/eth-json-rpc-provider` from `^4.1.4` to `^4.1.5` ([#4798](https://github.com/MetaMask/core/pull/4798))
|
|
173
|
-
|
|
174
|
-
## [21.0.1]
|
|
175
|
-
|
|
176
|
-
### Fixed
|
|
177
|
-
|
|
178
|
-
- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648))
|
|
179
|
-
- Previously, this package shipped with only one variant of type declaration
|
|
180
|
-
files, and these files were only CommonJS-compatible, and the `exports`
|
|
181
|
-
field in `package.json` linked to these files. This is an anti-pattern and
|
|
182
|
-
was rightfully flagged by the
|
|
183
|
-
["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as
|
|
184
|
-
["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md).
|
|
185
|
-
All of the ATTW checks now pass.
|
|
186
|
-
- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)).
|
|
187
|
-
- Previously, the build tool we used to generate JavaScript files extracted
|
|
188
|
-
common code to "chunk" files. While this was intended to make this package
|
|
189
|
-
more tree-shakeable, it also made debugging more difficult for our
|
|
190
|
-
development teams. These chunk files are no longer present.
|
|
191
|
-
|
|
192
|
-
## [21.0.0]
|
|
193
|
-
|
|
194
|
-
### Added
|
|
195
|
-
|
|
196
|
-
- **BREAKING:** Add `networkConfigurationsByChainId` to `NetworkState` (type: `Record<Hex, NetworkConfiguration>`) ([#4268](https://github.com/MetaMask/core/pull/4286))
|
|
197
|
-
- This property replaces `networkConfigurations`, and, as its name implies, organizes network configurations by chain ID rather than network client ID.
|
|
198
|
-
- If no initial state or this property is not included in initial state, the default value of this property will now include configurations for known Infura networks (Mainnet, Goerli, Sepolia, Linea Goerli, Linea Sepolia, and Linea Mainnet) by default.
|
|
199
|
-
- Add `getNetworkConfigurationByChainId` method, `NetworkController:getNetworkConfigurationByChainId` messenger action, and `NetworkControllerGetNetworkConfigurationByNetworkClientId` type ([#4268](https://github.com/MetaMask/core/pull/4286))
|
|
200
|
-
- Add `addNetwork`, which replaces one half of `upsertNetworkConfiguration` and can be used to add new network clients for a chain ([#4268](https://github.com/MetaMask/core/pull/4286))
|
|
201
|
-
- It's worth noting that this method now publishes a `NetworkController:networkAdded` event instead of calling a `trackMetaMetricsEvent` callback. It is expected that you will subscribe to this event and create a MetaMetrics event yourself.
|
|
202
|
-
- Add `updateNetwork`, which replaces one half of `upsertNetworkConfiguration` and can be used to recreate the network clients for an existing chain based on an updated configuration ([#4268](https://github.com/MetaMask/core/pull/4286))
|
|
203
|
-
- Note that it is not possible to remove the RPC endpoint from a network configuration that is currently represented by the globally selected network client. To prevent an error, you'll need to detect when such a removal is occurring and pass the `replacementSelectedRpcEndpointIndex` to `updateNetwork`. It will then switch to the designated RPC endpoint's network client on your behalf.
|
|
204
|
-
- Add `removeNetwork`, which replaces `removeNetworkConfiguration` and can be used to remove existing network clients for a chain ([#4268](https://github.com/MetaMask/core/pull/4286))
|
|
205
|
-
- Add `getDefaultNetworkControllerState` function, which replaces `defaultState` and matches patterns in other controllers ([#4268](https://github.com/MetaMask/core/pull/4286))
|
|
206
|
-
- Add `RpcEndpointType`, `AddNetworkFields`, and `UpdateNetworkFields` types ([#4268](https://github.com/MetaMask/core/pull/4286))
|
|
207
|
-
- Add `getNetworkConfigurations`, `getAvailableNetworkClientIds` and `selectAvailableNetworkClientIds` selectors ([#4268](https://github.com/MetaMask/core/pull/4286))
|
|
208
|
-
- These new selectors can be applied to messenger event subscriptions
|
|
209
|
-
|
|
210
|
-
### Changed
|
|
211
|
-
|
|
212
|
-
- **BREAKING:** Replace `NetworkConfiguration` type with a new definition ([#4268](https://github.com/MetaMask/core/pull/4286))
|
|
213
|
-
- A network configuration no longer represents a single RPC endpoint but rather a collection of RPC endpoints that can all be used to interface with a single chain.
|
|
214
|
-
- The only property that has brought over to this type unchanged is `chainId`.
|
|
215
|
-
- `ticker` has been renamed to `nativeCurrency`.
|
|
216
|
-
- `nickname` has been renamed to `name`.
|
|
217
|
-
- `rpcEndpoints` has been added. This is an an array of objects, where each object has properties `name` (optional), `networkClientId` (optional), `type`, and `url`.
|
|
218
|
-
- `defaultRpcEndpointIndex` has been added. This must point to an entry in `rpcEndpoints`.
|
|
219
|
-
- The block explorer URL is no longer located in `rpcPrefs` and is no longer restricted to one: `blockExplorerUrls` has been added along with a corresponding property `defaultBlockExplorerUrlIndex`, which must point to an entry in `blockExplorerUrls`.
|
|
220
|
-
- `id` has been removed. Previously, this represented the ID of the network client associated with the network configuration. Since network clients are now created from RPC endpoints, the equivalent to this is the `networkClientId` property on an `RpcEndpoint`.
|
|
221
|
-
- **BREAKING:** The network controller messenger must now allow the action `NetworkController:getNetworkConfigurationByChainId` ([#4268](https://github.com/MetaMask/core/pull/4286))
|
|
222
|
-
- **BREAKING:** The network controller messenger must now allow the event `NetworkController:networkAdded` ([#4268](https://github.com/MetaMask/core/pull/4286))
|
|
223
|
-
- **BREAKING:** The `NetworkController` constructor will now throw if the initial state provided is invalid ([#4268](https://github.com/MetaMask/core/pull/4286))
|
|
224
|
-
- `networkConfigurationsByChainId` cannot be empty.
|
|
225
|
-
- The `chainId` of a network configuration in `networkConfigurationsByChainId` must match the chain ID it is filed under.
|
|
226
|
-
- The `defaultRpcEndpointIndex` of a network configuration in `networkConfigurationsByChainId` must point to an entry in its `rpcEndpoints`.
|
|
227
|
-
- The `defaultBlockExplorerUrlIndex` of a network configuration in `networkConfigurationsByChainId` must point to an entry in its `blockExplorerUrls`.
|
|
228
|
-
- `selectedNetworkClientId` must match the `networkClientId` of an RPC endpoint in `networkConfigurationsByChainId`.
|
|
229
|
-
- **BREAKING:** Update `getNetworkConfigurationByNetworkClientId` so that when given an Infura network name (that is, a value from `InfuraNetworkType`), it will return a masked version of the RPC endpoint URL for the associated Infura network ([#4268](https://github.com/MetaMask/core/pull/4286))
|
|
230
|
-
- If you want the unmasked version, you'll need the `url` property from the network _client_ configuration, which you can get by calling `getNetworkClientById` and then accessing the `configuration` property off of the network client.
|
|
231
|
-
- **BREAKING:** Update `loadBackup` to take and update `networkConfigurationsByChainId` instead of `networkConfigurations` ([#4268](https://github.com/MetaMask/core/pull/4286))
|
|
232
|
-
- Bump `@metamask/base-controller` from `^6.0.2` to `^7.0.0` ([#4625](https://github.com/MetaMask/core/pull/4625), [#4643](https://github.com/MetaMask/core/pull/4643))
|
|
233
|
-
- Bump `@metamask/controller-utils` from `^11.0.2` to `^11.2.0` ([#4639](https://github.com/MetaMask/core/pull/4639), [#4651](https://github.com/MetaMask/core/pull/4651))
|
|
234
|
-
- Bump `@metamask/eth-block-tracker` from `^9.0.3` to `^10.0.0` ([#4424](https://github.com/MetaMask/core/pull/4424))
|
|
235
|
-
- Bump `@metamask/eth-json-rpc-middleware` from `^12.1.1` to `^13.0.0` ([#4424](https://github.com/MetaMask/core/pull/4424))
|
|
236
|
-
|
|
237
|
-
### Removed
|
|
238
|
-
|
|
239
|
-
- **BREAKING:** Remove `networkConfigurations` from `NetworkState`, which has been replaced with `networkConfigurationsByChainId` ([#4268](https://github.com/MetaMask/core/pull/4286))
|
|
240
|
-
- **BREAKING:** Remove `upsertNetworkConfiguration` and `removeNetworkConfiguration`, which have been replaced with `addNetwork`, `updateNetwork`, and `removeNetwork` ([#4268](https://github.com/MetaMask/core/pull/4286))
|
|
241
|
-
- **BREAKING:** Remove `defaultState` variable, which has been replaced with a `getDefaultNetworkControllerState` function ([#4268](https://github.com/MetaMask/core/pull/4286))
|
|
242
|
-
- **BREAKING:** Remove `trackMetaMetricsEvent` option from the NetworkController constructor ([#4268](https://github.com/MetaMask/core/pull/4286))
|
|
243
|
-
- Previously, this was used in `upsertNetworkConfiguration` to create a MetaMetrics event when a new network was added. This can now be achieved by subscribing to the `NetworkController:networkAdded` event and creating the event inside of the event handler.
|
|
244
|
-
|
|
245
|
-
## [20.2.0]
|
|
246
|
-
|
|
247
|
-
### Changed
|
|
248
|
-
|
|
249
|
-
- `upsertNetworkConfiguration` now accepts an optional id property on the NetworkConfiguration param. It allows a network configuration to have its rpcUrl updated in place when an id is specified, but only if that new rpcUrl does not already exist on a different network configuration. ([#4614](https://github.com/MetaMask/core/pull/4614))
|
|
250
|
-
- Bump `@metamask/eth-json-rpc-provider` to `^4.1.3` ([#4607](https://github.com/MetaMask/core/pull/4607))
|
|
251
|
-
- Update TypeScript to 5.2.2 ([#4576](https://github.com/MetaMask/core/pull/4576), [#4584](https://github.com/MetaMask/core/pull/4584))
|
|
252
|
-
|
|
253
|
-
### Fixed
|
|
254
|
-
|
|
255
|
-
- `removeNetworkConfiguration` now throws an error if you attempt to remove the selected network ([#4566](https://github.com/MetaMask/core/pull/4566))
|
|
256
|
-
|
|
257
|
-
## [20.1.0]
|
|
258
|
-
|
|
259
|
-
### Added
|
|
260
|
-
|
|
261
|
-
- Newly export the following types: `AutoManagedNetworkClient`, `InfuraNetworkClientConfiguration`, `CustomNetworkClientConfiguration` ([#3645](https://github.com/MetaMask/core/pull/3645))
|
|
262
|
-
|
|
263
|
-
### Changed
|
|
264
|
-
|
|
265
|
-
- Upgrade TypeScript version to `~5.0.4` and set `moduleResolution` option to `Node16` ([#3645](https://github.com/MetaMask/core/pull/3645))
|
|
266
|
-
- Bump `@metamask/base-controller` from `^6.0.0` to `^6.0.2` ([#4517](https://github.com/MetaMask/core/pull/4517), [#4544](https://github.com/MetaMask/core/pull/4544))
|
|
267
|
-
- Bump `@metamask/controller-utils` from `^11.0.0` to `^11.0.2` ([#4517](https://github.com/MetaMask/core/pull/4517), [#4544](https://github.com/MetaMask/core/pull/4544))
|
|
268
|
-
- Bump `@metamask/eth-json-rpc-provider` from `^4.1.0` to `^4.1.2` ([#4519](https://github.com/MetaMask/core/pull/4519), [#4548](https://github.com/MetaMask/core/pull/4548))
|
|
269
|
-
- Bump `@metamask/json-rpc-engine` from `^9.0.0` to `^9.0.2` ([#4517](https://github.com/MetaMask/core/pull/4517), [#4544](https://github.com/MetaMask/core/pull/4544))
|
|
270
|
-
- Bump `@metamask/rpc-errors` from `^6.2.1` to `^6.3.1` ([#4516](https://github.com/MetaMask/core/pull/4516))
|
|
271
|
-
- Bump `@metamask/utils` from `^8.3.0` to `^9.1.0` ([#4516](https://github.com/MetaMask/core/pull/4516), [#4529](https://github.com/MetaMask/core/pull/4529))
|
|
272
|
-
|
|
273
|
-
## [20.0.0]
|
|
274
|
-
|
|
275
|
-
### Added
|
|
276
|
-
|
|
277
|
-
- Add a new `log` argument to the constructor ([#4440](https://github.com/MetaMask/core/pull/4440))
|
|
278
|
-
- The new `log` argument must be a `Logger` object from the `loglevel` package and will be used to log a message when we fail to connect to a network or the network responds with an unknown error
|
|
279
|
-
|
|
280
|
-
### Changed
|
|
281
|
-
|
|
282
|
-
- **BREAKING:** Update `networksMetadata` state property so that the keys in the object will only ever be network client IDs and not RPC URLs ([#4254](https://github.com/MetaMask/core/pull/4254))
|
|
283
|
-
- Some keys could have been RPC URLs if the initial network controller state had a `providerConfig` with an empty `id`, but since `providerConfig` is being removed, that won't happen anymore.
|
|
284
|
-
- Bump `@metamask/eth-block-tracker` to `^9.0.3` ([#4418](https://github.com/MetaMask/core/pull/4418))
|
|
285
|
-
- Bump `@metamask/eth-json-rpc-provider` to `^4.1.0` ([#4508](https://github.com/MetaMask/core/pull/4508))
|
|
286
|
-
|
|
287
|
-
### Removed
|
|
288
|
-
|
|
289
|
-
- **BREAKING:** Remove `providerConfig` property from state along with `ProviderConfig` type and `NetworkController:getProviderConfig` messenger action ([#4254](https://github.com/MetaMask/core/pull/4254))
|
|
290
|
-
- The best way to obtain the equivalent configuration object, e.g. to access the chain ID of the currently selected network, is to get `selectedNetworkClientId` from state, pass this to the `NetworkController:getNetworkClientId` messenger action, and then use the `configuration` property on the network client.
|
|
291
|
-
|
|
292
|
-
## [19.0.0]
|
|
293
|
-
|
|
294
|
-
### Changed
|
|
295
|
-
|
|
296
|
-
- **BREAKING:** Bump minimum Node version to 18.18 ([#3611](https://github.com/MetaMask/core/pull/3611))
|
|
297
|
-
- Bump `@metamask/base-controller` to `^6.0.0` ([#4352](https://github.com/MetaMask/core/pull/4352))
|
|
298
|
-
- Bump `@metamask/controller-utils` to `^11.0.0` ([#4352](https://github.com/MetaMask/core/pull/4352))
|
|
299
|
-
- Bump `@metamask/eth-json-rpc-provider` to `^4.0.0` ([#4352](https://github.com/MetaMask/core/pull/4352))
|
|
300
|
-
- Bump `@metamask/json-rpc-engine` to `^9.0.0` ([#4352](https://github.com/MetaMask/core/pull/4352))
|
|
301
|
-
|
|
302
|
-
## [18.1.3]
|
|
303
|
-
|
|
304
|
-
### Changed
|
|
305
|
-
|
|
306
|
-
- Bump `async-mutex` to `^0.5.0` ([#4335](https://github.com/MetaMask/core/pull/4335))
|
|
307
|
-
- Bump `@metamask/controller-utils` to `^10.0.0` ([#4342](https://github.com/MetaMask/core/pull/4342))
|
|
308
|
-
|
|
309
|
-
## [18.1.2]
|
|
310
|
-
|
|
311
|
-
### Fixed
|
|
312
|
-
|
|
313
|
-
- Update from `eth-block-tracker` to `@metamask/eth-block-tracker` `^9.0.2`, mitigating redundant polling loops ([#4309](https://github.com/MetaMask/core/pull/4309))
|
|
314
|
-
|
|
315
|
-
## [18.1.1]
|
|
316
|
-
|
|
317
|
-
### Added
|
|
318
|
-
|
|
319
|
-
- Export `BuiltInNetworkClientId` and `CustomNetworkClientId` ([#4247](https://github.com/MetaMask/core/pull/4247))
|
|
320
|
-
|
|
321
|
-
### Changed
|
|
322
|
-
|
|
323
|
-
- Bump `@metamask/eth-json-rpc-provider` to `^3.0.2` ([#4234](https://github.com/MetaMask/core/pull/4234))
|
|
324
|
-
- Bump `@metamask/json-rpc-engine` to `^8.0.2` ([#4234](https://github.com/MetaMask/core/pull/4234))
|
|
325
|
-
- Bump `@metamask/base-controller` to `^5.0.2` ([#4232](https://github.com/MetaMask/core/pull/4232))
|
|
326
|
-
- Bump `@metamask/controller-utils` to `^9.1.0` ([#4153](https://github.com/MetaMask/core/pull/4153))
|
|
327
|
-
|
|
328
|
-
## [18.1.0]
|
|
329
|
-
|
|
330
|
-
### Added
|
|
331
|
-
|
|
332
|
-
- Add `getSelectedNetworkClient` method that returns the provider and blockTracker for the currently selected network but with a more easily used type than `getProviderAndBlockTracker` ([#4063](https://github.com/MetaMask/core/pull/4063))
|
|
333
|
-
- Add `NetworkController:getSelectedNetworkClient` action ([#4063](https://github.com/MetaMask/core/pull/4063))
|
|
334
|
-
|
|
335
|
-
### Changed
|
|
336
|
-
|
|
337
|
-
- `getProviderAndBlockTracker` is now marked as deprecated and will be removed in a future release. ([#4063](https://github.com/MetaMask/core/pull/4063))
|
|
338
|
-
|
|
339
|
-
## [18.0.1]
|
|
340
|
-
|
|
341
|
-
### Fixed
|
|
342
|
-
|
|
343
|
-
- Fix `types` field in `package.json` ([#4047](https://github.com/MetaMask/core/pull/4047))
|
|
344
|
-
|
|
345
|
-
## [18.0.0]
|
|
346
|
-
|
|
347
|
-
### Added
|
|
348
|
-
|
|
349
|
-
- **BREAKING**: Add ESM build ([#3998](https://github.com/MetaMask/core/pull/3998))
|
|
350
|
-
- It's no longer possible to import files from `./dist` directly.
|
|
351
|
-
- Add network client for Linea Sepolia (chain ID `0xe705`) ([#3995](https://github.com/MetaMask/core/pull/3995))
|
|
352
|
-
- Bump `@metamask/eth-json-rpc-infura` to `^9.1.0` to bring this change.
|
|
353
|
-
|
|
354
|
-
### Changed
|
|
355
|
-
|
|
356
|
-
- **BREAKING:** Bump `@metamask/base-controller` to `^5.0.0` ([#4039](https://github.com/MetaMask/core/pull/4039))
|
|
357
|
-
- This version has a number of breaking changes. See the changelog for more.
|
|
358
|
-
- Bump `@metamask/controller-utils` to `^9.0.0` ([#4039](https://github.com/MetaMask/core/pull/4039))
|
|
359
|
-
|
|
360
|
-
### Fixed
|
|
361
|
-
|
|
362
|
-
- **BREAKING:** Narrow `NetworkControllerMessenger` type parameters `AllowedAction` and `AllowedEvent` from `string` to `never` ([#4031](https://github.com/MetaMask/core/pull/4031))
|
|
363
|
-
- Allowlisting or using any external actions or events will now produce a type error.
|
|
364
|
-
|
|
365
|
-
## [17.2.1]
|
|
366
|
-
|
|
367
|
-
### Changed
|
|
368
|
-
|
|
369
|
-
- Bump `@metamask/controller-utils` to `^8.0.4` ([#4007](https://github.com/MetaMask/core/pull/4007))
|
|
370
|
-
- Bump `@metamask/eth-json-rpc-middleware` to `^12.1.0` ([#3829](https://github.com/MetaMask/core/pull/3829))
|
|
371
|
-
- Bump `@metamask/json-rpc-engine` to `^7.3.3` ([#4007](https://github.com/MetaMask/core/pull/4007))
|
|
372
|
-
- Bump `@metamask/rpc-errors` to `^6.2.1` ([#3970](https://github.com/MetaMask/core/pull/3970), [#3954](https://github.com/MetaMask/core/pull/3954))
|
|
373
|
-
|
|
374
|
-
## [17.2.0]
|
|
375
|
-
|
|
376
|
-
### Changed
|
|
377
|
-
|
|
378
|
-
- The `setActiveNetwork` method and action now supports built-in network types ([#3764](https://github.com/MetaMask/core/pull/3764))
|
|
379
|
-
- Previously this would only accept a network configuration ID. Now it will accept the type of a built-in network as well, using it like an ID. This lets you switch to a built-in or custom network with a single method/action.
|
|
380
|
-
- Deprecate the `setProviderType` method and action ([#3764](https://github.com/MetaMask/core/pull/3764))
|
|
381
|
-
- Use `setActiveNetwork` instead
|
|
382
|
-
- Bump `@metamask/swappable-obj-proxy` to `^2.2.0` ([#3784](https://github.com/MetaMask/core/pull/3784))
|
|
383
|
-
- Bump `@metamask/utils` to `^8.3.0` ([#3769](https://github.com/MetaMask/core/pull/3769))
|
|
384
|
-
- Bump `@metamask/base-controller` to `^4.1.1` ([#3760](https://github.com/MetaMask/core/pull/3760), [#3821](https://github.com/MetaMask/core/pull/3821))
|
|
385
|
-
- Bump `@metamask/controller-utils` to `^8.0.2` ([#3821](https://github.com/MetaMask/core/pull/3821))
|
|
386
|
-
- Bump `@metamask/eth-json-rpc-provider` to `^2.3.2` ([#3821](https://github.com/MetaMask/core/pull/3821))
|
|
387
|
-
- Bump `@metamask/json-rpc-engine` to `^7.3.2` ([#3821](https://github.com/MetaMask/core/pull/3821))
|
|
388
|
-
|
|
389
|
-
## [17.1.0]
|
|
390
|
-
|
|
391
|
-
### Added
|
|
392
|
-
|
|
393
|
-
- Add `getNetworkConfigurationByNetworkClientId` method which can be used to retrieve details for both custom and built-in networks (using the network configuration object shape) ([#2055](https://github.com/MetaMask/core/pull/2055))
|
|
394
|
-
- Add `NetworkController:getNetworkConfigurationByNetworkClientId` messenger action for the previous method ([#2055](https://github.com/MetaMask/core/pull/2055))
|
|
395
|
-
|
|
396
|
-
### Changed
|
|
397
|
-
|
|
398
|
-
- Bump `@metamask/base-controller` to `^4.0.1` ([#3695](https://github.com/MetaMask/core/pull/3695))
|
|
399
|
-
- Bump `@metamask/controller-utils` to `^8.0.1` ([#3695](https://github.com/MetaMask/core/pull/3695), [#3678](https://github.com/MetaMask/core/pull/3678), [#3667](https://github.com/MetaMask/core/pull/3667), [#3580](https://github.com/MetaMask/core/pull/3580))
|
|
400
|
-
- Bump `@metamask/eth-json-rpc-provider` to `^2.3.1` ([#3695](https://github.com/MetaMask/core/pull/3695))
|
|
401
|
-
- Bump `@metamask/json-rpc-engine` to `^7.3.1` ([#3695](https://github.com/MetaMask/core/pull/3695))
|
|
402
|
-
- Create new network clients before updating `networkConfigurations` state ([#3679](https://github.com/MetaMask/core/pull/3679))
|
|
403
|
-
- This primarily affects subscribers to the `NetworkController:stateChange` event. It's now safe to use a network client for any network that appears in the `networkConfigurations` state, whereas previously it was possible that synchronous attempts to access a network client in response to this event would fail.
|
|
404
|
-
- Add `NetworkState` payload to `NetworkController:networkWillChange` and `NetworkController:networkDidChange` ([#3598](https://github.com/MetaMask/core/pull/3598))
|
|
405
|
-
- Both of these events now include `NetworkState` as the first and only item in the payload
|
|
406
|
-
|
|
407
|
-
## [17.0.0]
|
|
408
|
-
|
|
409
|
-
### Changed
|
|
410
|
-
|
|
411
|
-
- **BREAKING:** Bump `@metamask/base-controller` to ^4.0.0 ([#2063](https://github.com/MetaMask/core/pull/2063))
|
|
412
|
-
- This is breaking because the type of the `messenger` has backward-incompatible changes. See the changelog for this package for more.
|
|
413
|
-
- Bump `@metamask/controller-utils` to ^6.0.0 ([#2063](https://github.com/MetaMask/core/pull/2063))
|
|
414
|
-
|
|
415
|
-
## [16.0.0]
|
|
416
|
-
|
|
417
|
-
### Changed
|
|
418
|
-
|
|
419
|
-
- **BREAKING:** Bump dependency `@metamask/eth-query` from ^3.0.1 to ^4.0.0 ([#2028](https://github.com/MetaMask/core/pull/2028))
|
|
420
|
-
- This is breaking because it changes the type of the EthQuery instance this controller creates internally and exports under the `getEthQuery` action. Please consult the [changelog for `@metamask/eth-query` 4.0.0](https://github.com/MetaMask/eth-query/blob/main/CHANGELOG.md#400) for more.
|
|
421
|
-
|
|
422
|
-
## [15.2.0]
|
|
423
|
-
|
|
424
|
-
### Changed
|
|
425
|
-
|
|
426
|
-
- Update @metamask/eth-json-rpc-middleware in network controller ([#1988](https://github.com/MetaMask/core/pull/1988))
|
|
427
|
-
- Bump dependency on `@metamask/json-rpc-engine` to ^7.2.0 ([#1895](https://github.com/MetaMask/core/pull/1895))
|
|
428
|
-
- Bump @metamask/utils from 8.1.0 to 8.2.0 ([#1957](https://github.com/MetaMask/core/pull/1957))
|
|
429
|
-
|
|
430
|
-
## [15.1.0]
|
|
431
|
-
|
|
432
|
-
### Added
|
|
433
|
-
|
|
434
|
-
- Add new action handlers and associated types ([#1806](https://github.com/MetaMask/core/pull/1806))
|
|
435
|
-
- `NetworkController:setActiveNetwork` / `NetworkControllerSetActiveNetworkAction`
|
|
436
|
-
- `NetworkController:setProviderType` / `NetworkControllerSetProviderTypeAction`
|
|
437
|
-
- `NetworkController:findNetworkClientByChainId` / `NetworkControllerFindNetworkClientIdByChainIdAction`
|
|
438
|
-
- Add `ticker` to `NetworkClientConfiguration` ([#1794](https://github.com/MetaMask/core/pull/1794))
|
|
439
|
-
|
|
440
|
-
### Changed
|
|
441
|
-
|
|
442
|
-
- Bump dependency on `@metamask/eth-json-rpc-provider` to ^2.2.0 ([#1738](https://github.com/MetaMask/core/pull/1738))
|
|
443
|
-
|
|
444
|
-
## [15.0.0]
|
|
445
|
-
|
|
446
|
-
### Changed
|
|
447
|
-
|
|
448
|
-
- **BREAKING:** Bump dependency on `@metamask/eth-json-rpc-infura` to ^9.0.0 ([#1653](https://github.com/MetaMask/core/pull/1653))
|
|
449
|
-
- **BREAKING:** Bump dependency on `@metamask/eth-json-rpc-middleware` to ^12.0.0 ([#1653](https://github.com/MetaMask/core/pull/1653))
|
|
450
|
-
- **BREAKING:** Move from `json-rpc-engine` ^7.1.1 to `@metamask/json-rpc-engine` ^8.0.0 ([#1653](https://github.com/MetaMask/core/pull/1653))
|
|
451
|
-
- **BREAKING:** Bump dependency on `eth-block-tracker` to ^8.0.0 ([#1653](https://github.com/MetaMask/core/pull/1653))
|
|
452
|
-
- Bump dependency on `@metamask/eth-json-rpc-provider` to ^2.1.0 ([#1653](https://github.com/MetaMask/core/pull/1653))
|
|
453
|
-
- Move from `eth-rpc-errors` ^4.0.2 to `@metamask/rpc-errors` ^6.1.0 ([#1653](https://github.com/MetaMask/core/pull/1653))
|
|
454
|
-
|
|
455
|
-
## [14.0.0]
|
|
456
|
-
|
|
457
|
-
### Added
|
|
458
|
-
|
|
459
|
-
- Add `NetworkController:getEIP1559Compatibility` controller action ([#1673](https://github.com/MetaMask/core/pull/1673))
|
|
460
|
-
|
|
461
|
-
### Changed
|
|
462
|
-
|
|
463
|
-
- **BREAKING:** Rename `get1555CompatibilityWithNetworkClientId` to `get1559CompatibilityWithNetworkClientId` ([#1673](https://github.com/MetaMask/core/pull/1673))
|
|
464
|
-
- Bump dependency on `@metamask/utils` to ^8.1.0 ([#1639](https://github.com/MetaMask/core/pull/1639))
|
|
465
|
-
- Bump dependency on `@metamask/base-controller` to ^3.2.3
|
|
466
|
-
- Bump dependency on `@metamask/controller-utils` to ^5.0.2
|
|
467
|
-
|
|
468
|
-
### Fixed
|
|
469
|
-
|
|
470
|
-
- Update linea goerli explorer url ([#1666](https://github.com/MetaMask/core/pull/1666))
|
|
471
|
-
|
|
472
|
-
## [13.0.1]
|
|
473
|
-
|
|
474
|
-
### Changed
|
|
475
|
-
|
|
476
|
-
- Update TypeScript to v4.8.x ([#1718](https://github.com/MetaMask/core/pull/1718))
|
|
477
|
-
|
|
478
|
-
## [13.0.0]
|
|
479
|
-
|
|
480
|
-
### Changed
|
|
481
|
-
|
|
482
|
-
- **BREAKING**: Remove `NetworkId` type ([#1633](https://github.com/MetaMask/core/pull/1633))
|
|
483
|
-
- **BREAKING**: Remove `networkId` property from `NetworkState` type ([#1633](https://github.com/MetaMask/core/pull/1633))
|
|
484
|
-
- Update scaffold RPC middleware for built-in Infura networks to no longer resolve `net_version` locally ([#1633](https://github.com/MetaMask/core/pull/1633))
|
|
485
|
-
- Stop making `net_version` request to determine network status ([#1633](https://github.com/MetaMask/core/pull/1633))
|
|
486
|
-
- Bump dependency on `@metamask/controller-utils` to ^5.0.0
|
|
487
|
-
|
|
488
|
-
## [12.2.0]
|
|
489
|
-
|
|
490
|
-
### Added
|
|
491
|
-
|
|
492
|
-
- Add `NetworkController:getNetworkClientById` action ([#1638](https://github.com/MetaMask/core/pull/1638))
|
|
493
|
-
- Add `lookupNetworkByClientId` and `get1555CompatibilityWithNetworkClientId` methods ([#1557](https://github.com/MetaMask/core/pull/1557))
|
|
494
|
-
|
|
495
|
-
### Changed
|
|
496
|
-
|
|
497
|
-
- Add optional `networkClientId` argument to methods `lookupNetwork` and `getEIP1559Compatibility` ([#1557](https://github.com/MetaMask/core/pull/1557))
|
|
498
|
-
|
|
499
|
-
## [12.1.2]
|
|
500
|
-
|
|
501
|
-
### Changed
|
|
502
|
-
|
|
503
|
-
- Bump dependency on `@metamask/base-controller` to ^3.2.1
|
|
504
|
-
- Bump dependency on `@metamask/controller-utils` to ^4.3.2
|
|
505
|
-
|
|
506
|
-
## [12.1.1]
|
|
507
|
-
|
|
508
|
-
### Added
|
|
509
|
-
|
|
510
|
-
- Added an export for NetworkClientId in NetworkController ([#1583](https://github.com/MetaMask/core/pull/1583))
|
|
511
|
-
|
|
512
|
-
## [12.1.0]
|
|
513
|
-
|
|
514
|
-
### Added
|
|
515
|
-
|
|
516
|
-
- Add `getNetworkClientById` ([#1562](https://github.com/MetaMask/core/pull/1562))
|
|
517
|
-
- Add `findNetworkClientIdByChainId` ([#1571](https://github.com/MetaMask/core/pull/1571))
|
|
518
|
-
|
|
519
|
-
## [12.0.0]
|
|
520
|
-
|
|
521
|
-
### Added
|
|
522
|
-
|
|
523
|
-
- Add `NetworksMetadata` type ([#1559](https://github.com/MetaMask/core/pull/1559))
|
|
524
|
-
|
|
525
|
-
### Changed
|
|
526
|
-
|
|
527
|
-
- **BREAKING:** Remove `NetworkDetails` type in favor of `NetworkMetadata` ([#1559](https://github.com/MetaMask/core/pull/1559))
|
|
528
|
-
- This new type includes `NetworkDetails` plus a `status` property
|
|
529
|
-
- **BREAKING:** Add `networksMetadata` to state ([#1559](https://github.com/MetaMask/core/pull/1559))
|
|
530
|
-
- Consumers will need to add a migration. The data for this property can be constructed by looping over the values in `InfuraNetworkType` from `@metamask/controller-utils` plus the network configuration IDs in the state property `networkConfigurations` and setting each value to `{ status: "unknown", EIPS: {} }`.
|
|
531
|
-
- **BREAKING:** Add `selectedNetworkClientId` to state ([#1548](https://github.com/MetaMask/core/pull/1548))
|
|
532
|
-
- Consumers will need to add a migration. This property should be set to either `providerConfig.type` or `providerConfig.id`.
|
|
533
|
-
- Update `getEIP1559Compatibility` to return `undefined` when the latest block is unavailable ([#1457](https://github.com/MetaMask/core/pull/1457))
|
|
534
|
-
- Replace `eth-query` ^2.1.2 with `@metamask/eth-query` ^3.0.1 ([#1546](https://github.com/MetaMask/core/pull/1546))
|
|
535
|
-
|
|
536
|
-
### Removed
|
|
537
|
-
|
|
538
|
-
- **BREAKING:** Remove `networkDetails` from state ([#1559](https://github.com/MetaMask/core/pull/1559))
|
|
539
|
-
- The data in this state property has been merged into the new `networksMetadata` state property; each value in this object contains an `EIPS` property.
|
|
540
|
-
|
|
541
|
-
## [11.0.0]
|
|
542
|
-
|
|
543
|
-
### Changed
|
|
544
|
-
|
|
545
|
-
- **BREAKING**: Require `ticker` to be included in the `providerConfig` state ([#1495](https://github.com/MetaMask/core/pull/1495))
|
|
546
|
-
- This requires a state migration, setting `providerConfig.ticker` to `ETH` if it's missing.
|
|
547
|
-
- Update `@metamask/utils` to `^6.2.0` ([#1514](https://github.com/MetaMask/core/pull/1514))
|
|
548
|
-
- Bump @metamask/eth-json-rpc-infura from 8.1.0 to 8.1.1 ([#1517](https://github.com/MetaMask/core/pull/1517))
|
|
549
|
-
- Remove unnecessary `babel-runtime` dependency ([#1504](https://github.com/MetaMask/core/pull/1504))
|
|
550
|
-
|
|
551
|
-
## [10.3.1]
|
|
552
|
-
|
|
553
|
-
### Changed
|
|
554
|
-
|
|
555
|
-
- Bump `@metamask/eth-json-rpc-infura` dependency from ^8.0.0 to ^8.1.0
|
|
556
|
-
- This extends the types that this package recognizes to include Linea networks
|
|
557
|
-
|
|
558
|
-
## [10.3.0]
|
|
559
|
-
|
|
560
|
-
### Added
|
|
561
|
-
|
|
562
|
-
- Add `getNetworkClientsById` method ([#1439](https://github.com/MetaMask/core/pull/1439))
|
|
563
|
-
- This method returns a registry of available built-in and custom networks, allowing consumers to access multiple networks simultaneously if desired
|
|
564
|
-
|
|
565
|
-
### Changed
|
|
566
|
-
|
|
567
|
-
- Network clients are retained and will no longer be destroyed or recreated whenever the network is initialized or switched ([#1439](https://github.com/MetaMask/core/pull/1439))
|
|
568
|
-
- This means that cached responses for a network will no longer disappear when a different network is selected
|
|
569
|
-
- Update `upsertNetworkConfiguration` to keep the network client registry up to date with changes to the set of network configurations ([#1439](https://github.com/MetaMask/core/pull/1439))
|
|
570
|
-
- If a new network configuration is added, the information in it will be used to create and register a new network client
|
|
571
|
-
- If an existing network configuration is updated, its information will be used to recreate the client for the corresponding network
|
|
572
|
-
|
|
573
|
-
## [10.2.0]
|
|
574
|
-
|
|
575
|
-
### Added
|
|
576
|
-
|
|
577
|
-
- Expose `BlockTracker` type ([#1443](https://github.com/MetaMask/core/pull/1443))
|
|
578
|
-
|
|
579
|
-
## [10.1.0]
|
|
580
|
-
|
|
581
|
-
### Added
|
|
582
|
-
|
|
583
|
-
- Add `loadBackup` method to NetworkController ([#1421](https://github.com/MetaMask/core/pull/1421))
|
|
584
|
-
|
|
585
|
-
## [10.0.0]
|
|
586
|
-
|
|
587
|
-
### Changed
|
|
588
|
-
|
|
589
|
-
- **BREAKING:** Update `getEIP1559Compatibility` to return `false` instead of `true` if the provider has not been initialized yet ([#1404](https://github.com/MetaMask/core/pull/1404))
|
|
590
|
-
- Update `getEIP1559Compatibility` to not hit the current network if it is known that it does not support EIP-1559 ([#1404](https://github.com/MetaMask/core/pull/1404))
|
|
591
|
-
- Update `networkDetails` initial state from `{ EIPS: { 1559: false } }` to `{ EIPS: {} }` ([#1404](https://github.com/MetaMask/core/pull/1404))
|
|
592
|
-
- Update lookupNetwork to unset `networkDetails.EIPS[1559]` in state instead of setting it `false` if either of its requests for the network ID or network details fails ([#1403](https://github.com/MetaMask/core/pull/1403))
|
|
593
|
-
|
|
594
|
-
## [9.0.0]
|
|
595
|
-
|
|
596
|
-
### Added
|
|
597
|
-
|
|
598
|
-
- The events `networkWillChange` and `networkDidChange` are emitted during `setProviderType`, `setActiveNetwork`, `resetConnection`, and `rollbackToPreviousProvider` ([#1336](https://github.com/MetaMask/core/pull/1336))
|
|
599
|
-
- The `networkWillChange` event is emitted before the network is switched (before the network status is cleared),
|
|
600
|
-
- The `networkDidChange` event is emitted after the new provider is setup (but before it has finished initializing).
|
|
601
|
-
- Add `destroy` method ([#1330](https://github.com/MetaMask/core/pull/1330))
|
|
602
|
-
- Add events `infuraIsBlocked` and `infuraIsUnblocked` ([#1264](https://github.com/MetaMask/core/pull/1264))
|
|
603
|
-
- Add `NetworkController:getState` action constant ([#1329](https://github.com/MetaMask/core/pull/1329))
|
|
604
|
-
|
|
605
|
-
### Changed
|
|
606
|
-
|
|
607
|
-
- **BREAKING:** Bump to Node 16 ([#1262](https://github.com/MetaMask/core/pull/1262))
|
|
608
|
-
- **BREAKING:** The `providerConfig` type and state property have changed. The `chainId` property is now `Hex` rather than a decimal `string` ([#1367](https://github.com/MetaMask/core/pull/1367))
|
|
609
|
-
- This requires a state migration
|
|
610
|
-
- This affects the return value of the `NetworkController:getProviderConfig` and `NetworkController:getState` actions.
|
|
611
|
-
- **BREAKING:** The `NetworkConfiguration` type and the `networkConfigurations` state property have changed. The `chainId` property on each configuration is now `Hex` rather than a decimal `string`. ([#1367](https://github.com/MetaMask/core/pull/1367))
|
|
612
|
-
- This requires a state migration
|
|
613
|
-
- This change affects the `upsertNetworkConfiguration` method, which takes a network configuration as the first parameter
|
|
614
|
-
- This affects the return value of the `NetworkController:getState` action
|
|
615
|
-
- Allow overlapping `lookupNetwork` calls ([#1375](https://github.com/MetaMask/core/pull/1375))
|
|
616
|
-
- `lookupNetwork` no longer uses a mutex, meaning that a lookup can be initiated before the previous one has finished. This allows for faster network switching
|
|
617
|
-
- When there is an overlap in `lookupNetwork` calls, the older one is aborted before events are emitted and before state changes
|
|
618
|
-
- **BREAKING:** Change `networkDetails` format ([#1326](https://github.com/MetaMask/core/pull/1326))
|
|
619
|
-
- Previously `networkDetails` was `{ isEIP1559Compatible: boolean }`, now it is `{ EIPS: { [eipNumber: number]: boolean } }`
|
|
620
|
-
- **BREAKING:** Update NetworkController to use a simpler middleware stack derived from pieces of `eth-json-rpc-middleware` instead of `web3-provider-engine` ([#1116](https://github.com/MetaMask/core/pull/1116))
|
|
621
|
-
- A call to `eth_chainId` on a custom network will now return the `chainId` in the provider config rather than the chain ID returned by the network.
|
|
622
|
-
- A call to `eth_chainId` on a built-in Infura network will now return a hard-coded chain ID rather than the chain ID returned by the network.
|
|
623
|
-
- A call to `net_version` on a built-in Infura network will now return a hard-coded network ID rather than the network ID returned by the network.
|
|
624
|
-
- Previously, RPC requests with an object as the first parameter (e.g. `eth_call`) were "sanitized" (i.e. unknown properties were removed from this first parameter, and any hex strings were normalized). This no longer happens. Instead these requests will pass through to the network unchanged.
|
|
625
|
-
- A call to `eth_getBalance`, `eth_getBlockByNumber`, `eth_getCode`, `eth_getTransactionCount`, or `eth_call` will now be intercepted such that a block tag parameter of `"latest"` will be replaced with the latest known block number before being passed to the network.
|
|
626
|
-
- This substitution makes it more likely that we can return a cached response to the request.
|
|
627
|
-
- Previously, a `eth_getTransactionCount` request with a block tag of `"pending"` would be intercepted and given a result from our nonce cache (if the cache was populated for the given address). This nonce cache was updated upon each call to `eth_sendRawTransaction` based on the nonce of the transaction being sent. The whole nonce cache was also cleared upon a call to `evm_revert`. This no longer happens, and these RPC methods will be passed to the network unchanged.
|
|
628
|
-
- If you were using this to get a suggested next nonce, you can instead use the `nonceTracker` that `@metamask/transaction-controller` exposes
|
|
629
|
-
- A call to `web3_clientVersion` is no longer intercepted to return a static result of `"ProviderEngine/v<version>/javascript"`
|
|
630
|
-
- A call to `net_listening` is no longer intercepted to return a static result of `true`
|
|
631
|
-
- A call to `eth_hashrate` is no longer intercepted to return a static result of `"0x00"`
|
|
632
|
-
- A call to `eth_mining` is no longer intercepted to return a static result of `false`
|
|
633
|
-
- Previously, `eth_subscribe` and `eth_unsubscribe` would never hit the network; instead, the behavior was polyfilled by polling the network for new blocks. Additionally, the `newPendingTransactions` parameter for `eth_subscribe` was unsupported. This polyfill is no longer present, and `eth_subscribe` and `eth_unsubscribe` are passed through to the network unchanged.
|
|
634
|
-
- Consumers wishing to recreate the prior behavior and use the block tracker to power subscriptions may employ the middleware provided by the `eth-json-rpc-filters` package.
|
|
635
|
-
- Previously, `eth_newFilter`, `eth_newBlockFilter`, `eth_newPendingTransactionFilter`, `eth_uninstallFilter`, `eth_getFilterChanges`, and `eth_getFilterLogs` would never hit the network; instead, the behavior was polyfilled by polling the network for new blocks and recording updates for registered filters. This polyfill is no longer present, and these RPC methods are passed through to the network unchanged.
|
|
636
|
-
- Consumers wishing to recreate the prior behavior and use the block tracker to power filters may employ the middleware provided by the `eth-json-rpc-filters` package.
|
|
637
|
-
- Interfacing with a network that exposes a websocket is no longer supported.
|
|
638
|
-
- **BREAKING:** The methods `initializeProvider`, `setActiveNetwork`, and `resetConnection` will now throw if the provider config is of type `rpc` but is missing an RPC URL or a chain ID. ([#1316](https://github.com/MetaMask/core/pull/1316))
|
|
639
|
-
- Previously the chain ID was not required to setup the provider.
|
|
640
|
-
- Previously if the RPC URL was omitted, no error would be thrown but the provider would not be setup.
|
|
641
|
-
- **BREAKING:** The method `setProviderType` will now throw when passed the type `rpc`. ([#1316](https://github.com/MetaMask/core/pull/1316))
|
|
642
|
-
- Previously no error would be thrown but the provider would not be setup.
|
|
643
|
-
- **BREAKING**: Update type of `blockTracker` property exposed by `getProviderAndBlockTracker` from `any` to `SwappableProxy<PollingBlockTracker>` ([#1303](https://github.com/MetaMask/core/pull/1303))
|
|
644
|
-
- **BREAKING:** Rename provider configuration property `rpcTarget` to `rpcUrl` ([#1292](https://github.com/MetaMask/core/pull/1292))
|
|
645
|
-
- **BREAKING:** The network status will now be "blocked" rather than "unavailable" when the user is blocked by Infura ([#1264](https://github.com/MetaMask/core/pull/1264))
|
|
646
|
-
- **BREAKING:** The `infuraProjectId` constructor parameter is now required ([#1276](https://github.com/MetaMask/core/pull/1276))
|
|
647
|
-
- **BREAKING:** The exported `Provider` type has been updated to better reflect the provider type returned by the network controller ([#1266](https://github.com/MetaMask/core/pull/1266))
|
|
648
|
-
- Previously this was set to `any`. Now it returns a type that _mostly_ matches the provider returned (some semi-internal properties are omitted)
|
|
649
|
-
- This affects the exported `ProviderProxy` type as well, which wraps the `Provider` type
|
|
650
|
-
- Support hex and number `net_version` responses ([#1380](https://github.com/MetaMask/core/pull/1380))
|
|
651
|
-
- Bump @metamask/utils from 5.0.1 to 5.0.2 ([#1271](https://github.com/MetaMask/core/pull/1271))
|
|
652
|
-
- Bump dependency `eth-json-rpc-infura` (now `@metamask/eth-json-rpc-infura`) from ^7.0.0 to ^8.0.0. ([#1116](https://github.com/MetaMask/core/pull/1116))
|
|
653
|
-
- Add dependency `eth-json-rpc-middleware` ^11.0.0 ([#1116](https://github.com/MetaMask/core/pull/1116))
|
|
654
|
-
- Add dependency `eth-json-rpc-provider` ^1.0.0 ([#1116](https://github.com/MetaMask/core/pull/1116))
|
|
655
|
-
- Add dependency `eth-block-tracker` ^7.0.0 ([#1116](https://github.com/MetaMask/core/pull/1116))
|
|
656
|
-
- Add dependency `json-rpc-engine` ^6.1.0 ([#1116](https://github.com/MetaMask/core/pull/1116))
|
|
657
|
-
|
|
658
|
-
### Removed
|
|
659
|
-
|
|
660
|
-
- **BREAKING:** Remove `providerConfigChange` event ([#1329](https://github.com/MetaMask/core/pull/1329))
|
|
661
|
-
- Consumers are encouraged to subscribe to `NetworkController:stateChange` with a selector function that returns `providerConfig` if they want to perform an action when `providerConfig` changes.
|
|
662
|
-
- **BREAKING:** The built-in "localhost" network has been removed ([#1313](https://github.com/MetaMask/core/pull/1313))
|
|
663
|
-
|
|
664
|
-
### Fixed
|
|
665
|
-
|
|
666
|
-
- Update network details in `lookupNetwork` even when network ID is unchanged ([#1379](https://github.com/MetaMask/core/pull/1379))
|
|
667
|
-
- Fix error when `rollbackToPreviousProvider` is called when the previous network is a custom network with a missing or invalid `id` ([#1223](https://github.com/MetaMask/core/pull/1223))
|
|
668
|
-
- In that situation, `rollbackToPreviousProvider` used to throw an error. Now it correctly rolls back instead.
|
|
669
|
-
|
|
670
|
-
## [8.0.0]
|
|
671
|
-
|
|
672
|
-
### Added
|
|
673
|
-
|
|
674
|
-
- Implement `resetConnection` method ([#1131](https://github.com/MetaMask/core/pull/1131), [#1235](https://github.com/MetaMask/core/pull/1235), [#1239](https://github.com/MetaMask/core/pull/1239))
|
|
675
|
-
|
|
676
|
-
### Changed
|
|
677
|
-
|
|
678
|
-
- Update EIP-1559 compatibility during network lookup ([#1236](https://github.com/MetaMask/core/pull/1236))
|
|
679
|
-
- EIP-1559 compatibility check is still performed on initialization and after switching networks, like before. This change only impacts direct calls to `lookupNetwork`.
|
|
680
|
-
- `lookupNetwork` is now making two network calls instead of one, ensuring that the `networkDetails` state is up-to-date.
|
|
681
|
-
- **BREAKING:** Replace `network` state with `networkId` and `networkStatus` ([#1196](https://github.com/MetaMask/core/pull/1196))
|
|
682
|
-
- If you were using `network` to access the network ID, use `networkId` instead. It will be set to `null` rather than `loading` if the network is not currently available.
|
|
683
|
-
- If you were using `network` to see if the network was currently available, use `networkStatus` instead. It will be set to `NetworkStatus.Available` if the network is available.
|
|
684
|
-
- When the network is unavailable, we now have two different states to represent that: `unknown` and `unavailable`. `unavailable` means that the network was detected as not available, whereas `unknown` is used for unknown errors and cases where the network status is yet to be determined (e.g. before initialization, or while the network is loading).
|
|
685
|
-
- Use JavaScript private fields rather than `private` TypeScript keyword for internal methods/fields ([#1189](https://github.com/MetaMask/core/pull/1189))
|
|
686
|
-
- Export `BlockTrackerProxy` type ([#1147](https://github.com/MetaMask/core/pull/1147))
|
|
687
|
-
- This is the type of the block tracker returned from the `getProviderAndBlockTracker` method
|
|
688
|
-
- **BREAKING:** Async refactor
|
|
689
|
-
- Make `rollbackToPreviousProvider` async ([#1237](https://github.com/MetaMask/core/pull/1237))
|
|
690
|
-
- Make `upsertNetworkConfiguration` async ([#1192](https://github.com/MetaMask/core/pull/1192))
|
|
691
|
-
- Make `setActiveNetwork` async ([#1190](https://github.com/MetaMask/core/pull/1190))
|
|
692
|
-
- Make `setProviderType` async ([#1191](https://github.com/MetaMask/core/pull/1191))
|
|
693
|
-
- Make `refreshNetwork` async ([#1182](https://github.com/MetaMask/core/pull/1182))
|
|
694
|
-
- Make `initializeProvider` async ([#1180](https://github.com/MetaMask/core/pull/1180))
|
|
695
|
-
- Make `verifyNetwork` async ([#1181](https://github.com/MetaMask/core/pull/1181))
|
|
696
|
-
- Dependency updates
|
|
697
|
-
- deps: bump web3-provider-engine@16.0.3->16.0.5 ([#1212](https://github.com/MetaMask/core/pull/1212))
|
|
698
|
-
- deps: eth-rpc-errors@4.0.0->4.0.2 ([#1215](https://github.com/MetaMask/core/pull/1215))
|
|
699
|
-
- deps: bump @metamask/utils to 5.0.1 ([#1211](https://github.com/MetaMask/core/pull/1211))
|
|
700
|
-
|
|
701
|
-
### Removed
|
|
702
|
-
|
|
703
|
-
- **BREAKING:** Remove `isCustomNetwork` state ([#1199](https://github.com/MetaMask/core/pull/1199))
|
|
704
|
-
- The `providerConfig.type` state will be set to `'rpc'` if the current network is a custom network. Replace all references to the `isCustomNetwork` state by checking the provider config state instead.
|
|
705
|
-
|
|
706
|
-
## [7.0.0]
|
|
707
|
-
|
|
708
|
-
### Changed
|
|
709
|
-
|
|
710
|
-
- **BREAKING:** Replace `providerConfig` setter with a public `initializeProvider` method ([#1133](https://github.com/MetaMask/core/pull/1133))
|
|
711
|
-
- The property `providerConfig` should no longer be set to initialize the provider. That property no longer exists.
|
|
712
|
-
- The method `initializeProvider` must be called instead to initialize the provider after constructing the network controller.
|
|
713
|
-
|
|
714
|
-
## [6.0.0]
|
|
715
|
-
|
|
716
|
-
### Added
|
|
717
|
-
|
|
718
|
-
- Add rollbackToPreviousProvider method ([#1132](https://github.com/MetaMask/core/pull/1132))
|
|
719
|
-
|
|
720
|
-
### Changed
|
|
721
|
-
|
|
722
|
-
- **BREAKING:** Migrate network configurations from `PreferencesController` to `NetworkController` ([#1064](https://github.com/MetaMask/core/pull/1064))
|
|
723
|
-
- Consumers will need to adapt to reading network data from `NetworkConfigurations` state on `NetworkController` rather than `frequentRpcList` on `PreferencesController`.
|
|
724
|
-
- `setRpcTarget` becomes `setActiveNetwork` on `NetworkController` and accepts a `networkConfigurationId` argument rather than an `rpcUrl`.
|
|
725
|
-
- `addToFrequentRpcList` on `PreferencesController` becomes `upsertNetworkConfiguration` on `NetworkController`.
|
|
726
|
-
- `removeFromFrequentRpcList` on `PreferencesController` becomes `removeNetworkConfiguration` on `NetworkController`
|
|
727
|
-
- The `NetworkController` requires a `trackMetaMetricsEvent` callback function argument in its constructor.
|
|
728
|
-
- **BREAKING:** Expose `getProviderAndBlockTracker` instead of `provider` ([#1091](https://github.com/MetaMask/core/pull/1091))
|
|
729
|
-
- This change is breaking because it removes the provider property from `NetworkController`. Instead, a new method `getProviderAndBlockTracker` method is available for accessing the current provider object.
|
|
730
|
-
|
|
731
|
-
## [5.0.0]
|
|
732
|
-
|
|
733
|
-
### Changed
|
|
734
|
-
|
|
735
|
-
- **BREAKING:** Rename `properties` property in state object to `networkDetails` ([#1074](https://github.com/MetaMask/controllers/pull/1074))
|
|
736
|
-
|
|
737
|
-
### Removed
|
|
738
|
-
|
|
739
|
-
- **BREAKING:** Remove `isomorphic-fetch` ([#1106](https://github.com/MetaMask/controllers/pull/1106))
|
|
740
|
-
- Consumers must now import `isomorphic-fetch` or another polyfill themselves if they are running in an environment without `fetch`
|
|
741
|
-
|
|
742
|
-
## [4.0.0]
|
|
743
|
-
|
|
744
|
-
### Changed
|
|
745
|
-
|
|
746
|
-
- **BREAKING:** Update type of state object by renaming `properties` property to `networkDetails` ([#1074](https://github.com/MetaMask/core/pull/1074))
|
|
747
|
-
- Consumers are recommended to add a state migration for this change.
|
|
748
|
-
- **BREAKING:** Rename `NetworkProperties` type to `NetworkDetails` ([#1074](https://github.com/MetaMask/core/pull/1074))
|
|
749
|
-
- Change `getEIP1559Compatibility` to use async await syntax ([#1084](https://github.com/MetaMask/core/pull/1084))
|
|
750
|
-
|
|
751
|
-
## [3.0.0]
|
|
752
|
-
|
|
753
|
-
### Added
|
|
754
|
-
|
|
755
|
-
- Add support for Sepolia as a built-in Infura network ([#1041](https://github.com/MetaMask/controllers/pull/1041))
|
|
756
|
-
- Export types for network controller events and actions ([#1039](https://github.com/MetaMask/core/pull/1039))
|
|
757
|
-
|
|
758
|
-
### Changed
|
|
759
|
-
|
|
760
|
-
- **BREAKING:** Make `lookupNetwork` block on completing the lookup ([#1063](https://github.com/MetaMask/controllers/pull/1063))
|
|
761
|
-
- This function was always `async`, but it would return before completing any async work. Now it will not return until after the network lookup has been completed.
|
|
762
|
-
- Rename this repository to `core` ([#1031](https://github.com/MetaMask/controllers/pull/1031))
|
|
763
|
-
- Update `@metamask/controller-utils` package ([#1041](https://github.com/MetaMask/controllers/pull/1041))
|
|
764
|
-
|
|
765
|
-
### Removed
|
|
766
|
-
|
|
767
|
-
- **BREAKING:**: Drop support for Ropsten, Rinkeby, and Kovan as built-in Infura networks ([#1041](https://github.com/MetaMask/controllers/pull/1041))
|
|
768
|
-
|
|
769
|
-
## [2.0.0]
|
|
770
|
-
|
|
771
|
-
### Changed
|
|
772
|
-
|
|
773
|
-
- **BREAKING:** Update type of state object by renaming `provider` property to `providerConfig` ([#995](https://github.com/MetaMask/core/pull/995))
|
|
774
|
-
- Consumers are recommended to add a state migration for this change.
|
|
775
|
-
- **BREAKING:** Rename `NetworkController:providerChange` messenger event to `NetworkController:providerConfigChange` ([#995](https://github.com/MetaMask/core/pull/995))
|
|
776
|
-
- Relax dependencies on `@metamask/base-controller` and `@metamask/controller-utils` (use `^` instead of `~`) ([#998](https://github.com/MetaMask/core/pull/998))
|
|
777
|
-
|
|
778
|
-
## [1.0.0]
|
|
779
|
-
|
|
780
|
-
### Added
|
|
781
|
-
|
|
782
|
-
- Initial release
|
|
783
|
-
|
|
784
|
-
- As a result of converting our shared controllers repo into a monorepo ([#831](https://github.com/MetaMask/core/pull/831)), we've created this package from select parts of [`@metamask/controllers` v33.0.0](https://github.com/MetaMask/core/tree/v33.0.0), namely:
|
|
785
|
-
|
|
786
|
-
- Everything in `src/network` (minus `NetworkType` and `NetworksChainId`, which were placed in `@metamask/controller-utils`)
|
|
787
|
-
|
|
788
|
-
All changes listed after this point were applied to this package following the monorepo conversion.
|
|
789
|
-
|
|
790
|
-
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/network-controller@23.1.0...HEAD
|
|
791
|
-
[23.1.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@23.0.0...@metamask/network-controller@23.1.0
|
|
792
|
-
[23.0.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@22.2.1...@metamask/network-controller@23.0.0
|
|
793
|
-
[22.2.1]: https://github.com/MetaMask/core/compare/@metamask/network-controller@22.2.0...@metamask/network-controller@22.2.1
|
|
794
|
-
[22.2.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@22.1.1...@metamask/network-controller@22.2.0
|
|
795
|
-
[22.1.1]: https://github.com/MetaMask/core/compare/@metamask/network-controller@22.1.0...@metamask/network-controller@22.1.1
|
|
796
|
-
[22.1.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@22.0.2...@metamask/network-controller@22.1.0
|
|
797
|
-
[22.0.2]: https://github.com/MetaMask/core/compare/@metamask/network-controller@22.0.1...@metamask/network-controller@22.0.2
|
|
798
|
-
[22.0.1]: https://github.com/MetaMask/core/compare/@metamask/network-controller@22.0.0...@metamask/network-controller@22.0.1
|
|
799
|
-
[22.0.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@21.1.0...@metamask/network-controller@22.0.0
|
|
800
|
-
[21.1.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@21.0.1...@metamask/network-controller@21.1.0
|
|
801
|
-
[21.0.1]: https://github.com/MetaMask/core/compare/@metamask/network-controller@21.0.0...@metamask/network-controller@21.0.1
|
|
802
|
-
[21.0.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@20.2.0...@metamask/network-controller@21.0.0
|
|
803
|
-
[20.2.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@20.1.0...@metamask/network-controller@20.2.0
|
|
804
|
-
[20.1.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@20.0.0...@metamask/network-controller@20.1.0
|
|
805
|
-
[20.0.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@19.0.0...@metamask/network-controller@20.0.0
|
|
806
|
-
[19.0.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@18.1.3...@metamask/network-controller@19.0.0
|
|
807
|
-
[18.1.3]: https://github.com/MetaMask/core/compare/@metamask/network-controller@18.1.2...@metamask/network-controller@18.1.3
|
|
808
|
-
[18.1.2]: https://github.com/MetaMask/core/compare/@metamask/network-controller@18.1.1...@metamask/network-controller@18.1.2
|
|
809
|
-
[18.1.1]: https://github.com/MetaMask/core/compare/@metamask/network-controller@18.1.0...@metamask/network-controller@18.1.1
|
|
810
|
-
[18.1.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@18.0.1...@metamask/network-controller@18.1.0
|
|
811
|
-
[18.0.1]: https://github.com/MetaMask/core/compare/@metamask/network-controller@18.0.0...@metamask/network-controller@18.0.1
|
|
812
|
-
[18.0.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@17.2.1...@metamask/network-controller@18.0.0
|
|
813
|
-
[17.2.1]: https://github.com/MetaMask/core/compare/@metamask/network-controller@17.2.0...@metamask/network-controller@17.2.1
|
|
814
|
-
[17.2.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@17.1.0...@metamask/network-controller@17.2.0
|
|
815
|
-
[17.1.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@17.0.0...@metamask/network-controller@17.1.0
|
|
816
|
-
[17.0.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@16.0.0...@metamask/network-controller@17.0.0
|
|
817
|
-
[16.0.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@15.2.0...@metamask/network-controller@16.0.0
|
|
818
|
-
[15.2.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@15.1.0...@metamask/network-controller@15.2.0
|
|
819
|
-
[15.1.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@15.0.0...@metamask/network-controller@15.1.0
|
|
820
|
-
[15.0.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@14.0.0...@metamask/network-controller@15.0.0
|
|
821
|
-
[14.0.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@13.0.1...@metamask/network-controller@14.0.0
|
|
822
|
-
[13.0.1]: https://github.com/MetaMask/core/compare/@metamask/network-controller@13.0.0...@metamask/network-controller@13.0.1
|
|
823
|
-
[13.0.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@12.2.0...@metamask/network-controller@13.0.0
|
|
824
|
-
[12.2.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@12.1.2...@metamask/network-controller@12.2.0
|
|
825
|
-
[12.1.2]: https://github.com/MetaMask/core/compare/@metamask/network-controller@12.1.1...@metamask/network-controller@12.1.2
|
|
826
|
-
[12.1.1]: https://github.com/MetaMask/core/compare/@metamask/network-controller@12.1.0...@metamask/network-controller@12.1.1
|
|
827
|
-
[12.1.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@12.0.0...@metamask/network-controller@12.1.0
|
|
828
|
-
[12.0.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@11.0.0...@metamask/network-controller@12.0.0
|
|
829
|
-
[11.0.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@10.3.1...@metamask/network-controller@11.0.0
|
|
830
|
-
[10.3.1]: https://github.com/MetaMask/core/compare/@metamask/network-controller@10.3.0...@metamask/network-controller@10.3.1
|
|
831
|
-
[10.3.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@10.2.0...@metamask/network-controller@10.3.0
|
|
832
|
-
[10.2.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@10.1.0...@metamask/network-controller@10.2.0
|
|
833
|
-
[10.1.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@10.0.0...@metamask/network-controller@10.1.0
|
|
834
|
-
[10.0.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@9.0.0...@metamask/network-controller@10.0.0
|
|
835
|
-
[9.0.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@8.0.0...@metamask/network-controller@9.0.0
|
|
836
|
-
[8.0.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@7.0.0...@metamask/network-controller@8.0.0
|
|
837
|
-
[7.0.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@6.0.0...@metamask/network-controller@7.0.0
|
|
838
|
-
[6.0.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@5.0.0...@metamask/network-controller@6.0.0
|
|
839
|
-
[5.0.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@4.0.0...@metamask/network-controller@5.0.0
|
|
840
|
-
[4.0.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@3.0.0...@metamask/network-controller@4.0.0
|
|
841
|
-
[3.0.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@2.0.0...@metamask/network-controller@3.0.0
|
|
842
|
-
[2.0.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@1.0.0...@metamask/network-controller@2.0.0
|
|
843
|
-
[1.0.0]: https://github.com/MetaMask/core/releases/tag/@metamask/network-controller@1.0.0
|