@polkadot/networks 7.6.2-0 → 7.6.2-4
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/interfaces.cjs +4 -1
- package/interfaces.js +4 -1
- package/package.json +17 -13
- package/packageInfo.cjs +1 -1
- package/packageInfo.js +1 -1
- package/types.d.ts +1 -0
package/interfaces.cjs
CHANGED
|
@@ -13,15 +13,18 @@ var _substrate = require("./substrate.cjs");
|
|
|
13
13
|
// SPDX-License-Identifier: Apache-2.0
|
|
14
14
|
// These are known prefixes that are not sorted
|
|
15
15
|
const UNSORTED = [0, 2, 42];
|
|
16
|
+
const TESTNETS = ['testnet'];
|
|
16
17
|
|
|
17
18
|
const allNetworks = _substrate.knownSubstrate.map(o => {
|
|
18
19
|
const network = o.network || '';
|
|
20
|
+
const nameParts = network.replace(/_/g, '-').split('-');
|
|
19
21
|
const n = o;
|
|
20
22
|
n.slip44 = _defaults.knownLedger[network];
|
|
21
23
|
n.hasLedgerSupport = !!n.slip44;
|
|
22
24
|
n.genesisHash = _defaults.knownGenesis[network] || [];
|
|
23
25
|
n.icon = _defaults.knownIcon[network] || 'substrate';
|
|
24
|
-
n.
|
|
26
|
+
n.isTestnet = !!_defaults.knownTestnet[network] || TESTNETS.includes(nameParts[nameParts.length - 1]);
|
|
27
|
+
n.isIgnored = n.isTestnet || !(o.standardAccount && o.decimals && o.symbols) && o.prefix !== 42;
|
|
25
28
|
return n;
|
|
26
29
|
}); // The list of available/claimed prefixes
|
|
27
30
|
// - no testnets
|
package/interfaces.js
CHANGED
|
@@ -4,14 +4,17 @@ import { knownGenesis, knownIcon, knownLedger, knownTestnet } from "./defaults.j
|
|
|
4
4
|
import { knownSubstrate } from "./substrate.js"; // These are known prefixes that are not sorted
|
|
5
5
|
|
|
6
6
|
const UNSORTED = [0, 2, 42];
|
|
7
|
+
const TESTNETS = ['testnet'];
|
|
7
8
|
export const allNetworks = knownSubstrate.map(o => {
|
|
8
9
|
const network = o.network || '';
|
|
10
|
+
const nameParts = network.replace(/_/g, '-').split('-');
|
|
9
11
|
const n = o;
|
|
10
12
|
n.slip44 = knownLedger[network];
|
|
11
13
|
n.hasLedgerSupport = !!n.slip44;
|
|
12
14
|
n.genesisHash = knownGenesis[network] || [];
|
|
13
15
|
n.icon = knownIcon[network] || 'substrate';
|
|
14
|
-
n.
|
|
16
|
+
n.isTestnet = !!knownTestnet[network] || TESTNETS.includes(nameParts[nameParts.length - 1]);
|
|
17
|
+
n.isIgnored = n.isTestnet || !(o.standardAccount && o.decimals && o.symbols) && o.prefix !== 42;
|
|
15
18
|
return n;
|
|
16
19
|
}); // The list of available/claimed prefixes
|
|
17
20
|
// - no testnets
|
package/package.json
CHANGED
|
@@ -1,26 +1,30 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
"
|
|
2
|
+
"author": "Jaco Greeff <jacogr@gmail.com>",
|
|
3
|
+
"bugs": "https://github.com/polkadot-js/common/issues",
|
|
4
|
+
"contributors": [],
|
|
5
5
|
"description": "A list of all available Substrate networks and their applicable prefixes",
|
|
6
|
-
"main": "index.js",
|
|
7
|
-
"sideEffects": false,
|
|
8
6
|
"engines": {
|
|
9
7
|
"node": ">=14.0.0"
|
|
10
8
|
},
|
|
11
|
-
"repository": "github:polkadot-js/common",
|
|
12
|
-
"author": "Jaco Greeff <jacogr@gmail.com>",
|
|
13
|
-
"maintainers": [],
|
|
14
|
-
"contributors": [],
|
|
15
|
-
"license": "Apache-2.0",
|
|
16
|
-
"bugs": "https://github.com/polkadot-js/common/issues",
|
|
17
9
|
"homepage": "https://github.com/polkadot-js/common/tree/master/packages/networks#readme",
|
|
10
|
+
"license": "Apache-2.0",
|
|
11
|
+
"maintainers": [],
|
|
12
|
+
"name": "@polkadot/networks",
|
|
13
|
+
"repository": {
|
|
14
|
+
"directory": "packages/networks",
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "https://github.com/polkadot-js/common.git"
|
|
17
|
+
},
|
|
18
|
+
"sideEffects": false,
|
|
19
|
+
"type": "module",
|
|
20
|
+
"version": "7.6.2-4",
|
|
21
|
+
"main": "index.js",
|
|
18
22
|
"dependencies": {
|
|
19
23
|
"@babel/runtime": "^7.15.4"
|
|
20
24
|
},
|
|
21
25
|
"devDependencies": {
|
|
22
|
-
"@polkadot/util": "7.6.2-
|
|
23
|
-
"@polkadot/x-fetch": "7.6.2-
|
|
26
|
+
"@polkadot/util": "7.6.2-4",
|
|
27
|
+
"@polkadot/x-fetch": "7.6.2-4"
|
|
24
28
|
},
|
|
25
29
|
"exports": {
|
|
26
30
|
".": {
|
package/packageInfo.cjs
CHANGED
package/packageInfo.js
CHANGED
package/types.d.ts
CHANGED