Versions in this module Expand all Collapse all v0 v0.0.1 Nov 11, 2020 Changes in this version + var Codec *codec.Codec + 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 func(logger tmlog.Logger, height int64, block *types.FullBlock) error + type Client struct + LcdURL string + RpcURL string + func NewClient(ctx Context) *Client + 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) + func (c Client) Cdc() *codec.Codec + type Context struct + func NewCtx(ctx context.Context) Context + func (c Context) Clone(ctx context.Context) Context + func (c Context) LcdURL() string + func (c Context) Logger() log.Logger + func (c Context) RpcURL() string + func (c Context) WithLogger(logger log.Logger) Context + func (c Context) WithUrls(lcdURL string, rpcURL string) Context + type WSClient struct + func NewWSClient(logger log.Logger, addr string) (*WSClient, error) + 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 func(typ string, val json.RawMessage) error