UNPKG

coingecko-tokens

Version:

Aggregated list of Token Lists from CoinGecko

31 lines (30 loc) 1.15 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.COINGECKO_CHAINS = exports.COINGECKO_TOKEN_API = exports.UNISWAP_TOKEN_LIST = void 0; exports.getCoingekoLists = getCoingekoLists; exports.getUniswapList = getUniswapList; const getTokenList_1 = require("./getTokenList"); exports.UNISWAP_TOKEN_LIST = 'https://tokens-uniswap-org.ipns.dweb.link'; exports.COINGECKO_TOKEN_API = 'https://tokens.coingecko.com'; exports.COINGECKO_CHAINS = [ 'uniswap', 'binance-smart-chain', 'arbitrum-one', 'optimistic-ethereum', 'polygon-pos', 'avalanche', 'xdai', 'base', 'unichain', 'ethereum-classic', ]; // eslint-disable-next-line @typescript-eslint/no-explicit-any function getCoingekoLists(fetchParams) { return Promise.all(exports.COINGECKO_CHAINS.map((chain) => { return (0, getTokenList_1.getTokenList)(`${exports.COINGECKO_TOKEN_API}/${chain}/all.json`, fetchParams); })); } // eslint-disable-next-line @typescript-eslint/no-explicit-any function getUniswapList(fetchParams) { return (0, getTokenList_1.getTokenList)(exports.UNISWAP_TOKEN_LIST, fetchParams); }