Stellar PHP SDK API Documentation

ManageSellOfferOperationBuilder
in package

Builder for creating ManageSellOffer operations.

This builder implements the builder pattern to construct ManageSellOfferOperation instances with a fluent interface. ManageSellOffer operations create, update, or delete offers to sell an asset on the Stellar decentralized exchange.

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

Stellar developer docs

since
1.0.0
example

$operation = (new ManageSellOfferOperationBuilder($selling, $buying, '100', '2.5')) ->setOfferId($existingOfferId) ->setSourceAccount($sourceId) ->build();

Table of Contents

Methods

__construct()  : mixed
Creates a new ManageSellOffer operation builder.
build()  : ManageSellOfferOperation
Builds the ManageSellOffer operation.
setMuxedSourceAccount()  : $this
Sets the muxed source account for this operation.
setOfferId()  : ManageSellOfferOperationBuilder
Sets offer ID. <code>0</code> creates a new offer. Set to existing offer ID to change it.
setSourceAccount()  : $this
Sets the source account for this operation.

Methods

__construct()

Creates a new ManageSellOffer operation builder.

public __construct(Asset $selling, Asset $buying, string $amount, string $price) : mixed
Parameters
$selling : Asset

The asset being sold

$buying : Asset

The asset being bought

$amount : string

The amount of selling asset

$price : string

The price of 1 unit of selling in terms of buying

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