import { NetworkIdType } from '@sonarwatch/portfolio-core'; import BigNumber from 'bignumber.js'; import { Cache } from '../../Cache'; export type TokenInfo = { mint: string; decimal?: number; rawReserve: BigNumber; }; export type PartialTokenUnderlying = { networkId: NetworkIdType; address: string; decimals: number; price: number; }; /** * @deprecated * This function has been deprecated. Use the getLpUnderlyingTokenSource instead. * This list is used to avoid calulating low liquidity tokens with others low liquidity tokens. * To prevent wrong prices (with very low precision) to be calculated, we setup a list of tokens to rely on. * These tokens have very low chance of having price manipulation. * Therefore, they can be safely used to compute other tokens prices. * * If you think other tokens should be added to this list, please send a PR. */ export declare const tokensToRelyOnByNetwork: Map; /** * @deprecated * This function has been deprecated. Use the getLpUnderlyingTokenSource instead. * This list is used to avoid calulating low liquidity tokens with others low liquidity tokens. * To prevent wrong prices (with very low precision) to be calculated, we setup a list of tokens to rely on. * These tokens have very low chance of having price manipulation. * Therefore, they can be safely used to compute other tokens prices. */ export default function checkComputeAndStoreTokensPrices(cache: Cache, source: string, networkId: NetworkIdType, tokenX: TokenInfo, tokenY: TokenInfo): Promise<{ partialTokenUnderlyingX: PartialTokenUnderlying; partialTokenUnderlyingY: PartialTokenUnderlying; } | undefined>;