Static methods
on()
Listen for events from the ChainPatrol Relay.
Example
Parameters
The on()
method accepts two parameters:
type
EventType
requiredThe type
property specifies what type of event you want to listen for.
callback
(data: EventData) => void
requiredThe callback
property is a function that will be called when the event is
triggered. The event data is passed to the callback function as the first
parameter.