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.
liquidityPoolIdThe liquidity pool ID
amountAmount of pool shares to withdraw.
minAmountAMinimum amount of first asset to withdraw.
minAmountBMinimum 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
fromXDRthe LiquidityPoolWithdrawOpXDR object to be used to create a new LiquidityPoolWithdrawOperation object.
sourceAccountId(optional) source account Id, must be valid, otherwise it will be ignored.
View on GitHub
Install in Dash