@metamask/network-controller
Version:
Provides an interface to the currently selected network via a MetaMask-compatible provider object
1 lines • 1.98 kB
Source Map (JSON)
{"version":3,"file":"constants.cjs","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAA;;;;;;GAMG;AACH,IAAY,aA0BX;AA1BD,WAAY,aAAa;IACvB;;;OAGG;IACH,oCAAmB,CAAA;IACnB;;OAEG;IACH,wCAAuB,CAAA;IACvB;;;;OAIG;IACH,sCAAqB,CAAA;IACrB;;;OAGG;IACH,4CAA2B,CAAA;IAC3B;;;OAGG;IACH,oCAAmB,CAAA;AACrB,CAAC,EA1BW,aAAa,6BAAb,aAAa,QA0BxB;AAEY,QAAA,kBAAkB,GAAG,gBAAgB,CAAC;AAEnD;;;;GAIG;AACU,QAAA,mBAAmB,GAAG,IAAI,GAAG,CAAS,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC","sourcesContent":["/**\n * Represents the availability status of an RPC endpoint. (Regrettably, the\n * name of this type is a misnomer.)\n *\n * The availability status is set both automatically (as requests are made) and\n * manually (when `lookupNetwork` is called).\n */\nexport enum NetworkStatus {\n /**\n * Either the availability status of the RPC endpoint has not been determined,\n * or request that `lookupNetwork` performed returned an unknown error.\n */\n Unknown = 'unknown',\n /**\n * The RPC endpoint is consistently returning successful (2xx) responses.\n */\n Available = 'available',\n /**\n * Either the last request to the RPC endpoint was either too slow, or the\n * endpoint is consistently returning errors and the number of retries has\n * been reached.\n */\n Degraded = 'degraded',\n /**\n * The RPC endpoint is consistently returning enough 5xx errors that requests\n * have been paused.\n */\n Unavailable = 'unavailable',\n /**\n * The RPC endpoint is inaccessible for the user based on their location. This\n * status only applies to Infura networks.\n */\n Blocked = 'blocked',\n}\n\nexport const INFURA_BLOCKED_KEY = 'countryBlocked';\n\n/**\n * A set of deprecated network ChainId.\n * The network controller will exclude those the networks begin as default network,\n * without the need to remove the network from constant list of controller-utils.\n */\nexport const DEPRECATED_NETWORKS = new Set<string>(['0xe704', '0x5']);\n"]}