CometBFT emits different events, which you can subscribe to via Websocket. This can be useful for third-party applications (for analysis) or for inspecting state. List of events To connect to a node via websocket from the CLI, you can use a tool such as wscat and run:Documentation Index
Fetch the complete documentation index at: https://docs.cosmos.network/llms.txt
Use this file to discover all available pages before exploring further.
wss instead of ws.
You can subscribe to any of the events above by calling the subscribe RPC
method via Websocket along with a valid query.
Query parameter and event type restrictions
While CometBFT imposes no restrictions on the application with regards to the type of the event output, there are several restrictions when it comes to querying events whose attribute values are numeric.- Queries cannot include negative numbers
- If floating points are compared to integers, they are converted to an integer
- Floating point to floating point comparison leads to a loss of precision for very big floating point numbers
(
10000000000000000000.0is treated the same as10000000000000000000.6) - When floating points do get converted to integers, they are not rounded, the decimal part is simply truncated. This has been done to preserve the behaviour present before introducing the support for BigInts in the query parameters.