You do not need to import anything extra to make use of event callbacks, instead simply add them using the events field inside the settings prop on LayerswapProvider.
Copy
Ask AI
<LayerswapProvider callbacks={{ // events callbacks go here }}> ...</LayerswapProvider>
onFormChange: Called whenever the swap form values change — for example, when the user updates the asset, amount, or destination network.onSwapCreate: Called when a new swap is successfully created after submitting the form.onSwapComplete: Called when a swap completes successfully on-chain or via an integrated exchange.onSwapIdChange: Called whenever the active swap ID changes — for example, when a new swap is created or the current swap resets.onSwapModalStateChange: Called when the swap modal is opened or closed.onBackClick: Called when the user clicks the back button in the swap flow.