> ## Documentation Index
> Fetch the complete documentation index at: https://developers.fireblocks.com/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://developers.fireblocks.com/feedback

```json
{
  "path": "/docs/embedded-wallet-events-handler",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# Events Handler

> You can choose whether to provide an events handler during the mobile and web Software Development Kits (SDKs) setup for the Fireblocks Embedded Wallet (EW). The events handler activates during different operations within the SDK and keeps you in the loop about significant occurrences, such as key generation, backup and recovery, and transaction signing.

<Note>
  For Fireblocks' recommended embedded wallet solution, see [Dynamic Embedded Wallets](/docs/dynamic-embedded-wallets). The documentation below covers the legacy Embedded Wallet APIs and SDKs.
</Note>

The events handler can be tailored to match your application's needs. It can be designed to execute various actions, such as refreshing the user interface, recording events, dispatching notifications, or initiating other behaviors specific to your application's functionality.

The events handler object should be provided when initializing the EW SDK. It must implement the following method (following a defined interface):

`handleEvent(event: Event): void`: The method invoked whenever there's a new event.

<CodeGroup>
  ```bash bash theme={"system"}
  export interface IEventsHandler {  
    handleEvent(event: TEvent): void;  
  }
  ```

  ```bash bash theme={"system"}
  interface FireblocksEventHandler {

      /**
       * Listens to various Fireblocks events see [Event]. Each event has relevant information.
       * In addition, in case of an error we will add the [FireblocksError] with the relevant error code
       */
      fun onEvent(event: Event)
  }
  ```

  ```bash bash theme={"system"}
  public protocol EventHandlerDelegate: AnyObject {
      /// Listens to various Fireblocks events [FireblocksEvent]. Each event has relevant information.
      /// In addition, in case of an error we will add the FireblocksError with the relevant error code
      /// - Parameter event: FireblocksEvent
       func onEvent(event: FireblocksEvent)
  }
  ```
</CodeGroup>
