@metamask-previews/network-controller 17.2.0-preview.8cdddaf → 17.2.0-preview.cbe2fbb7

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