mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-04 04:04:00 +00:00
docs: added further documentation to the subscribing to events page (#5110)
This commit is contained in:
@@ -4,14 +4,21 @@ order: 5
|
||||
|
||||
# Subscribing to events via Websocket
|
||||
|
||||
Tendermint emits different events, to which you can subscribe via
|
||||
Tendermint emits different events, which you can subscribe to via
|
||||
[Websocket](https://en.wikipedia.org/wiki/WebSocket). This can be useful
|
||||
for third-party applications (for analysis) or inspecting state.
|
||||
for third-party applications (for analysis) or for inspecting state.
|
||||
|
||||
[List of events](https://godoc.org/github.com/tendermint/tendermint/types#pkg-constants)
|
||||
|
||||
You can subscribe to any of the events above by calling `subscribe` RPC
|
||||
method via Websocket.
|
||||
To connect to a node via websocket from the CLI, you can use a tool such as
|
||||
[wscat](https://github.com/websockets/wscat) and run:
|
||||
|
||||
```
|
||||
wscat ws://127.0.0.1:26657/websocket
|
||||
```
|
||||
|
||||
You can subscribe to any of the events above by calling the `subscribe` RPC
|
||||
method via Websocket along with a valid query.
|
||||
|
||||
```
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user