@metamask/network-controller 8.0.0 → 10.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.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,84 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [10.0.0]
10
+ ### Changed
11
+ - **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))
12
+ - 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))
13
+ - Update `networkDetails` initial state from `{ EIPS: { 1559: false } }` to `{ EIPS: {} }` ([#1404](https://github.com/MetaMask/core/pull/1404))
14
+ - 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))
15
+
16
+ ## [9.0.0]
17
+ ### Added
18
+ - The events `networkWillChange` and `networkDidChange` are emitted during `setProviderType`, `setActiveNetwork`, `resetConnection`, and `rollbackToPreviousProvider` ([#1336](https://github.com/MetaMask/core/pull/1336))
19
+ - The `networkWillChange` event is emitted before the network is switched (before the network status is cleared),
20
+ - The `networkDidChange` event is emitted after the new provider is setup (but before it has finished initializing).
21
+ - Add `destroy` method ([#1330](https://github.com/MetaMask/core/pull/1330))
22
+ - Add events `infuraIsBlocked` and `infuraIsUnblocked` ([#1264](https://github.com/MetaMask/core/pull/1264))
23
+ - Add `NetworkController:getState` action constant ([#1329](https://github.com/MetaMask/core/pull/1329))
24
+
25
+ ### Changed
26
+ - **BREAKING:** Bump to Node 16 ([#1262](https://github.com/MetaMask/core/pull/1262))
27
+ - **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))
28
+ - This requires a state migration
29
+ - This affects the return value of the `NetworkController:getProviderConfig` and `NetworkController:getState` actions.
30
+ - **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))
31
+ - This requires a state migration
32
+ - This change affects the `upsertNetworkConfiguration` method, which takes a network configuration as the first parameter
33
+ - This affects the return value of the `NetworkController:getState` action
34
+ - Allow overlapping `lookupNetwork` calls ([#1375](https://github.com/MetaMask/core/pull/1375))
35
+ - `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
36
+ - When there is an overlap in `lookupNetwork` calls, the older one is aborted before events are emitted and before state changes
37
+ - **BREAKING:** Change `networkDetails` format ([#1326](https://github.com/MetaMask/core/pull/1326))
38
+ - Previously `networkDetails` was `{ isEIP1559Compatible: boolean }`, now it is `{ EIPS: { [eipNumber: number]: boolean } }`
39
+ - **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))
40
+ - 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.
41
+ - 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.
42
+ - 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.
43
+ - 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.
44
+ - 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.
45
+ - This substitution makes it more likely that we can return a cached response to the request.
46
+ - 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.
47
+ - If you were using this to get a suggested next nonce, you can instead use the `nonceTracker` that `@metamask/transaction-controller` exposes
48
+ - A call to `web3_clientVersion` is no longer intercepted to return a static result of `"ProviderEngine/v<version>/javascript"`
49
+ - A call to `net_listening` is no longer intercepted to return a static result of `true`
50
+ - A call to `eth_hashrate` is no longer intercepted to return a static result of `"0x00"`
51
+ - A call to `eth_mining` is no longer intercepted to return a static result of `false`
52
+ - 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.
53
+ - 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.
54
+ - 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.
55
+ - 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.
56
+ - Interfacing with a network that exposes a websocket is no longer supported.
57
+ - **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))
58
+ - Previously the chain ID was not required to setup the provider.
59
+ - Previously if the RPC URL was omitted, no error would be thrown but the provider would not be setup.
60
+ - **BREAKING:** The method `setProviderType` will now throw when passed the type `rpc`. ([#1316](https://github.com/MetaMask/core/pull/1316))
61
+ - Previously no error would be thrown but the provider would not be setup.
62
+ - **BREAKING**: Update type of `blockTracker` property exposed by `getProviderAndBlockTracker` from `any` to `SwappableProxy<PollingBlockTracker>` ([#1303](https://github.com/MetaMask/core/pull/1303))
63
+ - **BREAKING:** Rename provider configuration property `rpcTarget` to `rpcUrl` ([#1292](https://github.com/MetaMask/core/pull/1292))
64
+ - **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))
65
+ - **BREAKING:** The `infuraProjectId` constructor parameter is now required ([#1276](https://github.com/MetaMask/core/pull/1276))
66
+ - **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))
67
+ - Previously this was set to `any`. Now it returns a type that _mostly_ matches the provider returned (some semi-internal properties are omitted)
68
+ - This affects the exported `ProviderProxy` type as well, which wraps the `Provider` type
69
+ - Support hex and number `net_version` responses ([#1380](https://github.com/MetaMask/core/pull/1380))
70
+ - Bump @metamask/utils from 5.0.1 to 5.0.2 ([#1271](https://github.com/MetaMask/core/pull/1271))
71
+ - 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))
72
+ - Add dependency `eth-json-rpc-middleware` ^11.0.0 ([#1116](https://github.com/MetaMask/core/pull/1116))
73
+ - Add dependency `eth-json-rpc-provider` ^1.0.0 ([#1116](https://github.com/MetaMask/core/pull/1116))
74
+ - Add dependency `eth-block-tracker` ^7.0.0 ([#1116](https://github.com/MetaMask/core/pull/1116))
75
+ - Add dependency `json-rpc-engine` ^6.1.0 ([#1116](https://github.com/MetaMask/core/pull/1116))
76
+
77
+ ### Removed
78
+ - **BREAKING:** Remove `providerConfigChange` event ([#1329](https://github.com/MetaMask/core/pull/1329))
79
+ - 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.
80
+ - **BREAKING:** The built-in "localhost" network has been removed ([#1313](https://github.com/MetaMask/core/pull/1313))
81
+
82
+ ### Fixed
83
+ - Update network details in `lookupNetwork` even when network ID is unchanged ([#1379](https://github.com/MetaMask/core/pull/1379))
84
+ - 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))
85
+ - In that situation, `rollbackToPreviousProvider` used to throw an error. Now it correctly rolls back instead.
86
+
9
87
  ## [8.0.0]
10
88
  ### Added
11
89
  - 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))
@@ -102,7 +180,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
102
180
 
103
181
  All changes listed after this point were applied to this package following the monorepo conversion.
104
182
 
105
- [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/network-controller@8.0.0...HEAD
183
+ [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/network-controller@10.0.0...HEAD
184
+ [10.0.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@9.0.0...@metamask/network-controller@10.0.0
185
+ [9.0.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@8.0.0...@metamask/network-controller@9.0.0
106
186
  [8.0.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@7.0.0...@metamask/network-controller@8.0.0
107
187
  [7.0.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@6.0.0...@metamask/network-controller@7.0.0
108
188
  [6.0.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@5.0.0...@metamask/network-controller@6.0.0
@@ -1,13 +1,16 @@
1
1
  import type { SwappableProxy } from '@metamask/swappable-obj-proxy';
2
- import type { Patch } from 'immer';
2
+ import EthQuery from 'eth-query';
3
3
  import { BaseControllerV2, RestrictedControllerMessenger } from '@metamask/base-controller';
4
- import { NetworkType } from '@metamask/controller-utils';
4
+ import type { Patch } from 'immer';
5
+ import { InfuraNetworkType, NetworkType } from '@metamask/controller-utils';
6
+ import { Hex } from '@metamask/utils';
5
7
  import { NetworkStatus } from './constants';
8
+ import type { BlockTracker, Provider } from './types';
6
9
  /**
7
10
  * @type ProviderConfig
8
11
  *
9
12
  * Configuration passed to web3-provider-engine
10
- * @property rpcTarget - RPC target URL.
13
+ * @property rpcUrl - RPC target URL.
11
14
  * @property type - Human-readable network name.
12
15
  * @property chainId - Network ID as per EIP-155.
13
16
  * @property ticker - Currency ticker.
@@ -15,9 +18,9 @@ import { NetworkStatus } from './constants';
15
18
  * @property id - Network Configuration Id.
16
19
  */
17
20
  export declare type ProviderConfig = {
18
- rpcTarget?: string;
21
+ rpcUrl?: string;
19
22
  type: NetworkType;
20
- chainId: string;
23
+ chainId: Hex;
21
24
  ticker?: string;
22
25
  nickname?: string;
23
26
  rpcPrefs?: {
@@ -28,13 +31,22 @@ export declare type ProviderConfig = {
28
31
  export declare type Block = {
29
32
  baseFeePerGas?: string;
30
33
  };
34
+ /**
35
+ * Information about the network not held by any other part of state. Currently
36
+ * only used to capture whether a network supports EIP-1559.
37
+ */
31
38
  export declare type NetworkDetails = {
32
- isEIP1559Compatible?: boolean;
39
+ /**
40
+ * EIPs supported by the network.
41
+ */
42
+ EIPS: {
43
+ [eipNumber: number]: boolean;
44
+ };
33
45
  };
34
46
  /**
35
47
  * Custom RPC network information
36
48
  *
37
- * @property rpcTarget - RPC target URL.
49
+ * @property rpcUrl - RPC target URL.
38
50
  * @property chainId - Network ID as per EIP-155
39
51
  * @property nickname - Personalized network name.
40
52
  * @property ticker - Currency ticker.
@@ -42,7 +54,7 @@ export declare type NetworkDetails = {
42
54
  */
43
55
  export declare type NetworkConfiguration = {
44
56
  rpcUrl: string;
45
- chainId: string;
57
+ chainId: Hex;
46
58
  ticker: string;
47
59
  nickname?: string;
48
60
  rpcPrefs?: {
@@ -72,34 +84,66 @@ export declare type NetworkState = {
72
84
  }>;
73
85
  };
74
86
  declare const name = "NetworkController";
75
- export declare type EthQuery = any;
76
- declare type Provider = any;
77
- export declare type ProviderProxy = SwappableProxy<Provider>;
78
- declare type BlockTracker = any;
79
87
  export declare type BlockTrackerProxy = SwappableProxy<BlockTracker>;
88
+ export declare type ProviderProxy = SwappableProxy<Provider>;
80
89
  export declare type NetworkControllerStateChangeEvent = {
81
90
  type: `NetworkController:stateChange`;
82
91
  payload: [NetworkState, Patch[]];
83
92
  };
84
- export declare type NetworkControllerProviderConfigChangeEvent = {
85
- type: `NetworkController:providerConfigChange`;
86
- payload: [ProviderConfig];
93
+ /**
94
+ * `networkWillChange` is published when the current network is about to be
95
+ * switched, but the new provider has not been created and no state changes have
96
+ * occurred yet.
97
+ */
98
+ export declare type NetworkControllerNetworkWillChangeEvent = {
99
+ type: 'NetworkController:networkWillChange';
100
+ payload: [];
101
+ };
102
+ /**
103
+ * `networkDidChange` is published after a provider has been created for a newly
104
+ * switched network (but before the network has been confirmed to be available).
105
+ */
106
+ export declare type NetworkControllerNetworkDidChangeEvent = {
107
+ type: 'NetworkController:networkDidChange';
108
+ payload: [];
109
+ };
110
+ /**
111
+ * `infuraIsBlocked` is published after the network is switched to an Infura
112
+ * network, but when Infura returns an error blocking the user based on their
113
+ * location.
114
+ */
115
+ export declare type NetworkControllerInfuraIsBlockedEvent = {
116
+ type: 'NetworkController:infuraIsBlocked';
117
+ payload: [];
118
+ };
119
+ /**
120
+ * `infuraIsBlocked` is published either after the network is switched to an
121
+ * Infura network and Infura does not return an error blocking the user based on
122
+ * their location, or the network is switched to a non-Infura network.
123
+ */
124
+ export declare type NetworkControllerInfuraIsUnblockedEvent = {
125
+ type: 'NetworkController:infuraIsUnblocked';
126
+ payload: [];
127
+ };
128
+ export declare type NetworkControllerEvents = NetworkControllerStateChangeEvent | NetworkControllerNetworkWillChangeEvent | NetworkControllerNetworkDidChangeEvent | NetworkControllerInfuraIsBlockedEvent | NetworkControllerInfuraIsUnblockedEvent;
129
+ export declare type NetworkControllerGetStateAction = {
130
+ type: `NetworkController:getState`;
131
+ handler: () => NetworkState;
87
132
  };
88
- export declare type NetworkControllerEvents = NetworkControllerStateChangeEvent | NetworkControllerProviderConfigChangeEvent;
89
133
  export declare type NetworkControllerGetProviderConfigAction = {
90
134
  type: `NetworkController:getProviderConfig`;
91
135
  handler: () => ProviderConfig;
92
136
  };
93
137
  export declare type NetworkControllerGetEthQueryAction = {
94
138
  type: `NetworkController:getEthQuery`;
95
- handler: () => EthQuery;
139
+ handler: () => EthQuery | undefined;
96
140
  };
97
- export declare type NetworkControllerActions = NetworkControllerGetProviderConfigAction | NetworkControllerGetEthQueryAction;
98
- export declare type NetworkControllerMessenger = RestrictedControllerMessenger<typeof name, NetworkControllerGetProviderConfigAction | NetworkControllerGetEthQueryAction, NetworkControllerStateChangeEvent | NetworkControllerProviderConfigChangeEvent, string, string>;
141
+ export declare type NetworkControllerActions = NetworkControllerGetStateAction | NetworkControllerGetProviderConfigAction | NetworkControllerGetEthQueryAction;
142
+ export declare type NetworkControllerMessenger = RestrictedControllerMessenger<typeof name, NetworkControllerActions, NetworkControllerEvents, string, string>;
99
143
  export declare type NetworkControllerOptions = {
100
144
  messenger: NetworkControllerMessenger;
101
145
  trackMetaMetricsEvent: () => void;
102
- infuraProjectId?: string;
146
+ infuraProjectId: string;
103
147
  state?: Partial<NetworkState>;
104
148
  };
105
149
  export declare const defaultState: NetworkState;
@@ -126,6 +170,11 @@ export declare class NetworkController extends BaseControllerV2<typeof name, Net
126
170
  * available, updates the network state with the network ID of the network and
127
171
  * stores whether the network supports EIP-1559; otherwise clears said
128
172
  * information about the network that may have been previously stored.
173
+ *
174
+ * @fires infuraIsBlocked if the network is Infura-supported and is blocking
175
+ * requests.
176
+ * @fires infuraIsUnblocked if the network is Infura-supported and is not
177
+ * blocking requests, or if the network is not Infura-supported.
129
178
  */
130
179
  lookupNetwork(): Promise<void>;
131
180
  /**
@@ -133,13 +182,21 @@ export declare class NetworkController extends BaseControllerV2<typeof name, Net
133
182
  *
134
183
  * @param type - Human readable network name.
135
184
  */
136
- setProviderType(type: NetworkType): Promise<void>;
185
+ setProviderType(type: InfuraNetworkType): Promise<void>;
137
186
  /**
138
187
  * Convenience method to update provider RPC settings.
139
188
  *
140
189
  * @param networkConfigurationId - The unique id for the network configuration to set as the active provider.
141
190
  */
142
191
  setActiveNetwork(networkConfigurationId: string): Promise<void>;
192
+ /**
193
+ * Determines whether the network supports EIP-1559 by checking whether the
194
+ * latest block has a `baseFeePerGas` property, then updates state
195
+ * appropriately.
196
+ *
197
+ * @returns A promise that resolves to true if the network supports EIP-1559
198
+ * and false otherwise.
199
+ */
143
200
  getEIP1559Compatibility(): Promise<boolean>;
144
201
  /**
145
202
  * Re-initializes the provider and block tracker for the current network.
@@ -173,9 +230,17 @@ export declare class NetworkController extends BaseControllerV2<typeof name, Net
173
230
  */
174
231
  removeNetworkConfiguration(networkConfigurationId: string): void;
175
232
  /**
176
- * Rolls back provider config to the previous provider in case of errors or inability to connect during network switch.
233
+ * Switches to the previous network, assuming that the current network is
234
+ * different than the initial network (if it is, then this is equivalent to
235
+ * calling `resetConnection`).
177
236
  */
178
237
  rollbackToPreviousProvider(): Promise<void>;
238
+ /**
239
+ * Deactivates the controller, stopping any ongoing polling.
240
+ *
241
+ * In-progress requests will not be aborted.
242
+ */
243
+ destroy(): Promise<void>;
179
244
  }
180
245
  export default NetworkController;
181
246
  //# sourceMappingURL=NetworkController.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NetworkController.d.ts","sourceRoot":"","sources":["../src/NetworkController.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAGpE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EACL,gBAAgB,EAChB,6BAA6B,EAC9B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAEL,WAAW,EAKZ,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C;;;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