@subwallet/chain-list 0.2.95 → 0.2.96-beta.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/bundle-subwallet-chain-list.js +3304 -4779
- package/cjs/data/AssetLogoMap.json +883 -869
- package/cjs/data/AssetRef.json +146 -2386
- package/cjs/data/ChainAsset.json +1010 -782
- package/cjs/data/ChainInfo.json +461 -305
- package/cjs/data/ChainLogoMap.json +311 -305
- package/cjs/data/MultiChainAsset.json +97 -97
- package/cjs/index.js +20 -1
- package/cjs/packageInfo.js +1 -1
- package/data/AssetLogoMap.json +883 -869
- package/data/AssetRef.json +146 -2386
- package/data/ChainAsset.json +1010 -782
- package/data/ChainInfo.json +461 -305
- package/data/ChainLogoMap.json +311 -305
- package/data/MultiChainAsset.json +97 -97
- package/index.d.ts +2 -0
- package/index.js +18 -1
- package/package.json +3 -2
- package/packageInfo.js +1 -1
package/index.d.ts
CHANGED
|
@@ -43,3 +43,5 @@ export declare enum COMMON_ASSETS {
|
|
|
43
43
|
USDT_ETHEREUM = "ethereum-ERC20-USDT-0xdAC17F958D2ee523a2206206994597C13D831ec7"
|
|
44
44
|
}
|
|
45
45
|
export declare const _DEFAULT_CHAINS: string[];
|
|
46
|
+
export declare function md5HashChainInfo(data: _ChainInfo): string;
|
|
47
|
+
export declare function md5HashChainAsset(data: _ChainAsset): string;
|
package/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Copyright 2019-2024 @subwallet/chain-list authors & contributors
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
+
import { Md5 } from 'ts-md5';
|
|
4
5
|
import _AssetLogoMap from "./data/AssetLogoMap.json";
|
|
5
6
|
import _AssetRefMap from "./data/AssetRef.json";
|
|
6
7
|
import _ChainAssetMap from "./data/ChainAsset.json";
|
|
@@ -52,4 +53,20 @@ export let COMMON_ASSETS;
|
|
|
52
53
|
COMMON_ASSETS["DOT_HYDRADX_TESTNET"] = "hydradx_rococo-LOCAL-DOT";
|
|
53
54
|
COMMON_ASSETS["USDT_ETHEREUM"] = "ethereum-ERC20-USDT-0xdAC17F958D2ee523a2206206994597C13D831ec7";
|
|
54
55
|
})(COMMON_ASSETS || (COMMON_ASSETS = {}));
|
|
55
|
-
export const _DEFAULT_CHAINS = [COMMON_CHAIN_SLUGS.POLKADOT, COMMON_CHAIN_SLUGS.KUSAMA, COMMON_CHAIN_SLUGS.ETHEREUM];
|
|
56
|
+
export const _DEFAULT_CHAINS = [COMMON_CHAIN_SLUGS.POLKADOT, COMMON_CHAIN_SLUGS.KUSAMA, COMMON_CHAIN_SLUGS.ETHEREUM];
|
|
57
|
+
export function md5HashChainInfo(data) {
|
|
58
|
+
const {
|
|
59
|
+
chainStatus,
|
|
60
|
+
icon,
|
|
61
|
+
providers,
|
|
62
|
+
...chainBaseInfo
|
|
63
|
+
} = data;
|
|
64
|
+
return Md5.hashStr(JSON.stringify(chainBaseInfo));
|
|
65
|
+
}
|
|
66
|
+
export function md5HashChainAsset(data) {
|
|
67
|
+
const {
|
|
68
|
+
icon,
|
|
69
|
+
...assetBaseInfo
|
|
70
|
+
} = data;
|
|
71
|
+
return Md5.hashStr(JSON.stringify(assetBaseInfo));
|
|
72
|
+
}
|
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"./cjs/detectPackage.js"
|
|
21
21
|
],
|
|
22
22
|
"type": "module",
|
|
23
|
-
"version": "0.2.
|
|
23
|
+
"version": "0.2.96-beta.2",
|
|
24
24
|
"main": "./cjs/index.js",
|
|
25
25
|
"module": "./index.js",
|
|
26
26
|
"types": "./index.d.ts",
|
|
@@ -776,6 +776,7 @@
|
|
|
776
776
|
"dependencies": {
|
|
777
777
|
"@polkadot/dev": "0.67.167",
|
|
778
778
|
"@polkadot/util": "^12.5.1",
|
|
779
|
-
"eventemitter3": "^5.0.1"
|
|
779
|
+
"eventemitter3": "^5.0.1",
|
|
780
|
+
"ts-md5": "^1.3.1"
|
|
780
781
|
}
|
|
781
782
|
}
|
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.2.
|
|
10
|
+
version: '0.2.96-beta.2'
|
|
11
11
|
};
|