OperationTransaction

public class OperationTransaction : Operation

Operation subclass for sending XTZ to a destination

Properties

  • The amount of XTZ to send. Use TokenAmount().rpcRepresentation to create this value

    Declaration

    Swift

    public var amount: String
  • Declaration

    Swift

    public let destination: String
  • Dictionary holding the entrypoint and value of the contract call

    Declaration

    Swift

    public let parameters: [String : Any]?

Constructors

  • Create an OperationTransaction, to send an amount of token to a destination

    Declaration

    Swift

    public init(amount: TokenAmount, source: String, destination: String)

    Parameters

    amount

    The amount of XTZ to send. Use TokenAmount().rpcRepresentation to create this value.

    source

    The address of the acocunt sending the operation.

    destination

    The destination address to recieve the funds.

  • Create an OperationTransaction, to invoke a smart contract call

    Declaration

    Swift

    public init(amount: TokenAmount, source: String, destination: String, parameters: [String : Any])

    Parameters

    amount

    The amount of XTZ to send. Use TokenAmount().rpcRepresentation to create this value.

    source

    The address of the acocunt sending the operation.

    parameters

    A dictionary containing the michlelson JSON representation needed to invoke a smart contract. Should contain a key entrypoint with a string and value which can either be a dictionary of anything, or an array of dicitonaries of anything

    destination

    The destination address to recieve the funds.

Codable

  • Declaration

    Swift

    public required init(from decoder: Decoder) throws
  • Declaration

    Swift

    public override func encode(to encoder: Encoder) throws
  • A function to check if two operations are equal.

    Declaration

    Swift

    public func isEqual(_ op: OperationTransaction) -> Bool

    Parameters

    _

    An Operation to compare against

    Return Value

    A Bool indicating the result.