Documentation
    Preparing search index...

    Handles beacon events

    Index

    Constructors

    Methods

    Constructors

    • Parameters

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

      Returns BeaconEventHandler

    Methods

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