Subscribe Collections
Subscribe to blockchain events
You can create a websocket subscription for any event in the blockchain.
Read filter syntax and collections documentation in the previous section.
In this example, we start a subscription and get a result whenever a new block is generated.
The filter
and result
parameters are the same as in the query
method. The filter
parameter narrows the action down to a subset of monitored items. In this case, the filter is empty: all items are included into monitoring.
Last updated