Stellar PHP SDK API Documentation

LiquidityPoolWithdrawOperation extends AbstractOperation
in package

Represents a Liquidity Pool Withdraw operation.

Withdraws assets from a liquidity pool, reducing the pool's reserves.

Tags
see

Stellar developer docs

see
LiquidityPoolDepositOperation

For depositing to a pool

since
1.0.0

Table of Contents

Methods

__construct()  : mixed
Creates a new LiquidityPoolWithdrawOperation.
fromXdr()  : AbstractOperation
Creates an operation from its XDR representation.
fromXdrAmount()  : string
Converts an XDR amount (stroops) to a decimal string.
fromXdrOperation()  : LiquidityPoolWithdrawOperation
Creates a LiquidityPoolWithdrawOperation from its XDR representation.
getAmount()  : string
Gets the amount of pool shares to withdraw.
getLiqudityPoolId()  : string
Gets the liquidity pool ID.
getMinAmountA()  : string
Gets the minimum amount of asset A to receive.
getMinAmountB()  : string
Gets the minimum amount of asset B to receive.
getSourceAccount()  : MuxedAccount|null
Gets the source account for this operation.
setSourceAccount()  : void
Sets the source account for this operation.
toOperationBody()  : XdrOperationBody
Converts this operation to its XDR operation body representation.
toXdr()  : XdrOperation
Converts this operation to its XDR representation.
toXdrAmount()  : BigInteger
Converts a decimal amount string to XDR amount format (stroops).

Methods

__construct()

Creates a new LiquidityPoolWithdrawOperation.

public __construct(string $liqudityPoolId, string $amount, string $minAmountA, string $minAmountB) : mixed
Parameters
$liqudityPoolId : string

The liquidity pool ID

$amount : string

The amount of pool shares to withdraw (as a decimal string)

$minAmountA : string

Minimum amount of asset A to receive (as a decimal string)

$minAmountB : string

Minimum amount of asset B to receive (as a decimal string)

fromXdrAmount()

Converts an XDR amount (stroops) to a decimal string.

public static fromXdrAmount(BigInteger $stroops) : string
Parameters
$stroops : BigInteger

The amount in stroops (1 stroop = 0.0000001)

Return values
string

The amount as a decimal string

getAmount()

Gets the amount of pool shares to withdraw.

public getAmount() : string
Return values
string

The amount as a decimal string

getLiqudityPoolId()

Gets the liquidity pool ID.

public getLiqudityPoolId() : string
Return values
string

The liquidity pool ID

getMinAmountA()

Gets the minimum amount of asset A to receive.

public getMinAmountA() : string
Return values
string

The minimum amount as a decimal string

getMinAmountB()

Gets the minimum amount of asset B to receive.

public getMinAmountB() : string
Return values
string

The minimum amount as a decimal string

getSourceAccount()

Gets the source account for this operation.

public getSourceAccount() : MuxedAccount|null
Return values
MuxedAccount|null

The source account, or null if using the transaction's source account

setSourceAccount()

Sets the source account for this operation.

public setSourceAccount(MuxedAccount|null $sourceAccount) : void
Parameters
$sourceAccount : MuxedAccount|null

The source account, or null to use the transaction's source account

toXdrAmount()

Converts a decimal amount string to XDR amount format (stroops).

public static toXdrAmount(string $strAmount) : BigInteger
Parameters
$strAmount : string

The amount as a decimal string

Return values
BigInteger

The amount in stroops (1 stroop = 0.0000001)


        
On this page

Search results