@metamask-previews/network-controller 26.0.0-preview-d6fe4594 → 27.0.0-preview-84f90603
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.
- package/CHANGELOG.md +7 -1
- package/dist/NetworkController.cjs +33 -10
- package/dist/NetworkController.cjs.map +1 -1
- package/dist/NetworkController.d.cts.map +1 -1
- package/dist/NetworkController.d.mts.map +1 -1
- package/dist/NetworkController.mjs +33 -10
- package/dist/NetworkController.mjs.map +1 -1
- package/dist/constants.cjs +18 -10
- package/dist/constants.cjs.map +1 -1
- package/dist/constants.d.cts +18 -10
- package/dist/constants.d.cts.map +1 -1
- package/dist/constants.d.mts +18 -10
- package/dist/constants.d.mts.map +1 -1
- package/dist/constants.mjs +18 -10
- package/dist/constants.mjs.map +1 -1
- package/package.json +1 -1
package/dist/constants.cjs
CHANGED
|
@@ -2,29 +2,37 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DEPRECATED_NETWORKS = exports.INFURA_BLOCKED_KEY = exports.NetworkStatus = void 0;
|
|
4
4
|
/**
|
|
5
|
-
* Represents the availability
|
|
5
|
+
* Represents the availability status of an RPC endpoint. (Regrettably, the
|
|
6
|
+
* name of this type is a misnomer.)
|
|
7
|
+
*
|
|
8
|
+
* The availability status is set both automatically (as requests are made) and
|
|
9
|
+
* manually (when `lookupNetwork` is called).
|
|
6
10
|
*/
|
|
7
11
|
var NetworkStatus;
|
|
8
12
|
(function (NetworkStatus) {
|
|
9
13
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* unsuccessful.
|
|
14
|
+
* Either the availability status of the RPC endpoint has not been determined,
|
|
15
|
+
* or request that `lookupNetwork` performed returned an unknown error.
|
|
13
16
|
*/
|
|
14
17
|
NetworkStatus["Unknown"] = "unknown";
|
|
15
18
|
/**
|
|
16
|
-
* The
|
|
19
|
+
* The RPC endpoint is consistently returning successful (2xx) responses.
|
|
17
20
|
*/
|
|
18
21
|
NetworkStatus["Available"] = "available";
|
|
19
22
|
/**
|
|
20
|
-
*
|
|
21
|
-
*
|
|
23
|
+
* Either the last request to the RPC endpoint was either too slow, or the
|
|
24
|
+
* endpoint is consistently returning errors and the number of retries has
|
|
25
|
+
* been reached.
|
|
26
|
+
*/
|
|
27
|
+
NetworkStatus["Degraded"] = "degraded";
|
|
28
|
+
/**
|
|
29
|
+
* The RPC endpoint is consistently returning enough 5xx errors that requests
|
|
30
|
+
* have been paused.
|
|
22
31
|
*/
|
|
23
32
|
NetworkStatus["Unavailable"] = "unavailable";
|
|
24
33
|
/**
|
|
25
|
-
* The
|
|
26
|
-
*
|
|
27
|
-
* networks.
|
|
34
|
+
* The RPC endpoint is inaccessible for the user based on their location. This
|
|
35
|
+
* status only applies to Infura networks.
|
|
28
36
|
*/
|
|
29
37
|
NetworkStatus["Blocked"] = "blocked";
|
|
30
38
|
})(NetworkStatus || (exports.NetworkStatus = NetworkStatus = {}));
|
package/dist/constants.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.cjs","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAA
|
|
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"]}
|
package/dist/constants.d.cts
CHANGED
|
@@ -1,26 +1,34 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Represents the availability
|
|
2
|
+
* Represents the availability status of an RPC endpoint. (Regrettably, the
|
|
3
|
+
* name of this type is a misnomer.)
|
|
4
|
+
*
|
|
5
|
+
* The availability status is set both automatically (as requests are made) and
|
|
6
|
+
* manually (when `lookupNetwork` is called).
|
|
3
7
|
*/
|
|
4
8
|
export declare enum NetworkStatus {
|
|
5
9
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* unsuccessful.
|
|
10
|
+
* Either the availability status of the RPC endpoint has not been determined,
|
|
11
|
+
* or request that `lookupNetwork` performed returned an unknown error.
|
|
9
12
|
*/
|
|
10
13
|
Unknown = "unknown",
|
|
11
14
|
/**
|
|
12
|
-
* The
|
|
15
|
+
* The RPC endpoint is consistently returning successful (2xx) responses.
|
|
13
16
|
*/
|
|
14
17
|
Available = "available",
|
|
15
18
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
19
|
+
* Either the last request to the RPC endpoint was either too slow, or the
|
|
20
|
+
* endpoint is consistently returning errors and the number of retries has
|
|
21
|
+
* been reached.
|
|
22
|
+
*/
|
|
23
|
+
Degraded = "degraded",
|
|
24
|
+
/**
|
|
25
|
+
* The RPC endpoint is consistently returning enough 5xx errors that requests
|
|
26
|
+
* have been paused.
|
|
18
27
|
*/
|
|
19
28
|
Unavailable = "unavailable",
|
|
20
29
|
/**
|
|
21
|
-
* The
|
|
22
|
-
*
|
|
23
|
-
* networks.
|
|
30
|
+
* The RPC endpoint is inaccessible for the user based on their location. This
|
|
31
|
+
* status only applies to Infura networks.
|
|
24
32
|
*/
|
|
25
33
|
Blocked = "blocked"
|
|
26
34
|
}
|
package/dist/constants.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.cts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA
|
|
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"}
|
package/dist/constants.d.mts
CHANGED
|
@@ -1,26 +1,34 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Represents the availability
|
|
2
|
+
* Represents the availability status of an RPC endpoint. (Regrettably, the
|
|
3
|
+
* name of this type is a misnomer.)
|
|
4
|
+
*
|
|
5
|
+
* The availability status is set both automatically (as requests are made) and
|
|
6
|
+
* manually (when `lookupNetwork` is called).
|
|
3
7
|
*/
|
|
4
8
|
export declare enum NetworkStatus {
|
|
5
9
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* unsuccessful.
|
|
10
|
+
* Either the availability status of the RPC endpoint has not been determined,
|
|
11
|
+
* or request that `lookupNetwork` performed returned an unknown error.
|
|
9
12
|
*/
|
|
10
13
|
Unknown = "unknown",
|
|
11
14
|
/**
|
|
12
|
-
* The
|
|
15
|
+
* The RPC endpoint is consistently returning successful (2xx) responses.
|
|
13
16
|
*/
|
|
14
17
|
Available = "available",
|
|
15
18
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
19
|
+
* Either the last request to the RPC endpoint was either too slow, or the
|
|
20
|
+
* endpoint is consistently returning errors and the number of retries has
|
|
21
|
+
* been reached.
|
|
22
|
+
*/
|
|
23
|
+
Degraded = "degraded",
|
|
24
|
+
/**
|
|
25
|
+
* The RPC endpoint is consistently returning enough 5xx errors that requests
|
|
26
|
+
* have been paused.
|
|
18
27
|
*/
|
|
19
28
|
Unavailable = "unavailable",
|
|
20
29
|
/**
|
|
21
|
-
* The
|
|
22
|
-
*
|
|
23
|
-
* networks.
|
|
30
|
+
* The RPC endpoint is inaccessible for the user based on their location. This
|
|
31
|
+
* status only applies to Infura networks.
|
|
24
32
|
*/
|
|
25
33
|
Blocked = "blocked"
|
|
26
34
|
}
|
package/dist/constants.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.mts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA
|
|
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"}
|
package/dist/constants.mjs
CHANGED
|
@@ -1,27 +1,35 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Represents the availability
|
|
2
|
+
* Represents the availability status of an RPC endpoint. (Regrettably, the
|
|
3
|
+
* name of this type is a misnomer.)
|
|
4
|
+
*
|
|
5
|
+
* The availability status is set both automatically (as requests are made) and
|
|
6
|
+
* manually (when `lookupNetwork` is called).
|
|
3
7
|
*/
|
|
4
8
|
export var NetworkStatus;
|
|
5
9
|
(function (NetworkStatus) {
|
|
6
10
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* unsuccessful.
|
|
11
|
+
* Either the availability status of the RPC endpoint has not been determined,
|
|
12
|
+
* or request that `lookupNetwork` performed returned an unknown error.
|
|
10
13
|
*/
|
|
11
14
|
NetworkStatus["Unknown"] = "unknown";
|
|
12
15
|
/**
|
|
13
|
-
* The
|
|
16
|
+
* The RPC endpoint is consistently returning successful (2xx) responses.
|
|
14
17
|
*/
|
|
15
18
|
NetworkStatus["Available"] = "available";
|
|
16
19
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
20
|
+
* Either the last request to the RPC endpoint was either too slow, or the
|
|
21
|
+
* endpoint is consistently returning errors and the number of retries has
|
|
22
|
+
* been reached.
|
|
23
|
+
*/
|
|
24
|
+
NetworkStatus["Degraded"] = "degraded";
|
|
25
|
+
/**
|
|
26
|
+
* The RPC endpoint is consistently returning enough 5xx errors that requests
|
|
27
|
+
* have been paused.
|
|
19
28
|
*/
|
|
20
29
|
NetworkStatus["Unavailable"] = "unavailable";
|
|
21
30
|
/**
|
|
22
|
-
* The
|
|
23
|
-
*
|
|
24
|
-
* networks.
|
|
31
|
+
* The RPC endpoint is inaccessible for the user based on their location. This
|
|
32
|
+
* status only applies to Infura networks.
|
|
25
33
|
*/
|
|
26
34
|
NetworkStatus["Blocked"] = "blocked";
|
|
27
35
|
})(NetworkStatus || (NetworkStatus = {}));
|
package/dist/constants.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.mjs","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA
|
|
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"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metamask-previews/network-controller",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "27.0.0-preview-84f90603",
|
|
4
4
|
"description": "Provides an interface to the currently selected network via a MetaMask-compatible provider object",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"MetaMask",
|