@pezkuwi/networks 14.0.9 → 14.0.11
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/build/LICENSE +201 -0
- package/build/README.md +5 -0
- package/build/cjs/defaults/genesis.d.ts +2 -0
- package/build/cjs/defaults/genesis.js +216 -0
- package/build/cjs/defaults/icons.d.ts +2 -0
- package/build/cjs/defaults/icons.js +12 -0
- package/build/cjs/defaults/index.d.ts +4 -0
- package/build/cjs/defaults/index.js +11 -0
- package/build/cjs/defaults/ledger.d.ts +2 -0
- package/build/cjs/defaults/ledger.js +55 -0
- package/build/cjs/defaults/testnets.d.ts +2 -0
- package/build/cjs/defaults/testnets.js +13 -0
- package/build/cjs/index.d.ts +2 -0
- package/build/cjs/index.js +7 -0
- package/build/cjs/interfaces.d.ts +4 -0
- package/build/cjs/interfaces.js +82 -0
- package/build/cjs/package.json +3 -0
- package/build/cjs/packageDetect.d.ts +1 -0
- package/build/cjs/packageDetect.js +5 -0
- package/build/cjs/packageInfo.d.ts +6 -0
- package/build/cjs/packageInfo.js +4 -0
- package/build/cjs/types.d.ts +31 -0
- package/build/cjs/types.js +2 -0
- package/build/defaults/genesis.d.ts +2 -0
- package/build/defaults/genesis.js +213 -0
- package/build/defaults/icons.d.ts +2 -0
- package/build/defaults/icons.js +9 -0
- package/build/defaults/index.d.ts +4 -0
- package/build/defaults/index.js +4 -0
- package/build/defaults/ledger.d.ts +2 -0
- package/build/defaults/ledger.js +52 -0
- package/build/defaults/testnets.d.ts +2 -0
- package/build/defaults/testnets.js +10 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +2 -0
- package/build/interfaces.d.ts +4 -0
- package/build/interfaces.js +79 -0
- package/build/package.json +189 -0
- package/build/packageDetect.d.ts +1 -0
- package/build/packageDetect.js +3 -0
- package/build/packageInfo.d.ts +6 -0
- package/build/packageInfo.js +1 -0
- package/build/types.d.ts +31 -0
- package/build/types.js +1 -0
- package/build-deno/README.md +5 -0
- package/build-deno/defaults/genesis.ts +216 -0
- package/build-deno/defaults/icons.ts +12 -0
- package/build-deno/defaults/index.ts +5 -0
- package/build-deno/defaults/ledger.ts +55 -0
- package/build-deno/defaults/testnets.ts +13 -0
- package/build-deno/index.ts +4 -0
- package/build-deno/interfaces.ts +100 -0
- package/build-deno/mod.ts +2 -0
- package/build-deno/packageDetect.ts +7 -0
- package/build-deno/packageInfo.ts +3 -0
- package/build-deno/types.ts +41 -0
- package/build-tsc/defaults/genesis.d.ts +2 -0
- package/build-tsc/defaults/icons.d.ts +2 -0
- package/build-tsc/defaults/index.d.ts +4 -0
- package/build-tsc/defaults/ledger.d.ts +2 -0
- package/build-tsc/defaults/testnets.d.ts +2 -0
- package/build-tsc/index.d.ts +2 -0
- package/build-tsc/interfaces.d.ts +4 -0
- package/build-tsc/packageDetect.d.ts +1 -0
- package/build-tsc/packageInfo.d.ts +6 -0
- package/build-tsc/types.d.ts +31 -0
- package/build-tsc-cjs/defaults/genesis.js +216 -0
- package/build-tsc-cjs/defaults/icons.js +12 -0
- package/build-tsc-cjs/defaults/index.js +11 -0
- package/build-tsc-cjs/defaults/ledger.js +55 -0
- package/build-tsc-cjs/defaults/testnets.js +13 -0
- package/build-tsc-cjs/index.js +7 -0
- package/build-tsc-cjs/interfaces.js +82 -0
- package/build-tsc-cjs/packageDetect.js +5 -0
- package/build-tsc-cjs/packageInfo.js +4 -0
- package/build-tsc-cjs/types.js +2 -0
- package/build-tsc-esm/defaults/genesis.js +213 -0
- package/build-tsc-esm/defaults/icons.js +9 -0
- package/build-tsc-esm/defaults/index.js +4 -0
- package/build-tsc-esm/defaults/ledger.js +52 -0
- package/build-tsc-esm/defaults/testnets.js +10 -0
- package/build-tsc-esm/index.js +2 -0
- package/build-tsc-esm/interfaces.js +79 -0
- package/build-tsc-esm/packageDetect.js +3 -0
- package/build-tsc-esm/packageInfo.js +1 -0
- package/build-tsc-esm/types.js +1 -0
- package/cjs/interfaces.js +39 -3
- package/cjs/packageInfo.js +1 -1
- package/interfaces.js +39 -2
- package/package.json +3 -3
- package/packageInfo.js +1 -1
- package/src/defaults/genesis.ts +226 -0
- package/src/defaults/icons.ts +15 -0
- package/src/defaults/index.ts +7 -0
- package/src/defaults/ledger.ts +61 -0
- package/src/defaults/testnets.ts +16 -0
- package/src/defaults.spec.ts +59 -0
- package/src/index.spec.ts +120 -0
- package/src/index.ts +9 -0
- package/src/interfaces.ts +109 -0
- package/src/mod.ts +4 -0
- package/src/packageDetect.ts +11 -0
- package/src/packageInfo.ts +6 -0
- package/src/ss58registry.spec.ts +34 -0
- package/src/types.ts +43 -0
- package/test/ss58registry.json +1905 -0
- package/tsconfig.build.json +17 -0
- package/tsconfig.build.tsbuildinfo +1 -0
- package/tsconfig.spec.json +18 -0
- package/tsconfig.spec.tsbuildinfo +1 -0
package/build/types.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { RegistryEntry } from '@substrate/ss58-registry';
|
|
2
|
+
import type { HexString } from '@pezkuwi/util/types';
|
|
3
|
+
export type Icon = 'beachball' | 'empty' | 'jdenticon' | 'polkadot' | 'substrate';
|
|
4
|
+
export type KnownIcon = Record<string, Icon>;
|
|
5
|
+
export type KnownLedger = Record<string, number>;
|
|
6
|
+
export type KnownGenesis = Record<string, HexString[]>;
|
|
7
|
+
export type KnownBizinikiwi = RegistryEntry;
|
|
8
|
+
export type KnownTestnet = Record<string, true>;
|
|
9
|
+
export interface BizinikwiNetwork extends KnownBizinikiwi {
|
|
10
|
+
/** The genesisHash for the chain */
|
|
11
|
+
genesisHash: HexString[];
|
|
12
|
+
/** Does the chain has support for Ledger devices */
|
|
13
|
+
hasLedgerSupport: boolean;
|
|
14
|
+
/** The IdentityIcon to use for the chain */
|
|
15
|
+
icon: Icon;
|
|
16
|
+
/** Flag set when we don't include this chain */
|
|
17
|
+
isIgnored: boolean;
|
|
18
|
+
/** Flag to indicate a testnet */
|
|
19
|
+
isTestnet: boolean;
|
|
20
|
+
/** The Ledger-specific/required slip44 for the chain */
|
|
21
|
+
slip44?: number | null;
|
|
22
|
+
}
|
|
23
|
+
export interface Network extends BizinikwiNetwork {
|
|
24
|
+
/** The network assigned to this chain */
|
|
25
|
+
network: string;
|
|
26
|
+
}
|
|
27
|
+
export interface Ss58Registry {
|
|
28
|
+
registry: KnownBizinikiwi[];
|
|
29
|
+
specification: string;
|
|
30
|
+
schema: Record<keyof KnownBizinikiwi, string>;
|
|
31
|
+
}
|
package/build/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
|
|
2
|
+
import type { KnownGenesis } from '../types.ts';
|
|
3
|
+
|
|
4
|
+
export const knownGenesis: KnownGenesis = {
|
|
5
|
+
acala: [
|
|
6
|
+
'0xfc41b9bd8ef8fe53d58c7ea67c794c7ec9a73daf05e6d54b14ff6342c99ba64c'
|
|
7
|
+
],
|
|
8
|
+
ajuna: [
|
|
9
|
+
'0xe358eb1d11b31255a286c12e44fe6780b7edb171d657905a97e39f71d9c6c3ee'
|
|
10
|
+
],
|
|
11
|
+
'aleph-node': [
|
|
12
|
+
'0x70255b4d28de0fc4e1a193d7e175ad1ccef431598211c55538f1018651a0344e'
|
|
13
|
+
],
|
|
14
|
+
astar: [
|
|
15
|
+
'0x9eb76c5184c4ab8679d2d5d819fdf90b9c001403e9e17da2e14b6d8aec4029c6'
|
|
16
|
+
],
|
|
17
|
+
basilisk: [
|
|
18
|
+
'0xa85cfb9b9fd4d622a5b28289a02347af987d8f73fa3108450e2b4a11c1ce5755'
|
|
19
|
+
],
|
|
20
|
+
bifrost: [
|
|
21
|
+
'0x262e1b2ad728475fd6fe88e62d34c200abe6fd693931ddad144059b1eb884e5b'
|
|
22
|
+
],
|
|
23
|
+
'bifrost-kusama': [
|
|
24
|
+
'0x9f28c6a68e0fc9646eff64935684f6eeeece527e37bbe1f213d22caa1d9d6bed'
|
|
25
|
+
],
|
|
26
|
+
bittensor: [
|
|
27
|
+
'0x2f0555cc76fc2840a25a6ea3b9637146806f1f44b090c175ffde2a7e5ab36c03'
|
|
28
|
+
],
|
|
29
|
+
centrifuge: [
|
|
30
|
+
'0xb3db41421702df9a7fcac62b53ffeac85f7853cc4e689e0b93aeb3db18c09d82',
|
|
31
|
+
'0x67dddf2673b69e5f875f6f25277495834398eafd67f492e09f3f3345e003d1b5'
|
|
32
|
+
],
|
|
33
|
+
cere: [
|
|
34
|
+
'0x81443836a9a24caaa23f1241897d1235717535711d1d3fe24eae4fdc942c092c'
|
|
35
|
+
],
|
|
36
|
+
composable: [
|
|
37
|
+
'0xdaab8df776eb52ec604a5df5d388bb62a050a0aaec4556a64265b9d42755552d'
|
|
38
|
+
],
|
|
39
|
+
creditcoin3: [
|
|
40
|
+
'0x4436a7d64e363df85e065a894721002a86643283f9707338bf195d360ba2ee71', // cc3 mainnet
|
|
41
|
+
'0xfc4ec97a1c1f119c4353aecb4a17c7c0cf7b40d5d660143d8bad9117e9866572', // cc3 testnet/drynet
|
|
42
|
+
'0xfc9df99a665f964aed6649f275055e54df5e3420489538ed31d7788f53d11ef6' // cc3 devnet
|
|
43
|
+
],
|
|
44
|
+
darwinia: [
|
|
45
|
+
'0xe71578b37a7c799b0ab4ee87ffa6f059a6b98f71f06fb8c84a8d88013a548ad6'
|
|
46
|
+
],
|
|
47
|
+
dentnet: [
|
|
48
|
+
'0x0313f6a011d128d22f996703cbab05162e2fdc9e031493314fe6db79979c5ca7'
|
|
49
|
+
],
|
|
50
|
+
'dock-mainnet': [
|
|
51
|
+
'0x6bfe24dca2a3be10f22212678ac13a6446ec764103c0f3471c71609eac384aae',
|
|
52
|
+
'0xf73467c6544aa68df2ee546b135f955c46b90fa627e9b5d7935f41061bb8a5a9'
|
|
53
|
+
],
|
|
54
|
+
edgeware: [
|
|
55
|
+
'0x742a2ca70c2fda6cee4f8df98d64c4c670a052d9568058982dad9d5a7a135c5b'
|
|
56
|
+
],
|
|
57
|
+
encointer: [
|
|
58
|
+
'0x7dd99936c1e9e6d1ce7d90eb6f33bea8393b4bf87677d675aa63c9cb3e8c5b5b'
|
|
59
|
+
],
|
|
60
|
+
enjin: [
|
|
61
|
+
'0xd8761d3c88f26dc12875c00d3165f7d67243d56fc85b4cf19937601a7916e5a9'
|
|
62
|
+
],
|
|
63
|
+
equilibrium: [
|
|
64
|
+
'0x6f1a800de3daff7f5e037ddf66ab22ce03ab91874debeddb1086f5f7dbd48925'
|
|
65
|
+
],
|
|
66
|
+
frequency: [
|
|
67
|
+
'0x4a587bf17a404e3572747add7aab7bbe56e805a5479c6c436f07f36fcc8d3ae1'
|
|
68
|
+
],
|
|
69
|
+
genshiro: [
|
|
70
|
+
'0x9b8cefc0eb5c568b527998bdd76c184e2b76ae561be76e4667072230217ea243'
|
|
71
|
+
],
|
|
72
|
+
hydradx: [
|
|
73
|
+
'0xafdc188f45c71dacbaa0b62e16a91f726c7b8699a9748cdf715459de6b7f366d', // Hydration | HydraDX Parachain
|
|
74
|
+
'0xd2a620c27ec5cbc5621ff9a522689895074f7cca0d08e7134a7804e1a3ba86fc', // Snakenet Gen3-1
|
|
75
|
+
'0x10af6e84234477d84dc572bac0789813b254aa490767ed06fb9591191d1073f9', // Snakenet Gen3
|
|
76
|
+
'0x3d75507dd46301767e601265791da1d9cb47b6ebc94e87347b635e5bf58bd047', // Snakenet Gen2
|
|
77
|
+
'0x0ed32bfcab4a83517fac88f2aa7cbc2f88d3ab93be9a12b6188a036bf8a943c2' // Snakenet Gen1
|
|
78
|
+
],
|
|
79
|
+
integritee: [
|
|
80
|
+
'0xcdedc8eadbfa209d3f207bba541e57c3c58a667b05a2e1d1e86353c9000758da', // on Kusama
|
|
81
|
+
'0xe13e7af377c64e83f95e0d70d5e5c3c01d697a84538776c5b9bbe0e7d7b6034c' // on Polkadot
|
|
82
|
+
],
|
|
83
|
+
'interlay-parachain': [
|
|
84
|
+
'0xbf88efe70e9e0e916416e8bed61f2b45717f517d7f3523e33c7b001e5ffcbc72'
|
|
85
|
+
],
|
|
86
|
+
karura: [
|
|
87
|
+
'0xbaf5aabe40646d11f0ee8abbdc64f4a4b7674925cba08e4a05ff9ebed6e2126b'
|
|
88
|
+
],
|
|
89
|
+
khala: [
|
|
90
|
+
'0xd43540ba6d3eb4897c28a77d48cb5b729fea37603cbbfc7a86a73b72adb3be8d'
|
|
91
|
+
],
|
|
92
|
+
kulupu: [
|
|
93
|
+
'0xf7a99d3cb92853d00d5275c971c132c074636256583fee53b3bbe60d7b8769ba'
|
|
94
|
+
],
|
|
95
|
+
kusama: [
|
|
96
|
+
'0xb0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe', // Kusama CC3,
|
|
97
|
+
'0xe3777fa922cafbff200cadeaea1a76bd7898ad5b89f7848999058b50e715f636', // Kusama CC2
|
|
98
|
+
'0x3fd7b9eb6a00376e5be61f01abb429ffb0b104be05eaff4d458da48fcd425baf' // Kusama CC1
|
|
99
|
+
],
|
|
100
|
+
// Dicle - Pezkuwi canary relay chain (placeholder until mainnet launch)
|
|
101
|
+
dicle: [
|
|
102
|
+
'0xd9d3cd7c1e5d890d969b957f4c5b71a111bbeeabc968f1d0d4538c2663f080a7'
|
|
103
|
+
],
|
|
104
|
+
liberland: [
|
|
105
|
+
'0x6bd89e052d67a45bb60a9a23e8581053d5e0d619f15cb9865946937e690c42d6'
|
|
106
|
+
],
|
|
107
|
+
matrixchain: [
|
|
108
|
+
'0x3af4ff48ec76d2efc8476730f423ac07e25ad48f5f4c9dc39c778b164d808615'
|
|
109
|
+
],
|
|
110
|
+
mythos: [
|
|
111
|
+
'0xf6ee56e9c5277df5b4ce6ae9983ee88f3cbed27d31beeb98f9f84f997a1ab0b9'
|
|
112
|
+
],
|
|
113
|
+
nodle: [
|
|
114
|
+
'0x97da7ede98d7bad4e36b4d734b6055425a3be036da2a332ea5a7037656427a21'
|
|
115
|
+
],
|
|
116
|
+
origintrail: [
|
|
117
|
+
'0xe7e0962324a3b86c83404dbea483f25fb5dab4c224791c81b756cfc948006174'
|
|
118
|
+
],
|
|
119
|
+
p3d: [
|
|
120
|
+
'0x6c5894837ad89b6d92b114a2fb3eafa8fe3d26a54848e3447015442cd6ef4e66'
|
|
121
|
+
],
|
|
122
|
+
parallel: [
|
|
123
|
+
'0xe61a41c53f5dcd0beb09df93b34402aada44cb05117b71059cce40a2723a4e97'
|
|
124
|
+
],
|
|
125
|
+
peaq: [
|
|
126
|
+
'0xd2a5d385932d1f650dae03ef8e2748983779ee342c614f80854d32b8cd8fa48c'
|
|
127
|
+
],
|
|
128
|
+
pendulum: [
|
|
129
|
+
'0x5d3c298622d5634ed019bf61ea4b71655030015bde9beb0d6a24743714462c86'
|
|
130
|
+
],
|
|
131
|
+
phala: [
|
|
132
|
+
'0x1bb969d85965e4bb5a651abbedf21a54b6b31a21f66b5401cc3f1e286268d736'
|
|
133
|
+
],
|
|
134
|
+
picasso: [
|
|
135
|
+
'0x6811a339673c9daa897944dcdac99c6e2939cc88245ed21951a0a3c9a2be75bc',
|
|
136
|
+
'0xe8e7f0f4c4f5a00720b4821dbfddefea7490bcf0b19009961cc46957984e2c1c'
|
|
137
|
+
],
|
|
138
|
+
polimec: [
|
|
139
|
+
'0x7eb9354488318e7549c722669dcbdcdc526f1fef1420e7944667212f3601fdbd'
|
|
140
|
+
],
|
|
141
|
+
polkadex: [
|
|
142
|
+
'0x3920bcb4960a1eef5580cd5367ff3f430eef052774f78468852f7b9cb39f8a3c'
|
|
143
|
+
],
|
|
144
|
+
polkadot: [
|
|
145
|
+
'0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3'
|
|
146
|
+
],
|
|
147
|
+
// Pezkuwi - Pezkuwi main relay chain (placeholder until mainnet launch)
|
|
148
|
+
pezkuwi: [
|
|
149
|
+
'0x41693961995d879073269a008d0a52832caa3e0ae73869f02127f3d5daa4934c'
|
|
150
|
+
],
|
|
151
|
+
polymesh: [
|
|
152
|
+
'0x6fbd74e5e1d0a61d52ccfe9d4adaed16dd3a7caa37c6bc4d0c2fa12e8b2f4063'
|
|
153
|
+
],
|
|
154
|
+
quartz: [
|
|
155
|
+
'0xcd4d732201ebe5d6b014edda071c4203e16867305332301dc8d092044b28e554'
|
|
156
|
+
],
|
|
157
|
+
rococo: [
|
|
158
|
+
'0x6408de7737c59c238890533af25896a2c20608d8b380bb01029acb392781063e',
|
|
159
|
+
'0xaaf2cd1b74b5f726895921259421b534124726263982522174147046b8827897',
|
|
160
|
+
'0x037f5f3c8e67b314062025fc886fcd6238ea25a4a9b45dce8d246815c9ebe770',
|
|
161
|
+
'0xc196f81260cf1686172b47a79cf002120735d7cb0eb1474e8adce56618456fff',
|
|
162
|
+
'0xf6e9983c37baf68846fedafe21e56718790e39fb1c582abc408b81bc7b208f9a',
|
|
163
|
+
'0x5fce687da39305dfe682b117f0820b319348e8bb37eb16cf34acbf6a202de9d9',
|
|
164
|
+
'0xe7c3d5edde7db964317cd9b51a3a059d7cd99f81bdbce14990047354334c9779',
|
|
165
|
+
'0x1611e1dbf0405379b861e2e27daa90f480b2e6d3682414a80835a52e8cb8a215',
|
|
166
|
+
'0x343442f12fa715489a8714e79a7b264ea88c0d5b8c66b684a7788a516032f6b9',
|
|
167
|
+
'0x78bcd530c6b3a068bc17473cf5d2aff9c287102bed9af3ae3c41c33b9d6c6147',
|
|
168
|
+
'0x47381ee0697153d64404fc578392c8fd5cba9073391908f46c888498415647bd',
|
|
169
|
+
'0x19c0e4fa8ab75f5ac7865e0b8f74ff91eb9a100d336f423cd013a8befba40299'
|
|
170
|
+
],
|
|
171
|
+
// PezkuwiChain - Pezkuwi dev relay chain (placeholder until devnet launch)
|
|
172
|
+
pezkuwichain: [
|
|
173
|
+
'0x32154fd2c844f928c82964ff66168b41b15fc235f3a956d14393734c1ed4326b'
|
|
174
|
+
],
|
|
175
|
+
sora: [
|
|
176
|
+
'0x7e4e32d0feafd4f9c9414b0be86373f9a1efa904809b683453a9af6856d38ad5'
|
|
177
|
+
],
|
|
178
|
+
stafi: [
|
|
179
|
+
'0x290a4149f09ea0e402c74c1c7e96ae4239588577fe78932f94f5404c68243d80'
|
|
180
|
+
],
|
|
181
|
+
statemine: [
|
|
182
|
+
'0x48239ef607d7928874027a43a67689209727dfb3d3dc5e5b03a39bdc2eda771a'
|
|
183
|
+
],
|
|
184
|
+
statemint: [
|
|
185
|
+
'0x68d56f15f85d3136970ec16946040bc1752654e906147f7e43e9d539d7c3de2f'
|
|
186
|
+
],
|
|
187
|
+
subsocial: [
|
|
188
|
+
'0x0bd72c1c305172e1275278aaeb3f161e02eccb7a819e63f62d47bd53a28189f8'
|
|
189
|
+
],
|
|
190
|
+
ternoa: [
|
|
191
|
+
'0x6859c81ca95ef624c9dfe4dc6e3381c33e5d6509e35e147092bfbc780f777c4e'
|
|
192
|
+
],
|
|
193
|
+
unique: [
|
|
194
|
+
'0x84322d9cddbf35088f1e54e9a85c967a41a56a4f43445768125e61af166c7d31'
|
|
195
|
+
],
|
|
196
|
+
vara: [
|
|
197
|
+
'0xfe1b4c55fd4d668101126434206571a7838a8b6b93a6d1b95d607e78e6c53763'
|
|
198
|
+
],
|
|
199
|
+
vtb: [
|
|
200
|
+
'0x286bc8414c7000ce1d6ee6a834e29a54c1784814b76243eb77ed0b2c5573c60f',
|
|
201
|
+
'0x7483b89572fb2bd687c7b9a93b242d0b237f9aba463aba07ec24503931038aaa'
|
|
202
|
+
],
|
|
203
|
+
westend: [
|
|
204
|
+
'0xe143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e'
|
|
205
|
+
],
|
|
206
|
+
// Zagros - Pezkuwi test relay chain (placeholder until testnet launch)
|
|
207
|
+
zagros: [
|
|
208
|
+
'0x297f5a4d105b4b28312586ff1915572ffe4ee015ff772b76399ecbff25a22026'
|
|
209
|
+
],
|
|
210
|
+
xxnetwork: [
|
|
211
|
+
'0x50dd5d206917bf10502c68fb4d18a59fc8aa31586f4e8856b493e43544aa82aa'
|
|
212
|
+
],
|
|
213
|
+
zeitgeist: [
|
|
214
|
+
'0x1bf2a2ecb4a868de66ea8610f2ce7c8c43706561b6476031315f6640fe38e060'
|
|
215
|
+
]
|
|
216
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
import type { KnownIcon } from '../types.ts';
|
|
3
|
+
|
|
4
|
+
export const knownIcon: 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,55 @@
|
|
|
1
|
+
|
|
2
|
+
import type { KnownLedger } from '../types.ts';
|
|
3
|
+
|
|
4
|
+
export const knownLedger: KnownLedger = {
|
|
5
|
+
acala: 0x00000313,
|
|
6
|
+
ajuna: 0x00000162,
|
|
7
|
+
'aleph-node': 0x00000283,
|
|
8
|
+
astar: 0x0000032a,
|
|
9
|
+
bifrost: 0x00000314,
|
|
10
|
+
'bifrost-kusama': 0x00000314,
|
|
11
|
+
bittensor: 0x00000162,
|
|
12
|
+
centrifuge: 0x000002eb,
|
|
13
|
+
composable: 0x00000162,
|
|
14
|
+
creditcoin3: 0x00000162,
|
|
15
|
+
darwinia: 0x00000162,
|
|
16
|
+
dentnet: 0x000002de,
|
|
17
|
+
'dock-mainnet': 0x00000252,
|
|
18
|
+
edgeware: 0x0000020b,
|
|
19
|
+
encointer: 0x000001b2,
|
|
20
|
+
enjin: 0x00000483,
|
|
21
|
+
equilibrium: 0x05f5e0fd,
|
|
22
|
+
frequency: 0x0000082b,
|
|
23
|
+
genshiro: 0x05f5e0fc,
|
|
24
|
+
hydradx: 0x00000162,
|
|
25
|
+
integritee: 0x000007df,
|
|
26
|
+
'interlay-parachain': 0x00000162,
|
|
27
|
+
karura: 0x000002ae,
|
|
28
|
+
khala: 0x000001b2,
|
|
29
|
+
kusama: 0x000001b2,
|
|
30
|
+
liberland: 0x000002ff,
|
|
31
|
+
matrixchain: 0x00000483,
|
|
32
|
+
mythos: 0x0000003c,
|
|
33
|
+
nodle: 0x000003eb,
|
|
34
|
+
origintrail: 0x00000162,
|
|
35
|
+
parallel: 0x00000162,
|
|
36
|
+
peaq: 0x00000d0a,
|
|
37
|
+
pendulum: 0x00000162,
|
|
38
|
+
phala: 0x00000162,
|
|
39
|
+
picasso: 0x000001b2,
|
|
40
|
+
polimec: 0x00000d10,
|
|
41
|
+
polkadex: 0x0000031f,
|
|
42
|
+
polkadot: 0x00000162,
|
|
43
|
+
polymesh: 0x00000253,
|
|
44
|
+
quartz: 0x00000277,
|
|
45
|
+
sora: 0x00000269,
|
|
46
|
+
stafi: 0x0000038b,
|
|
47
|
+
statemine: 0x000001b2, // common-good on Kusama, shares derivation
|
|
48
|
+
statemint: 0x00000162, // common-good on Polkadot, shares derivation
|
|
49
|
+
ternoa: 0x00003e3,
|
|
50
|
+
unique: 0x00000295,
|
|
51
|
+
vara: 0x00001370,
|
|
52
|
+
vtb: 0x000002b6,
|
|
53
|
+
xxnetwork: 0x000007a3,
|
|
54
|
+
zeitgeist: 0x00000162
|
|
55
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
|
|
2
|
+
import type { KnownTestnet } from '../types.ts';
|
|
3
|
+
|
|
4
|
+
export const knownTestnet: KnownTestnet = {
|
|
5
|
+
'': true, // this is the default non-network entry
|
|
6
|
+
'cess-testnet': true,
|
|
7
|
+
'dock-testnet': true,
|
|
8
|
+
jupiter: true,
|
|
9
|
+
'mathchain-testnet': true,
|
|
10
|
+
p3dt: true,
|
|
11
|
+
subspace_testnet: true,
|
|
12
|
+
'zero-alphaville': true
|
|
13
|
+
};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
|
|
2
|
+
import type { KnownBizinikiwi, Network, BizinikwiNetwork } from './types.ts';
|
|
3
|
+
|
|
4
|
+
import { knownGenesis, knownIcon, knownLedger, knownTestnet } from './defaults/index.ts';
|
|
5
|
+
|
|
6
|
+
const UNSORTED = [0, 2, 42];
|
|
7
|
+
const TESTNETS = ['testnet'];
|
|
8
|
+
|
|
9
|
+
const customNetworks: KnownBizinikiwi[] = [
|
|
10
|
+
{
|
|
11
|
+
decimals: [10],
|
|
12
|
+
displayName: 'Pezkuwi Relay Chain',
|
|
13
|
+
network: 'pezkuwi',
|
|
14
|
+
prefix: 0,
|
|
15
|
+
standardAccount: '*25519',
|
|
16
|
+
symbols: ['PZW'],
|
|
17
|
+
website: 'https://pezkuwi.com'
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
decimals: [12],
|
|
21
|
+
displayName: 'Zagros Relay Chain',
|
|
22
|
+
network: 'zagros',
|
|
23
|
+
prefix: 2,
|
|
24
|
+
standardAccount: '*25519',
|
|
25
|
+
symbols: ['ZGS'],
|
|
26
|
+
website: 'https://zagros.pezkuwi.com'
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
decimals: [12],
|
|
30
|
+
displayName: 'Bizinikiwi',
|
|
31
|
+
network: 'bizinikiwi',
|
|
32
|
+
prefix: 42,
|
|
33
|
+
standardAccount: '*25519',
|
|
34
|
+
symbols: ['BZN'],
|
|
35
|
+
website: 'https://bizinikiwi.com'
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
decimals: [18],
|
|
39
|
+
displayName: 'PezkuwiChain',
|
|
40
|
+
network: 'pezkuwichain',
|
|
41
|
+
prefix: 1453,
|
|
42
|
+
standardAccount: '*25519',
|
|
43
|
+
symbols: ['PZC'],
|
|
44
|
+
website: 'https://chain.pezkuwi.com'
|
|
45
|
+
}
|
|
46
|
+
];
|
|
47
|
+
|
|
48
|
+
function toExpanded (o: KnownBizinikiwi): BizinikwiNetwork {
|
|
49
|
+
const network = o.network || '';
|
|
50
|
+
const nameParts = network.replace(/_/g, '-').split('-');
|
|
51
|
+
const n = o as BizinikwiNetwork;
|
|
52
|
+
|
|
53
|
+
// ledger additions
|
|
54
|
+
n.slip44 = knownLedger[network];
|
|
55
|
+
n.hasLedgerSupport = !!n.slip44;
|
|
56
|
+
|
|
57
|
+
// general items
|
|
58
|
+
n.genesisHash = knownGenesis[network] || [];
|
|
59
|
+
n.icon = knownIcon[network] || 'substrate';
|
|
60
|
+
|
|
61
|
+
// filtering
|
|
62
|
+
n.isTestnet = !!knownTestnet[network] || TESTNETS.includes(nameParts[nameParts.length - 1]);
|
|
63
|
+
n.isIgnored = n.isTestnet || (
|
|
64
|
+
!(
|
|
65
|
+
o.standardAccount &&
|
|
66
|
+
o.decimals?.length &&
|
|
67
|
+
o.symbols?.length
|
|
68
|
+
) &&
|
|
69
|
+
o.prefix !== 42
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
return n;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function filterSelectable ({ genesisHash, prefix }: Network): boolean {
|
|
76
|
+
return !!genesisHash.length || prefix === 42;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function filterAvailable (n: BizinikwiNetwork): n is Network {
|
|
80
|
+
return !n.isIgnored && !!n.network;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function sortNetworks (a: Network, b: Network): number {
|
|
84
|
+
const isUnSortedA = UNSORTED.includes(a.prefix);
|
|
85
|
+
const isUnSortedB = UNSORTED.includes(b.prefix);
|
|
86
|
+
|
|
87
|
+
return isUnSortedA === isUnSortedB
|
|
88
|
+
? isUnSortedA
|
|
89
|
+
? 0
|
|
90
|
+
: a.displayName.localeCompare(b.displayName)
|
|
91
|
+
: isUnSortedA
|
|
92
|
+
? -1
|
|
93
|
+
: 1;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export const allNetworks = customNetworks.map(toExpanded);
|
|
97
|
+
|
|
98
|
+
export const availableNetworks = allNetworks.filter(filterAvailable).sort(sortNetworks);
|
|
99
|
+
|
|
100
|
+
export const selectableNetworks = availableNetworks.filter(filterSelectable);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
|
|
2
|
+
import type { RegistryEntry } from 'https://esm.sh/@substrate/ss58-registry@1.51.0';
|
|
3
|
+
import type { HexString } from 'https://deno.land/x/pezkuwi/util/types.ts';
|
|
4
|
+
|
|
5
|
+
export type Icon = 'beachball' | 'empty' | 'jdenticon' | 'polkadot' | 'substrate';
|
|
6
|
+
|
|
7
|
+
export type KnownIcon = Record<string, Icon>;
|
|
8
|
+
|
|
9
|
+
export type KnownLedger = Record<string, number>;
|
|
10
|
+
|
|
11
|
+
export type KnownGenesis = Record<string, HexString[]>;
|
|
12
|
+
|
|
13
|
+
export type KnownBizinikiwi = RegistryEntry;
|
|
14
|
+
|
|
15
|
+
export type KnownTestnet = Record<string, true>;
|
|
16
|
+
|
|
17
|
+
export interface BizinikwiNetwork extends KnownBizinikiwi {
|
|
18
|
+
/** The genesisHash for the chain */
|
|
19
|
+
genesisHash: HexString[];
|
|
20
|
+
/** Does the chain has support for Ledger devices */
|
|
21
|
+
hasLedgerSupport: boolean;
|
|
22
|
+
/** The IdentityIcon to use for the chain */
|
|
23
|
+
icon: Icon;
|
|
24
|
+
/** Flag set when we don't include this chain */
|
|
25
|
+
isIgnored: boolean;
|
|
26
|
+
/** Flag to indicate a testnet */
|
|
27
|
+
isTestnet: boolean;
|
|
28
|
+
/** The Ledger-specific/required slip44 for the chain */
|
|
29
|
+
slip44?: number | null;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface Network extends BizinikwiNetwork {
|
|
33
|
+
/** The network assigned to this chain */
|
|
34
|
+
network: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface Ss58Registry {
|
|
38
|
+
registry: KnownBizinikiwi[];
|
|
39
|
+
specification: string;
|
|
40
|
+
schema: Record<keyof KnownBizinikiwi, string>;
|
|
41
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { RegistryEntry } from '@substrate/ss58-registry';
|
|
2
|
+
import type { HexString } from '@pezkuwi/util/types';
|
|
3
|
+
export type Icon = 'beachball' | 'empty' | 'jdenticon' | 'polkadot' | 'substrate';
|
|
4
|
+
export type KnownIcon = Record<string, Icon>;
|
|
5
|
+
export type KnownLedger = Record<string, number>;
|
|
6
|
+
export type KnownGenesis = Record<string, HexString[]>;
|
|
7
|
+
export type KnownBizinikiwi = RegistryEntry;
|
|
8
|
+
export type KnownTestnet = Record<string, true>;
|
|
9
|
+
export interface BizinikwiNetwork extends KnownBizinikiwi {
|
|
10
|
+
/** The genesisHash for the chain */
|
|
11
|
+
genesisHash: HexString[];
|
|
12
|
+
/** Does the chain has support for Ledger devices */
|
|
13
|
+
hasLedgerSupport: boolean;
|
|
14
|
+
/** The IdentityIcon to use for the chain */
|
|
15
|
+
icon: Icon;
|
|
16
|
+
/** Flag set when we don't include this chain */
|
|
17
|
+
isIgnored: boolean;
|
|
18
|
+
/** Flag to indicate a testnet */
|
|
19
|
+
isTestnet: boolean;
|
|
20
|
+
/** The Ledger-specific/required slip44 for the chain */
|
|
21
|
+
slip44?: number | null;
|
|
22
|
+
}
|
|
23
|
+
export interface Network extends BizinikwiNetwork {
|
|
24
|
+
/** The network assigned to this chain */
|
|
25
|
+
network: string;
|
|
26
|
+
}
|
|
27
|
+
export interface Ss58Registry {
|
|
28
|
+
registry: KnownBizinikiwi[];
|
|
29
|
+
specification: string;
|
|
30
|
+
schema: Record<keyof KnownBizinikiwi, string>;
|
|
31
|
+
}
|