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
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
build()
Builds the SetOptions operation.
public
build() : SetOptionsOperation
Return values
SetOptionsOperation —The constructed operation
setClearFlags()
Clears the given flags from the account.
public
setClearFlags(int $clearFlags) : SetOptionsOperationBuilder
Parameters
- $clearFlags : int
-
For details about the flags, please refer to the Stellar developer docs.
Return values
SetOptionsOperationBuilder —Builder object so you can chain 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
setInflationDestination()
Sets the inflation destination for the account.
public
setInflationDestination(string $inflationDestination) : SetOptionsOperationBuilder
Parameters
- $inflationDestination : string
-
The inflation destination account.
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
setMasterKeyWeight()
Sets the weight of the master key.
public
setMasterKeyWeight(int $masterKeyWeight) : SetOptionsOperationBuilder
Parameters
- $masterKeyWeight : 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
setSetFlags()
Sets the given flags on the account.
public
setSetFlags(int $setFlags) : SetOptionsOperationBuilder
Parameters
- $setFlags : int
-
For details about the flags, please refer to the Stellar developer docs.
Return values
SetOptionsOperationBuilder —Builder object so you can chain methods
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
-
- $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