@polkadot/networks 8.5.1 → 8.5.2-2

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/README.md CHANGED
@@ -2,4 +2,4 @@
2
2
 
3
3
  A list of all available Substrate networks and their applicable prefixes.
4
4
 
5
- This list is periodically checked against the master list available at https://github.com/paritytech/substrate/blob/master/ss58-registry.json
5
+ This list is periodically checked against the master list available at https://github.com/paritytech/ss58-registry/blob/main/ss58-registry.json
@@ -39,6 +39,7 @@ const knownGenesis = {
39
39
  sora: ['0x7e4e32d0feafd4f9c9414b0be86373f9a1efa904809b683453a9af6856d38ad5'],
40
40
  stafi: ['0x290a4149f09ea0e402c74c1c7e96ae4239588577fe78932f94f5404c68243d80'],
41
41
  statemine: ['0x48239ef607d7928874027a43a67689209727dfb3d3dc5e5b03a39bdc2eda771a'],
42
- subsocial: ['0x0bd72c1c305172e1275278aaeb3f161e02eccb7a819e63f62d47bd53a28189f8']
42
+ subsocial: ['0x0bd72c1c305172e1275278aaeb3f161e02eccb7a819e63f62d47bd53a28189f8'],
43
+ westend: ['0xe143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e']
43
44
  };
44
45
  exports.knownGenesis = knownGenesis;
@@ -1,2 +1,2 @@
1
- import type { KnownGenesis } from './types';
1
+ import type { KnownGenesis } from '../types';
2
2
  export declare const knownGenesis: KnownGenesis;
