Documentation
¶
Overview ¶
Package block defines the interface required for all blockchain or network connections.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Chain ¶
type Chain interface {
// member-type methods
MaxBlocks() int // number of blocks that are controlled for orphans (uncles)
AvgBlock() int // average block mining rate in seconds
// methods
Close()
Balance(account, token string) (bal, tokBal *big.Int, err error)
GetBlock(block uint64, full bool, response interface{}) error
DecodeBlock(b interface{}) (types.Block, error)
DecodeTxs(t interface{}) ([]types.Trans, error)
GetToken(token string) (types.Token, error)
Send(fromAddress, toAddress, token, amount string, data []byte, key string, priceIn uint64,
dryRun bool) (fee *big.Int, hash []byte, err error)
Get(hash string) (t *types.Trans, err error)
}
Chain is an interface that contains the required methods. It has been designed to be as much standard as possible, however, there may be specific blockchains or networks that would require different types or more methods.
Click to show internal directories.
Click to hide internal directories.