@swapkit/tokens 2.1.0 → 2.2.1
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/dist/index.js +2 -2
- package/dist/index.js.map +5 -6
- package/package.json +1 -1
- package/src/helpers.ts +2 -2
- package/src/index.ts +2 -50
- package/src/tokenLists/index.ts +14 -0
- package/src/tokenLists/traderjoe_v2.ts +1 -11
package/package.json
CHANGED
package/src/helpers.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as tokenLists from "./tokenLists";
|
|
2
2
|
|
|
3
3
|
export function getTokenIcon(identifier: string): string | undefined {
|
|
4
4
|
// Search through all lists for a matching token
|
|
5
5
|
for (const list of Object.values(tokenLists)) {
|
|
6
|
-
const token = list.tokens.find((
|
|
6
|
+
const token = list.tokens.find((token) => token.identifier === identifier);
|
|
7
7
|
if (token?.logoURI) {
|
|
8
8
|
return token.logoURI;
|
|
9
9
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,51 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { list as JupiterList } from "./tokenLists/jupiter";
|
|
4
|
-
import { list as KadoList } from "./tokenLists/kado";
|
|
5
|
-
import { list as MayaList } from "./tokenLists/mayachain";
|
|
6
|
-
// export { list as OciswapV1List } from "./tokenLists/ociswap_v1";
|
|
7
|
-
import { list as OneInchList } from "./tokenLists/oneinch";
|
|
8
|
-
import { list as OpenOceanV2List } from "./tokenLists/openocean_v2";
|
|
9
|
-
import { list as PancakeswapList } from "./tokenLists/pancakeswap";
|
|
10
|
-
import { list as PangolinList } from "./tokenLists/pangolin_v1";
|
|
11
|
-
import { list as SushiswapList } from "./tokenLists/sushiswap_v2";
|
|
12
|
-
import { list as ThorchainList } from "./tokenLists/thorchain";
|
|
13
|
-
import { list as TraderjoeV2List } from "./tokenLists/traderjoe_v2";
|
|
14
|
-
import { list as UniswapV2List } from "./tokenLists/uniswap_v2";
|
|
15
|
-
import { list as UniswapV3List } from "./tokenLists/uniswap_v3";
|
|
16
|
-
|
|
17
|
-
export const tokenLists: {
|
|
18
|
-
CaviarV1List: typeof CaviarV1List;
|
|
19
|
-
ChainflipList: typeof ChainflipList;
|
|
20
|
-
JupiterList: typeof JupiterList;
|
|
21
|
-
KadoList: typeof KadoList;
|
|
22
|
-
MayaList: typeof MayaList;
|
|
23
|
-
// OciswapV1List: typeof OciswapV1List
|
|
24
|
-
OneInchList: typeof OneInchList;
|
|
25
|
-
OpenOceanV2List: typeof OpenOceanV2List;
|
|
26
|
-
PancakeswapList: typeof PancakeswapList;
|
|
27
|
-
PangolinList: typeof PangolinList;
|
|
28
|
-
SushiswapList: typeof SushiswapList;
|
|
29
|
-
ThorchainList: typeof ThorchainList;
|
|
30
|
-
TraderjoeV2List: typeof TraderjoeV2List;
|
|
31
|
-
UniswapV2List: typeof UniswapV2List;
|
|
32
|
-
UniswapV3List: typeof UniswapV3List;
|
|
33
|
-
} = {
|
|
34
|
-
CaviarV1List,
|
|
35
|
-
ChainflipList,
|
|
36
|
-
JupiterList,
|
|
37
|
-
KadoList,
|
|
38
|
-
MayaList,
|
|
39
|
-
// OciswapV1List,
|
|
40
|
-
OneInchList,
|
|
41
|
-
OpenOceanV2List,
|
|
42
|
-
PancakeswapList,
|
|
43
|
-
PangolinList,
|
|
44
|
-
SushiswapList,
|
|
45
|
-
ThorchainList,
|
|
46
|
-
TraderjoeV2List,
|
|
47
|
-
UniswapV2List,
|
|
48
|
-
UniswapV3List,
|
|
49
|
-
};
|
|
50
|
-
|
|
1
|
+
export * as tokenLists from "./tokenLists";
|
|
2
|
+
export * from "./tokenLists";
|
|
51
3
|
export * from "./helpers";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { list as CaviarV1List } from "./caviar_v1";
|
|
2
|
+
export { list as ChainflipList } from "./chainflip";
|
|
3
|
+
export { list as JupiterList } from "./jupiter";
|
|
4
|
+
export { list as KadoList } from "./kado";
|
|
5
|
+
export { list as MayaList } from "./mayachain";
|
|
6
|
+
export { list as OneInchList } from "./oneinch";
|
|
7
|
+
export { list as OpenOceanV2List } from "./openocean_v2";
|
|
8
|
+
export { list as PancakeswapList } from "./pancakeswap";
|
|
9
|
+
export { list as PangolinList } from "./pangolin_v1";
|
|
10
|
+
export { list as SushiswapList } from "./sushiswap_v2";
|
|
11
|
+
export { list as ThorchainList } from "./thorchain";
|
|
12
|
+
export { list as TraderjoeV2List } from "./traderjoe_v2";
|
|
13
|
+
export { list as UniswapV2List } from "./uniswap_v2";
|
|
14
|
+
export { list as UniswapV3List } from "./uniswap_v3";
|
|
@@ -525,17 +525,7 @@ export const list = {
|
|
|
525
525
|
chain: "AVAX",
|
|
526
526
|
chainId: "43114",
|
|
527
527
|
decimals: 8,
|
|
528
|
-
identifier: "AVAX.BTC.
|
|
529
|
-
logoURI:
|
|
530
|
-
"https://storage.googleapis.com/token-list-swapkit/images/avax.btc.b-0x152b9d0fdc40c096757f570a51e494bd4b943e50.png",
|
|
531
|
-
ticker: "BTC.B",
|
|
532
|
-
},
|
|
533
|
-
{
|
|
534
|
-
address: "0x152b9d0FdC40C096757F570A51E494bd4b943E50",
|
|
535
|
-
chain: "AVAX",
|
|
536
|
-
chainId: "43114",
|
|
537
|
-
decimals: 8,
|
|
538
|
-
identifier: "AVAX.BTC.B-0X152B9D0FDC40C096757F570A51E494BD4B943E50",
|
|
528
|
+
identifier: "AVAX.BTC.b-0X152B9D0FDC40C096757F570A51E494BD4B943E50",
|
|
539
529
|
logoURI:
|
|
540
530
|
"https://storage.googleapis.com/token-list-swapkit/images/avax.btc.b-0x152b9d0fdc40c096757f570a51e494bd4b943e50.png",
|
|
541
531
|
ticker: "BTC.B",
|