Documentation
¶
Index ¶
- type Client
- func (c Client) GetBlock(height int64) (*tmctypes.ResultBlock, error)
- func (c Client) GetLatestBlockHeight() (int64, error)
- func (c Client) GetTokens(limit int, offset int) ([]*types.Token, error)
- func (c Client) GetTxs(block *tmctypes.ResultBlock) ([]*rpc.ResultTx, error)
- func (c Client) GetValidatorSet(height int64) (*tmctypes.ResultValidators, error)
- func (c Client) GetValidators() ([]*types.Validator, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps around both Tendermint RPC client and Cosmos SDK LCD REST client that enables to query necessary data.
func NewClient ¶
func NewClient(cfg config.NodeConfig) *Client
NewClient creates a new Client with the given config.
func (Client) GetBlock ¶
func (c Client) GetBlock(height int64) (*tmctypes.ResultBlock, error)
GetBlock queries for a block by height. An error is returned if the query fails.
func (Client) GetLatestBlockHeight ¶
GetLatestBlockHeight returns the latest block height on the active chain.
func (Client) GetTxs ¶
GetTxs queries for all the transactions in a block height. It uses `Tx` RPC method to query for the transaction.
func (Client) GetValidatorSet ¶
func (c Client) GetValidatorSet(height int64) (*tmctypes.ResultValidators, error)
GetValidatorSet returns all the known Tendermint validators for a given block height. An error is returned if the query fails.
Click to show internal directories.
Click to hide internal directories.