LiquidityPoolDepositOperation

public class LiquidityPoolDepositOperation : Operation, @unchecked Sendable

Represents a Stellar liquidity pool deposit operation for adding liquidity to AMM pools.

  • The liquidity pool ID.

    Declaration

    Swift

    public let liquidityPoolId: String
  • Maximum amount of first asset to deposit.

    Declaration

    Swift

    public let maxAmountA: Decimal
  • Maximum amount of second asset to deposit.

    Declaration

    Swift

    public let maxAmountB: Decimal
  • Minimum depositA/depositB price.

    Declaration

    Swift

    public let minPrice: Price
  • Maximum depositA/depositB price.

    Declaration

    Swift

    public let maxPrice: Price
  • Creates a new LiquidityPoolDepositOperation object.

    Declaration

    Swift

    public init(sourceAccountId: String?, liquidityPoolId: String, maxAmountA: Decimal, maxAmountB: Decimal, minPrice: Price, maxPrice: Price)

    Parameters

    sourceAccountId

    (optional) source account Id. must start with “M” or “G” and must be valid, otherwise it will be ignored.

    liquidityPoolId

    The liquidity pool ID

    maxAmountA

    Maximum amount of first asset to deposit.

    maxAmountB

    Maximum amount of second asset to deposit.

    minPrice

    Minimum depositA/depositB price.

    maxPrice

    Maximum depositA/depositB price.

  • Creates a new LiquidityPoolDepositOperation object from the given LiquidityPoolDepositOperationXDR object.

    Declaration

    Swift

    public init(fromXDR: LiquidityPoolDepositOpXDR, sourceAccountId: String?)

    Parameters

    fromXDR

    the LiquidityPoolDepositOperationXDR object to be used to create a new LiquidityPoolDepositOperation object.

    sourceAccountId

    (optional) source account Id, must be valid, otherwise it will be ignored.