@polkadot/networks 7.6.2-3 → 7.6.2-7

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/defaults.cjs CHANGED
@@ -18,6 +18,7 @@ const knownGenesis = {
18
18
  'dock-mainnet': ['0xf73467c6544aa68df2ee546b135f955c46b90fa627e9b5d7935f41061bb8a5a9'],
19
19
  edgeware: ['0x742a2ca70c2fda6cee4f8df98d64c4c670a052d9568058982dad9d5a7a135c5b'],
20
20
  equilibrium: ['0x6f1a800de3daff7f5e037ddf66ab22ce03ab91874debeddb1086f5f7dbd48925'],
21
+ genshiro: ['0x9b8cefc0eb5c568b527998bdd76c184e2b76ae561be76e4667072230217ea243'],
21
22
  hydradx: ['0xd2a620c27ec5cbc5621ff9a522689895074f7cca0d08e7134a7804e1a3ba86fc', // Snakenet Gen3-1
22
23
  '0x10af6e84234477d84dc572bac0789813b254aa490767ed06fb9591191d1073f9', // Snakenet Gen3
23
24
  '0x3d75507dd46301767e601265791da1d9cb47b6ebc94e87347b635e5bf58bd047', // Snakenet Gen2
@@ -56,6 +57,7 @@ const knownLedger = {
56
57
  'dock-mainnet': 0x00000252,
57
58
  edgeware: 0x0000020b,
58
59
  equilibrium: 0x05f5e0fd,
60
+ genshiro: 0x05f5e0fc,
59
61
  kusama: 0x000001b2,
60
62
  'nodle-chain': 0x000003eb,
61
63
  polkadot: 0x00000162,
package/defaults.js CHANGED
@@ -11,6 +11,7 @@ export const knownGenesis = {
11
11
  'dock-mainnet': ['0xf73467c6544aa68df2ee546b135f955c46b90fa627e9b5d7935f41061bb8a5a9'],
12
12
  edgeware: ['0x742a2ca70c2fda6cee4f8df98d64c4c670a052d9568058982dad9d5a7a135c5b'],
13
13
  equilibrium: ['0x6f1a800de3daff7f5e037ddf66ab22ce03ab91874debeddb1086f5f7dbd48925'],
14
+ genshiro: ['0x9b8cefc0eb5c568b527998bdd76c184e2b76ae561be76e4667072230217ea243'],
14
15
  hydradx: ['0xd2a620c27ec5cbc5621ff9a522689895074f7cca0d08e7134a7804e1a3ba86fc', // Snakenet Gen3-1
15
16
  '0x10af6e84234477d84dc572bac0789813b254aa490767ed06fb9591191d1073f9', // Snakenet Gen3
16
17
  '0x3d75507dd46301767e601265791da1d9cb47b6ebc94e87347b635e5bf58bd047', // Snakenet Gen2
@@ -47,6 +48,7 @@ export const knownLedger = {
47
48
  'dock-mainnet': 0x00000252,
48
49
  edgeware: 0x0000020b,
49
50
  equilibrium: 0x05f5e0fd,
51
+ genshiro: 0x05f5e0fc,
50
52
  kusama: 0x000001b2,
51
53
  'nodle-chain': 0x000003eb,
52
54
  polkadot: 0x00000162,
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.isIgnored = !!_defaults.knownTestnet[network] || !(o.standardAccount && o.decimals && o.symbols) && o.prefix !== 42;
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.isIgnored = !!knownTestnet[network] || !(o.standardAccount && o.decimals && o.symbols) && o.prefix !== 42;
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
@@ -10,7 +10,6 @@
10
10
  "license": "Apache-2.0",
11
11
  "maintainers": [],
12
12
  "name": "@polkadot/networks",
13
- "private": false,
14
13
  "repository": {
15
14
  "directory": "packages/networks",
16
15
  "type": "git",
@@ -18,14 +17,14 @@
18
17
  },
19
18
  "sideEffects": false,
20
19
  "type": "module",
21
- "version": "7.6.2-3",
20
+ "version": "7.6.2-7",
22
21
  "main": "index.js",
23
22
  "dependencies": {
24
23
  "@babel/runtime": "^7.15.4"
25
24
  },
26
25
  "devDependencies": {
27
- "@polkadot/util": "7.6.2-3",
28
- "@polkadot/x-fetch": "7.6.2-3"
26
+ "@polkadot/util": "7.6.2-7",
27
+ "@polkadot/x-fetch": "7.6.2-7"
29
28
  },
30
29
  "exports": {
31
30
  ".": {
package/packageInfo.cjs CHANGED
@@ -9,6 +9,6 @@ exports.packageInfo = void 0;
9
9
  // Auto-generated by @polkadot/dev, do not edit
10
10
  const packageInfo = {
11
11
  name: '@polkadot/networks',
12
- version: '7.6.2-3'
12
+ version: '7.6.2-7'
13
13
  };
14
14
  exports.packageInfo = packageInfo;
package/packageInfo.js CHANGED
@@ -3,5 +3,5 @@
3
3
  // Auto-generated by @polkadot/dev, do not edit
4
4
  export const packageInfo = {
5
5
  name: '@polkadot/networks',
6
- version: '7.6.2-3'
6
+ version: '7.6.2-7'
7
7
  };
package/types.d.ts CHANGED
@@ -17,6 +17,7 @@ export interface SubstrateNetwork extends KnownSubstrate {
17
17
  hasLedgerSupport: boolean;
18
18
  icon: Icon;
19
19
  isIgnored: boolean;
20
+ isTestnet: boolean;
20
21
  slip44?: number | null;
21
22
  }
22
23
  export interface Network extends SubstrateNetwork {