@metamask/network-controller 17.2.0 → 18.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.
Files changed (80) hide show
  1. package/CHANGELOG.md +113 -2
  2. package/dist/NetworkController.js +16 -921
  3. package/dist/NetworkController.js.map +1 -1
  4. package/dist/NetworkController.mjs +17 -0
  5. package/dist/NetworkController.mjs.map +1 -0
  6. package/dist/chunk-2QJYHWIP.mjs +15 -0
  7. package/dist/chunk-2QJYHWIP.mjs.map +1 -0
  8. package/dist/chunk-D7YSDUFH.mjs +123 -0
  9. package/dist/chunk-D7YSDUFH.mjs.map +1 -0
  10. package/dist/chunk-DMJYDN4Q.js +11 -0
  11. package/dist/chunk-DMJYDN4Q.js.map +1 -0
  12. package/dist/chunk-LTT6WJXC.js +99 -0
  13. package/dist/chunk-LTT6WJXC.js.map +1 -0
  14. package/dist/chunk-NFRLCZQI.js +123 -0
  15. package/dist/chunk-NFRLCZQI.js.map +1 -0
  16. package/dist/chunk-TEO6T2KL.mjs +11 -0
  17. package/dist/chunk-TEO6T2KL.mjs.map +1 -0
  18. package/dist/chunk-VGYLDDJB.js +9 -0
  19. package/dist/chunk-VGYLDDJB.js.map +1 -0
  20. package/dist/chunk-VNCJZRDU.js +999 -0
  21. package/dist/chunk-VNCJZRDU.js.map +1 -0
  22. package/dist/chunk-VTLOAS2R.mjs +9 -0
  23. package/dist/chunk-VTLOAS2R.mjs.map +1 -0
  24. package/dist/chunk-XUI43LEZ.mjs +30 -0
  25. package/dist/chunk-XUI43LEZ.mjs.map +1 -0
  26. package/dist/chunk-XWP6GXMK.mjs +999 -0
  27. package/dist/chunk-XWP6GXMK.mjs.map +1 -0
  28. package/dist/chunk-Z4BLTVTB.js +30 -0
  29. package/dist/chunk-Z4BLTVTB.js.map +1 -0
  30. package/dist/chunk-ZGRSXLW7.mjs +99 -0
  31. package/dist/chunk-ZGRSXLW7.mjs.map +1 -0
  32. package/dist/chunk-ZKNI7MD3.js +15 -0
  33. package/dist/chunk-ZKNI7MD3.js.map +1 -0
  34. package/dist/constants.js +9 -31
  35. package/dist/constants.js.map +1 -1
  36. package/dist/constants.mjs +10 -0
  37. package/dist/constants.mjs.map +1 -0
  38. package/dist/create-auto-managed-network-client.js +9 -131
  39. package/dist/create-auto-managed-network-client.js.map +1 -1
  40. package/dist/create-auto-managed-network-client.mjs +10 -0
  41. package/dist/create-auto-managed-network-client.mjs.map +1 -0
  42. package/dist/create-network-client.js +8 -147
  43. package/dist/create-network-client.js.map +1 -1
  44. package/dist/create-network-client.mjs +9 -0
  45. package/dist/create-network-client.mjs.map +1 -0
  46. package/dist/index.js +24 -21
  47. package/dist/index.js.map +1 -1
  48. package/dist/index.mjs +25 -0
  49. package/dist/index.mjs.map +1 -0
  50. package/dist/logger.js +9 -6
  51. package/dist/logger.js.map +1 -1
  52. package/dist/logger.mjs +10 -0
  53. package/dist/logger.mjs.map +1 -0
  54. package/dist/tsconfig.build.tsbuildinfo +1 -0
  55. package/dist/{NetworkController.d.ts → types/NetworkController.d.ts} +1 -1
  56. package/dist/types/NetworkController.d.ts.map +1 -0
  57. package/dist/types/constants.d.ts.map +1 -0
  58. package/dist/types/create-auto-managed-network-client.d.ts.map +1 -0
  59. package/dist/types/create-network-client.d.ts.map +1 -0
  60. package/dist/types/index.d.ts.map +1 -0
  61. package/dist/types/logger.d.ts.map +1 -0
  62. package/dist/types/types.d.ts.map +1 -0
  63. package/dist/types.js +7 -11
  64. package/dist/types.js.map +1 -1
  65. package/dist/types.mjs +8 -0
  66. package/dist/types.mjs.map +1 -0
  67. package/package.json +18 -8
  68. package/dist/NetworkController.d.ts.map +0 -1
  69. package/dist/constants.d.ts.map +0 -1
  70. package/dist/create-auto-managed-network-client.d.ts.map +0 -1
  71. package/dist/create-network-client.d.ts.map +0 -1
  72. package/dist/index.d.ts.map +0 -1
  73. package/dist/logger.d.ts.map +0 -1
  74. package/dist/types.d.ts.map +0 -1
  75. /package/dist/{constants.d.ts → types/constants.d.ts} +0 -0
  76. /package/dist/{create-auto-managed-network-client.d.ts → types/create-auto-managed-network-client.d.ts} +0 -0
  77. /package/dist/{create-network-client.d.ts → types/create-network-client.d.ts} +0 -0
  78. /package/dist/{index.d.ts → types/index.d.ts} +0 -0
  79. /package/dist/{logger.d.ts → types/logger.d.ts} +0 -0
  80. /package/dist/{types.d.ts → types/types.d.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,4 +1,5 @@
1
1
  # Changelog
2
+
2
3
  All notable changes to this project will be documented in this file.
3
4
 
4
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
@@ -6,8 +7,39 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
7
 
7
8
  ## [Unreleased]
8
9
 
10
+ ## [18.0.0]
11
+
12
+ ### Added
13
+
14
+ - **BREAKING**: Add ESM build ([#3998](https://github.com/MetaMask/core/pull/3998))
15
+ - It's no longer possible to import files from `./dist` directly.
16
+ - Add network client for Linea Sepolia (chain ID `0xe705`) ([#3995](https://github.com/MetaMask/core/pull/3995))
17
+ - Bump `@metamask/eth-json-rpc-infura` to `^9.1.0` to bring this change.
18
+
19
+ ### Changed
20
+
21
+ - **BREAKING:** Bump `@metamask/base-controller` to `^5.0.0` ([#4039](https://github.com/MetaMask/core/pull/4039))
22
+ - This version has a number of breaking changes. See the changelog for more.
23
+ - Bump `@metamask/controller-utils` to `^9.0.0` ([#4039](https://github.com/MetaMask/core/pull/4039))
24
+
25
+ ### Fixed
26
+
27
+ - **BREAKING:** Narrow `NetworkControllerMessenger` type parameters `AllowedAction` and `AllowedEvent` from `string` to `never` ([#4031](https://github.com/MetaMask/core/pull/4031))
28
+ - Allowlisting or using any external actions or events will now produce a type error.
29
+
30
+ ## [17.2.1]
31
+
32
+ ### Changed
33
+
34
+ - Bump `@metamask/controller-utils` to `^8.0.4` ([#4007](https://github.com/MetaMask/core/pull/4007))
35
+ - Bump `@metamask/eth-json-rpc-middleware` to `^12.1.0` ([#3829](https://github.com/MetaMask/core/pull/3829))
36
+ - Bump `@metamask/json-rpc-engine` to `^7.3.3` ([#4007](https://github.com/MetaMask/core/pull/4007))
37
+ - Bump `@metamask/rpc-errors` to `^6.2.1` ([#3970](https://github.com/MetaMask/core/pull/3970), [#3954](https://github.com/MetaMask/core/pull/3954))
38
+
9
39
  ## [17.2.0]
40
+
10
41
  ### Changed
42
+
11
43
  - The `setActiveNetwork` method and action now supports built-in network types ([#3764](https://github.com/MetaMask/core/pull/3764))
12
44
  - 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.
13
45
  - Deprecate the `setProviderType` method and action ([#3764](https://github.com/MetaMask/core/pull/3764))
@@ -20,11 +52,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
20
52
  - Bump `@metamask/json-rpc-engine` to `^7.3.2` ([#3821](https://github.com/MetaMask/core/pull/3821))
21
53
 
22
54
  ## [17.1.0]
55
+
23
56
  ### Added
57
+
24
58
  - 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))
25
59
  - Add `NetworkController:getNetworkConfigurationByNetworkClientId` messenger action for the previous method ([#2055](https://github.com/MetaMask/core/pull/2055))
26
60
 
27
61
  ### Changed
62
+
28
63
  - Bump `@metamask/base-controller` to `^4.0.1` ([#3695](https://github.com/MetaMask/core/pull/3695))
29
64
  - 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))
30
65
  - Bump `@metamask/eth-json-rpc-provider` to `^2.3.1` ([#3695](https://github.com/MetaMask/core/pull/3695))
@@ -35,24 +70,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
35
70
  - Both of these events now include `NetworkState` as the first and only item in the payload
36
71
 
37
72
  ## [17.0.0]
73
+
38
74
  ### Changed
75
+
39
76
  - **BREAKING:** Bump `@metamask/base-controller` to ^4.0.0 ([#2063](https://github.com/MetaMask/core/pull/2063))
40
77
  - This is breaking because the type of the `messenger` has backward-incompatible changes. See the changelog for this package for more.
41
78
  - Bump `@metamask/controller-utils` to ^6.0.0 ([#2063](https://github.com/MetaMask/core/pull/2063))
42
79
 
43
80
  ## [16.0.0]
81
+
44
82
  ### Changed
83
+
45
84
  - **BREAKING:** Bump dependency `@metamask/eth-query` from ^3.0.1 to ^4.0.0 ([#2028](https://github.com/MetaMask/core/pull/2028))
46
85
  - 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.
47
86
 
48
87
  ## [15.2.0]
88
+
49
89
  ### Changed
90
+
50
91
  - Update @metamask/eth-json-rpc-middleware in network controller ([#1988](https://github.com/MetaMask/core/pull/1988))
51
92
  - Bump dependency on `@metamask/json-rpc-engine` to ^7.2.0 ([#1895](https://github.com/MetaMask/core/pull/1895))
52
93
  - Bump @metamask/utils from 8.1.0 to 8.2.0 ([#1957](https://github.com/MetaMask/core/pull/1957))
53
94
 
54
95
  ## [15.1.0]
96
+
55
97
  ### Added
98
+
56
99
  - Add new action handlers and associated types ([#1806](https://github.com/MetaMask/core/pull/1806))
57
100
  - `NetworkController:setActiveNetwork` / `NetworkControllerSetActiveNetworkAction`
58
101
  - `NetworkController:setProviderType` / `NetworkControllerSetProviderTypeAction`
@@ -60,10 +103,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
60
103
  - Add `ticker` to `NetworkClientConfiguration` ([#1794](https://github.com/MetaMask/core/pull/1794))
61
104
 
62
105
  ### Changed
106
+
63
107
  - Bump dependency on `@metamask/eth-json-rpc-provider` to ^2.2.0 ([#1738](https://github.com/MetaMask/core/pull/1738))
64
108
 
65
109
  ## [15.0.0]
110
+
66
111
  ### Changed
112
+
67
113
  - **BREAKING:** Bump dependency on `@metamask/eth-json-rpc-infura` to ^9.0.0 ([#1653](https://github.com/MetaMask/core/pull/1653))
68
114
  - **BREAKING:** Bump dependency on `@metamask/eth-json-rpc-middleware` to ^12.0.0 ([#1653](https://github.com/MetaMask/core/pull/1653))
69
115
  - **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))
@@ -72,24 +118,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
72
118
  - Move from `eth-rpc-errors` ^4.0.2 to `@metamask/rpc-errors` ^6.1.0 ([#1653](https://github.com/MetaMask/core/pull/1653))
73
119
 
74
120
  ## [14.0.0]
121
+
75
122
  ### Added
123
+
76
124
  - Add `NetworkController:getEIP1559Compatibility` controller action ([#1673](https://github.com/MetaMask/core/pull/1673))
77
125
 
78
126
  ### Changed
127
+
79
128
  - **BREAKING:** Rename `get1555CompatibilityWithNetworkClientId` to `get1559CompatibilityWithNetworkClientId` ([#1673](https://github.com/MetaMask/core/pull/1673))
80
129
  - Bump dependency on `@metamask/utils` to ^8.1.0 ([#1639](https://github.com/MetaMask/core/pull/1639))
81
130
  - Bump dependency on `@metamask/base-controller` to ^3.2.3
82
131
  - Bump dependency on `@metamask/controller-utils` to ^5.0.2
83
132
 
84
133
  ### Fixed
134
+
85
135
  - Update linea goerli explorer url ([#1666](https://github.com/MetaMask/core/pull/1666))
86
136
 
87
137
  ## [13.0.1]
138
+
88
139
  ### Changed
140
+
89
141
  - Update TypeScript to v4.8.x ([#1718](https://github.com/MetaMask/core/pull/1718))
90
142
 
91
143
  ## [13.0.0]
144
+
92
145
  ### Changed
146
+
93
147
  - **BREAKING**: Remove `NetworkId` type ([#1633](https://github.com/MetaMask/core/pull/1633))
94
148
  - **BREAKING**: Remove `networkId` property from `NetworkState` type ([#1633](https://github.com/MetaMask/core/pull/1633))
95
149
  - Update scaffold RPC middleware for built-in Infura networks to no longer resolve `net_version` locally ([#1633](https://github.com/MetaMask/core/pull/1633))
@@ -97,32 +151,44 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
97
151
  - Bump dependency on `@metamask/controller-utils` to ^5.0.0
98
152
 
99
153
  ## [12.2.0]
154
+
100
155
  ### Added
156
+
101
157
  - Add `NetworkController:getNetworkClientById` action ([#1638](https://github.com/MetaMask/core/pull/1638))
102
158
  - Add `lookupNetworkByClientId` and `get1555CompatibilityWithNetworkClientId` methods ([#1557](https://github.com/MetaMask/core/pull/1557))
103
159
 
104
160
  ### Changed
105
- - Add optional `networkClientId` argument to methods `lookupNetwork` and `getEIP1559Compatibility` ([#1557](https://github.com/MetaMask/core/pull/1557))
161
+
162
+ - Add optional `networkClientId` argument to methods `lookupNetwork` and `getEIP1559Compatibility` ([#1557](https://github.com/MetaMask/core/pull/1557))
106
163
 
107
164
  ## [12.1.2]
165
+
108
166
  ### Changed
167
+
109
168
  - Bump dependency on `@metamask/base-controller` to ^3.2.1
110
169
  - Bump dependency on `@metamask/controller-utils` to ^4.3.2
111
170
 
112
171
  ## [12.1.1]
172
+
113
173
  ### Added
174
+
114
175
  - Added an export for NetworkClientId in NetworkController ([#1583](https://github.com/MetaMask/core/pull/1583))
115
176
 
116
177
  ## [12.1.0]
178
+
117
179
  ### Added
180
+
118
181
  - Add `getNetworkClientById` ([#1562](https://github.com/MetaMask/core/pull/1562))
119
182
  - Add `findNetworkClientIdByChainId` ([#1571](https://github.com/MetaMask/core/pull/1571))
120
183
 
121
184
  ## [12.0.0]
185
+
122
186
  ### Added
187
+
123
188
  - Add `NetworksMetadata` type ([#1559](https://github.com/MetaMask/core/pull/1559))
124
189
 
125
190
  ### Changed
191
+
126
192
  - **BREAKING:** Remove `NetworkDetails` type in favor of `NetworkMetadata` ([#1559](https://github.com/MetaMask/core/pull/1559))
127
193
  - This new type includes `NetworkDetails` plus a `status` property
128
194
  - **BREAKING:** Add `networksMetadata` to state ([#1559](https://github.com/MetaMask/core/pull/1559))
@@ -133,11 +199,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
133
199
  - Replace `eth-query` ^2.1.2 with `@metamask/eth-query` ^3.0.1 ([#1546](https://github.com/MetaMask/core/pull/1546))
134
200
 
135
201
  ### Removed
202
+
136
203
  - **BREAKING:** Remove `networkDetails` from state ([#1559](https://github.com/MetaMask/core/pull/1559))
137
204
  - The data in this state property has been merged into the new `networksMetadata` state property; each value in this object contains an `EIPS` property.
138
205
 
139
206
  ## [11.0.0]
207
+
140
208
  ### Changed
209
+
141
210
  - **BREAKING**: Require `ticker` to be included in the `providerConfig` state ([#1495](https://github.com/MetaMask/core/pull/1495))
142
211
  - This requires a state migration, setting `providerConfig.ticker` to `ETH` if it's missing.
143
212
  - Update `@metamask/utils` to `^6.2.0` ([#1514](https://github.com/MetaMask/core/pull/1514))
@@ -145,16 +214,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
145
214
  - Remove unnecessary `babel-runtime` dependency ([#1504](https://github.com/MetaMask/core/pull/1504))
146
215
 
147
216
  ## [10.3.1]
217
+
148
218
  ### Changed
219
+
149
220
  - Bump `@metamask/eth-json-rpc-infura` dependency from ^8.0.0 to ^8.1.0
150
221
  - This extends the types that this package recognizes to include Linea networks
151
222
 
152
223
  ## [10.3.0]
224
+
153
225
  ### Added
226
+
154
227
  - Add `getNetworkClientsById` method ([#1439](https://github.com/MetaMask/core/pull/1439))
155
228
  - This method returns a registry of available built-in and custom networks, allowing consumers to access multiple networks simultaneously if desired
156
229
 
157
230
  ### Changed
231
+
158
232
  - 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))
159
233
  - This means that cached responses for a network will no longer disappear when a different network is selected
160
234
  - 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))
@@ -162,22 +236,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
162
236
  - If an existing network configuration is updated, its information will be used to recreate the client for the corresponding network
163
237
 
164
238
  ## [10.2.0]
239
+
165
240
  ### Added
241
+
166
242
  - Expose `BlockTracker` type ([#1443](https://github.com/MetaMask/core/pull/1443))
167
243
 
168
244
  ## [10.1.0]
245
+
169
246
  ### Added
247
+
170
248
  - Add `loadBackup` method to NetworkController ([#1421](https://github.com/MetaMask/core/pull/1421))
171
249
 
172
250
  ## [10.0.0]
251
+
173
252
  ### Changed
253
+
174
254
  - **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))
175
255
  - 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))
176
256
  - Update `networkDetails` initial state from `{ EIPS: { 1559: false } }` to `{ EIPS: {} }` ([#1404](https://github.com/MetaMask/core/pull/1404))
177
257
  - 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))
178
258
 
179
259
  ## [9.0.0]
260
+
180
261
  ### Added
262
+
181
263
  - The events `networkWillChange` and `networkDidChange` are emitted during `setProviderType`, `setActiveNetwork`, `resetConnection`, and `rollbackToPreviousProvider` ([#1336](https://github.com/MetaMask/core/pull/1336))
182
264
  - The `networkWillChange` event is emitted before the network is switched (before the network status is cleared),
183
265
  - The `networkDidChange` event is emitted after the new provider is setup (but before it has finished initializing).
@@ -186,6 +268,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
186
268
  - Add `NetworkController:getState` action constant ([#1329](https://github.com/MetaMask/core/pull/1329))
187
269
 
188
270
  ### Changed
271
+
189
272
  - **BREAKING:** Bump to Node 16 ([#1262](https://github.com/MetaMask/core/pull/1262))
190
273
  - **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))
191
274
  - This requires a state migration
@@ -238,20 +321,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
238
321
  - Add dependency `json-rpc-engine` ^6.1.0 ([#1116](https://github.com/MetaMask/core/pull/1116))
239
322
 
240
323
  ### Removed
324
+
241
325
  - **BREAKING:** Remove `providerConfigChange` event ([#1329](https://github.com/MetaMask/core/pull/1329))
242
326
  - 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.
243
327
  - **BREAKING:** The built-in "localhost" network has been removed ([#1313](https://github.com/MetaMask/core/pull/1313))
244
328
 
245
329
  ### Fixed
330
+
246
331
  - Update network details in `lookupNetwork` even when network ID is unchanged ([#1379](https://github.com/MetaMask/core/pull/1379))
247
332
  - 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))
248
333
  - In that situation, `rollbackToPreviousProvider` used to throw an error. Now it correctly rolls back instead.
249
334
 
250
335
  ## [8.0.0]
336
+
251
337
  ### Added
338
+
252
339
  - 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))
253
340
 
254
341
  ### Changed
342
+
255
343
  - Update EIP-1559 compatibility during network lookup ([#1236](https://github.com/MetaMask/core/pull/1236))
256
344
  - EIP-1559 compatibility check is still performed on initialization and after switching networks, like before. This change only impacts direct calls to `lookupNetwork`.
257
345
  - `lookupNetwork` is now making two network calls instead of one, ensuring that the `networkDetails` state is up-to-date.
@@ -276,20 +364,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
276
364
  - deps: bump @metamask/utils to 5.0.1 ([#1211](https://github.com/MetaMask/core/pull/1211))
277
365
 
278
366
  ### Removed
367
+
279
368
  - **BREAKING:** Remove `isCustomNetwork` state ([#1199](https://github.com/MetaMask/core/pull/1199))
280
369
  - 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.
281
370
 
282
371
  ## [7.0.0]
372
+
283
373
  ### Changed
374
+
284
375
  - **BREAKING:** Replace `providerConfig` setter with a public `initializeProvider` method ([#1133](https://github.com/MetaMask/core/pull/1133))
285
376
  - The property `providerConfig` should no longer be set to initialize the provider. That property no longer exists.
286
377
  - The method `initializeProvider` must be called instead to initialize the provider after constructing the network controller.
287
378
 
288
379
  ## [6.0.0]
380
+
289
381
  ### Added
382
+
290
383
  - Add rollbackToPreviousProvider method ([#1132](https://github.com/MetaMask/core/pull/1132))
291
384
 
292
385
  ### Changed
386
+
293
387
  - **BREAKING:** Migrate network configurations from `PreferencesController` to `NetworkController` ([#1064](https://github.com/MetaMask/core/pull/1064))
294
388
  - Consumers will need to adapt to reading network data from `NetworkConfigurations` state on `NetworkController` rather than `frequentRpcList` on `PreferencesController`.
295
389
  - `setRpcTarget` becomes `setActiveNetwork` on `NetworkController` and accepts a `networkConfigurationId` argument rather than an `rpcUrl`.
@@ -300,50 +394,67 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
300
394
  - 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.
301
395
 
302
396
  ## [5.0.0]
397
+
303
398
  ### Changed
399
+
304
400
  - **BREAKING:** Rename `properties` property in state object to `networkDetails` ([#1074](https://github.com/MetaMask/controllers/pull/1074))
305
401
 
306
402
  ### Removed
403
+
307
404
  - **BREAKING:** Remove `isomorphic-fetch` ([#1106](https://github.com/MetaMask/controllers/pull/1106))
308
405
  - Consumers must now import `isomorphic-fetch` or another polyfill themselves if they are running in an environment without `fetch`
309
406
 
310
407
  ## [4.0.0]
408
+
311
409
  ### Changed
410
+
312
411
  - **BREAKING:** Update type of state object by renaming `properties` property to `networkDetails` ([#1074](https://github.com/MetaMask/core/pull/1074))
313
412
  - Consumers are recommended to add a state migration for this change.
314
413
  - **BREAKING:** Rename `NetworkProperties` type to `NetworkDetails` ([#1074](https://github.com/MetaMask/core/pull/1074))
315
414
  - Change `getEIP1559Compatibility` to use async await syntax ([#1084](https://github.com/MetaMask/core/pull/1084))
316
415
 
317
416
  ## [3.0.0]
417
+
318
418
  ### Added
419
+
319
420
  - Add support for Sepolia as a built-in Infura network ([#1041](https://github.com/MetaMask/controllers/pull/1041))
320
421
  - Export types for network controller events and actions ([#1039](https://github.com/MetaMask/core/pull/1039))
321
422
 
322
423
  ### Changed
424
+
323
425
  - **BREAKING:** Make `lookupNetwork` block on completing the lookup ([#1063](https://github.com/MetaMask/controllers/pull/1063))
324
426
  - 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.
325
427
  - Rename this repository to `core` ([#1031](https://github.com/MetaMask/controllers/pull/1031))
326
428
  - Update `@metamask/controller-utils` package ([#1041](https://github.com/MetaMask/controllers/pull/1041))
327
429
 
328
430
  ### Removed
431
+
329
432
  - **BREAKING:**: Drop support for Ropsten, Rinkeby, and Kovan as built-in Infura networks ([#1041](https://github.com/MetaMask/controllers/pull/1041))
330
433
 
331
434
  ## [2.0.0]
435
+
332
436
  ### Changed
437
+
333
438
  - **BREAKING:** Update type of state object by renaming `provider` property to `providerConfig` ([#995](https://github.com/MetaMask/core/pull/995))
334
439
  - Consumers are recommended to add a state migration for this change.
335
440
  - **BREAKING:** Rename `NetworkController:providerChange` messenger event to `NetworkController:providerConfigChange` ([#995](https://github.com/MetaMask/core/pull/995))
336
441
  - Relax dependencies on `@metamask/base-controller` and `@metamask/controller-utils` (use `^` instead of `~`) ([#998](https://github.com/MetaMask/core/pull/998))
337
442
 
338
443
  ## [1.0.0]
444
+
339
445
  ### Added
446
+
340
447
  - Initial release
448
+
341
449
  - 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:
450
+
342
451
  - Everything in `src/network` (minus `NetworkType` and `NetworksChainId`, which were placed in `@metamask/controller-utils`)
343
452
 
344
453
  All changes listed after this point were applied to this package following the monorepo conversion.
345
454
 
346
- [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/network-controller@17.2.0...HEAD
455
+ [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/network-controller@18.0.0...HEAD
456
+ [18.0.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@17.2.1...@metamask/network-controller@18.0.0
457
+ [17.2.1]: https://github.com/MetaMask/core/compare/@metamask/network-controller@17.2.0...@metamask/network-controller@17.2.1
347
458
  [17.2.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@17.1.0...@metamask/network-controller@17.2.0
348
459
  [17.1.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@17.0.0...@metamask/network-controller@17.1.0
349
460
  [17.0.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@16.0.0...@metamask/network-controller@17.0.0