Stellar PHP SDK API Documentation

LiquidityPoolDepositOperationBuilder
in package

Builder for creating LiquidityPoolDeposit operations.

This builder implements the builder pattern to construct LiquidityPoolDepositOperation instances with a fluent interface. This operation deposits assets into a liquidity pool, receiving pool shares in return proportional to the contribution.

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

Stellar developer docs

since
1.0.0
example

$operation = (new LiquidityPoolDepositOperationBuilder($poolId, '100', '200', $minPrice, $maxPrice)) ->setSourceAccount($sourceId) ->build();

Table of Contents

Methods

__construct()  : mixed
Creates a new LiquidityPoolDeposit operation builder.
build()  : LiquidityPoolDepositOperation
Builds the LiquidityPoolDeposit 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 LiquidityPoolDeposit operation builder.

public __construct(string $liquidityPoolId, string $maxAmountA, string $maxAmountB, Price $minPrice, Price $maxPrice) : mixed
Parameters
$liquidityPoolId : string

The liquidity pool ID

$maxAmountA : string

The maximum amount of asset A to deposit

$maxAmountB : string

The maximum amount of asset B to deposit

$minPrice : Price

The minimum price for the deposit

$maxPrice : Price

The maximum price for the deposit

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