SetOptionsOperation
public class SetOptionsOperation : Operation, @unchecked Sendable
Represents a set options operation. This operation sets the options for an account. See Stellar developer docs
-
Account of the inflation destination.
Declaration
Swift
public let inflationDestination: KeyPair? -
Indicates which flags to clear. The bit mask subtracts from the existing flags.
Declaration
Swift
public let clearFlags: UInt32? -
Indicates which flags to set. The bit mask adds onto the existing flags.
Declaration
Swift
public let setFlags: UInt32? -
Weight of the master key for signing transactions.
Declaration
Swift
public let masterKeyWeight: UInt32? -
Threshold for operations with low threshold requirement. Value from 0-255.
Declaration
Swift
public let lowThreshold: UInt32? -
Threshold for operations with medium threshold requirement. Value from 0-255.
Declaration
Swift
public let mediumThreshold: UInt32? -
Threshold for operations with high threshold requirement. Value from 0-255.
Declaration
Swift
public let highThreshold: UInt32? -
Sets the home domain of the account.
Declaration
Swift
public let homeDomain: String? -
The public key of the signer to add, remove, or update.
Declaration
Swift
public let signer: SignerKeyXDR? -
The weight of the signer. Set to 0 to remove the signer.
Declaration
Swift
public let signerWeight: UInt32? -
init(sourceAccountId:inflationDestination: clearFlags: setFlags: masterKeyWeight: lowThreshold: mediumThreshold: highThreshold: homeDomain: signer: signerWeight: ) Creates a new SetOptionsOperation object.
Throws
Throws StellarSDKError.invalidArgument if signer is not nil but signerWeight is nil
Declaration
Swift
public init(sourceAccountId: String?, inflationDestination: KeyPair? = nil, clearFlags: UInt32? = nil, setFlags: UInt32? = nil, masterKeyWeight: UInt32? = nil, lowThreshold: UInt32? = nil, mediumThreshold: UInt32? = nil, highThreshold: UInt32? = nil, homeDomain: String? = nil, signer: SignerKeyXDR? = nil, signerWeight: UInt32? = nil) throwsParameters
sourceAccountId(optional) source account Id, must be valid, otherwise it will be ignored.
inflationDestinationAccount of the inflation destination.
clearFlagsThe asset you would like to buy. Indicates which flags to clear. For details about the flags, please refer to the Stellar developer docs. The bit mask integer subtracts from the existing flags of the account. This allows for setting specific bits without knowledge of existing flags.
setFlagsIndicates which flags to set. For details about the flags, please refer to the Stellar developer docs. The bit mask integer adds onto the existing flags of the account. This allows for setting specific bits without knowledge of existing flags.
masterKeyWeightWeight of the master key. This account may also add other keys with which to sign transactions using signer below.
lowThresholdA number from 0-255 representing the threshold this account sets on all operations it performs that have a low threshold.
mediumThresholdA number from 0-255 representing the threshold this account sets on all operations it performs that have a medium threshold.
highThresholdA number from 0-255 representing the threshold this account sets on all operations it performs that have a high threshold.
homeDomainSets the home domain of an account.
signerSigners PublicKey. If you fill this parameter you also need to fill ‘signerWeight’
signerWeightAdd or remove the signer from parameter ‘signer’. The signer is deleted if the weight is 0.
-
Creates a new SetOptionsOperation object from the given SetOptionsOperationXDR object.
Declaration
Swift
public init(fromXDR: SetOptionsOperationXDR, sourceAccountId: String?)Parameters
fromXDRthe SetOptionsOperationXDR object to be used to create a new SetOptionsOperation object.
sourceAccountId(optional) source account Id, must be valid, otherwise it will be ignored.
View on GitHub
Install in Dash