You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
891 B

  1. # Subscribing to events via Websocket
  2. Tendermint emits different events, to which you can subscribe via
  3. [Websocket](https://en.wikipedia.org/wiki/WebSocket). This can be useful
  4. for third-party applications (for analysys) or inspecting state.
  5. [List of events](https://godoc.org/github.com/tendermint/tendermint/types#pkg-constants)
  6. You can subscribe to any of the events above by calling `subscribe` RPC
  7. method via Websocket.
  8. {
  9. "jsonrpc": "2.0",
  10. "method": "subscribe",
  11. "id": "0",
  12. "params": {
  13. "query": "tm.event='NewBlock'"
  14. }
  15. }
  16. Check out [API docs](https://tendermint.github.io/slate/#subscribe) for
  17. more information on query syntax and other options.
  18. You can also use tags, given you had included them into DeliverTx
  19. response, to query transaction results. See [Indexing
  20. transactions](./indexing-transactions.md) for details.