interface IVaultsModule { calcReceiveAsset(vault,
to,
units): Promise<bigint>; calcSendAsset(vault,
from,
amount): Promise<bigint>; deployVault(options): Promise<SdkResult<string>>; depositMixed(vault,
tokenAmounts,
minOut): Promise<SdkResponse>; estimateGasForExecuteInstructions(instructions,
gasAmount?,
options?): Promise<bigint>; finishSetup(vault): Promise<SdkResponse>; getUnitCapacity(vault): Promise<bigint>; sendAsset(options): Promise<SdkResponse>; sendAssetFromQuote(quote,
toAccount,
fallbackUser,
callData?): Promise<SdkResponse>; sendAssetWithRouter(instructions): Promise<SdkResponse>; sendAssetWithRouterFromQuote(quote): Promise<SdkResponse>; setConnection(vault,
toVault,
channelId,
isActive): Promise<SdkResponse>; withdrawAll(vault,
poolTokens,
minOut): Promise<SdkResponse>; withdrawMixed(vault,
poolTokens,
withdrawRatio,
minOut): Promise<SdkResponse>; } Methods
calcReceiveAsset
- calcReceiveAsset(vault, to, units): Promise<bigint>
Parameters
- vault: string
- to: string
- units: bigint
Returns Promise<bigint>
calcSendAsset
- calcSendAsset(vault, from, amount): Promise<bigint>
Parameters
- vault: string
- from: string
- amount: bigint
Returns Promise<bigint>
depositMixed
- depositMixed(vault, tokenAmounts, minOut): Promise<SdkResponse>
Parameters
- vault: string
- tokenAmounts: bigint[]
- minOut: bigint
estimateGasForExecuteInstructions
- estimateGasForExecuteInstructions(instructions, gasAmount?, options?): Promise<bigint>
Parameters
- instructions: ExecutionInstructions
Optional
gasAmount: bigintOptional
options: TransactionOptions
Returns Promise<bigint>
getUnitCapacity
- getUnitCapacity(vault): Promise<bigint>
Returns Promise<bigint>
sendAssetFromQuote
- sendAssetFromQuote(quote, toAccount, fallbackUser, callData?): Promise<SdkResponse>
Parameters
- quote: PriceQuote
- toAccount: string
- fallbackUser: string
Optional
callData: string
sendAssetWithRouter
- sendAssetWithRouter(instructions): Promise<SdkResponse>
Parameters
- instructions: ExecutionInstructions
sendAssetWithRouterFromQuote
- sendAssetWithRouterFromQuote(quote): Promise<SdkResponse>
setConnection
- setConnection(vault, toVault, channelId, isActive): Promise<SdkResponse>
Parameters
- vault: string
- toVault: string
- channelId: string
- isActive: boolean
withdrawAll
- withdrawAll(vault, poolTokens, minOut): Promise<SdkResponse>
Parameters
- vault: string
- poolTokens: bigint
- minOut: bigint[]
withdrawMixed
- withdrawMixed(vault, poolTokens, withdrawRatio, minOut): Promise<SdkResponse>
Parameters
- vault: string
- poolTokens: bigint
- withdrawRatio: bigint[]
- minOut: bigint[]
See CatalystSDK.calcReceiveAsset