SparkWallet extends EventEmitter, so it inherits the following methods for handling events.
on(event: string, listener: Function)
Adds a listener for the specified event.Parameters
The event name to listen for
The callback function to execute when the event is emitted
Returns
The SparkWallet instance for chaining
Example
once(event: string, listener: Function)
Adds a one-time listener for the specified event.Parameters
The event name to listen for
The callback function to execute when the event is emitted
Returns
The SparkWallet instance for chaining
Example
off(event: string, listener: Function)
Removes the specified listener from the specified event.Parameters
The event name
The callback function to remove
Returns
The SparkWallet instance for chaining