OperationTransaction
public class OperationTransaction : Operation
Operation
subclass for sending XTZ to a destination
-
The amount of XTZ to send. Use
TokenAmount().rpcRepresentation
to create this valueDeclaration
Swift
public var amount: String
-
Declaration
Swift
public let destination: String
-
Dictionary holding the
entrypoint
andvalue
of the contract callDeclaration
Swift
public let parameters: [String : Any]?
-
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 andvalue
which can either be a dictionary of anything, or an array of dicitonaries of anythingdestination
The destination address to recieve the funds.
-
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 againstReturn Value
A
Bool
indicating the result.