Xaman Developer Docs
Developer ConsoleAPI Endpoints
  • Build on Xaman
  • Concepts
    • Getting started
      • Terminology
      • Developer Education
    • 🔐Authorization & Credentials
    • Payloads (sign requests)
      • 🚨Secure Payment Verification
      • Workflow
      • Lifecycle
        • Sample POS lifecycle
      • Payload Delivery
        • Deep Linking
        • QR Scanning
        • Push
        • xApps
        • Mobile (iOS/Android)
        • Desktop browser
      • Status updates
        • Websocket
        • Webhooks
          • Signature verification
        • API Call (polling)
      • Networks
      • Payload Return URL
      • Tx Explorer(s)
    • Special Transaction Types
    • Limitations
      • Rate limits
      • Transaction types
      • Push permission
    • Implementation checklist
      • Protocol specific checks
  • Environments
    • 🌎Browser ("Web3")
      • CORS (Browser)
    • 📱xApps ("dApps")
      • Requirements
      • Develop & Test
      • CORS (xApp)
      • Xumm UI interaction
      • Your own backend (Auth)
      • Style guide
      • Development & Debugging
      • xAppBuilder 🏗️
        • Connecting localhost to xAppBuilder
        • xAppBuilder FAQ
    • 📂Backend (SDK / API)
      • User identification payloads
    • 🎛️Native Apps
    • 🙇Identity (OAuth2, OpenID)
      • Test Tools
  • JS/TS SDK
    • Xaman SDK (Intro)
    • Examples / User stories
      • Sign Requests (payloads)
        • Browser
        • xApp
        • Backend
      • Verify Payload signature
      • Simple Sign Request
    • 📦SDK (syntax)
      • Xumm.ping()
      • Xumm.on(event, fn)
      • Xumm.off(event, fn)
      • Xumm.helpers { … }
        • ping()
        • getRates( … )
        • getRails()
        • getHookHash( … )
        • getHookHashes()
        • getCuratedAssets()
        • getNftokenDetail( … )
        • getKycStatus( … )
        • verifyUserTokens([ … ])
        • getTransaction( … )
      • Xumm.user { … }
      • Xumm.environment { … }
      • Xumm.payload { … }
        • create( … )
        • createAndSubscribe( … )
        • cancel( … )
        • subscribe( … )
        • get( … )
      • Xumm.xapp { … }
        • ready()
        • openSignRequest({ … })
        • selectDestination({ … })
        • scanQr()
        • tx({ … })
        • close({ … })
        • share({ … })
        • navigate({ … })
        • openBrowser({ … })
        • on(xAppEvent, fn)
        • off(xAppEvent, fn)
      • Xumm.userstore { … }
        • list()
        • get( … )
        • delete( … )
        • set( … , { … } )
      • Xumm.backendstore { … }
        • get()
        • set({ … })
        • delete()
      • Xumm.push { … }
        • event( … )
        • notification( … )
      • Xumm.runtime { … }
      • Xumm.authorize()
      • Xumm.logout()
Powered by GitBook
On this page
  • Event order
  • xApp (always auto-signed in)
  • Web3 (browser) - Signed out & then signing in
  • Web3 (browser) - Already signed in

Was this helpful?

Edit on GitHub
Export as PDF
  1. JS/TS SDK
  2. SDK (syntax)

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

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

payload

destination

networkswitch

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

PreviousXumm.ping()NextXumm.off(event, fn)

Last updated 1 year ago

Was this helpful?

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

A Sign Request (payload) has been resolved (cancelled / signed / ...) From:

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

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 key.

📦
scanQr()
openSignRequest({ … })
selectDestination({ … })
getRails()
xApp (user event)
xApp (user event)
xApp (user event)
xApp (user event)