Documentation ¶
Index ¶
- Variables
- func HoldToClose(waitFunc func())
- func MustMarshalJSON(o interface{}) []byte
- func NewLoggerByZap(isTrace bool, logLevelStr string) tmlog.Logger
- func NewScanner(ctx Context, fromHeight int64) *scanner
- func NewWatcher(ctx Context, fromHeight int64) *watcher
- func SetupCloseHandler(waitFunc func())
- func UnmarshalJSON(bz []byte, ptr interface{}) error
- type BlockHandler
- type Client
- func (c Client) Cdc() *codec.Codec
- func (c *Client) QueryBlockByNum(num int64) (block.DecodeResultBlock, error)
- func (c *Client) QueryBlockResultsByHeight(height int64) (types.ResultBlockResults, error)
- func (c *Client) QueryFullBlock(num int64) (types.FullBlock, error)
- func (c *Client) QueryLatestBlock() (block.DecodeResultBlock, error)
- func (c *Client) QueryTxByHash(hash string) (sdk.TxResponse, error)
- func (c *Client) SetLogger(l tmlog.Logger)
- type Context
- type WSClient
- func (w *WSClient) AddHandler(handler WsHandler)
- func (w *WSClient) SetLogger(l log.Logger)
- func (w *WSClient) Start() error
- func (w *WSClient) Stop() error
- func (w *WSClient) Subscribe(ctx context.Context, query string, handler WsHandler) error
- func (w *WSClient) SubscribeBlocks(ctx context.Context, handler func(evtBlock *types.EventNewBlock) error) error
- func (w *WSClient) Wait()
- type WsHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Codec *codec.Codec
)
Functions ¶
func HoldToClose ¶
func HoldToClose(waitFunc func())
func MustMarshalJSON ¶
func MustMarshalJSON(o interface{}) []byte
func NewScanner ¶
func NewWatcher ¶
func SetupCloseHandler ¶
func SetupCloseHandler(waitFunc func())
func UnmarshalJSON ¶
Types ¶
type BlockHandler ¶
type Client ¶
func (*Client) QueryBlockByNum ¶
func (c *Client) QueryBlockByNum(num int64) (block.DecodeResultBlock, error)
func (*Client) QueryBlockResultsByHeight ¶
func (c *Client) QueryBlockResultsByHeight(height int64) (types.ResultBlockResults, error)
func (*Client) QueryLatestBlock ¶
func (c *Client) QueryLatestBlock() (block.DecodeResultBlock, error)
func (*Client) QueryTxByHash ¶
func (c *Client) QueryTxByHash(hash string) (sdk.TxResponse, error)
type WSClient ¶
type WSClient struct {
// contains filtered or unexported fields
}
func (*WSClient) AddHandler ¶
func (*WSClient) SubscribeBlocks ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.