Tendermint RPC
The Tendermint RPC allows you to query transactions, blocks, consensus state, broadcast transactions, etc. The latest Tendermint RPC documentations can be found here. Tendermint supports the following RPC protocols:- URI over HTTP
- JSON-RPC over HTTP
- JSON-RPC over Websockets
URI/HTTP
A GET request with arguments encoded as query parameters:RPC/HTTP
JSONRPC requests can be POST’d to the root RPC endpoint via HTTP. See the list of supported Tendermint RPC endpoints using Swagger here.RPC/Websocket
Cosmos and Tendermint Events
Events are objects that contain information about the execution of the application
and are triggered after a block is committed. They are mainly used by service providers
like block explorers and wallet to track the execution of various messages and index transactions.
You can get the full list of event categories and values here.
More on Events:
Subscribing to Events via Websocket
Tendermint Core provides a Websocket connection to subscribe or unsubscribe to TendermintEvents.
To start a connection with the Tendermint websocket you need to
define the address with the --rpc.laddr flag when starting the node
(default tcp://127.0.0.1:26657):
type and attribute value of the query allow you to filter the specific event you are
looking for. For example, an Ethereum transaction on HyperPaxeer (MsgEthereumTx) triggers an event of type ethermint and
has sender and recipient as attributes. Subscribing to this event would be done like so:
hexAddress is an Ethereum hex address (eg: 0x1122334455667788990011223344556677889900).
The generic syntax looks like this:
List of Tendermint Events
The main events you can subscribe to are:NewBlock: Containseventstriggered duringBeginBlockandEndBlock.Tx: Containseventstriggered duringDeliverTx(i.e. transaction processing).ValidatorSetUpdates: Contains validator set updates for the block.
Events page to obtain the event list of each supported module on HyperPaxeer.
:::
List of all Tendermint event keys:
Below is a list of values that you can use to subscribe for the
tm.event type: