UNPKG

@metamask/network-controller

Version:

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

1 lines 1.59 kB
{"version":3,"file":"constants.cjs","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,aAsBX;AAtBD,WAAY,aAAa;IACvB;;;;OAIG;IACH,oCAAmB,CAAA;IACnB;;OAEG;IACH,wCAAuB,CAAA;IACvB;;;OAGG;IACH,4CAA2B,CAAA;IAC3B;;;;OAIG;IACH,oCAAmB,CAAA;AACrB,CAAC,EAtBW,aAAa,6BAAb,aAAa,QAsBxB;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 state of the currently selected network.\n */\nexport enum NetworkStatus {\n /**\n * The network may or may not be able to receive requests, but either no\n * attempt has been made to determine this, or an attempt was made but was\n * unsuccessful.\n */\n Unknown = 'unknown',\n /**\n * The network is able to receive and respond to requests.\n */\n Available = 'available',\n /**\n * The network was unable to receive and respond to requests for unknown\n * reasons.\n */\n Unavailable = 'unavailable',\n /**\n * The network is not only unavailable, but is also inaccessible for the user\n * specifically based on their location. This state only applies to Infura\n * 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"]}