The starknet_subscribeEvents websocket endpoint accepts from_address and keys filter arguments (these correspond roughly to the EventFilterParams type in our legacy websocket interface), as well as a block argument which serves as the block ID (pathfinder_common::BlockId) to start streaming from. It returns a stream of emitted events (pathfinder_storage::EmittedEvent).
The filtering code should remain the same as what we have right now in our legacy websocket interface.
In case of a reorg, this endpoint will stream a reorg message of the following format:
{
"starting_block_hash": "the block hash from which the reorg starts",
"starting_block_number": "the block number from which the reorg starts",
"ending_block_hash": "the block hash at which the reorg ends",
"ending_block_number": "the block number at which the reorg ends"
}
The
starknet_subscribeEvents
websocket endpoint acceptsfrom_address
andkeys
filter arguments (these correspond roughly to theEventFilterParams
type in our legacy websocket interface), as well as ablock
argument which serves as the block ID (pathfinder_common::BlockId
) to start streaming from. It returns a stream of emitted events (pathfinder_storage::EmittedEvent
).The filtering code should remain the same as what we have right now in our legacy websocket interface.
In case of a reorg, this endpoint will stream a reorg message of the following format: