Internalapi

Handles beacon events

Hierarchy

  • BeaconEventHandler

Constructors

Properties

Methods

Constructors

  • Parameters

    • eventsToOverride: {
          ACKNOWLEDGE_RECEIVED: undefined | {
              handler: BeaconEventHandlerFunction<{
                  extraInfo: ExtraInfo;
                  message: AcknowledgeResponse;
                  walletInfo: WalletInfo;
              }>;
          };
          ACTIVE_ACCOUNT_SET: undefined | {
              handler: BeaconEventHandlerFunction<AccountInfo>;
          };
          ACTIVE_TRANSPORT_SET: undefined | {
              handler: BeaconEventHandlerFunction<Transport<PeerInfo, any, any>>;
          };
          BROADCAST_REQUEST_ERROR: undefined | {
              handler: BeaconEventHandlerFunction<{
                  errorResponse: ErrorResponse;
                  walletInfo: WalletInfo;
              }>;
          };
          BROADCAST_REQUEST_SENT: undefined | {
              handler: BeaconEventHandlerFunction<RequestSentInfo>;
          };
          BROADCAST_REQUEST_SUCCESS: undefined | {
              handler: BeaconEventHandlerFunction<{
                  blockExplorer: BlockExplorer;
                  connectionContext: ConnectionContext;
                  network: Network;
                  output: BroadcastResponse;
                  walletInfo: WalletInfo;
              }>;
          };
          CHANNEL_CLOSED: undefined | {
              handler: BeaconEventHandlerFunction<string>;
          };
          HIDE_UI: undefined | {
              handler: BeaconEventHandlerFunction<undefined | ("alert" | "toast")[]>;
          };
          INTERNAL_ERROR: undefined | {
              handler: BeaconEventHandlerFunction<{
                  buttons?: AlertButton[];
                  text: string;
              }>;
          };
          INVALID_ACTIVE_ACCOUNT_STATE: undefined | {
              handler: BeaconEventHandlerFunction<undefined>;
          };
          LOCAL_RATE_LIMIT_REACHED: undefined | {
              handler: BeaconEventHandlerFunction<undefined>;
          };
          NO_PERMISSIONS: undefined | {
              handler: BeaconEventHandlerFunction<undefined>;
          };
          OPERATION_REQUEST_ERROR: undefined | {
              handler: BeaconEventHandlerFunction<{
                  errorMessages: Record<string, Record<string | number, string>>;
                  errorResponse: ErrorResponse;
                  walletInfo: WalletInfo;
              }>;
          };
          OPERATION_REQUEST_SENT: undefined | {
              handler: BeaconEventHandlerFunction<RequestSentInfo>;
          };
          OPERATION_REQUEST_SUCCESS: undefined | {
              handler: BeaconEventHandlerFunction<{
                  account: AccountInfo;
                  blockExplorer: BlockExplorer;
                  connectionContext: ConnectionContext;
                  output: OperationResponse;
                  walletInfo: WalletInfo;
              }>;
          };
          PAIR_INIT: undefined | {
              handler: BeaconEventHandlerFunction<{
                  analytics: AnalyticsInterface;
                  disclaimerText?: string;
                  featuredWallets?: string[];
                  networkType: NetworkType;
                  p2pPeerInfo: (() => Promise<P2PPairingRequest>);
                  postmessagePeerInfo: (() => Promise<PostMessagePairingRequest>);
                  walletConnectPeerInfo: (() => Promise<WalletConnectPairingRequest>);
                  abortedHandler?() => void;
              }>;
          };
          PAIR_SUCCESS: undefined | {
              handler: BeaconEventHandlerFunction<ExtendedP2PPairingResponse | ExtendedPostMessagePairingResponse | ExtendedWalletConnectPairingResponse>;
          };
          PERMISSION_REQUEST_ERROR: undefined | {
              handler: BeaconEventHandlerFunction<{
                  errorResponse: ErrorResponse;
                  walletInfo: WalletInfo;
              }>;
          };
          PERMISSION_REQUEST_SENT: undefined | {
              handler: BeaconEventHandlerFunction<RequestSentInfo>;
          };
          PERMISSION_REQUEST_SUCCESS: undefined | {
              handler: BeaconEventHandlerFunction<{
                  account: AccountInfo;
                  blockExplorer: BlockExplorer;
                  connectionContext: ConnectionContext;
                  output: PermissionResponseOutput;
                  walletInfo: WalletInfo;
              }>;
          };
          PROOF_OF_EVENT_CHALLENGE_REQUEST_ERROR: undefined | {
              handler: BeaconEventHandlerFunction<{
                  errorResponse: ErrorResponse;
                  walletInfo: WalletInfo;
              }>;
          };
          PROOF_OF_EVENT_CHALLENGE_REQUEST_SENT: undefined | {
              handler: BeaconEventHandlerFunction<RequestSentInfo>;
          };
          PROOF_OF_EVENT_CHALLENGE_REQUEST_SUCCESS: undefined | {
              handler: BeaconEventHandlerFunction<{
                  account: AccountInfo;
                  blockExplorer: BlockExplorer;
                  connectionContext: ConnectionContext;
                  output: ProofOfEventChallengeResponse;
                  walletInfo: WalletInfo;
              }>;
          };
          SHOW_PREPARE: undefined | {
              handler: BeaconEventHandlerFunction<{
                  walletInfo?: WalletInfo;
              }>;
          };
          SIGN_REQUEST_ERROR: undefined | {
              handler: BeaconEventHandlerFunction<{
                  errorResponse: ErrorResponse;
                  walletInfo: WalletInfo;
              }>;
          };
          SIGN_REQUEST_SENT: undefined | {
              handler: BeaconEventHandlerFunction<RequestSentInfo>;
          };
          SIGN_REQUEST_SUCCESS: undefined | {
              handler: BeaconEventHandlerFunction<{
                  connectionContext: ConnectionContext;
                  output: SignPayloadResponse;
                  walletInfo: WalletInfo;
              }>;
          };
          SIMULATED_PROOF_OF_EVENT_CHALLENGE_REQUEST_ERROR: undefined | {
              handler: BeaconEventHandlerFunction<{
                  errorResponse: ErrorResponse;
                  walletInfo: WalletInfo;
              }>;
          };
          SIMULATED_PROOF_OF_EVENT_CHALLENGE_REQUEST_SENT: undefined | {
              handler: BeaconEventHandlerFunction<RequestSentInfo>;
          };
          SIMULATED_PROOF_OF_EVENT_CHALLENGE_REQUEST_SUCCESS: undefined | {
              handler: BeaconEventHandlerFunction<{
                  account: AccountInfo;
                  blockExplorer: BlockExplorer;
                  connectionContext: ConnectionContext;
                  output: SimulatedProofOfEventChallengeResponse;
                  walletInfo: WalletInfo;
              }>;
          };
          UNKNOWN: undefined | {
              handler: BeaconEventHandlerFunction<undefined>;
          };
      } = {}
      • ACKNOWLEDGE_RECEIVED: undefined | {
            handler: BeaconEventHandlerFunction<{
                extraInfo: ExtraInfo;
                message: AcknowledgeResponse;
                walletInfo: WalletInfo;
            }>;
        }
      • ACTIVE_ACCOUNT_SET: undefined | {
            handler: BeaconEventHandlerFunction<AccountInfo>;
        }
      • ACTIVE_TRANSPORT_SET: undefined | {
            handler: BeaconEventHandlerFunction<Transport<PeerInfo, any, any>>;
        }
      • BROADCAST_REQUEST_ERROR: undefined | {
            handler: BeaconEventHandlerFunction<{
                errorResponse: ErrorResponse;
                walletInfo: WalletInfo;
            }>;
        }
      • BROADCAST_REQUEST_SENT: undefined | {
            handler: BeaconEventHandlerFunction<RequestSentInfo>;
        }
      • BROADCAST_REQUEST_SUCCESS: undefined | {
            handler: BeaconEventHandlerFunction<{
                blockExplorer: BlockExplorer;
                connectionContext: ConnectionContext;
                network: Network;
                output: BroadcastResponse;
                walletInfo: WalletInfo;
            }>;
        }
      • CHANNEL_CLOSED: undefined | {
            handler: BeaconEventHandlerFunction<string>;
        }
      • HIDE_UI: undefined | {
            handler: BeaconEventHandlerFunction<undefined | ("alert" | "toast")[]>;
        }
      • INTERNAL_ERROR: undefined | {
            handler: BeaconEventHandlerFunction<{
                buttons?: AlertButton[];
                text: string;
            }>;
        }
      • INVALID_ACTIVE_ACCOUNT_STATE: undefined | {
            handler: BeaconEventHandlerFunction<undefined>;
        }
      • LOCAL_RATE_LIMIT_REACHED: undefined | {
            handler: BeaconEventHandlerFunction<undefined>;
        }
      • NO_PERMISSIONS: undefined | {
            handler: BeaconEventHandlerFunction<undefined>;
        }
      • OPERATION_REQUEST_ERROR: undefined | {
            handler: BeaconEventHandlerFunction<{
                errorMessages: Record<string, Record<string | number, string>>;
                errorResponse: ErrorResponse;
                walletInfo: WalletInfo;
            }>;
        }
      • OPERATION_REQUEST_SENT: undefined | {
            handler: BeaconEventHandlerFunction<RequestSentInfo>;
        }
      • OPERATION_REQUEST_SUCCESS: undefined | {
            handler: BeaconEventHandlerFunction<{
                account: AccountInfo;
                blockExplorer: BlockExplorer;
                connectionContext: ConnectionContext;
                output: OperationResponse;
                walletInfo: WalletInfo;
            }>;
        }
      • PAIR_INIT: undefined | {
            handler: BeaconEventHandlerFunction<{
                analytics: AnalyticsInterface;
                disclaimerText?: string;
                featuredWallets?: string[];
                networkType: NetworkType;
                p2pPeerInfo: (() => Promise<P2PPairingRequest>);
                postmessagePeerInfo: (() => Promise<PostMessagePairingRequest>);
                walletConnectPeerInfo: (() => Promise<WalletConnectPairingRequest>);
                abortedHandler?() => void;
            }>;
        }
      • PAIR_SUCCESS: undefined | {
            handler: BeaconEventHandlerFunction<ExtendedP2PPairingResponse | ExtendedPostMessagePairingResponse | ExtendedWalletConnectPairingResponse>;
        }
      • PERMISSION_REQUEST_ERROR: undefined | {
            handler: BeaconEventHandlerFunction<{
                errorResponse: ErrorResponse;
                walletInfo: WalletInfo;
            }>;
        }
      • PERMISSION_REQUEST_SENT: undefined | {
            handler: BeaconEventHandlerFunction<RequestSentInfo>;
        }
      • PERMISSION_REQUEST_SUCCESS: undefined | {
            handler: BeaconEventHandlerFunction<{
                account: AccountInfo;
                blockExplorer: BlockExplorer;
                connectionContext: ConnectionContext;
                output: PermissionResponseOutput;
                walletInfo: WalletInfo;
            }>;
        }
      • PROOF_OF_EVENT_CHALLENGE_REQUEST_ERROR: undefined | {
            handler: BeaconEventHandlerFunction<{
                errorResponse: ErrorResponse;
                walletInfo: WalletInfo;
            }>;
        }
      • PROOF_OF_EVENT_CHALLENGE_REQUEST_SENT: undefined | {
            handler: BeaconEventHandlerFunction<RequestSentInfo>;
        }
      • PROOF_OF_EVENT_CHALLENGE_REQUEST_SUCCESS: undefined | {
            handler: BeaconEventHandlerFunction<{
                account: AccountInfo;
                blockExplorer: BlockExplorer;
                connectionContext: ConnectionContext;
                output: ProofOfEventChallengeResponse;
                walletInfo: WalletInfo;
            }>;
        }
      • SHOW_PREPARE: undefined | {
            handler: BeaconEventHandlerFunction<{
                walletInfo?: WalletInfo;
            }>;
        }
      • SIGN_REQUEST_ERROR: undefined | {
            handler: BeaconEventHandlerFunction<{
                errorResponse: ErrorResponse;
                walletInfo: WalletInfo;
            }>;
        }
      • SIGN_REQUEST_SENT: undefined | {
            handler: BeaconEventHandlerFunction<RequestSentInfo>;
        }
      • SIGN_REQUEST_SUCCESS: undefined | {
            handler: BeaconEventHandlerFunction<{
                connectionContext: ConnectionContext;
                output: SignPayloadResponse;
                walletInfo: WalletInfo;
            }>;
        }
      • SIMULATED_PROOF_OF_EVENT_CHALLENGE_REQUEST_ERROR: undefined | {
            handler: BeaconEventHandlerFunction<{
                errorResponse: ErrorResponse;
                walletInfo: WalletInfo;
            }>;
        }
      • SIMULATED_PROOF_OF_EVENT_CHALLENGE_REQUEST_SENT: undefined | {
            handler: BeaconEventHandlerFunction<RequestSentInfo>;
        }
      • SIMULATED_PROOF_OF_EVENT_CHALLENGE_REQUEST_SUCCESS: undefined | {
            handler: BeaconEventHandlerFunction<{
                account: AccountInfo;
                blockExplorer: BlockExplorer;
                connectionContext: ConnectionContext;
                output: SimulatedProofOfEventChallengeResponse;
                walletInfo: WalletInfo;
            }>;
        }
      • UNKNOWN: undefined | {
            handler: BeaconEventHandlerFunction<undefined>;
        }
    • Optional overrideAll: boolean

    Returns BeaconEventHandler

Properties

callbackMap: {
    ACKNOWLEDGE_RECEIVED: BeaconEventHandlerFunction<any>[];
    ACTIVE_ACCOUNT_SET: BeaconEventHandlerFunction<any>[];
    ACTIVE_TRANSPORT_SET: BeaconEventHandlerFunction<any>[];
    BROADCAST_REQUEST_ERROR: BeaconEventHandlerFunction<any>[];
    BROADCAST_REQUEST_SENT: BeaconEventHandlerFunction<any>[];
    BROADCAST_REQUEST_SUCCESS: BeaconEventHandlerFunction<any>[];
    CHANNEL_CLOSED: BeaconEventHandlerFunction<any>[];
    HIDE_UI: BeaconEventHandlerFunction<any>[];
    INTERNAL_ERROR: BeaconEventHandlerFunction<any>[];
    INVALID_ACTIVE_ACCOUNT_STATE: BeaconEventHandlerFunction<any>[];
    LOCAL_RATE_LIMIT_REACHED: BeaconEventHandlerFunction<any>[];
    NO_PERMISSIONS: BeaconEventHandlerFunction<any>[];
    OPERATION_REQUEST_ERROR: BeaconEventHandlerFunction<any>[];
    OPERATION_REQUEST_SENT: BeaconEventHandlerFunction<any>[];
    OPERATION_REQUEST_SUCCESS: BeaconEventHandlerFunction<any>[];
    PAIR_INIT: BeaconEventHandlerFunction<any>[];
    PAIR_SUCCESS: BeaconEventHandlerFunction<any>[];
    PERMISSION_REQUEST_ERROR: BeaconEventHandlerFunction<any>[];
    PERMISSION_REQUEST_SENT: BeaconEventHandlerFunction<any>[];
    PERMISSION_REQUEST_SUCCESS: BeaconEventHandlerFunction<any>[];
    PROOF_OF_EVENT_CHALLENGE_REQUEST_ERROR: BeaconEventHandlerFunction<any>[];
    PROOF_OF_EVENT_CHALLENGE_REQUEST_SENT: BeaconEventHandlerFunction<any>[];
    PROOF_OF_EVENT_CHALLENGE_REQUEST_SUCCESS: BeaconEventHandlerFunction<any>[];
    SHOW_PREPARE: BeaconEventHandlerFunction<any>[];
    SIGN_REQUEST_ERROR: BeaconEventHandlerFunction<any>[];
    SIGN_REQUEST_SENT: BeaconEventHandlerFunction<any>[];
    SIGN_REQUEST_SUCCESS: BeaconEventHandlerFunction<any>[];
    SIMULATED_PROOF_OF_EVENT_CHALLENGE_REQUEST_ERROR: BeaconEventHandlerFunction<any>[];
    SIMULATED_PROOF_OF_EVENT_CHALLENGE_REQUEST_SENT: BeaconEventHandlerFunction<any>[];
    SIMULATED_PROOF_OF_EVENT_CHALLENGE_REQUEST_SUCCESS: BeaconEventHandlerFunction<any>[];
    UNKNOWN: BeaconEventHandlerFunction<any>[];
} = ...

Type declaration

  • ACKNOWLEDGE_RECEIVED: BeaconEventHandlerFunction<any>[]
  • ACTIVE_ACCOUNT_SET: BeaconEventHandlerFunction<any>[]
  • ACTIVE_TRANSPORT_SET: BeaconEventHandlerFunction<any>[]
  • BROADCAST_REQUEST_ERROR: BeaconEventHandlerFunction<any>[]
  • BROADCAST_REQUEST_SENT: BeaconEventHandlerFunction<any>[]
  • BROADCAST_REQUEST_SUCCESS: BeaconEventHandlerFunction<any>[]
  • CHANNEL_CLOSED: BeaconEventHandlerFunction<any>[]
  • HIDE_UI: BeaconEventHandlerFunction<any>[]
  • INTERNAL_ERROR: BeaconEventHandlerFunction<any>[]
  • INVALID_ACTIVE_ACCOUNT_STATE: BeaconEventHandlerFunction<any>[]
  • LOCAL_RATE_LIMIT_REACHED: BeaconEventHandlerFunction<any>[]
  • NO_PERMISSIONS: BeaconEventHandlerFunction<any>[]
  • OPERATION_REQUEST_ERROR: BeaconEventHandlerFunction<any>[]
  • OPERATION_REQUEST_SENT: BeaconEventHandlerFunction<any>[]
  • OPERATION_REQUEST_SUCCESS: BeaconEventHandlerFunction<any>[]
  • PAIR_INIT: BeaconEventHandlerFunction<any>[]
  • PAIR_SUCCESS: BeaconEventHandlerFunction<any>[]
  • PERMISSION_REQUEST_ERROR: BeaconEventHandlerFunction<any>[]
  • PERMISSION_REQUEST_SENT: BeaconEventHandlerFunction<any>[]
  • PERMISSION_REQUEST_SUCCESS: BeaconEventHandlerFunction<any>[]
  • PROOF_OF_EVENT_CHALLENGE_REQUEST_ERROR: BeaconEventHandlerFunction<any>[]
  • PROOF_OF_EVENT_CHALLENGE_REQUEST_SENT: BeaconEventHandlerFunction<any>[]
  • PROOF_OF_EVENT_CHALLENGE_REQUEST_SUCCESS: BeaconEventHandlerFunction<any>[]
  • SHOW_PREPARE: BeaconEventHandlerFunction<any>[]
  • SIGN_REQUEST_ERROR: BeaconEventHandlerFunction<any>[]
  • SIGN_REQUEST_SENT: BeaconEventHandlerFunction<any>[]
  • SIGN_REQUEST_SUCCESS: BeaconEventHandlerFunction<any>[]
  • SIMULATED_PROOF_OF_EVENT_CHALLENGE_REQUEST_ERROR: BeaconEventHandlerFunction<any>[]
  • SIMULATED_PROOF_OF_EVENT_CHALLENGE_REQUEST_SENT: BeaconEventHandlerFunction<any>[]
  • SIMULATED_PROOF_OF_EVENT_CHALLENGE_REQUEST_SUCCESS: BeaconEventHandlerFunction<any>[]
  • UNKNOWN: BeaconEventHandlerFunction<any>[]

