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 readonly customPlatformIdMap?;
    private static instance;
    private prices;
    private pricesBySymbol;
    private _maxPriceAge;
    private retryDelay;
    private numRetries;
    private basicApiTimeout;
    private platformIdMap;
    private tokenIdMap;
    static get(logger: Logger, apiKey?: string, customPlatformIdMap?: Record<number, string>): Coingecko;
    get maxPriceAge(): number;
    set maxPriceAge(age: number);
    protected constructor(host: string, proHost: string, logger: Logger, apiKey?: string | undefined, customPlatformIdMap?: Record<number, string> | undefined);
    protected getPlatformId(chainId: number): Promise<string>;
    protected getCoingeckoTokenId(address: string, chainId: number): Promise<string>;
    getTokenIdFromAddress(address: string, platformId: string): string | undefined;
    updateTokenMap(): Promise<typeof this.tokenIdMap>;
    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<number>;
    getContractDetails(contract_address: string, platform_id?: string): Promise<unknown>;
    getCurrentPriceByContract(contractAddress: string, currency?: string, chainId?: number): Promise<[string, number]>;
    getCurrentPriceById(contractAddress: string, currency?: string, chainId?: number): Promise<[string, number]>;
    getCurrentPriceBySymbol(symbol: string, currency?: string): Promise<[string, number]>;
    getContractPrices(addresses: Array<string>, currency?: string, platform_id?: string): Promise<CoinGeckoPrice[]>;
    getPlatforms(): Promise<CoinGeckoAssetPlatform[]>;
    call<T>(path: string): Promise<T>;
    protected getPriceCache(currency: string, platform_id: string): {
        [addr: string]: CoinGeckoPrice;
    };
    protected getPriceCacheBySymbol(symbol: string): {
        [currency: string]: Omit<CoinGeckoPrice, "address">;
    };
    protected getCachedAddressPrice(contractAddress: string, currency: string, platform_id: string): CoinGeckoPrice | undefined;
    protected getCachedSymbolPrice(symbol: string, currency: string): Omit<CoinGeckoPrice, "address"> | undefined;
    protected updatePriceCache(cgPrice: CGTokenPrice, contractAddress: string, currency: string, platform_id: string): void;
    protected updatePriceCacheBySymbol(cgPrice: CGTokenPrice, symbol: string, currency: string): void;
    private _callBasic;
    private _callPro;
}
export {};
//# sourceMappingURL=Coingecko.d.ts.map