Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Amount ¶
type Amount struct { Value string `json:"value"` Currency identifier.Currency `json:"currency"` }
Amount is some value of a currency. It is considered invalid to specify a value without a currency.
type Block ¶
type Block struct { ID identifier.Block `json:"block_identifier"` ParentID identifier.Block `json:"parent_block_identifier"` Timestamp int64 `json:"timestamp"` Transactions []*Transaction `json:"transactions"` }
Block contains an array of transactions that occurred at a particular block identifier. A hard requirement for blocks returned by Rosetta implementations is that they must be unalterable: once a client has requested and received a block identified by a specific block identifier, all future calls for that same block identifier must return the same block contents.
Examples given of metadata in the Rosetta API documentation are `transaction_root` and `difficulty`.
type Operation ¶
type Operation struct { ID identifier.Operation `json:"operation_identifier"` Type string `json:"type"` Status string `json:"status"` AccountID identifier.Account `json:"account"` Amount Amount `json:"amount"` }
Operation contains all balance-changing information within a transaction. It is always one-sided (only affects one account identifier) and can succeed or fail independently from a transaction. Operations are used both to represent on-chain data in the Data API and to construct new transaction in the Construction API, creating a standard interface for reading and writing to blockchains.
Examples of metadata given in the Rosetta API documentation are "asm" and "hex".
The `coin_change` field is omitted, as the Flow blockchain is an account-based blockchain without utxo set.
type Transaction ¶
type Transaction struct { ID identifier.Transaction `json:"transaction_identifier"` Operations []*Operation `json:"operations"` }
Transaction contains an array of operations that are attributable to the same transaction identifier.
Examples of metadata given in the Rosetta API documentation are "size" and "lockTime".