@@ -33,5 +33,6 @@ export const knownGenesis = {
33
33
  sora: ['0x7e4e32d0feafd4f9c9414b0be86373f9a1efa904809b683453a9af6856d38ad5'],
34
34
  stafi: ['0x290a4149f09ea0e402c74c1c7e96ae4239588577fe78932f94f5404c68243d80'],
35
35
  statemine: ['0x48239ef607d7928874027a43a67689209727dfb3d3dc5e5b03a39bdc2eda771a'],
36
- subsocial: ['0x0bd72c1c305172e1275278aaeb3f161e02eccb7a819e63f62d47bd53a28189f8']
36
+ subsocial: ['0x0bd72c1c305172e1275278aaeb3f161e02eccb7a819e63f62d47bd53a28189f8'],
37
+ westend: ['0xe143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e']
37
38
  };
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.knownIcon = void 0;
7
+ // Copyright 2017-2022 @polkadot/networks authors & contributors
8
+ // SPDX-License-Identifier: Apache-2.0
9
+ // these are icon overrides
10
+ const knownIcon = {
11
+ centrifuge: 'polkadot',
12
+ kusama: 'polkadot',
13
+ polkadot: 'polkadot',
14
+ sora: 'polkadot',
15
+ statemine: 'polkadot',
16
+ statemint: 'polkadot',
17
+ westmint: 'polkadot'
18
+ };
19
+ exports.knownIcon = knownIcon;
@@ -0,0 +1,2 @@
1
+ import type { KnownIcon } from '../types';
2
+ export declare const knownIcon: KnownIcon;
@@ -0,0 +1,12 @@
1
+ // Copyright 2017-2022 @polkadot/networks authors & contributors
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ // these are icon overrides
4
+ export const knownIcon = {
5
+ centrifuge: 'polkadot',
6
+ kusama: 'polkadot',
7
+ polkadot: 'polkadot',
8
+ sora: 'polkadot',
9
+ statemine: 'polkadot',
10
+ statemint: 'polkadot',
11
+ westmint: 'polkadot'
12
+ };
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "knownGenesis", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _genesis.knownGenesis;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "knownIcon", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _icons.knownIcon;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "knownLedger", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _ledger.knownLedger;
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "knownTestnet", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _testnets.knownTestnet;
28
+ }
29
+ });
30
+
31
+ var _genesis = require("./genesis.cjs");
32
+
33
+ var _icons = require("./icons.cjs");
34
+
35
+ var _ledger = require("./ledger.cjs");
36
+
37
+ var _testnets = require("./testnets.cjs");
@@ -0,0 +1,4 @@
1
+ export { knownGenesis } from './genesis';
2
+ export { knownIcon } from './icons';
3
+ export { knownLedger } from './ledger';
4
+ export { knownTestnet } from './testnets';
@@ -0,0 +1,6 @@
1
+ // Copyright 2017-2022 @polkadot/networks authors & contributors
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ export { knownGenesis } from "./genesis.js";
4
+ export { knownIcon } from "./icons.js";
5
+ export { knownLedger } from "./ledger.js";
6
+ export { knownTestnet } from "./testnets.js";
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.knownLedger = void 0;
7
+ // Copyright 2017-2022 @polkadot/networks authors & contributors
8
+ // SPDX-License-Identifier: Apache-2.0
9
+ // These match up with the keys of the ledgerApps object in the @polkadot/hw-ledger/defaults.ts
10
+ // and maps to the known slip44 (minus the `0x8` hard derivation flag)
11
+ //
12
+ // NOTE: Any network here needs to have a genesisHash attached in the ./genesis.ts config
13
+ const knownLedger = {
14
+ bifrost: 0x00000314,
15
+ centrifuge: 0x000002eb,
16
+ 'dock-mainnet': 0x00000252,
17
+ edgeware: 0x0000020b,
18
+ equilibrium: 0x05f5e0fd,
19
+ genshiro: 0x05f5e0fc,
20
+ kusama: 0x000001b2,
21
+ 'nodle-chain': 0x000003eb,
22
+ polkadot: 0x00000162,
23
+ polymesh: 0x00000253,
24
+ sora: 0x00000269,
25
+ statemine: 0x000001b2 // common-good on Kusama, shares derivation
26
+
27
+ };
28
+ exports.knownLedger = knownLedger;
@@ -0,0 +1,2 @@
1
+ import type { KnownLedger } from '../types';
2
+ export declare const knownLedger: KnownLedger;
@@ -0,0 +1,21 @@
1
+ // Copyright 2017-2022 @polkadot/networks authors & contributors
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ // These match up with the keys of the ledgerApps object in the @polkadot/hw-ledger/defaults.ts
4
+ // and maps to the known slip44 (minus the `0x8` hard derivation flag)
5
+ //
6
+ // NOTE: Any network here needs to have a genesisHash attached in the ./genesis.ts config
7
+ export const knownLedger = {
8
+ bifrost: 0x00000314,
9
+ centrifuge: 0x000002eb,
10
+ 'dock-mainnet': 0x00000252,
11
+ edgeware: 0x0000020b,
12
+ equilibrium: 0x05f5e0fd,
13
+ genshiro: 0x05f5e0fc,
14
+ kusama: 0x000001b2,
15
+ 'nodle-chain': 0x000003eb,
16
+ polkadot: 0x00000162,
17
+ polymesh: 0x00000253,
18
+ sora: 0x00000269,
19
+ statemine: 0x000001b2 // common-good on Kusama, shares derivation
20
+
21
+ };
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.knownTestnet = void 0;
7
+ // Copyright 2017-2022 @polkadot/networks authors & contributors
8
+ // SPDX-License-Identifier: Apache-2.0
9
+ // testnets should not allow selection
10
+ const knownTestnet = {
11
+ '': true,
12
+ // this is the default non-network entry
13
+ 'cess-testnet': true,
14
+ 'dock-testnet': true,
15
+ jupiter: true,
16
+ 'mathchain-testnet': true,
17
+ subspace_testnet: true,
18
+ 'zero-alphaville': true
19
+ };
20
+ exports.knownTestnet = knownTestnet;
@@ -0,0 +1,2 @@
1
+ import type { KnownTestnet } from '../types';
2
+ export declare const knownTestnet: KnownTestnet;
@@ -0,0 +1,13 @@
1
+ // Copyright 2017-2022 @polkadot/networks authors & contributors
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ // testnets should not allow selection
4
+ export const knownTestnet = {
5
+ '': true,
6
+ // this is the default non-network entry
7
+ 'cess-testnet': true,
8
+ 'dock-testnet': true,
9
+ jupiter: true,
10
+ 'mathchain-testnet': true,
11
+ subspace_testnet: true,
12
+ 'zero-alphaville': true
13
+ };
package/interfaces.cjs CHANGED
@@ -9,7 +9,7 @@ exports.selectableNetworks = exports.availableNetworks = exports.allNetworks = v
9
9
 
10
10
  var _ss58Registry = _interopRequireDefault(require("@substrate/ss58-registry"));
11
11
 
12
- var _defaults = require("./defaults.cjs");
12
+ var _index = require("./defaults/index.cjs");
13
13
 
14
14
  // Copyright 2017-2022 @polkadot/networks authors & contributors
15
15
  // SPDX-License-Identifier: Apache-2.0
