These events allow for enhanced monitoring, reporting, and analytics.
Triggered when a route is built
.
event_token_changed - Triggered when the selected token changes
.
event_swap_settings_updated - Triggered when the swap settings are updated
.
event_token_imported - Triggered when a token is imported
.
event_transactions_built - Triggered when a set of transactions is built
.
event_swap_result_received - Triggered when the swap result is received
.
event_wallet_connected - Triggered on wallet successfully connected
event_wallet_disconnected - Triggered when wallet was disconnected
event_swap_started - Triggered when SWAP transaction confirmed by wallet and started
event_swap_completed - Triggered when SWAP or MultiSwap operation completed
event_multi_swap_started - Triggered when MultiSwap transaction confirmed by wallet and started
addEventListener
method. Here’s how you can listen event_route_built
event as example:
event.detail
. For example:
event_route_built
: Contains information about the route, including the tokens involved and estimated fees.event_token_changed
: Contains the details of the token that has been changed.event_swap_settings_updated
: Contains the updated swap settings.event_token_imported
: Contains the details of the imported token.event_transactions_built
: Contains the details of the built transactions.event_swap_result_received
: Contains the result of the swap.event_wallet_connected
: Contains information about the connected wallet, including wallet type and address.event_wallet_disconnected
: Contains information about the disconnected wallet.event_swap_started
: Contains details about the started swap transaction, including transaction hash and tokens involved.event_swap_completed
: Contains the final result of the completed swap operation, including success status and transaction details.event_multi_swap_started
: Contains details about the started multi-swap transaction, including transaction hash and involved token pairs.