ManageBuyOfferOperationBuilder
in package
Builder for creating ManageBuyOffer operations.
This builder implements the builder pattern to construct ManageBuyOfferOperation instances with a fluent interface. ManageBuyOffer operations create, update, or delete offers on the Stellar decentralized exchange, specifying the amount to buy rather than the amount to sell.
Tags
Table of Contents
Methods
- __construct() : mixed
- Creates a new ManageBuyOffer operation builder.
- build() : ManageBuyOfferOperation
- Builds the ManageBuyOffer operation.
- setMuxedSourceAccount() : $this
- Sets the muxed source account for this operation.
- setOfferId() : $this
- Sets the offer ID for this operation.
- setSourceAccount() : $this
- Sets the source account for this operation.
Methods
__construct()
Creates a new ManageBuyOffer operation builder.
public
__construct(Asset $selling, Asset $buying, string $amount, string $price) : mixed
Parameters
build()
Builds the ManageBuyOffer operation.
public
build() : ManageBuyOfferOperation
Return values
ManageBuyOfferOperation —The constructed operation
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
setOfferId()
Sets the offer ID for this operation.
public
setOfferId(int $offerId) : $this
Use 0 to create a new offer, or an existing offer ID to modify it.
Parameters
- $offerId : int
-
The offer ID (must be non-negative)
Tags
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