Constructors
constructor
- new Pool(provider: Provider, info: IPool): Pool
Parameters
Methods
deposit
- deposit(owner: PublicKey, maxTokenAIn: Decimal, maxTokenBIn: Decimal, minPoolTokenAmountOut: Decimal): Promise<TransactionEnvelope>
Parameters
owner: PublicKey
maxTokenAIn: Decimal
maxTokenBIn: Decimal
minPoolTokenAmountOut: Decimal
Returns Promise<TransactionEnvelope>
getDepositQuote
- getDepositQuote(maxTokenAIn: Decimal, maxTokenBIn: Decimal, slippage?: number): Promise<IDepositQuote>
Parameters
maxTokenAIn: Decimal
maxTokenBIn: Decimal
slippage: number = 1
Returns Promise<IDepositQuote>
withdraw
- withdraw(owner: PublicKey, poolTokenAmountIn: Decimal): Promise<TransactionEnvelope>
Parameters
owner: PublicKey
poolTokenAmountIn: Decimal
Returns Promise<TransactionEnvelope>
Static computeWithdrawQuote
- computeWithdrawQuote(config: IPool, withdrawTokenAmount: Decimal, withdrawTokenMint: PublicKey, slippage?: number): IWithdrawQuote
Parameters
withdrawTokenAmount: Decimal
withdrawTokenMint: PublicKey
slippage: number = 1
Returns IWithdrawQuote
Static createPool
- createPool(provider: Provider, owner: PublicKey, tradeFee: number, inputToken: IToken, outputToken: IToken, inputTokenAmount: Decimal, outputTokenAmount: Decimal): Promise<{ address: any; mint: any; tx: TransactionEnvelope }>
Parameters
provider: Provider
owner: PublicKey
tradeFee: number
outputToken: IToken
inputTokenAmount: Decimal
outputTokenAmount: Decimal
Returns Promise<{ address: any; mint: any; tx: TransactionEnvelope }>