Stellar PHP SDK API Documentation

SetOptionsOperationBuilder
in package

Builder for creating SetOptions operations.

This builder implements the builder pattern to construct SetOptionsOperation instances with a fluent interface. SetOptions operations allow an account to configure various settings including thresholds, signers, home domain, and flags.

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

Stellar developer docs

since
1.0.0
example

$operation = (new SetOptionsOperationBuilder()) ->setHomeDomain('example.com') ->setMediumThreshold(2) ->setSourceAccount($sourceId) ->build();

Table of Contents

Methods

build()  : SetOptionsOperation
Builds the SetOptions operation.
setClearFlags()  : SetOptionsOperationBuilder
Clears the given flags from the account.
setHighThreshold()  : SetOptionsOperationBuilder
A number from StellarConstants::THRESHOLD_MIN to StellarConstants::THRESHOLD_MAX representing the threshold this account sets on all operations it performs that have a high threshold.
setHomeDomain()  : SetOptionsOperationBuilder
Sets the account's home domain address used in <a href="https://www.stellar.org/developers/learn/concepts/federation.html" target="_blank">Federation</a>.
setInflationDestination()  : SetOptionsOperationBuilder
Sets the inflation destination for the account.
setLowThreshold()  : SetOptionsOperationBuilder
A number from StellarConstants::THRESHOLD_MIN to StellarConstants::THRESHOLD_MAX representing the threshold this account sets on all operations it performs that have a low threshold.
setMasterKeyWeight()  : SetOptionsOperationBuilder
Sets the weight of the master key.
setMediumThreshold()  : SetOptionsOperationBuilder
A number from StellarConstants::THRESHOLD_MIN to StellarConstants::THRESHOLD_MAX representing the threshold this account sets on all operations it performs that have a medium threshold.
setMuxedSourceAccount()  : $this
Sets the muxed source account for this operation.
setSetFlags()  : SetOptionsOperationBuilder
Sets the given flags on the account.
setSigner()  : SetOptionsOperationBuilder
Add, update, or remove a signer from the account. Signer is deleted if the weight = 0;
setSourceAccount()  : $this
Sets the source account for this operation.

Methods

setHighThreshold()

A number from StellarConstants::THRESHOLD_MIN to StellarConstants::THRESHOLD_MAX representing the threshold this account sets on all operations it performs that have a high threshold.

public setHighThreshold(int $highThreshold) : SetOptionsOperationBuilder
Parameters
$highThreshold : int

Number between StellarConstants::THRESHOLD_MIN and StellarConstants::THRESHOLD_MAX

Return values
SetOptionsOperationBuilder

Builder object so you can chain methods

setHomeDomain()

Sets the account's home domain address used in <a href="https://www.stellar.org/developers/learn/concepts/federation.html" target="_blank">Federation</a>.

public setHomeDomain(string $homeDomain) : SetOptionsOperationBuilder
Parameters
$homeDomain : string

A string of the address which can be up to StellarConstants::HOME_DOMAIN_MAX_LENGTH characters.

Return values
SetOptionsOperationBuilder

Builder object so you can chain methods

setLowThreshold()

A number from StellarConstants::THRESHOLD_MIN to StellarConstants::THRESHOLD_MAX representing the threshold this account sets on all operations it performs that have a low threshold.

public setLowThreshold(int $lowThreshold) : SetOptionsOperationBuilder
Parameters
$lowThreshold : int

Number between StellarConstants::THRESHOLD_MIN and StellarConstants::THRESHOLD_MAX

Return values
SetOptionsOperationBuilder

Builder object so you can chain methods

setMediumThreshold()

A number from StellarConstants::THRESHOLD_MIN to StellarConstants::THRESHOLD_MAX representing the threshold this account sets on all operations it performs that have a medium threshold.

public setMediumThreshold(int $mediumThreshold) : SetOptionsOperationBuilder
Parameters
$mediumThreshold : int

Number between StellarConstants::THRESHOLD_MIN and StellarConstants::THRESHOLD_MAX

Return values
SetOptionsOperationBuilder

Builder object so you can chain methods

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

setSigner()

Add, update, or remove a signer from the account. Signer is deleted if the weight = 0;

public setSigner(XdrSignerKey $signerKey, int $weight) : SetOptionsOperationBuilder
Parameters
$signerKey : XdrSignerKey

The signer key. Use helper to create this object.

$weight : int

The weight to attach to the signer (StellarConstants::THRESHOLD_MIN to StellarConstants::THRESHOLD_MAX).

Return values
SetOptionsOperationBuilder

Builder 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