Operation class

Operations contain all balance-changing information within a transaction. They are always one-sided (only affect 1 AccountIdentifier) and can succeed or fail independently from a Transaction. Operations are used both to represent on-chain data (Data API) and to construct new transactions (Construction API), creating a standard interface for reading and writing to blockchains.

Constructors

Operation(String type, OperationIdentifier operation_identifier, List<OperationIdentifier>? related_operations, String? status, AccountIdentifier? account, Amount? amount, CoinChange? coin_change, Map<String, dynamic>? metadata)
Operation.fromMap(Map<String, dynamic> map)
factory

Properties

account AccountIdentifier?
getter/setter pair
amount Amount?
getter/setter pair
coin_change CoinChange?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
metadata Map<String, dynamic>?
getter/setter pair
operation_identifier OperationIdentifier
getter/setter pair
Restrict referenced related_operations to identifier indexes < the current operation_identifier.index. This ensures there exists a clear DAG-structure of relations. Since operations are one-sided, one could imagine relating operations in a single transfer or linking operations in a call tree.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status String?
Status is the network-specific status of the operation. Status is not defined on the transaction object because blockchains with smart contracts may have transactions that partially apply (some operations are successful and some are not). Blockchains with atomic transactions (all operations succeed or all operations fail) will have the same status for each operation. On-chain operations (operations retrieved in the /block and /block/transaction endpoints) MUST have a populated status field (anything on-chain must have succeeded or failed). However, operations provided during transaction construction (often times called "intent" in the documentation) MUST NOT have a populated status field (operations yet to be included on-chain have not yet succeeded or failed).
getter/setter pair
type String
Type is the network-specific type of the operation. Ensure that any type that can be returned here is also specified in the NetworkOptionsResponse. This can be very useful to downstream consumers that parse all block data.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited