identifier

package
v1.3.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2021 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Address string `json:"address"`
}

Account uniquely identifies an account within a network. No sub-accounts are used in this implementation for now, though they will probably have to be added to support staking on Coinbase in the future.

type Block

type Block struct {
	Index *uint64 `json:"index,omitempty"`
	Hash  string  `json:"hash,omitempty"`
}

Block uniquely identifies a block in a particular network. As the view is not unique between sporks, index refers to the block height.

type Currency

type Currency struct {
	Symbol   string `json:"symbol"`
	Decimals uint   `json:"decimals,omitempty"`
}

Currency is composed of a canonical symbol and decimals. The `decimals` value is used to convert an amount value from atomic units (such as satoshis) to standard units (such as bitcoins). As monetary values in Flow are provided as an unsigned fixed point value with 8 decimals, simply use the full integer with 8 decimals in the currency struct. The symbol is always `FLOW`.

An example of metadata given in the Rosetta API documentation is `Issuer`.

type Network

type Network struct {
	Blockchain string `json:"blockchain"`
	Network    string `json:"network"`
}

Network specifies which network a particular object is associated with. The blockchain field is always set to `flow` and the network is always set to `mainnet`.

We are omitting the `SubNetwork` field for now, but we could use it in the future to distinguish between the networks of different sporks (i.e. `candidate4` or `mainnet-5`).

type Operation

type Operation struct {
	Index        uint  `json:"index"`
	NetworkIndex *uint `json:"network_index,omitempty"`
}

Operation uniquely identifies an operation within a transaction. No network index is needed because of the absence Flow does not support sharding.

type Transaction

type Transaction struct {
	Hash string `json:"hash"`
}

Transaction uniquely identifies a transaction in a particular network and block.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL