# xApps ("dApps")

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.

{% hint style="info" %}
Please read carefully: [Requirements](/environments/xapps-dapps/requirements.md)
{% endhint %}

## 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

{% hint style="info" %}
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()](/js-ts-sdk/sdk-syntax/xumm.xapp/ready.md)
{% endhint %}

### 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
<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>
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.xaman.dev/environments/xapps-dapps.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
