Skip to main content

StandardEventsOnMethod

@iota/wallet-standard


@iota/wallet-standard / StandardEventsOnMethod

Type Alias: StandardEventsOnMethod

StandardEventsOnMethod = <E>(event, listener) => () => void

Defined in: node_modules/.pnpm/@[email protected]/node_modules/@wallet-standard/features/lib/types/events.d.ts:57

Method to call to use the StandardEventsFeature.

Type Parameters​

E​

E extends StandardEventsNames

Parameters​

event​

E

Event type to listen for. `change` is the only event type.

listener​

StandardEventsListeners[E]

Function that will be called when an event of the type is emitted.

Returns​

off function which may be called to remove the event listener and unsubscribe from events.

As with all event listeners, be careful to avoid memory leaks.

() => void