Stellar PHP SDK API Documentation

PathPaymentStrictSendOperationBuilder
in package

Builder for creating PathPaymentStrictSend operations.

This builder implements the builder pattern to construct PathPaymentStrictSendOperation instances with a fluent interface. This operation sends a payment where the amount sent is specified, and the destination receives assets converted through a path.

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

Stellar developer docs

since
1.0.0
example

$operation = (new PathPaymentStrictSendOperationBuilder($sendAsset, '100', $destId, $destAsset, '95')) ->setPath([$intermediateAsset1, $intermediateAsset2]) ->setSourceAccount($sourceId) ->build();

Table of Contents

Methods

__construct()  : mixed
Creates a new PathPaymentStrictSend operation builder.
build()  : PathPaymentStrictSendOperation
Builds the PathPaymentStrictSend operation.
forMuxedDestinationAccount()  : PathPaymentStrictSendOperationBuilder
Creates a builder for a muxed destination account.
setMuxedSourceAccount()  : $this
Sets the muxed source account for this operation.
setPath()  : PathPaymentStrictSendOperationBuilder
Sets path for this operation
setSourceAccount()  : $this
Sets the source account for this operation.

Methods

__construct()

Creates a new PathPaymentStrictSend operation builder.

public __construct(Asset $sendAsset, string $sendAmount, string $destinationAccountId, Asset $destAsset, string $destMin) : mixed
Parameters
$sendAsset : Asset

The asset being sent

$sendAmount : string

The amount of send asset to send

$destinationAccountId : string

The destination account ID

$destAsset : Asset

The asset the destination receives

$destMin : string

The minimum amount of destination asset to receive

forMuxedDestinationAccount()

Creates a builder for a muxed destination account.

public static forMuxedDestinationAccount(Asset $sendAsset, string $sendAmount, MuxedAccount $destination, Asset $destAsset, string $destMin) : PathPaymentStrictSendOperationBuilder
Parameters
$sendAsset : Asset

The asset being sent

$sendAmount : string

The amount of send asset to send

$destination : MuxedAccount

The muxed destination account

$destAsset : Asset

The asset the destination receives

$destMin : string

The minimum amount of destination asset to receive

Return values
PathPaymentStrictSendOperationBuilder

The builder instance

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

setPath()

Sets path for this operation

public setPath(array<string|int, Asset$path) : PathPaymentStrictSendOperationBuilder
Parameters
$path : array<string|int, Asset>

The assets (other than send asset and destination asset) involved in the offers the path takes. For example, if you can only find a path from USD to EUR through XLM and BTC, the path would be USD -» XLM -» BTC -» EUR and the path field would contain XLM and BTC.

Return values
PathPaymentStrictSendOperationBuilder

object so you can chain methods.

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