Handling events
Last updated
Last updated
In your application, you'll need to listen and respond to different events emitted by the CSPR.click library. On this page, we're covering the most common. Check the page in the Web SDK reference for a full list of events.
The following code shows an example of how to bind your handlers to the CSPR.click events:
This event is emitted every time the CSPR.click library connects to an account. The previous state was disconnected.
reference.
This event is emitted every time the CSPR.click livrary switches connection from one account to another.
reference.
This event is emitted when the CSPR.click library disconnects the active account due to a call to the signOut()
SDK method.
This event is emitted when CSPR.click library receives a disconnect request or event from the connected wallet. The app should close the current session as a consequence of this event.
Receives the provider that has been disconnected.
reference.
reference.