@@ -22,13 +22,13 @@ function toExpanded(o) {
22
22
  const nameParts = network.replace(/_/g, '-').split('-');
23
23
  const n = o; // ledger additions
24
24
 
25
- n.slip44 = _defaults.knownLedger[network];
25
+ n.slip44 = _index.knownLedger[network];
26
26
  n.hasLedgerSupport = !!n.slip44; // general items
27
27
 
28
- n.genesisHash = _defaults.knownGenesis[network] || [];
29
- n.icon = _defaults.knownIcon[network] || 'substrate'; // filtering
28
+ n.genesisHash = _index.knownGenesis[network] || [];
29
+ n.icon = _index.knownIcon[network] || 'substrate'; // filtering
30
30
 
31
- n.isTestnet = !!_defaults.knownTestnet[network] || TESTNETS.includes(nameParts[nameParts.length - 1]);
31
+ n.isTestnet = !!_index.knownTestnet[network] || TESTNETS.includes(nameParts[nameParts.length - 1]);
32
32
  n.isIgnored = n.isTestnet || !(o.standardAccount && o.decimals && o.decimals.length && o.symbols && o.symbols.length) && o.prefix !== 42;
33
33
  return n;
34
34
  }
package/interfaces.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // Copyright 2017-2022 @polkadot/networks authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import knownSubstrate from '@substrate/ss58-registry';
4
- import { knownGenesis, knownIcon, knownLedger, knownTestnet } from "./defaults.js"; // These are known prefixes that are not sorted
4
+ import { knownGenesis, knownIcon, knownLedger, knownTestnet } from "./defaults/index.js"; // These are known prefixes that are not sorted
5
5
 
6
6
  const UNSORTED = [0, 2, 42];
7
7
  const TESTNETS = ['testnet'];
package/package.json CHANGED
@@ -17,7 +17,7 @@
17
17
  },
18
18
  "sideEffects": false,
19
19
  "type": "module",
20
- "version": "8.5.1",
20
+ "version": "8.5.2-2",
21
21
  "main": "index.cjs",
22
22
  "module": "index.js",
23
23
  "types": "index.d.ts",
@@ -28,9 +28,29 @@
28
28
  "default": "./index.js"
29
29
  },
30
30
  "./defaults": {
31
- "types": "./defaults.d.ts",
32
- "require": "./defaults.cjs",
33
- "default": "./defaults.js"
31
+ "types": "./defaults/index.d.ts",
32
+ "require": "./defaults/index.cjs",
33
+ "default": "./defaults/index.js"
34
+ },
35
+ "./defaults/genesis": {
36
+ "types": "./defaults/genesis.d.ts",
37
+ "require": "./defaults/genesis.cjs",
38
+ "default": "./defaults/genesis.js"
39
+ },
40
+ "./defaults/icons": {
41
+ "types": "./defaults/icons.d.ts",
42
+ "require": "./defaults/icons.cjs",
43
+ "default": "./defaults/icons.js"
44
+ },
45
+ "./defaults/ledger": {
46
+ "types": "./defaults/ledger.d.ts",
47
+ "require": "./defaults/ledger.cjs",
48
+ "default": "./defaults/ledger.js"
49
+ },
50
+ "./defaults/testnets": {
51
+ "types": "./defaults/testnets.d.ts",
52
+ "require": "./defaults/testnets.cjs",
53
+ "default": "./defaults/testnets.js"
34
54
  },
35
55
  "./detectOther": {
36
56
  "types": "./detectOther.d.ts",
@@ -42,11 +62,6 @@
42
62
  "require": "./detectPackage.cjs",
43
63
  "default": "./detectPackage.js"
44
64
  },
45
- "./genesis": {
46
- "types": "./genesis.d.ts",
47
- "require": "./genesis.cjs",
48
- "default": "./genesis.js"
49
- },
50
65
  "./interfaces": {
51
66
  "types": "./interfaces.d.ts",
52
67
  "require": "./interfaces.cjs",
@@ -68,7 +83,7 @@
68
83
  },
69
84
  "dependencies": {
70
85
  "@babel/runtime": "^7.17.2",
71
- "@polkadot/util": "8.5.1",
86
+ "@polkadot/util": "8.5.2-2",
72
87
  "@substrate/ss58-registry": "^1.16.0"
73
88
  }
74
89
  }
package/packageInfo.cjs CHANGED
@@ -11,6 +11,6 @@ const packageInfo = {
11
11
  name: '@polkadot/networks',
12
12
  path: typeof __dirname === 'string' ? __dirname : 'auto',
13
13
  type: 'cjs',
14
- version: '8.5.1'
14
+ version: '8.5.2-2'
15
15
  };
16
16
  exports.packageInfo = packageInfo;
package/packageInfo.js CHANGED
@@ -5,5 +5,5 @@ export const packageInfo = {
5
5
  name: '@polkadot/networks',
6
6
  path: (import.meta && import.meta.url) ? new URL('.', import.meta.url).pathname : 'auto',
7
7
  type: 'esm',
8
- version: '8.5.1'
8
+ version: '8.5.2-2'
9
9
  };
