Operation
public class Operation : Codable
Base class representing an Operation
on the Tezos network. On its own this class can’t be sent to the network. See its subclasses for more info.
-
An enum to denote the type of operation. e.g.
transaction
,delegation
,reveal
etc.Declaration
Swift
public let operationKind: OperationKind
-
The source address for the operation
Declaration
Swift
public var source: String?
-
A string representing a numeric counter. Must be unique and 1 higher than the previous counter. Current counter obtained from the metadata query in
TezosNodeClient
Declaration
Swift
public var counter: String?
-
Object representing the various fees, storage and compute required to fulfil this operation
Declaration
Swift
public var operationFees: OperationFees
-
Create a base operation.
Declaration
Swift
public init(operationKind: OperationKind, source: String)
Parameters
operationKind
The type of operation.
source
The address of the acocunt sending the operation.
-
Create a base operation.
Declaration
Swift
public required init(from decoder: Decoder) throws
Parameters
from
A decoder used to convert a data fromat (such as JSON) into the model object.
-
Convert the object into a data format, such as JSON.
Declaration
Swift
public func encode(to encoder: Encoder) throws
Parameters
to
An encoder that will allow conversions to multipel data formats.
-
A function to check if two operations are equal.
Declaration
Swift
public func isEqual(_ op: Operation) -> Bool
Parameters
_
An
Operation
to compare againstReturn Value
A
Bool
indicating the result.