Stellar PHP SDK API Documentation

LiquidityPoolWithdrawOperationBuilder
in package

Builder for creating LiquidityPoolWithdraw operations.

This builder implements the builder pattern to construct LiquidityPoolWithdrawOperation instances with a fluent interface. This operation withdraws assets from a liquidity pool by redeeming pool shares for the underlying reserves.

Tags
see
LiquidityPoolWithdrawOperation
see
https://developers.stellar.org

Stellar developer docs

since
1.0.0
example

$operation = (new LiquidityPoolWithdrawOperationBuilder($poolId, '50', '25', '25')) ->setSourceAccount($sourceId) ->build();

Table of Contents

Methods

__construct()  : mixed
Creates a new LiquidityPoolWithdraw operation builder.
build()  : LiquidityPoolWithdrawOperation
Builds the LiquidityPoolWithdraw operation.
setMuxedSourceAccount()  : $this
Sets the muxed source account for this operation.
setSourceAccount()  : $this
Sets the source account for this operation.

Methods

__construct()

Creates a new LiquidityPoolWithdraw operation builder.

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

The liquidity pool ID

$amount : string

The amount of pool shares to withdraw

$minAmountA : string

The minimum amount of asset A to receive

$minAmountB : string

The minimum amount of asset B to receive

setMuxedSourceAccount()

Sets the muxed source account for this operation.

public setMuxedSourceAccount(MuxedAccount $sourceAccount) : $this
Parameters
$sourceAccount : MuxedAccount

The muxed account to use as source

Return values
$this

Returns the builder instance for method chaining

setSourceAccount()

Sets the source account for this operation.

public setSourceAccount(string $accountId) : $this
Parameters
$accountId : string

The Stellar account ID (G...)

Return values
$this

Returns the builder instance for method chaining


        
On this page

Search results