import { PairInfo } from '@premia/pair-lists/src/types'; import { Provider } from 'ethers'; import { BlackScholes } from '@uqee/black-scholes'; import { TokenPair, TokenPairExtended, TokenPairMinimal } from '../entities'; import { BaseAPI } from './baseAPI'; export declare const blackScholes: BlackScholes; export declare const ONE_YEAR_MS: number; export declare type TokenPairOrInfo = PairInfo | TokenPair | TokenPairMinimal; export declare type TokenPairOrId = TokenPairOrInfo | string; /** * Represents a class for handling `TokenPair` operations related to the voidnode server. * * @class TokenPairAPI * @extends {BaseAPI} */ export declare class TokenPairAPI extends BaseAPI { /** * Fetches the current spot price of a token pair from the price oracle. * Uses caching with a one-minute time-to-live. * * @param {TokenPairOrId} pair - The token pair to fetch the spot price for. * @param {Provider} provider - The custom provider to use for this call. * @returns {Promise} The current spot price of the token pair. */ getSpotPrice(pair: TokenPairOrId, provider?: Provider): Promise; /** * Gets the strike interval for a token pair based on its spot price. * * @param {TokenPairOrId} pair - The token pair to fetch the strike increment for. * @param {Provider} provider - The custom provider to use for this call. * @returns {Promise} The strike increment for the token pair. */ getStrikeInterval(pair: TokenPairOrId, provider?: Provider): Promise; /** * Fetches data for a token pair from the voidnode server. * Uses caching with a one-day time-to-live. * * @param {TokenPairOrId} pair - The token pair or id to fetch the data for. * * @returns {Promise} The data for the token pair. */ getPair(pair: TokenPairOrId): Promise; /** * Retrieves extended information for a token pair. * Uses caching with a one-minute time-to-live. * * @param {TokenPairOrId} pair - The token pair to fetch the extended information for. * * @returns {Promise} The extended information for the token pair. */ getPairExtended(pair: TokenPairOrId): Promise; /** * Fetches data for multiple token pairs. * Uses caching with a one-day time-to-live. * * @param {TokenPairOrId[]} pairs - An array of token pairs to fetch the data for. * * @returns {Promise} The data for the specified token pairs. */ getPairs(pairs: TokenPairOrId[]): Promise; /** * Retrieves extended information for multiple token pairs. * Uses caching with a one-minute time-to-live. * * @param {TokenPairOrId[]} pairs - An array of token pairs to fetch the extended information for. * * @returns {Promise} The extended information for the specified token pairs. */ getPairsExtended(pairs: TokenPairOrId[]): Promise; }