UNPKG

@atomiqlabs/sdk

Version:

atomiq labs SDK for cross-chain swaps between smart chains and bitcoin

26 lines (25 loc) 844 B
import { CoinType, CtorCoinTypes } from "../abstract/IPriceProvider"; import { HttpPriceProvider } from "./abstract/HttpPriceProvider"; import { MultiChain } from "../../swapper/Swapper"; export type CoinPaprikaResponse<Currency extends string> = { quotes: { [curr in Currency]: { price: number; }; }; }; /** * Price provider using CoinPaprika API * @category Pricing */ export declare class CoinPaprikaPriceProvider<T extends MultiChain> extends HttpPriceProvider<T> { constructor(coinsMap: CtorCoinTypes<T>, url?: string, httpRequestTimeout?: number); /** * @inheritDoc */ fetchPrice(token: CoinType, abortSignal?: AbortSignal): Promise<bigint>; /** * @inheritDoc */ protected fetchUsdPrice(abortSignal?: AbortSignal): Promise<number>; }