SetTrustlineFlagsOperation

public class SetTrustlineFlagsOperation : Operation, @unchecked Sendable

Represents a Stellar set trustline flags operation allowing issuers to authorize or revoke trustlines.

  • The asset of the trustline whose flags are being modified.

    Declaration

    Swift

    public let asset: Asset
  • The account whose trustline is affected by this operation.

    Declaration

    Swift

    public let trustorAccountId: String
  • Indicates which flags to set. The bit mask adds onto the existing trustline flags.

    Declaration

    Swift

    public let setFlags: UInt32
  • Indicates which flags to clear. The bit mask subtracts from the existing trustline flags.

    Declaration

    Swift

    public let clearFlags: UInt32
  • Creates a new SetTrustlineFlagsOperation object.

    Declaration

    Swift

    public init(sourceAccountId: String?, asset: Asset, trustorAccountId: String, setFlags: UInt32, clearFlags: UInt32)

    Parameters

    sourceAccountId

    (optional) source account Id. must start with “M” or “G” and must be valid, otherwise it will be ignored.

    asset

    The asset to set trustline flags for

    trustorAccountId

    account whose trustline is affected by this operation

    setFlags

    Indicates which flags to set. For details about the flags, please refer to the trustline doc. The bit mask integer adds onto the existing flags of the trustline. This allows for setting specific bits without knowledge of existing flags. (note that CAP-35 introduces the new AUTH_CLAWBACK_ENABLED_FLAG flag)

    clearFlags

    Indicates which flags to clear. For details about the flags, please refer to the trustline doc. The bit mask integer subtracts from the existing flags of the trustline. This allows for setting specific bits without knowledge of existing flags. (note that CAP-35 introduces the new AUTH_CLAWBACK_ENABLED_FLAG flag)

  • Creates a new SetTrustlineFlagsOperation object from the given SetTrustLineFlagsOpXDR object.

    Declaration

    Swift

    public init(fromXDR: SetTrustLineFlagsOpXDR, sourceAccountId: String?)

    Parameters

    fromXDR

    the SetTrustLineFlagsOpXDR object to be used to create a new SetTrustlineFlagsOperation object.

    sourceAccountId

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