Options
All
  • Public
  • Public/Protected
  • All
Menu

A representation of an action of adding liquidity to the pool.

Typically, users don't have to manually instantiate this class. Use Pool.prepareAddLiquidity instead.

Hierarchy

  • LiquidityAddition

Index

Constructors

  • new LiquidityAddition(pool: Pool, primaryAssetAmount: number, secondaryAssetAmount: number, slippagePct: number): LiquidityAddition
  • Parameters

    • pool: Pool

      The pool to provide liquidity for.

    • primaryAssetAmount: number

      Amount of primary asset the will be added to the pool.

    • secondaryAssetAmount: number

      Amount of secondary asset the will be added to the pool.

    • slippagePct: number

    Returns LiquidityAddition

Properties

The effect of adding the liquidity computed at the time of construction.

pool: Pool

The pool to provide liquidity for.

primaryAssetAmount: number

Amount of primary asset the will be added to the pool.

secondaryAssetAmount: number

Amount of secondary asset the will be added to the pool.

slippagePct: number

The maximum amount of slippage allowed in performing the add liquidity.

Methods

  • Creates the transactions needed to perform adding liquidity and returns them as a transaction group ready to be signed and committed.

    Parameters

    • address: string

      The account that will be performing adding liquidity.

    Returns Promise<TransactionGroup>

    A transaction group that when executed will add the liquidity to the pool.

  • validateLiquidityAddition(): void

Generated using TypeDoc