Xumm.on(event, fn)
Events fired by the SDK per environment. For the order of events, see the section per environment after the table with events.
Event | Environment | Meaning |
---|---|---|
| xApp, Web3 (browser) | A valid signed in Xumm SDK session has been retrieved. |
| xApp, Web3 (browser) | A user is succesfully identified and signed in |
| xApp, Web3 (browser) | The SDK is ready (final state) so your application can render |
| Web3 (browser) | The SDK is trying to retrieve & verify an existing session |
| Web3 (browser) | The SDK is going to destroy a pending signed in session |
| Web3 (browser) | The SDK destroyed a signed in session, a user can login again. |
| Web3 (browser) | An error occurred, see the browser console for more information |
| The QR code scan dialog in Xumm has been closed (dismissed or a QR code has been scanned) From: scanQr() | |
| A Sign Request (payload) has been resolved (cancelled / signed / ...) From: openSignRequest({ … }) | |
| The "Destination Picker" dialog in Xumm has been closed (dismissed or a destination has been selected) From: selectDestination({ … }) | |
| The user switched the selected network in Xumm while present in the xApp, while your xApp settings (Xumm Developer Console) indicate the xApp shouldn't reload but receive an event.
|
Event order
The following order of events can be expected per environment.
Note about the ready
vs the success
event:
The ready
event fires if the SDK state is ready for the rendering of your application. This does not have to mean the SDK is signed in: it just means the SDK is ready.
If you want to know a user
xApp (always auto-signed in)
retrieved
- xApps always auto-resolvesuccess
- all information is populated to SDK properties (Promises)ready
- ready to render your application with the correct Xumm SDK state
Web3 (browser) - Signed out & then signing in
retrieving
- but the user is signed outready
- ready to render your application with the correct Xumm SDK state, but the user must still log inThe user signs in
success
- all information is populated to SDK properties (Promises)
Web3 (browser) - Already signed in
retrieving
- existing session information is being fetched & verifiedsuccess
- all information is populated to SDK properties (Promises)retrieved
- you are dealing with an already signed in userready
- ready to render your application with the correct Xumm SDK state
Last updated