Stellar PHP SDK API Documentation

CreatePassiveSellOfferOperationBuilder
in package

Builder for creating CreatePassiveSellOffer operations.

This builder implements the builder pattern to construct CreatePassiveSellOfferOperation instances with a fluent interface. Passive sell offers allow an account to place an offer on the order book that will not be immediately matched with crossing offers.

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

Stellar developer docs

since
1.0.0
example

$operation = (new CreatePassiveSellOfferOperationBuilder($sellingAsset, $buyingAsset, '100.00', $price)) ->setSourceAccount($sourceId) ->build();

Table of Contents

Methods

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

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

The asset being sold

$buying : Asset

The asset being bought

$amount : string

The amount of selling asset

$price : Price

The price ratio of buying to selling

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