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
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
build()
Builds the PathPaymentStrictSend operation.
public
build() : PathPaymentStrictSendOperation
Return values
PathPaymentStrictSendOperation —The constructed operation
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