Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account string
Account represents a user address or customer
func NewAccount ¶
NewAccount takes in a value and returns a new Account type
type Block ¶
type Block struct { Header BlockHeader `json:"header"` TXs []Tx `json:"payload"` }
Block for a batch of transactions
func GetBlocksAfter ¶
GetBlocksAfter syncs with all blocks after a specified Hash
type BlockHeader ¶
type BlockHeader struct { Parent Hash `json:"parent"` Number uint64 `json:"number"` Time uint64 `json:"time"` }
BlockHeader is meta data for Blocks
type Hash ¶
type Hash [32]byte
Hash replaces the Snapshot type
func (Hash) MarshalText ¶
MarshalText encodes a has into a hex value
func (*Hash) UnmarshalText ¶
UnmarshalText decodes hex into a string
type State ¶
State encapsulates all the business logic of the chain
func NewStateFromDisk ¶
NewStateFromDisk creates State with a genesis file
func (*State) LatestBlock ¶
LatestBlock returns the most recent block created
func (*State) LatestBlockHash ¶
LatestBlockHash return the most recent block hash
func (*State) NextBlockNumber ¶
NextBlockNumber return the block number from the state
Click to show internal directories.
Click to hide internal directories.