Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@metamask-previews/network-controller

Package Overview
Dependencies
Maintainers
2
Versions
386
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@metamask-previews/network-controller - npm Package Compare versions

Comparing version 14.0.0-preview.ce06456 to 15.0.0-preview.72e94e9

12

CHANGELOG.md

@@ -9,2 +9,11 @@ # Changelog

## [15.0.0]
### Changed
- **BREAKING:** Bump dependency on `@metamask/eth-json-rpc-infura` to ^9.0.0 ([#1653](https://github.com/MetaMask/core/pull/1653))
- **BREAKING:** Bump dependency on `@metamask/eth-json-rpc-middleware` to ^12.0.0 ([#1653](https://github.com/MetaMask/core/pull/1653))
- **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))
- **BREAKING:** Bump dependency on `eth-block-tracker` to ^8.0.0 ([#1653](https://github.com/MetaMask/core/pull/1653))
- Bump dependency on `@metamask/eth-json-rpc-provider` to ^2.1.0 ([#1653](https://github.com/MetaMask/core/pull/1653))
- Move from `eth-rpc-errors` ^4.0.2 to `@metamask/rpc-errors` ^6.1.0 ([#1653](https://github.com/MetaMask/core/pull/1653))
## [14.0.0]

@@ -282,3 +291,4 @@ ### Added

[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/network-controller@14.0.0...HEAD
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/network-controller@15.0.0...HEAD
[15.0.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@14.0.0...@metamask/network-controller@15.0.0
[14.0.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@13.0.1...@metamask/network-controller@14.0.0

@@ -285,0 +295,0 @@ [13.0.1]: https://github.com/MetaMask/core/compare/@metamask/network-controller@13.0.0...@metamask/network-controller@13.0.1

2

dist/create-network-client.js

@@ -17,4 +17,4 @@ "use strict";

const eth_json_rpc_provider_1 = require("@metamask/eth-json-rpc-provider");
const json_rpc_engine_1 = require("@metamask/json-rpc-engine");
const eth_block_tracker_1 = require("eth-block-tracker");
const json_rpc_engine_1 = require("json-rpc-engine");
const types_1 = require("./types");

@@ -21,0 +21,0 @@ const SECOND = 1000;

@@ -31,6 +31,6 @@ "use strict";

const eth_query_1 = __importDefault(require("@metamask/eth-query"));
const rpc_errors_1 = require("@metamask/rpc-errors");
const swappable_obj_proxy_1 = require("@metamask/swappable-obj-proxy");
const utils_1 = require("@metamask/utils");
const assert_1 = require("assert");
const eth_rpc_errors_1 = require("eth-rpc-errors");
const uuid_1 = require("uuid");

@@ -338,3 +338,3 @@ const constants_1 = require("./constants");

}
else if (error.code === eth_rpc_errors_1.errorCodes.rpc.internal) {
else if (error.code === rpc_errors_1.errorCodes.rpc.internal) {
updatedNetworkStatus = constants_1.NetworkStatus.Unknown;

@@ -428,3 +428,3 @@ }

}
else if (error.code === eth_rpc_errors_1.errorCodes.rpc.internal) {
else if (error.code === rpc_errors_1.errorCodes.rpc.internal) {
updatedNetworkStatus = constants_1.NetworkStatus.Unknown;

@@ -649,2 +649,3 @@ }

rpcUrl,
ticker,
});

@@ -760,2 +761,3 @@ }

const networkClient = this.getNetworkClientById(networkClientId);
// @ts-expect-error TODO: Provider type alignment
const ethQuery = new eth_query_1.default(networkClient.provider);

@@ -809,2 +811,3 @@ return new Promise((resolve, reject) => {

chainId: controller_utils_1.BUILT_IN_NETWORKS[network].chainId,
ticker: controller_utils_1.BUILT_IN_NETWORKS[network].ticker,
};

@@ -830,2 +833,3 @@ return [

rpcUrl: networkConfiguration.rpcUrl,
ticker: networkConfiguration.ticker,
};

@@ -847,2 +851,3 @@ return [

type: types_1.NetworkClientType.Custom,
ticker: providerConfig.ticker,
};

@@ -912,4 +917,5 @@ return [

}
// @ts-expect-error TODO: Provider type alignment
__classPrivateFieldSet(this, _NetworkController_ethQuery, new eth_query_1.default(__classPrivateFieldGet(this, _NetworkController_providerProxy, "f")), "f");
};
//# sourceMappingURL=NetworkController.js.map
import type { InfuraNetworkType } from '@metamask/controller-utils';
import type { SafeEventEmitterProvider } from '@metamask/eth-json-rpc-provider';
import type { Hex } from '@metamask/utils';
import type { PollingBlockTracker } from 'eth-block-tracker';
import type { BlockTracker as BaseBlockTracker } from 'eth-block-tracker';
export declare type Provider = SafeEventEmitterProvider;
export declare type BlockTracker = PollingBlockTracker;
export declare type BlockTracker = BaseBlockTracker & {
checkForLatestBlock(): Promise<string>;
};
/**

@@ -21,2 +23,3 @@ * The type of network client that can be created.

rpcUrl: string;
ticker: string;
type: NetworkClientType.Custom;

@@ -32,2 +35,3 @@ };

infuraProjectId: string;
ticker: string;
type: NetworkClientType.Infura;

@@ -34,0 +38,0 @@ };

{
"name": "@metamask-previews/network-controller",
"version": "14.0.0-preview.ce06456",
"version": "15.0.0-preview.72e94e9",
"description": "Provides an interface to the currently selected network via a MetaMask-compatible provider object",

@@ -34,13 +34,13 @@ "keywords": [

"@metamask/controller-utils": "^5.0.2",
"@metamask/eth-json-rpc-infura": "^8.1.1",
"@metamask/eth-json-rpc-middleware": "^11.0.2",
"@metamask/eth-json-rpc-provider": "^1.0.0",
"@metamask/eth-json-rpc-infura": "^9.0.0",
"@metamask/eth-json-rpc-middleware": "^12.0.0",
"@metamask/eth-json-rpc-provider": "^2.2.0",
"@metamask/eth-query": "^3.0.1",
"@metamask/json-rpc-engine": "^7.1.1",
"@metamask/rpc-errors": "^6.1.0",
"@metamask/swappable-obj-proxy": "^2.1.0",
"@metamask/utils": "^8.1.0",
"async-mutex": "^0.2.6",
"eth-block-tracker": "^7.0.1",
"eth-rpc-errors": "^4.0.2",
"eth-block-tracker": "^8.0.0",
"immer": "^9.0.6",
"json-rpc-engine": "^6.1.0",
"uuid": "^8.3.2"

@@ -47,0 +47,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc