@subwallet/chain-list 0.0.20 → 0.0.21
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/bundle-subwallet-chain-list.js +879 -239
- package/cjs/index.js +1 -0
- package/cjs/packageInfo.js +1 -1
- package/data/AssetRef.json +218 -13
- package/data/ChainAsset.json +463 -39
- package/data/ChainInfo.json +17 -65
- package/data/MultiChainAsset.json +64 -0
- package/index.d.ts +2 -1
- package/index.js +1 -0
- package/migrate/validate-chainAsset.js +35 -0
- package/package.json +2 -1
- package/packageInfo.js +1 -1
package/data/ChainInfo.json
CHANGED
|
@@ -426,7 +426,7 @@
|
|
|
426
426
|
"substrateInfo": {
|
|
427
427
|
"paraId": null,
|
|
428
428
|
"relaySlug": null,
|
|
429
|
-
"genesisHash": "
|
|
429
|
+
"genesisHash": "0x8ffa3204b182fbda4676f75ea2d6a9bbdbbaf0d78470c62952e918c60e0583b4",
|
|
430
430
|
"addressPrefix": 42,
|
|
431
431
|
"crowdloanUrl": null,
|
|
432
432
|
"chainType": "RELAYCHAIN",
|
|
@@ -1102,21 +1102,20 @@
|
|
|
1102
1102
|
"name": "Darwinia",
|
|
1103
1103
|
"chainStatus": "ACTIVE",
|
|
1104
1104
|
"providers": {
|
|
1105
|
-
"Darwinia Network": "wss://rpc.darwinia.network"
|
|
1106
|
-
"Darwinia": "wss://darwinia-rpc.dwellir.com"
|
|
1105
|
+
"Darwinia Network": "wss://parachain-rpc.darwinia.network"
|
|
1107
1106
|
},
|
|
1108
1107
|
"isTestnet": false,
|
|
1109
1108
|
"substrateInfo": {
|
|
1110
|
-
"paraId":
|
|
1109
|
+
"paraId": 2046,
|
|
1111
1110
|
"relaySlug": "polkadot",
|
|
1112
|
-
"genesisHash": "
|
|
1111
|
+
"genesisHash": "0xe71578b37a7c799b0ab4ee87ffa6f059a6b98f71f06fb8c84a8d88013a548ad6",
|
|
1113
1112
|
"addressPrefix": 18,
|
|
1114
1113
|
"crowdloanUrl": "https://darwinia.network/plo_contribute",
|
|
1115
1114
|
"chainType": "PARACHAIN",
|
|
1116
1115
|
"blockExplorer": "https://darwinia.subscan.io/",
|
|
1117
1116
|
"symbol": "RING",
|
|
1118
1117
|
"existentialDeposit": "0",
|
|
1119
|
-
"decimals":
|
|
1118
|
+
"decimals": 18,
|
|
1120
1119
|
"hasNativeNft": false,
|
|
1121
1120
|
"supportSmartContract": null,
|
|
1122
1121
|
"supportStaking": false
|
|
@@ -1480,7 +1479,7 @@
|
|
|
1480
1479
|
"symbol": "KAR",
|
|
1481
1480
|
"existentialDeposit": "100000000000",
|
|
1482
1481
|
"decimals": 12,
|
|
1483
|
-
"hasNativeNft":
|
|
1482
|
+
"hasNativeNft": true,
|
|
1484
1483
|
"supportSmartContract": null,
|
|
1485
1484
|
"supportStaking": false
|
|
1486
1485
|
},
|
|
@@ -1996,45 +1995,20 @@
|
|
|
1996
1995
|
},
|
|
1997
1996
|
"evmInfo": null
|
|
1998
1997
|
},
|
|
1999
|
-
"crab": {
|
|
2000
|
-
"slug": "crab",
|
|
2001
|
-
"name": "Darwinia Crab",
|
|
2002
|
-
"chainStatus": "ACTIVE",
|
|
2003
|
-
"providers": {
|
|
2004
|
-
"OnFinality": "wss://darwinia-crab.api.onfinality.io/public-ws",
|
|
2005
|
-
"Darwinia_Network": "wss://crab-rpc.darwinia.network",
|
|
2006
|
-
"Dwellir": "wss://darwiniacrab-rpc.dwellir.com"
|
|
2007
|
-
},
|
|
2008
|
-
"isTestnet": false,
|
|
2009
|
-
"substrateInfo": {
|
|
2010
|
-
"paraId": null,
|
|
2011
|
-
"relaySlug": null,
|
|
2012
|
-
"genesisHash": "0x34f61bfda344b3fad3c3e38832a91448b3c613b199eb23e5110a635d71c13c65",
|
|
2013
|
-
"addressPrefix": 42,
|
|
2014
|
-
"crowdloanUrl": "https://crab.network/plo",
|
|
2015
|
-
"chainType": "RELAYCHAIN",
|
|
2016
|
-
"blockExplorer": "https://crab.subscan.io/",
|
|
2017
|
-
"symbol": "CRAB",
|
|
2018
|
-
"existentialDeposit": "0",
|
|
2019
|
-
"decimals": 9,
|
|
2020
|
-
"hasNativeNft": false,
|
|
2021
|
-
"supportSmartContract": null,
|
|
2022
|
-
"supportStaking": false
|
|
2023
|
-
},
|
|
2024
|
-
"evmInfo": null
|
|
2025
|
-
},
|
|
2026
1998
|
"crabParachain": {
|
|
2027
1999
|
"slug": "crabParachain",
|
|
2028
|
-
"name": "
|
|
2000
|
+
"name": "Crab2 Parachain",
|
|
2029
2001
|
"chainStatus": "ACTIVE",
|
|
2030
2002
|
"providers": {
|
|
2031
|
-
"Crab": "wss://crab-
|
|
2003
|
+
"Crab": "wss://crab-rpc.darwinia.network/",
|
|
2004
|
+
"Dwellir": "wss://darwiniacrab-rpc.dwellir.com",
|
|
2005
|
+
"OnFinality": "wss://crab.api.onfinality.io/public-ws"
|
|
2032
2006
|
},
|
|
2033
2007
|
"isTestnet": false,
|
|
2034
2008
|
"substrateInfo": {
|
|
2035
2009
|
"paraId": 2105,
|
|
2036
2010
|
"relaySlug": "kusama",
|
|
2037
|
-
"genesisHash": "
|
|
2011
|
+
"genesisHash": "0x86e49c195aeae7c5c4a86ced251f1a28c67b3c35d8289c387ede1776cdd88b24",
|
|
2038
2012
|
"addressPrefix": 42,
|
|
2039
2013
|
"crowdloanUrl": "https://crab.network/plo",
|
|
2040
2014
|
"chainType": "PARACHAIN",
|
|
@@ -2043,20 +2017,9 @@
|
|
|
2043
2017
|
"decimals": 18,
|
|
2044
2018
|
"hasNativeNft": false,
|
|
2045
2019
|
"supportSmartContract": null,
|
|
2046
|
-
"blockExplorer":
|
|
2020
|
+
"blockExplorer": "https://crab.subscan.io",
|
|
2047
2021
|
"supportStaking": false
|
|
2048
2022
|
},
|
|
2049
|
-
"evmInfo": null
|
|
2050
|
-
},
|
|
2051
|
-
"crabEvm": {
|
|
2052
|
-
"slug": "crabEvm",
|
|
2053
|
-
"name": "Darwinia Crab - EVM",
|
|
2054
|
-
"chainStatus": "ACTIVE",
|
|
2055
|
-
"providers": {
|
|
2056
|
-
"Darwinia_Network": "wss://crab-rpc.darwinia.network"
|
|
2057
|
-
},
|
|
2058
|
-
"isTestnet": false,
|
|
2059
|
-
"substrateInfo": null,
|
|
2060
2023
|
"evmInfo": {
|
|
2061
2024
|
"evmChainId": 44,
|
|
2062
2025
|
"blockExplorer": "https://crab.subscan.io",
|
|
@@ -2078,30 +2041,19 @@
|
|
|
2078
2041
|
},
|
|
2079
2042
|
"isTestnet": true,
|
|
2080
2043
|
"substrateInfo": {
|
|
2081
|
-
"paraId":
|
|
2082
|
-
"relaySlug":
|
|
2083
|
-
"genesisHash": "
|
|
2044
|
+
"paraId": 2105,
|
|
2045
|
+
"relaySlug": "rococo",
|
|
2046
|
+
"genesisHash": "0xb067215e6232ffeed7cede2f92ac6b65f2121523fa221fc76f2e4430086c6b70",
|
|
2084
2047
|
"addressPrefix": 42,
|
|
2085
|
-
"chainType": "
|
|
2048
|
+
"chainType": "PARACHAIN",
|
|
2086
2049
|
"blockExplorer": "https://pangolin.subscan.io",
|
|
2087
2050
|
"symbol": "PRING",
|
|
2088
2051
|
"existentialDeposit": "0",
|
|
2089
|
-
"decimals":
|
|
2052
|
+
"decimals": 18,
|
|
2090
2053
|
"hasNativeNft": false,
|
|
2091
2054
|
"supportSmartContract": null,
|
|
2092
2055
|
"supportStaking": false
|
|
2093
2056
|
},
|
|
2094
|
-
"evmInfo": null
|
|
2095
|
-
},
|
|
2096
|
-
"pangolinEvm": {
|
|
2097
|
-
"slug": "pangolinEvm",
|
|
2098
|
-
"name": "Pangolin - EVM",
|
|
2099
|
-
"chainStatus": "ACTIVE",
|
|
2100
|
-
"providers": {
|
|
2101
|
-
"Pangolin_Network": "wss://pangolin-rpc.darwinia.network"
|
|
2102
|
-
},
|
|
2103
|
-
"isTestnet": true,
|
|
2104
|
-
"substrateInfo": null,
|
|
2105
2057
|
"evmInfo": {
|
|
2106
2058
|
"evmChainId": 43,
|
|
2107
2059
|
"blockExplorer": "https://pangolin.subscan.io",
|
|
@@ -31,6 +31,14 @@
|
|
|
31
31
|
"priceId": "acala",
|
|
32
32
|
"hasValue": true
|
|
33
33
|
},
|
|
34
|
+
"KAR-Karura": {
|
|
35
|
+
"slug": "KAR-Karura",
|
|
36
|
+
"originChainAsset": "karura-NATIVE-KAR",
|
|
37
|
+
"name": "Karura",
|
|
38
|
+
"symbol": "KAR",
|
|
39
|
+
"priceId": null,
|
|
40
|
+
"hasValue": true
|
|
41
|
+
},
|
|
34
42
|
"USDT-Tether": {
|
|
35
43
|
"slug": "USDT-Tether",
|
|
36
44
|
"originChainAsset": null,
|
|
@@ -63,6 +71,14 @@
|
|
|
63
71
|
"priceId": "acala-dollar-acala",
|
|
64
72
|
"hasValue": true
|
|
65
73
|
},
|
|
74
|
+
"aUSD-KaruraDollar": {
|
|
75
|
+
"slug": "aUSD-KaruraDollar",
|
|
76
|
+
"originChainAsset": "karura-LOCAL-aUSD",
|
|
77
|
+
"name": "Karura Dollar",
|
|
78
|
+
"symbol": "aUSD",
|
|
79
|
+
"priceId": null,
|
|
80
|
+
"hasValue": true
|
|
81
|
+
},
|
|
66
82
|
"DEV-MoonbaseDev": {
|
|
67
83
|
"slug": "DEV-MoonbaseDev",
|
|
68
84
|
"originChainAsset": "moonbase-NATIVE-DEV",
|
|
@@ -78,5 +94,53 @@
|
|
|
78
94
|
"symbol": "MOVR",
|
|
79
95
|
"priceId": "moonriver",
|
|
80
96
|
"hasValue": true
|
|
97
|
+
},
|
|
98
|
+
"BNC-BifrostKusama": {
|
|
99
|
+
"slug": "BNC-BifrostKusama",
|
|
100
|
+
"originChainAsset": "bifrost-NATIVE-BNC",
|
|
101
|
+
"name": "Bifrost Kusama",
|
|
102
|
+
"symbol": "BNC",
|
|
103
|
+
"priceId": "bifrost-native-coin",
|
|
104
|
+
"hasValue": true
|
|
105
|
+
},
|
|
106
|
+
"NEER-Pioneer": {
|
|
107
|
+
"slug": "NEER-Pioneer",
|
|
108
|
+
"originChainAsset": "pioneer-NATIVE-NEER",
|
|
109
|
+
"name": "Pioneer",
|
|
110
|
+
"symbol": "NEER",
|
|
111
|
+
"priceId": "metaverse-network-pioneer",
|
|
112
|
+
"hasValue": true
|
|
113
|
+
},
|
|
114
|
+
"INTR-Interlay": {
|
|
115
|
+
"slug": "INTR-Interlay",
|
|
116
|
+
"originChainAsset": "interlay-NATIVE-INTR",
|
|
117
|
+
"name": "Interlay",
|
|
118
|
+
"symbol": "INTR",
|
|
119
|
+
"priceId": "interlay",
|
|
120
|
+
"hasValue": true
|
|
121
|
+
},
|
|
122
|
+
"iBTC-interBTC": {
|
|
123
|
+
"slug": "iBTC-interBTC",
|
|
124
|
+
"originChainAsset": "interlay-LOCAL-iBTC",
|
|
125
|
+
"name": "interBTC",
|
|
126
|
+
"symbol": "iBTC",
|
|
127
|
+
"priceId": null,
|
|
128
|
+
"hasValue": true
|
|
129
|
+
},
|
|
130
|
+
"KINT-Kintsugi": {
|
|
131
|
+
"slug": "KINT-Kintsugi",
|
|
132
|
+
"originChainAsset": "kintsugi-NATIVE-KINT",
|
|
133
|
+
"name": "Kintsugi",
|
|
134
|
+
"symbol": "KINT",
|
|
135
|
+
"priceId": null,
|
|
136
|
+
"hasValue": true
|
|
137
|
+
},
|
|
138
|
+
"kBTC-KintsugiWrappedBTC": {
|
|
139
|
+
"slug": "kBTC-KintsugiWrappedBTC",
|
|
140
|
+
"originChainAsset": "kintsugi-LOCAL-kBTC",
|
|
141
|
+
"name": "Kintsugi Wrapped BTC",
|
|
142
|
+
"symbol": "ikBTC",
|
|
143
|
+
"priceId": null,
|
|
144
|
+
"hasValue": true
|
|
81
145
|
}
|
|
82
146
|
}
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -22,5 +22,6 @@ export let COMMON_CHAIN_SLUGS;
|
|
|
22
22
|
COMMON_CHAIN_SLUGS["ASTAR"] = "astar";
|
|
23
23
|
COMMON_CHAIN_SLUGS["WESTEND"] = "westend";
|
|
24
24
|
COMMON_CHAIN_SLUGS["BINANCE"] = "binance";
|
|
25
|
+
COMMON_CHAIN_SLUGS["ASTAR_EVM"] = "astarEvm";
|
|
25
26
|
})(COMMON_CHAIN_SLUGS || (COMMON_CHAIN_SLUGS = {}));
|
|
26
27
|
export const _DEFAULT_CHAINS = [COMMON_CHAIN_SLUGS.POLKADOT, COMMON_CHAIN_SLUGS.KUSAMA];
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Convert chain list
|
|
2
|
+
import fs from 'fs';
|
|
3
|
+
|
|
4
|
+
const AssetMap = JSON.parse(fs.readFileSync('../data/ChainAsset.json'));
|
|
5
|
+
const ChainMap = JSON.parse(fs.readFileSync('../data/ChainInfo.json'));
|
|
6
|
+
|
|
7
|
+
Object.entries(AssetMap).forEach(([slug, asset]) => {
|
|
8
|
+
if (slug !== asset.slug) {
|
|
9
|
+
console.warn('Not match:', slug, asset.slug);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
if (!ChainMap[asset.originChain]) {
|
|
13
|
+
console.warn('Notfound:', slug, asset.originChain, asset.symbol);
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
Object.entries(ChainMap).forEach(([slug, chain]) => {
|
|
18
|
+
if (chain.substrateInfo) {
|
|
19
|
+
const nativeTokenSlug = `${slug}-NATIVE-${chain.substrateInfo.symbol}`;
|
|
20
|
+
|
|
21
|
+
if (!AssetMap[nativeTokenSlug]) {
|
|
22
|
+
console.warn('Notfound native token:', slug, nativeTokenSlug);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if (chain.evmInfo) {
|
|
27
|
+
const nativeTokenSlug = `${slug}-NATIVE-${chain.evmInfo.symbol}`;
|
|
28
|
+
|
|
29
|
+
if (!AssetMap[nativeTokenSlug]) {
|
|
30
|
+
console.warn('Notfound native token:', slug, nativeTokenSlug);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
console.log('Finished');
|
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"./cjs/detectPackage.js"
|
|
21
21
|
],
|
|
22
22
|
"type": "module",
|
|
23
|
-
"version": "0.0.
|
|
23
|
+
"version": "0.0.21",
|
|
24
24
|
"main": "./cjs/index.js",
|
|
25
25
|
"module": "./index.js",
|
|
26
26
|
"types": "./index.d.ts",
|
|
@@ -252,6 +252,7 @@
|
|
|
252
252
|
"./migrate/convert-change-list": "./migrate/convert-change-list.js",
|
|
253
253
|
"./migrate/generate-native-tokens": "./migrate/generate-native-tokens.js",
|
|
254
254
|
"./migrate/update-price-symbol": "./migrate/update-price-symbol.js",
|
|
255
|
+
"./migrate/validate-chainAsset": "./migrate/validate-chainAsset.js",
|
|
255
256
|
"./package.json": "./package.json",
|
|
256
257
|
"./packageInfo.js": {
|
|
257
258
|
"types": "./packageInfo.d.ts",
|
package/packageInfo.js
CHANGED
|
@@ -7,5 +7,5 @@ export const packageInfo = {
|
|
|
7
7
|
name: '@subwallet/chain-list',
|
|
8
8
|
path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto',
|
|
9
9
|
type: 'esm',
|
|
10
|
-
version: '0.0.
|
|
10
|
+
version: '0.0.21'
|
|
11
11
|
};
|