import { Logger } from "../relayFeeCalculator"; export declare function msToS(ms: number): number; export type CoinGeckoAssetPlatform = { id: string; chain_identifier: number; name: string; shortname: string; }; export type CoinGeckoPrice = { address: string; timestamp: number; price: number; }; type CGTokenPrice = { [currency: string]: number; last_updated_at: number; }; export type CoinGeckoTokenList = { id: string; symbol: string; name: string; platforms: { [platform: string]: string; }; }; export type PriceHistory = { market_data: { current_price: { [currency: string]: number; }; }; }; export type HistoricPriceChartData = { prices: Array<[number, number]>; market_caps: Array<[number, number]>; total_volumes: Array<[number, number]>; }; export declare class Coingecko { private readonly host; private readonly proHost; private readonly logger; private readonly apiKey?; private static instance; private prices; private _maxPriceAge; private retryDelay; private numRetries; private basicApiTimeout; private platformIdMap; private tokenIdMap; static get(logger: Logger, apiKey?: string): Coingecko; get maxPriceAge(): number; set maxPriceAge(age: number); protected constructor(host: string, proHost: string, logger: Logger, apiKey?: string | undefined); protected getPlatformId(chainId: number): Promise; protected getCoingeckoTokenId(address: string, chainId: number): Promise; getTokenIdFromAddress(address: string, platformId: string): string | undefined; updateTokenMap(): Promise; getHistoricContractPrices(contract: string, from: number, to: number, currency?: string): Promise<[number, number][]>; /** * Get the current price of a token denominated in `currency`. * @param contractAddress The L1 token address to fetch the price for. * @param date A datestring in the format "dd-mm-yyyy" to fetch the price for. * @param currency The currency to fetch the price in. Defaults to "usd". * @returns The price of the token at the given date. * @throws If today is selected and it is before 3am UTC or if the price is not found. */ getContractHistoricDayPrice(contractAddress: string, date: string, currency?: string, chainId?: number): Promise; getContractDetails(contract_address: string, platform_id?: string): Promise; getCurrentPriceByContract(contractAddress: string, currency?: string, chainId?: number): Promise<[string, number]>; getCurrentPriceById(contractAddress: string, currency?: string, chainId?: number): Promise<[string, number]>; getContractPrices(addresses: Array, currency?: string, platform_id?: string): Promise; getPlatforms(): Promise; call(path: string): Promise; protected getPriceCache(currency: string, platform_id: string): { [addr: string]: CoinGeckoPrice; }; protected getCachedAddressPrice(contractAddress: string, currency: string, platform_id: string): CoinGeckoPrice | undefined; protected updatePriceCache(cgPrice: CGTokenPrice, contractAddress: string, currency: string, platform_id: string): void; private _callBasic; private _callPro; } export {};