I am subscribing to the events of Tendermint (like new transactions) with the code below;
query := "tm.event='Tx'"
txs, err := client.Subscribe(ctx, "some-consumer", query)
or from terminal as;
wscat --connect ws://0.0.0.0:26657/websocket
> { "jsonrpc": "2.0", "method": "subscribe", "params": ["tm.event='Tx'"], "id": 1 }
I am getting the events as they arise but how can I get the historical event, e.g. starting from a specific block?
I think you should use the
HTTP
fromgithub.com/tendermint/tendermint/rpc/client/http
. Then you can make requests likeBlock(context, height)
,Tx(context, hash, prove)
, and many others!