import { LpCurrency, CurrencyExt } from "../../../types"; import { MonetaryAmount } from "@interlay/monetary-js"; import { PooledCurrencies } from "../types"; declare class LiquidityPoolCalculator { pooledCurrencies: PooledCurrencies; totalSupply: MonetaryAmount; constructor(pooledCurrencies: PooledCurrencies, totalSupply: MonetaryAmount); private _getCurrencyReserve; /** * Calculates how much of pooled currencies needs to be deposited * into pool with current ratio of currencies. * * @param amount Amount of one of the pooled currencies. * @returns Monetary amounts of all pooled currencies in balanced proportion. * @throws If pool is empty. Note: handle by checking `isEmpty` property of pool. */ getLiquidityDepositInputAmounts(amount: MonetaryAmount): Array>; /** * Calculates expected amount of LP token account will get after depositing * `amount` of pooled currency into pool. * * @note This method assumes all pooled currencies will be added in balance. * @param amount Amount of one of the pooled currencies. * @returns Expected amount of lp token that will be received after `amount` is added to pool. * @throws If pool is empty. Note: handle by checking `isEmpty` property of pool. */ getLiquidityDepositLpTokenAmount(amount: MonetaryAmount): MonetaryAmount; /** * Calculates expected amount of pooled currencies account will get * after withdrawing `amount` of LP token. * * @note This method assumes all pooled currencies will be withdrawn in balance. * @param amount Amount of liquidity in LP token to be withdrawn. * @returns Amounts of pooled currencies to be returned to account. * @throws If pool is empty. Note: handle by checking `isEmpty` property of pool. */ getLiquidityWithdrawalPooledCurrencyAmounts(amount: MonetaryAmount): Array>; } export { LiquidityPoolCalculator };