Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • BeaconEventHandler

Index

Constructors

Properties

Methods

Constructors

constructor

  • new BeaconEventHandler(eventsToOverride?: { ACKNOWLEDGE_RECEIVED: any; ACTIVE_ACCOUNT_SET: any; ACTIVE_TRANSPORT_SET: any; BROADCAST_REQUEST_ERROR: any; BROADCAST_REQUEST_SENT: any; BROADCAST_REQUEST_SUCCESS: any; CHANNEL_CLOSED: any; INTERNAL_ERROR: any; LOCAL_RATE_LIMIT_REACHED: any; NO_PERMISSIONS: any; OPERATION_REQUEST_ERROR: any; OPERATION_REQUEST_SENT: any; OPERATION_REQUEST_SUCCESS: any; PAIR_INIT: any; PAIR_SUCCESS: any; PERMISSION_REQUEST_ERROR: any; PERMISSION_REQUEST_SENT: any; PERMISSION_REQUEST_SUCCESS: any; SIGN_REQUEST_ERROR: any; SIGN_REQUEST_SENT: any; SIGN_REQUEST_SUCCESS: any; UNKNOWN: any }, overrideAll?: boolean): BeaconEventHandler
  • Parameters

    • eventsToOverride: { ACKNOWLEDGE_RECEIVED: any; ACTIVE_ACCOUNT_SET: any; ACTIVE_TRANSPORT_SET: any; BROADCAST_REQUEST_ERROR: any; BROADCAST_REQUEST_SENT: any; BROADCAST_REQUEST_SUCCESS: any; CHANNEL_CLOSED: any; INTERNAL_ERROR: any; LOCAL_RATE_LIMIT_REACHED: any; NO_PERMISSIONS: any; OPERATION_REQUEST_ERROR: any; OPERATION_REQUEST_SENT: any; OPERATION_REQUEST_SUCCESS: any; PAIR_INIT: any; PAIR_SUCCESS: any; PERMISSION_REQUEST_ERROR: any; PERMISSION_REQUEST_SENT: any; PERMISSION_REQUEST_SUCCESS: any; SIGN_REQUEST_ERROR: any; SIGN_REQUEST_SENT: any; SIGN_REQUEST_SUCCESS: any; UNKNOWN: any } = ...
    • Optional overrideAll: boolean

    Returns BeaconEventHandler

Properties

Private Readonly callbackMap

callbackMap: { ACKNOWLEDGE_RECEIVED: any; ACTIVE_ACCOUNT_SET: any; ACTIVE_TRANSPORT_SET: any; BROADCAST_REQUEST_ERROR: any; BROADCAST_REQUEST_SENT: any; BROADCAST_REQUEST_SUCCESS: any; CHANNEL_CLOSED: any; INTERNAL_ERROR: any; LOCAL_RATE_LIMIT_REACHED: any; NO_PERMISSIONS: any; OPERATION_REQUEST_ERROR: any; OPERATION_REQUEST_SENT: any; OPERATION_REQUEST_SUCCESS: any; PAIR_INIT: any; PAIR_SUCCESS: any; PERMISSION_REQUEST_ERROR: any; PERMISSION_REQUEST_SENT: any; PERMISSION_REQUEST_SUCCESS: any; SIGN_REQUEST_ERROR: any; SIGN_REQUEST_SENT: any; SIGN_REQUEST_SUCCESS: any; UNKNOWN: any } = ...

Type declaration

Methods

emit

  • emit<K>(event: K, data?: BeaconEventType[K], eventCallback?: AlertButton[]): Promise<void>
  • Emit a beacon event

    Type parameters

    Parameters

    • event: K

      The event being emitted

    • Optional data: BeaconEventType[K]

      The data to be emit

    • Optional eventCallback: AlertButton[]

    Returns Promise<void>

on

  • on<K>(event: K, eventCallback: BeaconEventHandlerFunction<BeaconEventType[K]>): Promise<void>
  • A method to subscribe to a specific beacon event and register a callback

    Type parameters

    Parameters

    • event: K

      The event being emitted

    • eventCallback: BeaconEventHandlerFunction<BeaconEventType[K]>

      The callback that will be invoked

    Returns Promise<void>

Private overrideDefaults

  • overrideDefaults(eventsToOverride: { ACKNOWLEDGE_RECEIVED: any; ACTIVE_ACCOUNT_SET: any; ACTIVE_TRANSPORT_SET: any; BROADCAST_REQUEST_ERROR: any; BROADCAST_REQUEST_SENT: any; BROADCAST_REQUEST_SUCCESS: any; CHANNEL_CLOSED: any; INTERNAL_ERROR: any; LOCAL_RATE_LIMIT_REACHED: any; NO_PERMISSIONS: any; OPERATION_REQUEST_ERROR: any; OPERATION_REQUEST_SENT: any; OPERATION_REQUEST_SUCCESS: any; PAIR_INIT: any; PAIR_SUCCESS: any; PERMISSION_REQUEST_ERROR: any; PERMISSION_REQUEST_SENT: any; PERMISSION_REQUEST_SUCCESS: any; SIGN_REQUEST_ERROR: any; SIGN_REQUEST_SENT: any; SIGN_REQUEST_SUCCESS: any; UNKNOWN: any }): void
  • Override beacon event default callbacks. This can be used to disable default alert/toast behaviour

    Parameters

    • eventsToOverride: { ACKNOWLEDGE_RECEIVED: any; ACTIVE_ACCOUNT_SET: any; ACTIVE_TRANSPORT_SET: any; BROADCAST_REQUEST_ERROR: any; BROADCAST_REQUEST_SENT: any; BROADCAST_REQUEST_SUCCESS: any; CHANNEL_CLOSED: any; INTERNAL_ERROR: any; LOCAL_RATE_LIMIT_REACHED: any; NO_PERMISSIONS: any; OPERATION_REQUEST_ERROR: any; OPERATION_REQUEST_SENT: any; OPERATION_REQUEST_SUCCESS: any; PAIR_INIT: any; PAIR_SUCCESS: any; PERMISSION_REQUEST_ERROR: any; PERMISSION_REQUEST_SENT: any; PERMISSION_REQUEST_SUCCESS: any; SIGN_REQUEST_ERROR: any; SIGN_REQUEST_SENT: any; SIGN_REQUEST_SUCCESS: any; UNKNOWN: any }

      An object with the events to override

    Returns void

Private setAllHandlers

  • setAllHandlers(handler?: BeaconEventHandlerFunction<unknown>): void
  • Set all event callbacks to a specific handler.

    Parameters

    • Optional handler: BeaconEventHandlerFunction<unknown>

    Returns void

Generated using TypeDoc