ClawbackOperation

public class ClawbackOperation : Operation, @unchecked Sendable

Represents a Stellar clawback operation allowing asset issuers to burn assets from accounts.

  • The asset to be clawed back.

    Declaration

    Swift

    public let asset: Asset
  • The account from which the asset is clawed back.

    Declaration

    Swift

    public let fromAccountId: String
  • The amount of the asset to be clawed back.

    Declaration

    Swift

    public let amount: Decimal
  • Creates a new ClawbackOperation object.

    Declaration

    Swift

    public init(sourceAccountId: String?, asset: Asset, fromAccountId: String, amount: Decimal)

    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 be clawed back

    fromAccountId

    account from which the asset is clawed back

    amount

    asset amount clawed back

  • Creates a new ClawbackOperation object from the given ClawbackOpXDR object.

    Declaration

    Swift

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

    Parameters

    fromXDR

    the ClawbackOpXDR object to be used to create a new ClawbackOperation object.

    sourceAccountId

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