@metamask-previews/network-controller 27.1.0-preview-67bc4e39 → 27.1.0-preview-ca619be

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.
@@ -35,6 +35,10 @@ var NetworkStatus;
35
35
  * status only applies to Infura networks.
36
36
  */
37
37
  NetworkStatus["Blocked"] = "blocked";
38
+ /**
39
+ * Some other status for testing.
40
+ */
41
+ NetworkStatus["Test"] = "test";
38
42
  })(NetworkStatus || (exports.NetworkStatus = NetworkStatus = {}));
39
43
  exports.INFURA_BLOCKED_KEY = 'countryBlocked';
40
44
  /**
@@ -1 +1 @@
1
- {"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"]}
1
+ {"version":3,"file":"constants.cjs","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAA;;;;;;GAMG;AACH,IAAY,aA8BX;AA9BD,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;IACnB;;OAEG;IACH,8BAAa,CAAA;AACf,CAAC,EA9BW,aAAa,6BAAb,aAAa,QA8BxB;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 * Some other status for testing.\n */\n Test = 'test',\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"]}
@@ -30,7 +30,11 @@ export declare enum NetworkStatus {
30
30
  * The RPC endpoint is inaccessible for the user based on their location. This
31
31
  * status only applies to Infura networks.
32
32
  */
33
- Blocked = "blocked"
33
+ Blocked = "blocked",
34
+ /**
35
+ * Some other status for testing.
36
+ */
37
+ Test = "test"
34
38
  }
35
39
  export declare const INFURA_BLOCKED_KEY = "countryBlocked";
36
40
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.cts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,oBAAY,aAAa;IACvB;;;OAGG;IACH,OAAO,YAAY;IACnB;;OAEG;IACH,SAAS,cAAc;IACvB;;;;OAIG;IACH,QAAQ,aAAa;IACrB;;;OAGG;IACH,WAAW,gBAAgB;IAC3B;;;OAGG;IACH,OAAO,YAAY;CACpB;AAED,eAAO,MAAM,kBAAkB,mBAAmB,CAAC;AAEnD;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,aAAqC,CAAC"}
1
+ {"version":3,"file":"constants.d.cts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,oBAAY,aAAa;IACvB;;;OAGG;IACH,OAAO,YAAY;IACnB;;OAEG;IACH,SAAS,cAAc;IACvB;;;;OAIG;IACH,QAAQ,aAAa;IACrB;;;OAGG;IACH,WAAW,gBAAgB;IAC3B;;;OAGG;IACH,OAAO,YAAY;IACnB;;OAEG;IACH,IAAI,SAAS;CACd;AAED,eAAO,MAAM,kBAAkB,mBAAmB,CAAC;AAEnD;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,aAAqC,CAAC"}
@@ -30,7 +30,11 @@ export declare enum NetworkStatus {
30
30
  * The RPC endpoint is inaccessible for the user based on their location. This
31
31
  * status only applies to Infura networks.
32
32
  */
33
- Blocked = "blocked"
33
+ Blocked = "blocked",
34
+ /**
35
+ * Some other status for testing.
36
+ */
37
+ Test = "test"
34
38
  }
35
39
  export declare const INFURA_BLOCKED_KEY = "countryBlocked";
36
40
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.mts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,oBAAY,aAAa;IACvB;;;OAGG;IACH,OAAO,YAAY;IACnB;;OAEG;IACH,SAAS,cAAc;IACvB;;;;OAIG;IACH,QAAQ,aAAa;IACrB;;;OAGG;IACH,WAAW,gBAAgB;IAC3B;;;OAGG;IACH,OAAO,YAAY;CACpB;AAED,eAAO,MAAM,kBAAkB,mBAAmB,CAAC;AAEnD;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,aAAqC,CAAC"}
1
+ {"version":3,"file":"constants.d.mts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,oBAAY,aAAa;IACvB;;;OAGG;IACH,OAAO,YAAY;IACnB;;OAEG;IACH,SAAS,cAAc;IACvB;;;;OAIG;IACH,QAAQ,aAAa;IACrB;;;OAGG;IACH,WAAW,gBAAgB;IAC3B;;;OAGG;IACH,OAAO,YAAY;IACnB;;OAEG;IACH,IAAI,SAAS;CACd;AAED,eAAO,MAAM,kBAAkB,mBAAmB,CAAC;AAEnD;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,aAAqC,CAAC"}
@@ -32,6 +32,10 @@ export var NetworkStatus;
32
32
  * status only applies to Infura networks.
33
33
  */
34
34
  NetworkStatus["Blocked"] = "blocked";
35
+ /**
36
+ * Some other status for testing.
37
+ */
38
+ NetworkStatus["Test"] = "test";
35
39
  })(NetworkStatus || (NetworkStatus = {}));
36
40
  export const INFURA_BLOCKED_KEY = 'countryBlocked';
37
41
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"constants.mjs","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAN,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,KAAb,aAAa,QA0BxB;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,gBAAgB,CAAC;AAEnD;;;;GAIG;AACH,MAAM,CAAC,MAAM,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"]}
1
+ {"version":3,"file":"constants.mjs","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,aA8BX;AA9BD,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;IACnB;;OAEG;IACH,8BAAa,CAAA;AACf,CAAC,EA9BW,aAAa,KAAb,aAAa,QA8BxB;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,gBAAgB,CAAC;AAEnD;;;;GAIG;AACH,MAAM,CAAC,MAAM,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 * Some other status for testing.\n */\n Test = 'test',\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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask-previews/network-controller",
3
- "version": "27.1.0-preview-67bc4e39",
3
+ "version": "27.1.0-preview-ca619be",
4
4
  "description": "Provides an interface to the currently selected network via a MetaMask-compatible provider object",
5
5
  "keywords": [
6
6
  "MetaMask",