LiquidityPoolWithdrawOperation

public class LiquidityPoolWithdrawOperation : Operation, @unchecked Sendable

Represents a Stellar liquidity pool withdraw operation for removing liquidity from AMM pools.

  • The liquidity pool ID.

    Declaration

    Swift

    public let liquidityPoolId: String
  • Amount of pool shares to withdraw.

    Declaration

    Swift

    public let amount: Decimal
  • Minimum amount of first asset to withdraw.

    Declaration

    Swift

    public let minAmountA: Decimal
  • Minimum amount of second asset to withdraw.

    Declaration

    Swift

    public let minAmountB: Decimal
  • Creates a new LiquidityPoolDepositOperation object.

    Declaration

    Swift

    public init(sourceAccountId: String?, liquidityPoolId: String, amount: Decimal, minAmountA: Decimal, minAmountB: Decimal)

    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

    amount

    Amount of pool shares to withdraw.

    minAmountA

    Minimum amount of first asset to withdraw.

    minAmountB

    Minimum amount of second asset to withdraw.

  • Creates a new LiquidityPoolWithdrawOperation object from the given LiquidityPoolWithdrawOpXDR object.

    Declaration

    Swift

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

    Parameters

    fromXDR

    the LiquidityPoolWithdrawOpXDR object to be used to create a new LiquidityPoolWithdrawOperation object.

    sourceAccountId

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