package/defaults.cjs DELETED
@@ -1,61 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "knownGenesis", {
7
- enumerable: true,
8
- get: function () {
9
- return _genesis.knownGenesis;
10
- }
11
- });
12
- exports.substrateRegistry = exports.knownTestnet = exports.knownLedger = exports.knownIcon = void 0;
13
-
14
- var _genesis = require("./genesis.cjs");
15
-
16
- // Copyright 2017-2022 @polkadot/networks authors & contributors
17
- // SPDX-License-Identifier: Apache-2.0
18
- const substrateRegistry = 'https://raw.githubusercontent.com/paritytech/ss58-registry/main/ss58-registry.json'; // these are icon overrides
19
-
20
- exports.substrateRegistry = substrateRegistry;
21
- const knownIcon = {
22
- centrifuge: 'polkadot',
23
- kusama: 'polkadot',
24
- polkadot: 'polkadot',
25
- sora: 'polkadot',
26
- statemine: 'polkadot',
27
- statemint: 'polkadot',
28
- westmint: 'polkadot'
29
- }; // These match up with the keys of the ledgerApps object in the @polkadot/hw-ledger/defaults.ts
30
- // and maps to the known slip44 (minus the `0x8` hard derivation flag)
31
- // NOTE: Any network here needs to have a genesisHash attached in the config above
32
-
33
- exports.knownIcon = knownIcon;
34
- const knownLedger = {
35
- bifrost: 0x00000314,
36
- centrifuge: 0x000002eb,
37
- 'dock-mainnet': 0x00000252,
38
- edgeware: 0x0000020b,
39
- equilibrium: 0x05f5e0fd,
40
- genshiro: 0x05f5e0fc,
41
- kusama: 0x000001b2,
42
- 'nodle-chain': 0x000003eb,
43
- polkadot: 0x00000162,
44
- polymesh: 0x00000253,
45
- sora: 0x00000269,
46
- statemine: 0x000001b2 // common-good on Kusama, shares derivation
47
-
48
- }; // testnets should not allow selection
49
-
50
- exports.knownLedger = knownLedger;
51
- const knownTestnet = {
52
- '': true,
53
- // this is the default non-network entry
54
- 'cess-testnet': true,
55
- 'dock-testnet': true,
56
- jupiter: true,
57
- 'mathchain-testnet': true,
58
- subspace_testnet: true,
59
- 'zero-alphaville': true
60
- };
61
- exports.knownTestnet = knownTestnet;
package/defaults.d.ts DELETED
@@ -1,6 +0,0 @@
1
- import type { KnownIcon, KnownLedger, KnownTestnet } from './types';
2
- export { knownGenesis } from './genesis';
3
- export declare const substrateRegistry = "https://raw.githubusercontent.com/paritytech/ss58-registry/main/ss58-registry.json";
4
- export declare const knownIcon: KnownIcon;
5
- export declare const knownLedger: KnownLedger;
6
- export declare const knownTestnet: KnownTestnet;
package/defaults.js DELETED
@@ -1,43 +0,0 @@
1
- // Copyright 2017-2022 @polkadot/networks authors & contributors
2
- // SPDX-License-Identifier: Apache-2.0
3
- export { knownGenesis } from "./genesis.js";
4
- export const substrateRegistry = 'https://raw.githubusercontent.com/paritytech/ss58-registry/main/ss58-registry.json'; // these are icon overrides
5
-
6
- export const knownIcon = {
7
- centrifuge: 'polkadot',
8
- kusama: 'polkadot',
9
- polkadot: 'polkadot',
10
- sora: 'polkadot',
11
- statemine: 'polkadot',
12
- statemint: 'polkadot',
13
- westmint: 'polkadot'
14
- }; // These match up with the keys of the ledgerApps object in the @polkadot/hw-ledger/defaults.ts
15
- // and maps to the known slip44 (minus the `0x8` hard derivation flag)
16
- // NOTE: Any network here needs to have a genesisHash attached in the config above
17
-
18
- export const knownLedger = {
19
- bifrost: 0x00000314,
20
- centrifuge: 0x000002eb,
21
- 'dock-mainnet': 0x00000252,
22
- edgeware: 0x0000020b,
23
- equilibrium: 0x05f5e0fd,
24
- genshiro: 0x05f5e0fc,
25
- kusama: 0x000001b2,
26
- 'nodle-chain': 0x000003eb,
27
- polkadot: 0x00000162,
28
- polymesh: 0x00000253,
29
- sora: 0x00000269,
30
- statemine: 0x000001b2 // common-good on Kusama, shares derivation
31
-
32
- }; // testnets should not allow selection
33
-
34
- export const knownTestnet = {
35
- '': true,
36
- // this is the default non-network entry
37
- 'cess-testnet': true,
38
- 'dock-testnet': true,
39
- jupiter: true,
40
- 'mathchain-testnet': true,
41
- subspace_testnet: true,
42
- 'zero-alphaville': true
43
- };