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
  • Permissions
  • Opening xApps
  • Advanced ways to open xApps
  • xApp example use cases
  • Sample code

Was this helpful?

Edit on GitHub
Export as PDF
  1. Environments

xApps ("dApps")

Build your own web app to live in-app, inside Xumm for all Xumm users. Build an xApp. Use your favourite tools & frameworks for the client side code (HTML, CSS, JS, etc.

xApps are web apps. They are offered to users as integrated apps, opened in Xumm for a great user experience. They add value (tools, apps, wizards, ...) for end users. They receive context information when opened, and can interact with some of the native Xumm features & users through Sign Requests.

Please read carefully: Requirements

Permissions

xApps have extra special permissions, allowing the xApp (web app) to interact with some of the native Xumm features:

  • They receive context (user account selected in Xumm when opened, Xumm theme, input params, account type (eg. Tangem / ...)

  • They can trigger overlay Sign Requests and receive callback info

  • They can trigger the QR scanner and receive scanned QR data

Opening xApps

xApps can be opened (triggered) in lots of ways:

  • In the Xumm shortlist (we feature some apps, they get replaced by frequently used apps by the user)

  • From the xApp directory

  • By opening a deeplink (browser / from within another app)

  • By scanning a QR code

To prevent showing a double loader (first the Xumm xApp loader, then your xApp's loader while hydrating / booting) you can enable the "Xumm Loader Screen" option in the Xumm Developer Console (xApp tab). See ready()

Advanced ways to open xApps

  • By attaching an xApp memo to an XRPL TX (so the Event list will show there's an xApp attached to the TX)

  • Using push notifications

  • From the Event list, as an xApp session pushed to a Xumm user

xApp example use cases

  • Trading interface (offloads signing to Xumm)

  • Admission ticket checking

  • NFT marketplaces / viewers

  • Issuing tokens, checking tokens

  • Tools: setting up accounts, crafting advanced transactions, escrows, etc.

  • Exchange deposit / withdraw integrations

Sample code

<html lang="en">
  <body>
    <h1 id="accountaddress">...</h1>
        
    <script src="https://xumm.app/assets/cdn/xumm.min.js"></script>
    <script>
      var xumm = new Xumm('your-api-key')
      
      xumm.on("ready", () => console.log("Ready (e.g. hide loading state of xApp)"))
  
      // Account can't change (like Web3 logout/login) so we can rely on the promise
      xumm.user.account.then(account => {
        document.getElementById('accountaddress').innerText = account
      })
    </script>
  </body>
</html>
PreviousCORS (Browser)NextRequirements

Last updated 1 year ago

Was this helpful?

📱