UNPKG

@metamask/network-controller

Version:

Provides an interface to the currently selected network via a MetaMask-compatible provider object

46 lines 1.85 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DEPRECATED_NETWORKS = exports.INFURA_BLOCKED_KEY = exports.NetworkStatus = void 0; /** * Represents the availability status of an RPC endpoint. (Regrettably, the * name of this type is a misnomer.) * * The availability status is set both automatically (as requests are made) and * manually (when `lookupNetwork` is called). */ var NetworkStatus; (function (NetworkStatus) { /** * Either the availability status of the RPC endpoint has not been determined, * or request that `lookupNetwork` performed returned an unknown error. */ NetworkStatus["Unknown"] = "unknown"; /** * The RPC endpoint is consistently returning successful (2xx) responses. */ NetworkStatus["Available"] = "available"; /** * Either the last request to the RPC endpoint was either too slow, or the * endpoint is consistently returning errors and the number of retries has * been reached. */ NetworkStatus["Degraded"] = "degraded"; /** * The RPC endpoint is consistently returning enough 5xx errors that requests * have been paused. */ NetworkStatus["Unavailable"] = "unavailable"; /** * The RPC endpoint is inaccessible for the user based on their location. This * status only applies to Infura networks. */ NetworkStatus["Blocked"] = "blocked"; })(NetworkStatus || (exports.NetworkStatus = NetworkStatus = {})); exports.INFURA_BLOCKED_KEY = 'countryBlocked'; /** * A set of deprecated network ChainId. * The network controller will exclude those the networks begin as default network, * without the need to remove the network from constant list of controller-utils. */ exports.DEPRECATED_NETWORKS = new Set(['0xe704', '0x5']); //# sourceMappingURL=constants.cjs.map