Stellar PHP SDK API Documentation

SetOptionsOperation extends AbstractOperation
in package

Represents a Set Options operation.

Sets various configuration options for an account, including thresholds, signers, home domain, and account flags. This operation allows comprehensive account configuration.

Tags
see

Stellar developer docs

see
SetOptionsOperationBuilder

For building this operation

since
1.0.0

Table of Contents

Methods

__construct()  : mixed
Constructs a new SetOptionsOperation object.
fromXdr()  : AbstractOperation
Creates an operation from its XDR representation.
fromXdrAmount()  : string
Converts an XDR amount (stroops) to a decimal string.
fromXdrOperation()  : SetOptionsOperation
Creates a SetOptionsOperation from XDR operation object.
getClearFlags()  : int|null
Returns flags to clear on the account.
getHighThreshold()  : int|null
Returns the threshold for high-security operations.
getHomeDomain()  : string|null
Returns the home domain of the account.
getInflationDestination()  : string|null
Returns the account ID to receive inflation proceeds.
getLowThreshold()  : int|null
Returns the threshold for low-security operations.
getMasterKeyWeight()  : int|null
Returns the weight of the master key.
getMediumThreshold()  : int|null
Returns the threshold for medium-security operations.
getSetFlags()  : int|null
Returns flags to set on the account.
getSignerKey()  : XdrSignerKey|null
Returns the additional signer key added or removed in this operation.
getSignerWeight()  : int|null
Returns the weight of the additional signer.
getSourceAccount()  : MuxedAccount|null
Gets the source account for this operation.
setSourceAccount()  : void
Sets the source account for this operation.
toOperationBody()  : XdrOperationBody
Converts the operation to its XDR operation body representation.
toXdr()  : XdrOperation
Converts this operation to its XDR representation.
toXdrAmount()  : BigInteger
Converts a decimal amount string to XDR amount format (stroops).

Methods

__construct()

Constructs a new SetOptionsOperation object.

public __construct([string|null $inflationDestination = null ][, int|null $clearFlags = null ][, int|null $setFlags = null ][, int|null $masterKeyWeight = null ][, int|null $lowThreshold = null ][, int|null $mediumThreshold = null ][, int|null $highThreshold = null ][, string|null $homeDomain = null ][, XdrSignerKey|null $signerKey = null ][, int|null $signerWeight = null ]) : mixed
Parameters
$inflationDestination : string|null = null

Account ID to receive inflation proceeds

$clearFlags : int|null = null

Flags to clear on the account

$setFlags : int|null = null

Flags to set on the account

$masterKeyWeight : int|null = null

Weight of the master key (0-255)

$lowThreshold : int|null = null

Threshold for low-security operations (0-255)

$mediumThreshold : int|null = null

Threshold for medium-security operations (0-255)

$highThreshold : int|null = null

Threshold for high-security operations (0-255)

$homeDomain : string|null = null

The home domain of the account

$signerKey : XdrSignerKey|null = null

Additional signer key to add/remove

$signerWeight : int|null = null

Weight of the additional signer (0 to remove)

fromXdrAmount()

Converts an XDR amount (stroops) to a decimal string.

public static fromXdrAmount(BigInteger $stroops) : string
Parameters
$stroops : BigInteger

The amount in stroops (1 stroop = 0.0000001)

Return values
string

The amount as a decimal string

getHighThreshold()

Returns the threshold for high-security operations.

public getHighThreshold() : int|null

A number from 0-255. See Stellar developer docs.

Return values
int|null

The high threshold.

getHomeDomain()

Returns the home domain of the account.

public getHomeDomain() : string|null
Return values
string|null

The home domain.

getInflationDestination()

Returns the account ID to receive inflation proceeds.

public getInflationDestination() : string|null
Return values
string|null

The inflation destination account ID.

getLowThreshold()

Returns the threshold for low-security operations.

public getLowThreshold() : int|null

A number from 0-255. See Stellar developer docs.

Return values
int|null

The low threshold.

getMasterKeyWeight()

Returns the weight of the master key.

public getMasterKeyWeight() : int|null
Return values
int|null

The master key weight (0-255).

getMediumThreshold()

Returns the threshold for medium-security operations.

public getMediumThreshold() : int|null

A number from 0-255. See Stellar developer docs.

Return values
int|null

The medium threshold.

getSignerWeight()

Returns the weight of the additional signer.

public getSignerWeight() : int|null

The signer is deleted if the weight is 0.

Return values
int|null

The signer weight.

getSourceAccount()

Gets the source account for this operation.

public getSourceAccount() : MuxedAccount|null
Return values
MuxedAccount|null

The source account, or null if using the transaction's source account

setSourceAccount()

Sets the source account for this operation.

public setSourceAccount(MuxedAccount|null $sourceAccount) : void
Parameters
$sourceAccount : MuxedAccount|null

The source account, or null to use the transaction's source account

toXdrAmount()

Converts a decimal amount string to XDR amount format (stroops).

public static toXdrAmount(string $strAmount) : BigInteger
Parameters
$strAmount : string

The amount as a decimal string

Return values
BigInteger

The amount in stroops (1 stroop = 0.0000001)


        
On this page

Search results