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.

EventEnvironmentMeaning

retrieved

xApp, Web3 (browser)

A valid signed in Xumm SDK session has been retrieved.

success

xApp, Web3 (browser)

A user is succesfully identified and signed in

ready

xApp, Web3 (browser)

The SDK is ready (final state) so your application can render

retrieving

Web3 (browser)

The SDK is trying to retrieve & verify an existing session

logout

Web3 (browser)

The SDK is going to destroy a pending signed in session

loggedout

Web3 (browser)

The SDK destroyed a signed in session, a user can login again.

error

Web3 (browser)

An error occurred, see the browser console for more information

qr

The QR code scan dialog in Xumm has been closed (dismissed or a QR code has been scanned) From: scanQr()

payload

A Sign Request (payload) has been resolved (cancelled / signed / ...) From: openSignRequest({ … })

destination

The "Destination Picker" dialog in Xumm has been closed (dismissed or a destination has been selected) From: selectDestination({ … })

networkswitch

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. network contains getRails()key.

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)

  1. retrieved - xApps always auto-resolve

  2. success- all information is populated to SDK properties (Promises)

  3. ready - ready to render your application with the correct Xumm SDK state

Web3 (browser) - Signed out & then signing in

  1. retrieving - but the user is signed out

  2. ready - ready to render your application with the correct Xumm SDK state, but the user must still log in

  3. The user signs in

  4. success - all information is populated to SDK properties (Promises)

Web3 (browser) - Already signed in

  1. retrieving - existing session information is being fetched & verified

  2. success - all information is populated to SDK properties (Promises)

  3. retrieved - you are dealing with an already signed in user

  4. ready - ready to render your application with the correct Xumm SDK state

Last updated