import { Interface } from '@ethersproject/abi'; import { BigNumber } from '@ethersproject/bignumber'; import { BasePool } from '../balancer-v2-pool'; import { callData, SubgraphPoolBase, PoolState } from '../../types'; import { SwapSide } from '../../../../constants'; export declare enum PairTypes { BptToMainToken = 0, MainTokenToBpt = 1, MainTokenToWrappedToken = 2, WrappedTokenToMainToken = 3, BptToWrappedToken = 4, WrappedTokenToBpt = 5 } type LinearPoolPairData = { tokens: string[]; balances: bigint[]; indexIn: number; indexOut: number; scalingFactors: bigint[]; bptIndex: number; swapFee: bigint; amp: bigint; wrappedIndex: number; mainIndex: number; lowerTarget: bigint; upperTarget: bigint; }; export declare class LinearPool extends BasePool { MAX_TOKEN_BALANCE: BigNumber; vaultAddress: string; vaultInterface: Interface; poolInterface: Interface; constructor(vaultAddress: string, vaultInterface: Interface); onSell(amounts: bigint[], poolPairData: LinearPoolPairData): bigint[]; onBuy(amounts: bigint[], poolPairData: LinearPoolPairData): bigint[]; _swapGivenOut(tokenAmountsOut: bigint[], tokens: string[], balances: bigint[], indexIn: number, indexOut: number, bptIndex: number, wrappedIndex: number, mainIndex: number, scalingFactors: bigint[], swapFeePercentage: bigint, lowerTarget: bigint, upperTarget: bigint): bigint[]; _onSwapGivenOut(tokenAmountsIn: bigint[], mainBalance: bigint, wrappedBalance: bigint, fee: bigint, lowerTarget: bigint, upperTarget: bigint, virtualBptSupply: bigint, pairType: PairTypes): bigint[]; _swapGivenIn(tokenAmountsIn: bigint[], tokens: string[], balances: bigint[], indexIn: number, indexOut: number, bptIndex: number, wrappedIndex: number, mainIndex: number, scalingFactors: bigint[], swapFeePercentage: bigint, lowerTarget: bigint, upperTarget: bigint): bigint[]; _onSwapGivenIn(tokenAmountsIn: bigint[], mainBalance: bigint, wrappedBalance: bigint, fee: bigint, lowerTarget: bigint, upperTarget: bigint, virtualBptSupply: bigint, pairType: PairTypes): bigint[]; parsePoolPairData(pool: SubgraphPoolBase, poolState: PoolState, tokenIn: string, tokenOut: string): LinearPoolPairData; getOnChainCalls(pool: SubgraphPoolBase): callData[]; decodeOnChainCalls(pool: SubgraphPoolBase, data: { success: boolean; returnData: any; }[], startIndex: number): [{ [address: string]: PoolState; }, number]; getSwapMaxAmount(poolPairData: LinearPoolPairData, side: SwapSide): bigint; } export {};