import { NetworkIdType } from './Network'; import { PortfolioElementLabel, SourceRef } from './Portfolio'; export declare const hyloSourceId = "hylo-tokens-pricing"; export declare const adrasteaSourceId = "adrastea-lst-pricing"; export declare const adrenaSourceId = "adrena-token-pricing"; export declare const exponentSourceId = "exponent-token-pricing"; export declare const fragmetricApiSourceId = "fragmetric-api-pricing"; export declare const fragmetricSourceId = "fragmetric-fund-account-pricing"; export declare const jitoSourceId = "jito-vaults-pricing"; export declare const jupLendSourceId = "jupiter-jtokens-pricing"; export declare const xOrcaSourceId = "x-orca-pricing"; export declare const rainSourceId = "rain-liquid-pricing"; export declare const usdcPlusSourceId = "reflect-usdc-plus-pricing"; export declare const sandglassSourceId = "sandglass-markets-pricing"; export declare const xStakingSourceId = "x-staking-pricing"; export declare const piggyBankSourceId = "piggy-bank-pricing"; export declare const coingeckoSourceId = "coingecko"; export declare const jupiterSourceId = "jupiter-datapi"; export declare const solvSourceId = "solv-tokens-pricing"; export declare const flashSourceId = "flash-pools"; export declare const manifestSourceId = "manifest-pools"; export declare const mooncakeSourceId = "mooncake-pricing"; export declare const perenaSourceId = "perena-pricing"; /** * List of source ids to prioritise when computing the token price. * The first id in the list has the highest priority. * The last id has the lowest priority. */ export declare const prioritisedSourceIds: string[]; export declare const tokenPriceSourceTtl: number; export type TokenPriceUnderlying = { networkId: NetworkIdType; address: string; price: number; decimals: number; amountPerLp: number; }; export type TokenPriceSource = { id: string; weight: number; address: string; networkId: NetworkIdType; platformId: string; decimals: number; price: number; priceChange24h?: number; label?: PortfolioElementLabel; elementName?: string; liquidityName?: string; underlyings?: TokenPriceUnderlying[]; timestamp: number; sourceRefs?: SourceRef[]; link?: string; /** * Token will be added to the missing tokens list, and price will be sent to datapi */ addToMissingToken?: boolean; }; export type TokenPrice = { address: string; networkId: NetworkIdType; platformId: string; decimals: number; price: number; priceChange24h?: number; label?: PortfolioElementLabel; elementName?: string; liquidityName?: string; underlyings?: TokenPriceUnderlying[]; sources: TokenPriceSource[]; timestamp: number; sourceRefs?: SourceRef[]; link?: string; }; export declare function tokenPriceFromSources(sources: TokenPriceSource[]): TokenPrice | undefined; export declare function pushTokenPriceSource(sources: TokenPriceSource[], source: TokenPriceSource): TokenPriceSource[] | undefined; export declare function updateTokenPriceSources(sources: TokenPriceSource[]): TokenPriceSource[] | undefined; export declare function getTokenPriceUnderlyingFromTokenPrice(tokenPrice: TokenPrice, amountPerLp: number): TokenPriceUnderlying; export declare function getTokenPricesUnderlyingsFromTokensPrices(tokensPrices: TokenPrice[], amountsPerLp: number[]): TokenPriceUnderlying[]; export declare function getHighestPrioritisedSource(sources: TokenPriceSource[]): TokenPriceSource | undefined; /** * Get the price information from a list of sources. * The price is determined by prioritising sources present in the prioritisedSourceIds list * If no prioritised source is found, the price is calculated as a weighted average of all sources' price * @sources : list of TokenPriceSources */ export declare function getPriceInfoFromSources(sources: TokenPriceSource[]): { price: number; priceChange24h?: number; timestamp: number; };