# Xverse Developer Documentation

## Build on Bitcoin with Xverse

[Xverse](https://www.xverse.app/) is the Bitcoin super-app trusted by nearly 2 million users — built for payments, trading, earning, and borrowing across Bitcoin, Lightning, [Spark](https://www.spark.money/), [Starknet](https://www.starknet.io/), and [Stacks](https://www.stacks.co/).&#x20;

The infrastructure behind it is now open to developers.

Whether you're building a Bitcoin app, a data service, or an AI agent, Xverse gives you the tools to ship on Bitcoin and Bitcoin layers without running your own nodes, indexers, or infrastructure.

## What are you building?

### **Xverse API** - The Data Layer for Bitcoin Apps

{% columns %}
{% column %}
REST APIs for real-time and historical Bitcoin data — no node, no indexer, no custom infrastructure required.&#x20;

* Bitcoin RPC, mempool, UTXOs, and balances.
* Portfolio indexing, analytics, and market data for Bitcoin, Spark, Starknet, Stacks.
* Ordinals, Runes, BRC-20, and inscription services.
* Swap aggregation across Bitcoin AMMs and Bitcoin L2s.

<a href="https://app.gitbook.com/s/itFugh7txAO3gqbz7AUt/" class="button primary" data-icon="rocket-launch">Get started</a> <a href="https://app.gitbook.com/s/itFugh7txAO3gqbz7AUt/mcp-server" class="button secondary" data-icon="robot">MCP server</a>
{% endcolumn %}

{% column %}
{% code title="" overflow="wrap" %}

```http
GET /v2/bitcoin/address/{address}/utxo HTTP/1.1
Host: api.secretkeylabs.io
x-api-key: YOUR_API_KEY
Accept: */*

```

{% endcode %}
{% endcolumn %}
{% endcolumns %}

***

### **Sats Connect -** The Wallet SDK for Bitcoin Apps

{% columns %}
{% column %}
Build apps that connect to users' Bitcoin wallets. Send transactions, request signatures, and interact with the full Bitcoin asset stack — BTC, Ordinals, Runes, BRC-20, Spark, Stacks, and Starknet.

* Bitcoin PSBTs, transfers, and message signing.
* Ordinals, Runes, and BRC-20 operations.
* Spark, Stacks, and Starknet support.
* \~2 million downloads. Used by leading BitcoinFi apps.

<a href="https://app.gitbook.com/s/33DLypUqgcjkBSmN0gZn/" class="button primary" data-icon="rocket-launch">Get started</a> <a href="https://app.gitbook.com/s/33DLypUqgcjkBSmN0gZn/resources/ai-agent-integration" class="button secondary" data-icon="robot">AI Agent integration</a>
{% endcolumn %}

{% column %}
{% code title="index.js" overflow="wrap" %}

```javascript
import {
  request,
  BitcoinNetworkType,
  RpcErrorCode,
} from "sats-connect";
    
try {
  const response = await request('signPsbt', {
    psbt: psbtBase64,
    signInputs: {
      "1ef9...Jn1r": [0],
      "bc1p...ra4w": [1,2],
    },
  });

```

{% endcode %}
{% endcolumn %}
{% endcolumns %}

***

### **Xverse Agentic Wallet -** The Agent Economy on Bitcoin Rails

{% hint style="info" %}
Coming soon.
{% endhint %}

{% columns %}
{% column width="50%" %}
Give your AI agent a Bitcoin-native wallet that can pay, receive, and trade programmatically across Lightning, Spark, and Starknet. No custodian, no permissions to ask for, and no infrastructure to run.

* ⚡ **Pay and get paid on Lightning** request invoices, settle instantly, sub-cent fees. The natural primitive for any agent that needs to charge for or consume a service on Bitcoin rails.
* 🔲 **Trade Runes & Ordinals** directly from the agent, no intermediary.
* 🌐 **Trade on Starknet** — Bitcoin assets, stables, RWAs with high throughput & low fees.
* ⚡ **Trade on Flashnet** via Spark — the cheapest way to move Bitcoin assets.
  {% endcolumn %}

{% column width="50%" %}
{% code title="johndoe\@john-mbp \~ %" overflow="wrap" %}

```bash
xverse [my-agent.com] mainnet:0> --agent my-agent.com bitcoin balance

BTC Balance:

+------------------+-----------+-------------+
| Address Type     | Confirmed | Unconfirmed |
+------------------+-----------+-------------+
| Native Segwit    | 0.1823    | 0.0000      |
| Taproot          | 0.0412    | 0.0050      |
+------------------+-----------+-------------+
| Total            | 0.2235    | 0.0050      |
+------------------+-----------+-------------+


```

{% endcode %}
{% endcolumn %}
{% endcolumns %}

## Not sure where to start?

| I want to…                                         | Use this                                                                                                                             |
| -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| Let users connect their wallet to my app           | [Sats Connect](https://app.gitbook.com/s/33DLypUqgcjkBSmN0gZn/)                                                                      |
| Request transaction signatures from my users       | [Sats Connect](https://app.gitbook.com/s/33DLypUqgcjkBSmN0gZn/)                                                                      |
| Query balances, UTXOs, or mempool data server-side | [Xverse API](https://app.gitbook.com/s/itFugh7txAO3gqbz7AUt/)                                                                        |
| Fetch Ordinals, Runes, or BRC-20 data              | [Xverse API](https://app.gitbook.com/s/itFugh7txAO3gqbz7AUt/)                                                                        |
| Get market data or floor prices                    | [Xverse API](https://app.gitbook.com/s/itFugh7txAO3gqbz7AUt/)                                                                        |
| Give my AI agent a Bitcoin wallet to pay and trade | Agentic Wallet :soon:                                                                                                                |
| Use Bitcoin data inside Claude or Cursor           | [MCP Server](https://app.gitbook.com/s/itFugh7txAO3gqbz7AUt/mcp-server)                                                              |
| Build a full-stack Bitcoin app                     | Both [Xverse API](https://app.gitbook.com/s/itFugh7txAO3gqbz7AUt/) + [Sats Connect](https://app.gitbook.com/s/33DLypUqgcjkBSmN0gZn/) |

## Developer resources

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th></th><th></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td><h4><i class="fa-discord">:discord:</i></h4></td><td><strong>Discord community</strong></td><td>Post questions, feature requests, get help, and share resources with other developers.</td><td><a href="https://discord.gg/tN84HhSDrz" class="button secondary">Join Discord</a></td><td></td></tr><tr><td><h4><i class="fa-github">:github:</i></h4></td><td><strong>GitHub</strong></td><td>Check out our GitHub repository and submit your first PR.</td><td><a href="https://github.com/secretkeylabs" class="button secondary">Go to Github</a></td><td></td></tr></tbody></table>
