WalletConnect events
Overview
In Beacon we use signClient to manage all WalletConnect's connections.
signClient
manages the lifecycle and communication of sessions between a dApp and
a wallet.
This page outlines the various events that Beacon handles through signClient
.
Session Events
-
session_event: Triggered by any significant occurrence within a session not explicitly covered by more specific events. It can be used for logging, debugging, or extending functionality.
In Beacon we use this event to acknowledge requests sent to a wallet.
-
session_update: Occurs when a session's state changes, such as updating permissions, accounts, or chain information. This is crucial for dApps to adjust their state in response to changes in the session parameters.
-
session_expire: Fired when a session reaches its expiry time and is no longer valid. This event is critical for managing session lifecycle and ensuring that expired sessions are refreshed or terminated as needed.
-
session_delete: This event is fired when a session is terminated either by the user, the dApp, or due to external factors leading to a disconnection.
Pairing Events
-
pairing_delete: This event is triggered when a pairing is intentionally deleted, either by user action or programmatically by the dApp or wallet. This is used to manage the list of available pairings, ensuring that only valid or required pairings are maintained.
-
pairing_expire: Occurs when a pairing reaches its defined expiry time. Since pairings are typically temporary connections before establishing a full session, this event handles the automatic cleanup of these temporary states.
References
-
Session Events: This document outlines the various session events that can be handled by WalletConnect's
signClient
, providing details on each event's significance and usage. -
Pairing API: A guide to understanding the pairing process within WalletConnect, explaining how dApps can establish preliminary connections with wallets before initiating a full session.