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?
  • 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) throws

    Parameters

    sourceAccountId

    (optional) source account Id, must be valid, otherwise it will be ignored.

    inflationDestination

    Account of the inflation destination.

    clearFlags

    The 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.

    setFlags

    Indicates 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.

    masterKeyWeight

    Weight of the master key. This account may also add other keys with which to sign transactions using signer below.

    lowThreshold

    A number from 0-255 representing the threshold this account sets on all operations it performs that have a low threshold.

    mediumThreshold

    A number from 0-255 representing the threshold this account sets on all operations it performs that have a medium threshold.

    highThreshold

    A number from 0-255 representing the threshold this account sets on all operations it performs that have a high threshold.

    homeDomain

    Sets the home domain of an account.

    signer

    Signers PublicKey. If you fill this parameter you also need to fill ‘signerWeight’

    signerWeight

    Add 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

    fromXDR

    the SetOptionsOperationXDR object to be used to create a new SetOptionsOperation object.

    sourceAccountId

    (optional) source account Id, must be valid, otherwise it will be ignored.