Methods

  • 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>

  • 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>

  • Override beacon event default callbacks. This can be used to disable default alert/toast behaviour

    Parameters

    • eventsToOverride: {
          ACKNOWLEDGE_RECEIVED: undefined | {
              handler: BeaconEventHandlerFunction<{
                  extraInfo: ExtraInfo;
                  message: AcknowledgeResponse;
                  walletInfo: WalletInfo;
              }>;
          };
          ACTIVE_ACCOUNT_SET: undefined | {
              handler: BeaconEventHandlerFunction<AccountInfo>;
          };
          ACTIVE_TRANSPORT_SET: undefined | {
              handler: BeaconEventHandlerFunction<Transport<PeerInfo, any, any>>;
          };
          BROADCAST_REQUEST_ERROR: undefined | {
              handler: BeaconEventHandlerFunction<{
                  errorResponse: ErrorResponse;
                  walletInfo: WalletInfo;
              }>;
          };
          BROADCAST_REQUEST_SENT: undefined | {
              handler: BeaconEventHandlerFunction<RequestSentInfo>;
          };
          BROADCAST_REQUEST_SUCCESS: undefined | {
              handler: BeaconEventHandlerFunction<{
                  blockExplorer: BlockExplorer;
                  connectionContext: ConnectionContext;
                  network: Network;
                  output: BroadcastResponse;
                  walletInfo: WalletInfo;
              }>;
          };
          CHANNEL_CLOSED: undefined | {
              handler: BeaconEventHandlerFunction<string>;
          };
          HIDE_UI: undefined | {
              handler: BeaconEventHandlerFunction<undefined | ("alert" | "toast")[]>;
          };
          INTERNAL_ERROR: undefined | {
              handler: BeaconEventHandlerFunction<{
                  buttons?: AlertButton[];
                  text: string;
              }>;
          };
          INVALID_ACTIVE_ACCOUNT_STATE: undefined | {
              handler: BeaconEventHandlerFunction<undefined>;
          };
          LOCAL_RATE_LIMIT_REACHED: undefined | {
              handler: BeaconEventHandlerFunction<undefined>;
          };
          NO_PERMISSIONS: undefined | {
              handler: BeaconEventHandlerFunction<undefined>;
          };
          OPERATION_REQUEST_ERROR: undefined | {
              handler: BeaconEventHandlerFunction<{
                  errorMessages: Record<string, Record<string | number, string>>;
                  errorResponse: ErrorResponse;
                  walletInfo: WalletInfo;
              }>;
          };
          OPERATION_REQUEST_SENT: undefined | {
              handler: BeaconEventHandlerFunction<RequestSentInfo>;
          };
          OPERATION_REQUEST_SUCCESS: undefined | {
              handler: BeaconEventHandlerFunction<{
                  account: AccountInfo;
                  blockExplorer: BlockExplorer;
                  connectionContext: ConnectionContext;
                  output: OperationResponse;
                  walletInfo: WalletInfo;
              }>;
          };
          PAIR_INIT: undefined | {
              handler: BeaconEventHandlerFunction<{
                  analytics: AnalyticsInterface;
                  disclaimerText?: string;
                  featuredWallets?: string[];
                  networkType: NetworkType;
                  p2pPeerInfo: (() => Promise<P2PPairingRequest>);
                  postmessagePeerInfo: (() => Promise<PostMessagePairingRequest>);
                  walletConnectPeerInfo: (() => Promise<WalletConnectPairingRequest>);
                  abortedHandler?() => void;
              }>;
          };
          PAIR_SUCCESS: undefined | {
              handler: BeaconEventHandlerFunction<ExtendedP2PPairingResponse | ExtendedPostMessagePairingResponse | ExtendedWalletConnectPairingResponse>;
          };
          PERMISSION_REQUEST_ERROR: undefined | {
              handler: BeaconEventHandlerFunction<{
                  errorResponse: ErrorResponse;
                  walletInfo: WalletInfo;
              }>;
          };
          PERMISSION_REQUEST_SENT: undefined | {
              handler: BeaconEventHandlerFunction<RequestSentInfo>;
          };
          PERMISSION_REQUEST_SUCCESS: undefined | {
              handler: BeaconEventHandlerFunction<{
                  account: AccountInfo;
                  blockExplorer: BlockExplorer;
                  connectionContext: ConnectionContext;
                  output: PermissionResponseOutput;
                  walletInfo: WalletInfo;
              }>;
          };
          PROOF_OF_EVENT_CHALLENGE_REQUEST_ERROR: undefined | {
              handler: BeaconEventHandlerFunction<{
                  errorResponse: ErrorResponse;
                  walletInfo: WalletInfo;
              }>;
          };
          PROOF_OF_EVENT_CHALLENGE_REQUEST_SENT: undefined | {
              handler: BeaconEventHandlerFunction<RequestSentInfo>;
          };
          PROOF_OF_EVENT_CHALLENGE_REQUEST_SUCCESS: undefined | {
              handler: BeaconEventHandlerFunction<{
                  account: AccountInfo;
                  blockExplorer: BlockExplorer;
                  connectionContext: ConnectionContext;
                  output: ProofOfEventChallengeResponse;
                  walletInfo: WalletInfo;
              }>;
          };
          SHOW_PREPARE: undefined | {
              handler: BeaconEventHandlerFunction<{
                  walletInfo?: WalletInfo;
              }>;
          };
          SIGN_REQUEST_ERROR: undefined | {
              handler: BeaconEventHandlerFunction<{
                  errorResponse: ErrorResponse;
                  walletInfo: WalletInfo;
              }>;
          };
          SIGN_REQUEST_SENT: undefined | {
              handler: BeaconEventHandlerFunction<RequestSentInfo>;
          };
          SIGN_REQUEST_SUCCESS: undefined | {
              handler: BeaconEventHandlerFunction<{
                  connectionContext: ConnectionContext;
                  output: SignPayloadResponse;
                  walletInfo: WalletInfo;
              }>;
          };
          SIMULATED_PROOF_OF_EVENT_CHALLENGE_REQUEST_ERROR: undefined | {
              handler: BeaconEventHandlerFunction<{
                  errorResponse: ErrorResponse;
                  walletInfo: WalletInfo;
              }>;
          };
          SIMULATED_PROOF_OF_EVENT_CHALLENGE_REQUEST_SENT: undefined | {
              handler: BeaconEventHandlerFunction<RequestSentInfo>;
          };
          SIMULATED_PROOF_OF_EVENT_CHALLENGE_REQUEST_SUCCESS: undefined | {
              handler: BeaconEventHandlerFunction<{
                  account: AccountInfo;
                  blockExplorer: BlockExplorer;
                  connectionContext: ConnectionContext;
                  output: SimulatedProofOfEventChallengeResponse;
                  walletInfo: WalletInfo;
              }>;
          };
          UNKNOWN: undefined | {
              handler: BeaconEventHandlerFunction<undefined>;
          };
      }

      An object with the events to override

      • ACKNOWLEDGE_RECEIVED: undefined | {
            handler: BeaconEventHandlerFunction<{
                extraInfo: ExtraInfo;
                message: AcknowledgeResponse;
                walletInfo: WalletInfo;
            }>;
        }
      • ACTIVE_ACCOUNT_SET: undefined | {
            handler: BeaconEventHandlerFunction<AccountInfo>;
        }
      • ACTIVE_TRANSPORT_SET: undefined | {
            handler: BeaconEventHandlerFunction<Transport<PeerInfo, any, any>>;
        }
      • BROADCAST_REQUEST_ERROR: undefined | {
            handler: BeaconEventHandlerFunction<{
                errorResponse: ErrorResponse;
                walletInfo: WalletInfo;
            }>;
        }
      • BROADCAST_REQUEST_SENT: undefined | {
            handler: BeaconEventHandlerFunction<RequestSentInfo>;
        }
      • BROADCAST_REQUEST_SUCCESS: undefined | {
            handler: BeaconEventHandlerFunction<{
                blockExplorer: BlockExplorer;
                connectionContext: ConnectionContext;
                network: Network;
                output: BroadcastResponse;
                walletInfo: WalletInfo;
            }>;
        }
      • CHANNEL_CLOSED: undefined | {
            handler: BeaconEventHandlerFunction<string>;
        }
      • HIDE_UI: undefined | {
            handler: BeaconEventHandlerFunction<undefined | ("alert" | "toast")[]>;
        }
      • INTERNAL_ERROR: undefined | {
            handler: BeaconEventHandlerFunction<{
                buttons?: AlertButton[];
                text: string;
            }>;
        }
      • INVALID_ACTIVE_ACCOUNT_STATE: undefined | {
            handler: BeaconEventHandlerFunction<undefined>;
        }
      • LOCAL_RATE_LIMIT_REACHED: undefined | {
            handler: BeaconEventHandlerFunction<undefined>;
        }
      • NO_PERMISSIONS: undefined | {
            handler: BeaconEventHandlerFunction<undefined>;
        }
      • OPERATION_REQUEST_ERROR: undefined | {
            handler: BeaconEventHandlerFunction<{
                errorMessages: Record<string, Record<string | number, string>>;
                errorResponse: ErrorResponse;
                walletInfo: WalletInfo;
            }>;
        }
      • OPERATION_REQUEST_SENT: undefined | {
            handler: BeaconEventHandlerFunction<RequestSentInfo>;
        }
      • OPERATION_REQUEST_SUCCESS: undefined | {
            handler: BeaconEventHandlerFunction<{
                account: AccountInfo;
                blockExplorer: BlockExplorer;
                connectionContext: ConnectionContext;
                output: OperationResponse;
                walletInfo: WalletInfo;
            }>;
        }
      • PAIR_INIT: undefined | {
            handler: BeaconEventHandlerFunction<{
                analytics: AnalyticsInterface;
                disclaimerText?: string;
                featuredWallets?: string[];
                networkType: NetworkType;
                p2pPeerInfo: (() => Promise<P2PPairingRequest>);
                postmessagePeerInfo: (() => Promise<PostMessagePairingRequest>);
                walletConnectPeerInfo: (() => Promise<WalletConnectPairingRequest>);
                abortedHandler?() => void;
            }>;
        }
      • PAIR_SUCCESS: undefined | {
            handler: BeaconEventHandlerFunction<ExtendedP2PPairingResponse | ExtendedPostMessagePairingResponse | ExtendedWalletConnectPairingResponse>;
        }
      • PERMISSION_REQUEST_ERROR: undefined | {
            handler: BeaconEventHandlerFunction<{
                errorResponse: ErrorResponse;
                walletInfo: WalletInfo;
            }>;
        }
      • PERMISSION_REQUEST_SENT: undefined | {
            handler: BeaconEventHandlerFunction<RequestSentInfo>;
        }
      • PERMISSION_REQUEST_SUCCESS: undefined | {
            handler: BeaconEventHandlerFunction<{
                account: AccountInfo;
                blockExplorer: BlockExplorer;
                connectionContext: ConnectionContext;
                output: PermissionResponseOutput;
                walletInfo: WalletInfo;
            }>;
        }
      • PROOF_OF_EVENT_CHALLENGE_REQUEST_ERROR: undefined | {
            handler: BeaconEventHandlerFunction<{
                errorResponse: ErrorResponse;
                walletInfo: WalletInfo;
            }>;
        }
      • PROOF_OF_EVENT_CHALLENGE_REQUEST_SENT: undefined | {
            handler: BeaconEventHandlerFunction<RequestSentInfo>;
        }
      • PROOF_OF_EVENT_CHALLENGE_REQUEST_SUCCESS: undefined | {
            handler: BeaconEventHandlerFunction<{
                account: AccountInfo;
                blockExplorer: BlockExplorer;
                connectionContext: ConnectionContext;
                output: ProofOfEventChallengeResponse;
                walletInfo: WalletInfo;
            }>;
        }
      • SHOW_PREPARE: undefined | {
            handler: BeaconEventHandlerFunction<{
                walletInfo?: WalletInfo;
            }>;
        }
      • SIGN_REQUEST_ERROR: undefined | {
            handler: BeaconEventHandlerFunction<{
                errorResponse: ErrorResponse;
                walletInfo: WalletInfo;
            }>;
        }
      • SIGN_REQUEST_SENT: undefined | {
            handler: BeaconEventHandlerFunction<RequestSentInfo>;
        }
      • SIGN_REQUEST_SUCCESS: undefined | {
            handler: BeaconEventHandlerFunction<{
                connectionContext: ConnectionContext;
                output: SignPayloadResponse;
                walletInfo: WalletInfo;
            }>;
        }
      • SIMULATED_PROOF_OF_EVENT_CHALLENGE_REQUEST_ERROR: undefined | {
            handler: BeaconEventHandlerFunction<{
                errorResponse: ErrorResponse;
                walletInfo: WalletInfo;
            }>;
        }
      • SIMULATED_PROOF_OF_EVENT_CHALLENGE_REQUEST_SENT: undefined | {
            handler: BeaconEventHandlerFunction<RequestSentInfo>;
        }
      • SIMULATED_PROOF_OF_EVENT_CHALLENGE_REQUEST_SUCCESS: undefined | {
            handler: BeaconEventHandlerFunction<{
                account: AccountInfo;
                blockExplorer: BlockExplorer;
                connectionContext: ConnectionContext;
                output: SimulatedProofOfEventChallengeResponse;
                walletInfo: WalletInfo;
            }>;
        }
      • UNKNOWN: undefined | {
            handler: BeaconEventHandlerFunction<undefined>;
        }

    Returns void

  • Set all event callbacks to a specific handler.

    Parameters

    • Optional handler: BeaconEventHandlerFunction<unknown>

    Returns void

Generated using TypeDoc