Documentation
¶
Overview ¶
Package chain provides a blockchain client.
Index ¶
- type Block
- type Client
- func (c *Client) BatchSize() int
- func (c *Client) FetchSingle(height int64) (*coretypes.ResultBlockResults, error)
- func (c *Client) FirstBlockHash() (hash string, err error)
- func (c *Client) GetBlock(height *int64) (*coretypes.ResultBlock, error)
- func (c *Client) Iterator(startHeight, finalBlockHeight int64) Iterator
- func (c *Client) RefreshStatus() (rs *coretypes.ResultStatus, err error)
- type Iterator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block struct { Height int64 `json:"height"` Time time.Time `json:"time"` Hash []byte `json:"hash"` Results *coretypes.ResultBlockResults `json:"results"` PureBlock *coretypes.ResultBlock `json:"pure_block"` }
Block is a chain record.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides Tendermint access.
func (*Client) FetchSingle ¶
func (c *Client) FetchSingle(height int64) (*coretypes.ResultBlockResults, error)
func (*Client) FirstBlockHash ¶
func (*Client) GetBlock ¶
func (c *Client) GetBlock(height *int64) (*coretypes.ResultBlock, error)
Fetch Single block details
func (*Client) RefreshStatus ¶
func (c *Client) RefreshStatus() (rs *coretypes.ResultStatus, err error)
Fetch the summary of the chain: latest height, node address, ...
Click to show internal directories.
Click to hide internal directories.