const e=require(`./chains.constants.cjs`);var t=`https://api.coingecko.com/api/v3`,n=`https://pro-api.coingecko.com/api/v3`,r=typeof window<`u`?``:process.env.COINGECKO_API_KEY,i=`x-cg-pro-api-key`,a=r?n:t,o=e=>`${a}/simple/price?ids=${e}&vs_currencies=USD,ETH`,s=(e,t)=>`${a}/simple/token_price/${t}?contract_addresses=${e}&vs_currencies=USD`,c=e=>`${a}/coins/${e}`,l=e=>`${a}/search?query=${encodeURIComponent(e)}`,u=(e,t)=>`${n}/coins/${e}/contract/${t}`,d=(e,t)=>`${n}/coins/${e}/market_chart?vs_currency=usd&days=${t}&interval=daily`,f=`${n}/coins/list`,p={[e.chainIds.arbMainnet]:`ethereum`,[e.chainIds.localhost]:`ethereum`,[e.chainIds.ethMainnet]:`ethereum`,[e.chainIds.optimism]:`ethereum`,[e.chainIds.optimismTest]:`ethereum`,[e.chainIds.polygon]:`matic-network`,[e.chainIds.bnbMainnet]:`binancecoin`,[e.chainIds.base]:`ethereum`,[e.chainIds.solanaMainnet]:`solana`,[e.chainIds.solanaLocalnet]:`solana`,[e.chainIds.tronNile]:`tron`,[e.chainIds.tronMainnet]:`tron`,[e.chainIds.tronLocalnet]:`tron`,[e.chainIds.sepoliaTestnet]:`ethereum`},m=t=>{switch(e.getNonLocalhostChainId(t)){case e.chainIds.ethMainnet:return`ethereum`;case e.chainIds.polygon:return`polygon-pos`;case e.chainIds.bnbMainnet:return`binance-smart-chain`;case e.chainIds.optimism:return`optimistic-ethereum`;case e.chainIds.optimismTest:return`optimistic-ethereum`;case e.chainIds.arbMainnet:return`arbitrum-one`;case e.chainIds.base:return`base`;case e.chainIds.solanaMainnet:case e.chainIds.solanaLocalnet:return`solana`;case e.chainIds.tronNile:case e.chainIds.tronMainnet:case e.chainIds.tronLocalnet:return`tron`;case e.chainIds.tempo:return`tempo`;default:return`ethereum`}},h={[e.chainIds.polygon]:`polygon-pos`,[e.chainIds.arbMainnet]:`arbitrum-one`,[e.chainIds.ethMainnet]:`ethereum`,[e.chainIds.bnbMainnet]:`binance-smart-chain`,[e.chainIds.optimism]:`optimistic-ethereum`,[e.chainIds.optimismTest]:`optimistic-ethereum`,[e.chainIds.base]:`base`,[e.chainIds.solanaMainnet]:`solana`,[e.chainIds.solanaLocalnet]:`solana`,[e.chainIds.tronNile]:`tron`,[e.chainIds.tronMainnet]:`tron`,[e.chainIds.tronLocalnet]:`tron`,[e.chainIds.sepoliaTestnet]:`sepoliaTestnet`};exports.COINGECKO_API_KEY=r,exports.CoinGeckoChainLabels=h,exports.coingeckoPriceUrl=o,exports.coingeckoPriceUrl2=s,exports.coingeckoTokenListUrl=f,exports.getCoinByAddress=u,exports.getCoinById=c,exports.getCoinMarketChartByTokenId=d,exports.getCoingeckoIdForNativeTokens=p,exports.getCoingeckoPlatform=m,exports.proCoingeckoUrl=n,exports.proHeader=i,exports.searchBySymbol=l;