# Table of Contents - [Xverse Developer Documentation | xverse](#xverse-developer-documentation-xverse) - [Xverse Agent Wallet | xverse](#xverse-agent-wallet-xverse) - [Unknown](#unknown) - [Unknown](#unknown) - [Getting Started | Xverse Agent Wallet | xverse](#getting-started-xverse-agent-wallet-xverse) - [Bitcoin | Xverse Agent Wallet | xverse](#bitcoin-xverse-agent-wallet-xverse) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Agent Mode | Xverse Agent Wallet | xverse](#agent-mode-xverse-agent-wallet-xverse) - [Portfolio & Treasury | Xverse Agent Wallet | xverse](#portfolio-treasury-xverse-agent-wallet-xverse) - [Stacks | Xverse Agent Wallet | xverse](#stacks-xverse-agent-wallet-xverse) - [Runes | Xverse Agent Wallet | xverse](#runes-xverse-agent-wallet-xverse) - [Swaps | Xverse Agent Wallet | xverse](#swaps-xverse-agent-wallet-xverse) - [Spark and Lightning | Xverse Agent Wallet | xverse](#spark-and-lightning-xverse-agent-wallet-xverse) - [Xverse API | xverse](#xverse-api-xverse) - [Unknown](#unknown) - [Get Started | Xverse API | xverse](#get-started-xverse-api-xverse) - [Starknet | Xverse Agent Wallet | xverse](#starknet-xverse-agent-wallet-xverse) - [Agentic Starknet Trading | Xverse Agent Wallet | xverse](#agentic-starknet-trading-xverse-agent-wallet-xverse) - [Agentic Flashnet Trading | Xverse Agent Wallet | xverse](#agentic-flashnet-trading-xverse-agent-wallet-xverse) - [Register Portfolio Address | Xverse API | xverse](#register-portfolio-address-xverse-api-xverse) - [Ordinals | Xverse API | xverse](#ordinals-xverse-api-xverse) - [Bitcoin | Xverse Agent Wallet | xverse](#bitcoin-xverse-agent-wallet-xverse) - [Portfolio | Xverse API | xverse](#portfolio-xverse-api-xverse) - [Address | Xverse API | xverse](#address-xverse-api-xverse) - [Watch Addresses | Xverse API | xverse](#watch-addresses-xverse-api-xverse) - [Estimate | Xverse API | xverse](#estimate-xverse-api-xverse) - [Transactions | Xverse API | xverse](#transactions-xverse-api-xverse) - [BRC-20 | Xverse API | xverse](#brc-20-xverse-api-xverse) - [⚡ MPP Lightning Payments | Xverse API | xverse](#-mpp-lightning-payments-xverse-api-xverse) - [Bitcoin | Xverse API | xverse](#bitcoin-xverse-api-xverse) - [Inscription Service | Xverse API | xverse](#inscription-service-xverse-api-xverse) - [Swaps | Xverse API | xverse](#swaps-xverse-api-xverse) - [Mint BRC-20 | Xverse API | xverse](#mint-brc-20-xverse-api-xverse) - [Estimate | Xverse API | xverse](#estimate-xverse-api-xverse) - [Order | Xverse API | xverse](#order-xverse-api-xverse) - [Agentic Lightning Commerce | Xverse Agent Wallet | xverse](#agentic-lightning-commerce-xverse-agent-wallet-xverse) - [Spark | Xverse API | xverse](#spark-xverse-api-xverse) - [Inscriptions | Xverse API | xverse](#inscriptions-xverse-api-xverse) - [MCP Server | Xverse API | xverse](#mcp-server-xverse-api-xverse) - [Deploy BRC-20 | Xverse API | xverse](#deploy-brc-20-xverse-api-xverse) - [Blocks | Xverse API | xverse](#blocks-xverse-api-xverse) - [Execute | Xverse API | xverse](#execute-xverse-api-xverse) - [Ordinals by Address | Xverse API | xverse](#ordinals-by-address-xverse-api-xverse) - [UTXO Listings | Xverse API | xverse](#utxo-listings-xverse-api-xverse) - [Execute order | Xverse API | xverse](#execute-order-xverse-api-xverse) - [Execute | Xverse API | xverse](#execute-xverse-api-xverse) - [Order | Xverse API | xverse](#order-xverse-api-xverse) - [Order | Xverse API | xverse](#order-xverse-api-xverse) - [Node & Mempool | Xverse API | xverse](#node-mempool-xverse-api-xverse) - [Execute | Xverse API | xverse](#execute-xverse-api-xverse) - [Address | Xverse API | xverse](#address-xverse-api-xverse) - [Collections | Xverse API | xverse](#collections-xverse-api-xverse) - [Transactions | Xverse API | xverse](#transactions-xverse-api-xverse) - [Decode Raw Bitcoin Transaction | Xverse API | xverse](#decode-raw-bitcoin-transaction-xverse-api-xverse) - [Runes | Xverse API | xverse](#runes-xverse-api-xverse) - [Place order | Xverse API | xverse](#place-order-xverse-api-xverse) - [Crosschain Swaps | Xverse API | xverse](#crosschain-swaps-xverse-api-xverse) - [Activity | Xverse API | xverse](#activity-xverse-api-xverse) - [Historical Activity (Confirmed) | Xverse API | xverse](#historical-activity-confirmed-xverse-api-xverse) - [Real-Time Mempool Activity (Unconfirmed) | Xverse API | xverse](#real-time-mempool-activity-unconfirmed-xverse-api-xverse) - [Runes by Address | Xverse API | xverse](#runes-by-address-xverse-api-xverse) - [Estimate | Xverse API | xverse](#estimate-xverse-api-xverse) - [Place order | Xverse API | xverse](#place-order-xverse-api-xverse) - [Get utxos | Xverse API | xverse](#get-utxos-xverse-api-xverse) - [Execute order | Xverse API | xverse](#execute-order-xverse-api-xverse) - [Place order | Xverse API | xverse](#place-order-xverse-api-xverse) - [Stacks Swaps | Xverse API | xverse](#stacks-swaps-xverse-api-xverse) - [Runes Swaps | Xverse API | xverse](#runes-swaps-xverse-api-xverse) - [Unknown](#unknown) - [List Rune Etch Orders | Xverse API | xverse](#list-rune-etch-orders-xverse-api-xverse) - [Execute Rune Mint Order | Xverse API | xverse](#execute-rune-mint-order-xverse-api-xverse) - [Estimate Rune Mint Order | Xverse API | xverse](#estimate-rune-mint-order-xverse-api-xverse) - [Create Rune Mint Order | Xverse API | xverse](#create-rune-mint-order-xverse-api-xverse) - [Execute Rune Etch Order | Xverse API | xverse](#execute-rune-etch-order-xverse-api-xverse) - [BRC-20 by Address | Xverse API | xverse](#brc-20-by-address-xverse-api-xverse) - [Monitor Rune Mint Order | Xverse API | xverse](#monitor-rune-mint-order-xverse-api-xverse) - [BTKN Tokens | Xverse API | xverse](#btkn-tokens-xverse-api-xverse) - [Runes by Blocks | Xverse API | xverse](#runes-by-blocks-xverse-api-xverse) - [Monitor Rune Etch Order | Xverse API | xverse](#monitor-rune-etch-order-xverse-api-xverse) - [Create Rune Etch Order | Xverse API | xverse](#create-rune-etch-order-xverse-api-xverse) - [Estimate Rune Etch Order | Xverse API | xverse](#estimate-rune-etch-order-xverse-api-xverse) - [List Rune Mint Orders | Xverse API | xverse](#list-rune-mint-orders-xverse-api-xverse) - [Mint Rune | Xverse API | xverse](#mint-rune-xverse-api-xverse) - [Verify Bitcoin message signatures | Sats Connect | xverse](#verify-bitcoin-message-signatures-sats-connect-xverse) - [Mobile Integration | Sats Connect | xverse](#mobile-integration-sats-connect-xverse) - [Etch Rune | Xverse API | xverse](#etch-rune-xverse-api-xverse) - [Mint Runes | Sats Connect | xverse](#mint-runes-sats-connect-xverse) - [Speed up a Rune Mint or Etch order | Sats Connect | xverse](#speed-up-a-rune-mint-or-etch-order-sats-connect-xverse) - [ord_sendInscriptions | Sats Connect | xverse](#ord-sendinscriptions-sats-connect-xverse) - [stx_transferStx | Sats Connect | xverse](#stx-transferstx-sats-connect-xverse) - [spark_transfer | Sats Connect | xverse](#spark-transfer-sats-connect-xverse) --- # Xverse Developer Documentation | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/readme.md) . Build on Bitcoin with Xverse[](https://docs.xverse.app/#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/) . 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?[](https://docs.xverse.app/#what-are-you-building) ------------------------------------------------------------------------- ### **Xverse API** - The Data Layer for Bitcoin Apps[](https://docs.xverse.app/#xverse-api-the-data-layer-for-bitcoin-apps) REST APIs for real-time and historical Bitcoin data — no node, no indexer, no custom infrastructure required. * 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. [Get started](https://docs.xverse.app/api) [MCP server](https://docs.xverse.app/api/mcp-server) Copy GET /v2/bitcoin/address/{address}/utxo HTTP/1.1 Host: api.secretkeylabs.io x-api-key: YOUR_API_KEY Accept: */* * * * ### **Sats Connect -** The Wallet SDK for Bitcoin Apps[](https://docs.xverse.app/#sats-connect-the-wallet-sdk-for-bitcoin-apps) 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. [Get started](https://docs.xverse.app/sats-connect) [AI Agent integration](https://docs.xverse.app/sats-connect/ai-agent-integration) index.js Copy import { request, BitcoinNetworkType, RpcErrorCode, } from "sats-connect"; try { const response = await request('signPsbt', { psbt: psbtBase64, signInputs: { "1ef9...Jn1r": [0], "bc1p...ra4w": [1,2], }, }); * * * ### **Xverse Agent Wallet -** The Agent Economy on Bitcoin Rails[](https://docs.xverse.app/#xverse-agent-wallet-the-agent-economy-on-bitcoin-rails) 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. [Get started](https://docs.xverse.app/xverse-agentic-wallet#the-first-bitcoin-native-wallet-built-for-ai-agents) [Agent Mode](https://docs.xverse.app/xverse-agentic-wallet/agent-mode) johndoe@john-mbp ~ % Copy 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 | +------------------+-----------+-------------+ Not sure where to start?[](https://docs.xverse.app/#not-sure-where-to-start) ----------------------------------------------------------------------------- I want to… Use this Let users connect their wallet to my app [Sats Connect](https://docs.xverse.app/sats-connect) Request transaction signatures from my users [Sats Connect](https://docs.xverse.app/sats-connect) Query balances, UTXOs, or mempool data server-side [Xverse API](https://docs.xverse.app/api) Fetch Ordinals, Runes, or BRC-20 data [Xverse API](https://docs.xverse.app/api) Get market data or floor prices [Xverse API](https://docs.xverse.app/api) Give my AI agent a Bitcoin wallet to pay and trade [Agent Wallet](https://docs.xverse.app/xverse-agentic-wallet#the-first-bitcoin-native-wallet-built-for-ai-agents) Use Bitcoin data inside Claude or Cursor [MCP Server](https://docs.xverse.app/api/mcp-server) Build a full-stack Bitcoin app Both [Xverse API](https://docs.xverse.app/api) + [Sats Connect](https://docs.xverse.app/sats-connect) Developer resources[](https://docs.xverse.app/#developer-resources) -------------------------------------------------------------------- #### [](https://docs.xverse.app/#undefined) **Discord community** Post questions, feature requests, get help, and share resources with other developers. [Join Discord](https://discord.gg/tN84HhSDrz) #### [](https://docs.xverse.app/#undefined-1) **GitHub** Check out our GitHub repository and submit your first PR. [Go to Github](https://github.com/secretkeylabs) --- # Xverse Agent Wallet | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/xverse-agentic-wallet/xverse-agent-wallet.md) . **The first Bitcoin-native wallet built for AI agents.**[](https://docs.xverse.app/xverse-agentic-wallet#the-first-bitcoin-native-wallet-built-for-ai-agents) -------------------------------------------------------------------------------------------------------------------------------------------------------------- Xverse Agent Wallet is a headless, developer-first wallet that gives AI agents the ability to hold, send, receive, swap, and trade assets across Bitcoin and its layer 2s — without a browser extension, without a UI, and without human intervention. Agentic wallets are emerging across EVM and Solana ecosystems. Bitcoin has been left behind. Xverse fills that gap — with native support for Bitcoin L1, Spark (Lightning), Starknet, and Stacks from day one. ### ⚡ What makes it different[](https://docs.xverse.app/xverse-agentic-wallet#what-makes-it-different) Xverse Agent Wallet isn't an embedded wallet with an agent wrapper. It's purpose-built infrastructure for autonomous Bitcoin operations: * **Bitcoin-native** — built on the same `xverse-core` that powers the Xverse wallet used by millions. Same derivation paths, same transaction builders, same vault encryption. * **Multi-chain from birth** — your agent can hold BTC, trade on Starknet DEXes (AVNU), swap on Flashnet (Spark), pay Lightning invoices, and manage Runes — all from one wallet. * **Headless CLI** — no browser, no popups. Every operation is a CLI command with `--json` output. Built for scripts, bots, and AI agent frameworks. * **Machine-payable APIs** — built-in support for the Machine Payments Protocol (MPP). Your agent can call paid APIs and settle over Lightning automatically — no checkout flows, no human approval. * **Self-custodial** — the agent owns its keys. The vault is encrypted at rest with a passphrase from an environment variable, compatible with any secret manager. ### 🚀 What your agent can do[](https://docs.xverse.app/xverse-agentic-wallet#what-your-agent-can-do) #### 💲 Agentic Payments[](https://docs.xverse.app/xverse-agentic-wallet#agentic-payments) Pay and get paid on Lightning rails via Spark. Sub-cent fees, sub-second settlement. Your agent can create invoices, pay invoices, and call MPP-enabled APIs that settle over Lightning automatically. #### 📈 Agentic Trading[](https://docs.xverse.app/xverse-agentic-wallet#agentic-trading) Execute spot trades across integrated DEXes — AVNU on Starknet, Flashnet on Spark, Dotswap and Sats Terminal for Runes. Quote, compare, and execute from the command line. #### 🏦 Treasury Management[](https://docs.xverse.app/xverse-agentic-wallet#treasury-management) Sweep profits to cold BTC storage, rebalance between stables and BTC, harvest staking rewards, and manage funds across hot wallets and cold vaults. #### 📊 Portfolio Intelligence[](https://docs.xverse.app/xverse-agentic-wallet#portfolio-intelligence) Query balances across all chains, scan multiple accounts, and monitor your full asset allocation — Bitcoin, Starknet, Spark, Stacks, Runes, stablecoins, and staking positions — in a single command. ### 🏗️ Architecture[](https://docs.xverse.app/xverse-agentic-wallet#architecture) The CLI wraps `xverse-core` directly — the same library that powers the Xverse browser extension and mobile app. If something works in the CLI, it works everywhere. ### 📦 Install[](https://docs.xverse.app/xverse-agentic-wallet#install) ### ⚡ Quickstart[](https://docs.xverse.app/xverse-agentic-wallet#quickstart) Run the command in your terminal to start Claude Code with wallet access. It will handle wallet setup and password authentication automatically. For other AI agents, use: From here, explore the capabilities your agent needs: I want to... Start here Pay or receive on Lightning [Spark & Lightning](https://docs.xverse.app/xverse-agentic-wallet/capabilities/spark-and-lightning) Call paid APIs over Lightning [Machine Payments (MPP)](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-lightning-commerce) Trade on Starknet DEXes [Starknet Trading Guide](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-starknet-trading) Trade on Flashnet (Spark) [Flashnet Trading Guide](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-flashnet-trading) Manage balances across all chains [Portfolio & Treasury](https://docs.xverse.app/xverse-agentic-wallet/capabilities/portfolio-and-treasury) Swap between any assets/chains [Swaps](https://docs.xverse.app/xverse-agentic-wallet/capabilities/swaps) Manage and send Runes on Bitcoin L1 [Runes](https://docs.xverse.app/xverse-agentic-wallet/capabilities/runes) ### 🤝 Join the community[](https://docs.xverse.app/xverse-agentic-wallet#join-the-community) Building with the Xverse Agent Wallet? Join our [developer forum](https://discord.gg/tN84HhSDrz) to connect with the team and other builders. [NextGetting Started](https://docs.xverse.app/xverse-agentic-wallet/getting-started) Last updated 5 months ago * [The first Bitcoin-native wallet built for AI agents.](https://docs.xverse.app/xverse-agentic-wallet#the-first-bitcoin-native-wallet-built-for-ai-agents) * [⚡ What makes it different](https://docs.xverse.app/xverse-agentic-wallet#what-makes-it-different) * [🚀 What your agent can do](https://docs.xverse.app/xverse-agentic-wallet#what-your-agent-can-do) * [🏗️ Architecture](https://docs.xverse.app/xverse-agentic-wallet#architecture) * [📦 Install](https://docs.xverse.app/xverse-agentic-wallet#install) * [⚡ Quickstart](https://docs.xverse.app/xverse-agentic-wallet#quickstart) * [🤝 Join the community](https://docs.xverse.app/xverse-agentic-wallet#join-the-community) Copy ┌──────────────────────────────────────┐ │ AI Agent (any framework) │ │ ┌──────────────────────────────┐ │ │ │ xverse-wallet CLI │ │ │ │ (wraps xverse-core) │ │ │ │ │ │ │ │ • Wallet creation & vault │ │ │ │ • Balance retrieval │ │ │ │ • Sign & broadcast txns │ │ ┌──────────────┐ │ │ • BTC / Spark / Starknet / │────┼────▶│ Blockchain │ │ │ Stacks / Runes / LN │ │ │ Networks │ │ └──────────────────────────────┘ │ └──────────────┘ └──────────────────────────────────────┘ Copy npx @secretkeylabs/xverse-agent-wallet --install Copy xverse-wallet agent Copy xverse-wallet agent --agent --- # Unknown \# xverse ## Get started - \[Xverse Developer Documentation\](https://docs.xverse.app/readme.md): Build with the world's leading Bitcoin self-custodial platform ## Xverse API - \[Xverse API\](https://docs.xverse.app/api/xverse-api.md) - \[Get Started\](https://docs.xverse.app/api/get-started.md) - \[⚡ MPP Lightning Payments\](https://docs.xverse.app/api/mpp-lightning-payments.md) - \[MCP Server\](https://docs.xverse.app/api/mcp-server.md) - \[Bitcoin\](https://docs.xverse.app/api/bitcoin.md) - \[Address\](https://docs.xverse.app/api/bitcoin/address.md) - \[Balance\](https://docs.xverse.app/api/bitcoin/address/balance.md) - \[Bitcoin Address Summary\](https://docs.xverse.app/api/bitcoin/address/bitcoin-address-summary.md) - \[\\\[v1\\\] Get Bitcoin UTXOs\](https://docs.xverse.app/api/bitcoin/address/v1-get-bitcoin-utxos.md) - \[\\\[v2\\\] Get Bitcoin UTXOs (Mempool-Aware)\](https://docs.xverse.app/api/bitcoin/address/v2-get-bitcoin-utxos-mempool-aware.md) - \[Activity\](https://docs.xverse.app/api/bitcoin/address/activity.md) - \[Historical Activity (Confirmed)\](https://docs.xverse.app/api/bitcoin/address/activity/historical-activity-confirmed.md) - \[Real-Time Mempool Activity (Unconfirmed)\](https://docs.xverse.app/api/bitcoin/address/activity/real-time-mempool-activity-unconfirmed.md) - \[Unconfirmed Transactions\](https://docs.xverse.app/api/bitcoin/address/activity/unconfirmed-transactions.md) - \[Transactions\](https://docs.xverse.app/api/bitcoin/transactions.md) - \[Get Bitcoin Transaction\](https://docs.xverse.app/api/bitcoin/transactions/get-bitcoin-transaction.md) - \[Get Raw Bitcoin Transaction Hex\](https://docs.xverse.app/api/bitcoin/transactions/get-raw-bitcoin-transaction-hex.md) - \[Decode Raw Bitcoin Transaction\](https://docs.xverse.app/api/bitcoin/transactions/decode-raw-bitcoin-transaction.md) - \[Ordinal Transaction\](https://docs.xverse.app/api/bitcoin/transactions/ordinal-transaction.md) - \[Ordinal Transaction Outputs\](https://docs.xverse.app/api/bitcoin/transactions/ordinal-transaction-outputs.md) - \[Ordinal Transaction Inputs\](https://docs.xverse.app/api/bitcoin/transactions/ordinal-transaction-inputs.md) - \[Outputs\](https://docs.xverse.app/api/bitcoin/outputs.md) - \[Node & Mempool\](https://docs.xverse.app/api/bitcoin/node-and-mempool.md) - \[Estimate Transaction Fee\](https://docs.xverse.app/api/bitcoin/node-and-mempool/estimate-transaction-fee.md) - \[Mempool Fees\](https://docs.xverse.app/api/bitcoin/node-and-mempool/mempool-fees.md): Retrieve statistics regarding the fee rates of transactions within estimated mempool blocks. - \[Send Transaction\](https://docs.xverse.app/api/bitcoin/node-and-mempool/send-transaction.md) - \[Mempool Acceptance Test\](https://docs.xverse.app/api/bitcoin/node-and-mempool/mempool-acceptance-test.md) - \[Blocks\](https://docs.xverse.app/api/bitcoin/blocks.md) - \[Get Current Block\](https://docs.xverse.app/api/bitcoin/blocks/get-current-block.md) - \[Get Block by Height\](https://docs.xverse.app/api/bitcoin/blocks/get-block-by-height.md) - \[Bitcoin JSON-RPC\](https://docs.xverse.app/api/bitcoin/bitcoin-json-rpc.md) - \[getblockhash\](https://docs.xverse.app/api/bitcoin/bitcoin-json-rpc/getblockhash.md) - \[getblock\](https://docs.xverse.app/api/bitcoin/bitcoin-json-rpc/getblock.md) - \[getblockchaininfo\](https://docs.xverse.app/api/bitcoin/bitcoin-json-rpc/getblockchaininfo.md) - \[getblockcount\](https://docs.xverse.app/api/bitcoin/bitcoin-json-rpc/getblockcount.md) - \[getblockfilter\](https://docs.xverse.app/api/bitcoin/bitcoin-json-rpc/getblockfilter.md) - \[getblockhash\](https://docs.xverse.app/api/bitcoin/bitcoin-json-rpc/getblockhash-1.md) - \[getblockheader\](https://docs.xverse.app/api/bitcoin/bitcoin-json-rpc/getblockheader.md) - \[getblockstats\](https://docs.xverse.app/api/bitcoin/bitcoin-json-rpc/getblockstats.md) - \[getchaintips\](https://docs.xverse.app/api/bitcoin/bitcoin-json-rpc/getchaintips.md) - \[getchaintxstats\](https://docs.xverse.app/api/bitcoin/bitcoin-json-rpc/getchaintxstats.md) - \[getdifficulty\](https://docs.xverse.app/api/bitcoin/bitcoin-json-rpc/getdifficulty.md) - \[getmempoolancestors\](https://docs.xverse.app/api/bitcoin/bitcoin-json-rpc/getmempoolancestors.md) - \[getmempooldescendants\](https://docs.xverse.app/api/bitcoin/bitcoin-json-rpc/getmempooldescendants.md) - \[getmempoolentry\](https://docs.xverse.app/api/bitcoin/bitcoin-json-rpc/getmempoolentry.md) - \[getmempoolinfo\](https://docs.xverse.app/api/bitcoin/bitcoin-json-rpc/getmempoolinfo.md) - \[getrawmempool\](https://docs.xverse.app/api/bitcoin/bitcoin-json-rpc/getrawmempool.md) - \[gettxout\](https://docs.xverse.app/api/bitcoin/bitcoin-json-rpc/gettxout.md) - \[gettxoutproof\](https://docs.xverse.app/api/bitcoin/bitcoin-json-rpc/gettxoutproof.md) - \[createrawtransaction\](https://docs.xverse.app/api/bitcoin/bitcoin-json-rpc/createrawtransaction.md) - \[decoderawtransaction\](https://docs.xverse.app/api/bitcoin/bitcoin-json-rpc/decoderawtransaction.md) - \[decodescript\](https://docs.xverse.app/api/bitcoin/bitcoin-json-rpc/decodescript.md) - \[getrawtransaction\](https://docs.xverse.app/api/bitcoin/bitcoin-json-rpc/getrawtransaction.md) - \[sendrawtransaction\](https://docs.xverse.app/api/bitcoin/bitcoin-json-rpc/sendrawtransaction.md) - \[testmempoolaccept\](https://docs.xverse.app/api/bitcoin/bitcoin-json-rpc/testmempoolaccept.md) - \[createmultisig\](https://docs.xverse.app/api/bitcoin/bitcoin-json-rpc/createmultisig.md) - \[estimatesmartfee\](https://docs.xverse.app/api/bitcoin/bitcoin-json-rpc/estimatesmartfee.md) - \[validateaddress\](https://docs.xverse.app/api/bitcoin/bitcoin-json-rpc/validateaddress.md) - \[verifymessage\](https://docs.xverse.app/api/bitcoin/bitcoin-json-rpc/verifymessage.md) - \[Bitcoin Price\](https://docs.xverse.app/api/bitcoin/bitcoin-price.md) - \[Portfolio\](https://docs.xverse.app/api/portfolio.md) - \[Register Portfolio Address\](https://docs.xverse.app/api/portfolio/register-portfolio-address.md) - \[List Registered Portfolio Addresses\](https://docs.xverse.app/api/portfolio/list-registered-portfolio-addresses.md) - \[Get Portfolio Address History\](https://docs.xverse.app/api/portfolio/get-portfolio-address-history.md) - \[Watch Addresses\](https://docs.xverse.app/api/watch-addresses.md) - \[Ordinals\](https://docs.xverse.app/api/ordinals.md) - \[Ordinals by Address\](https://docs.xverse.app/api/ordinals/ordinals-by-address.md) - \[UTXOs\](https://docs.xverse.app/api/ordinals/ordinals-by-address/utxos.md) - \[Collections\](https://docs.xverse.app/api/ordinals/ordinals-by-address/collections.md) - \[Inscriptions\](https://docs.xverse.app/api/ordinals/ordinals-by-address/inscriptions.md) - \[Unconfirmed Inscriptions (Mempool)\](https://docs.xverse.app/api/ordinals/ordinals-by-address/unconfirmed-inscriptions-mempool.md) - \[Inscriptions of a Collection\](https://docs.xverse.app/api/ordinals/ordinals-by-address/inscriptions-of-a-collection.md) - \[Void inscriptions\](https://docs.xverse.app/api/ordinals/ordinals-by-address/void-inscriptions.md) - \[Collections\](https://docs.xverse.app/api/ordinals/collections.md) - \[Collection by ID\](https://docs.xverse.app/api/ordinals/collections/collection-by-id.md) - \[Top Collections by Volume\](https://docs.xverse.app/api/ordinals/collections/top-collections-by-volume.md) - \[Collections\](https://docs.xverse.app/api/ordinals/collections/collections.md) - \[Holders by Collection\](https://docs.xverse.app/api/ordinals/collections/holders-by-collection.md) - \[Inscriptions by Collection\](https://docs.xverse.app/api/ordinals/collections/inscriptions-by-collection.md) - \[\\\[v1\\\] Collection Historical Floor Prices\](https://docs.xverse.app/api/ordinals/collections/v1-collection-historical-floor-prices.md) - \[\\\[v2\\\] Collection Historical Floor Prices\](https://docs.xverse.app/api/ordinals/collections/v2-collection-historical-floor-prices.md) - \[Inscriptions\](https://docs.xverse.app/api/ordinals/inscriptions.md) - \[Inscription by ID\](https://docs.xverse.app/api/ordinals/inscriptions/inscription-by-id.md) - \[Inscription Thumbnail\](https://docs.xverse.app/api/ordinals/inscriptions/inscription-thumbnail.md) - \[Inscriptions by IDs\](https://docs.xverse.app/api/ordinals/inscriptions/inscriptions-by-ids.md) - \[Inscription Activity\](https://docs.xverse.app/api/ordinals/inscriptions/inscription-activity.md) - \[Inscription Service\](https://docs.xverse.app/api/ordinals/inscription-service.md) - \[Estimate\](https://docs.xverse.app/api/ordinals/inscription-service/estimate.md) - \[Order\](https://docs.xverse.app/api/ordinals/inscription-service/order.md) - \[Execute\](https://docs.xverse.app/api/ordinals/inscription-service/order/execute.md) - \[Runes\](https://docs.xverse.app/api/runes.md) - \[Runes by Address\](https://docs.xverse.app/api/runes/runes-by-address.md) - \[\\\[v1\\\] Rune Balances\](https://docs.xverse.app/api/runes/runes-by-address/v1-rune-balances.md) - \[\\\[v2\\\] Rune Balances (Mempool-Aware)\](https://docs.xverse.app/api/runes/runes-by-address/v2-rune-balances-mempool-aware.md) - \[Rune Activity\](https://docs.xverse.app/api/runes/runes-by-address/rune-activity.md) - \[UTXOs\](https://docs.xverse.app/api/runes/runes-by-address/utxos.md) - \[Rune by ID\](https://docs.xverse.app/api/runes/rune-by-id.md) - \[Runes by IDs\](https://docs.xverse.app/api/runes/runes-by-ids.md) - \[Search Runes\](https://docs.xverse.app/api/runes/search-runes.md) - \[Holders by Rune\](https://docs.xverse.app/api/runes/holders-by-rune.md) - \[Rune Activity\](https://docs.xverse.app/api/runes/rune-activity.md) - \[Top Runes by Volume\](https://docs.xverse.app/api/runes/top-runes-by-volume.md) - \[Runes Top Gainers & Losers\](https://docs.xverse.app/api/runes/runes-top-gainers-and-losers.md) - \[\\\[v1\\\] Runes Historical Prices\](https://docs.xverse.app/api/runes/v1-runes-historical-prices.md) - \[\\\[v2\\\] Runes Historical Prices\](https://docs.xverse.app/api/runes/v2-runes-historical-prices.md) - \[Runes by Blocks\](https://docs.xverse.app/api/runes/runes-by-blocks.md) - \[Get All Rune Transfers by Blocks\](https://docs.xverse.app/api/runes/runes-by-blocks/get-all-rune-transfers-by-blocks.md) - \[Get All Rune Trades by Blocks\](https://docs.xverse.app/api/runes/runes-by-blocks/get-all-rune-trades-by-blocks.md) - \[Decode Runestone\](https://docs.xverse.app/api/runes/decode-runestone.md) - \[Mint Rune\](https://docs.xverse.app/api/runes/mint-rune.md) - \[Estimate Rune Mint Order\](https://docs.xverse.app/api/runes/mint-rune/estimate-rune-mint-order.md) - \[Create Rune Mint Order\](https://docs.xverse.app/api/runes/mint-rune/create-rune-mint-order.md) - \[Execute Rune Mint Order\](https://docs.xverse.app/api/runes/mint-rune/execute-rune-mint-order.md) - \[Monitor Rune Mint Order\](https://docs.xverse.app/api/runes/mint-rune/monitor-rune-mint-order.md) - \[List Rune Mint Orders\](https://docs.xverse.app/api/runes/mint-rune/list-rune-mint-orders.md) - \[Etch Rune\](https://docs.xverse.app/api/runes/etch-rune.md) - \[Validate Rune Name\](https://docs.xverse.app/api/runes/etch-rune/validate-rune-name.md) - \[Estimate Rune Etch Order\](https://docs.xverse.app/api/runes/etch-rune/estimate-rune-etch-order.md) - \[Create Rune Etch Order\](https://docs.xverse.app/api/runes/etch-rune/create-rune-etch-order.md) - \[Execute Rune Etch Order\](https://docs.xverse.app/api/runes/etch-rune/execute-rune-etch-order.md) - \[Monitor Rune Etch Order\](https://docs.xverse.app/api/runes/etch-rune/monitor-rune-etch-order.md) - \[List Rune Etch Orders\](https://docs.xverse.app/api/runes/etch-rune/list-rune-etch-orders.md) - \[BRC-20\](https://docs.xverse.app/api/brc-20.md) - \[BRC-20 by Address\](https://docs.xverse.app/api/brc-20/brc-20-by-address.md) - \[BRC-20 balances\](https://docs.xverse.app/api/brc-20/brc-20-by-address/brc-20-balances.md) - \[BRC-20 transaction history\](https://docs.xverse.app/api/brc-20/brc-20-by-address/brc-20-transaction-history.md) - \[BRC-20 Activity\](https://docs.xverse.app/api/brc-20/brc-20-by-address/brc-20-activity.md) - \[Unspent BRC-20 Transfers\](https://docs.xverse.app/api/brc-20/brc-20-by-address/unspent-brc-20-transfers.md) - \[Void inscriptions (spent BRC-20 transfers)\](https://docs.xverse.app/api/brc-20/brc-20-by-address/void-inscriptions-spent-brc-20-transfers.md) - \[BRC-20 by Ticker\](https://docs.xverse.app/api/brc-20/brc-20-by-ticker.md) - \[BRC-20s by Tickers\](https://docs.xverse.app/api/brc-20/brc-20s-by-tickers.md) - \[BRC-20 Transfer Validity Check\](https://docs.xverse.app/api/brc-20/brc-20-transfer-validity-check.md) - \[Mint BRC-20\](https://docs.xverse.app/api/brc-20/mint-brc-20.md) - \[Estimate\](https://docs.xverse.app/api/brc-20/mint-brc-20/estimate.md) - \[Order\](https://docs.xverse.app/api/brc-20/mint-brc-20/order.md) - \[Execute\](https://docs.xverse.app/api/brc-20/mint-brc-20/order/execute.md) - \[Deploy BRC-20\](https://docs.xverse.app/api/brc-20/deploy-brc-20.md) - \[Estimate\](https://docs.xverse.app/api/brc-20/deploy-brc-20/estimate.md) - \[Order\](https://docs.xverse.app/api/brc-20/deploy-brc-20/order.md) - \[Execute\](https://docs.xverse.app/api/brc-20/deploy-brc-20/order/execute.md) - \[Spark\](https://docs.xverse.app/api/spark.md) - \[Address\](https://docs.xverse.app/api/spark/address.md) - \[Spark Balances\](https://docs.xverse.app/api/spark/address/spark-balances.md) - \[Spark Transaction History\](https://docs.xverse.app/api/spark/address/spark-transaction-history.md) - \[Spark Address Summary\](https://docs.xverse.app/api/spark/address/spark-address-summary.md) - \[Transactions\](https://docs.xverse.app/api/spark/transactions.md) - \[Spark Transaction Details\](https://docs.xverse.app/api/spark/transactions/spark-transaction-details.md) - \[Latest Spark Transactions\](https://docs.xverse.app/api/spark/transactions/latest-spark-transactions.md): This endpoint returns the most recent Spark transactions of all types, sorted by timestamp. - \[BTKN Tokens\](https://docs.xverse.app/api/spark/btkn-tokens.md) - \[BTKN Token by ID\](https://docs.xverse.app/api/spark/btkn-tokens/btkn-token-by-id.md) - \[BTKN Tokens by IDs (Batch)\](https://docs.xverse.app/api/spark/btkn-tokens/btkn-tokens-by-ids-batch.md) - \[BTKN Token by Pubkey/Address or Search BTKN\](https://docs.xverse.app/api/spark/btkn-tokens/btkn-token-by-pubkey-address-or-search-btkn.md) - \[BTKN Tokens by Pubkey/Address\](https://docs.xverse.app/api/spark/btkn-tokens/btkn-tokens-by-pubkey-address.md) - \[BTKN Token Transactions\](https://docs.xverse.app/api/spark/btkn-tokens/btkn-token-transactions.md) - \[Holders by BTKN Token\](https://docs.xverse.app/api/spark/btkn-tokens/holders-by-btkn-token.md) - \[BTKN Token Rankings\](https://docs.xverse.app/api/spark/btkn-tokens/btkn-token-rankings.md) - \[Swaps\](https://docs.xverse.app/api/swaps.md) - \[Get destination tokens\](https://docs.xverse.app/api/swaps/get-destination-tokens.md) - \[Get quotes\](https://docs.xverse.app/api/swaps/get-quotes.md) - \[Runes Swaps\](https://docs.xverse.app/api/swaps/runes-swaps.md) - \[Place order\](https://docs.xverse.app/api/swaps/runes-swaps/place-order.md) - \[Execute order\](https://docs.xverse.app/api/swaps/runes-swaps/execute-order.md) - \[UTXO Listings\](https://docs.xverse.app/api/swaps/utxo-listings.md) - \[Get utxos\](https://docs.xverse.app/api/swaps/utxo-listings/get-utxos.md) - \[Place order\](https://docs.xverse.app/api/swaps/utxo-listings/place-order.md) - \[Execute order\](https://docs.xverse.app/api/swaps/utxo-listings/execute-order.md) - \[Stacks Swaps\](https://docs.xverse.app/api/swaps/stacks-swaps.md) - \[Place order\](https://docs.xverse.app/api/swaps/stacks-swaps/place-order.md) - \[Execute order\](https://docs.xverse.app/api/swaps/stacks-swaps/execute-order.md) - \[Crosschain Swaps\](https://docs.xverse.app/api/swaps/crosschain-swaps.md) - \[Place order\](https://docs.xverse.app/api/swaps/crosschain-swaps/place-order.md) ## Sats Connect - \[Sats Connect\](https://docs.xverse.app/sats-connect/sats-connect.md) - \[🤖 AI agent integration\](https://docs.xverse.app/sats-connect/ai-agent-integration.md) - \[Wallet Providers\](https://docs.xverse.app/sats-connect/wallet-providers.md) - \[getInfo\](https://docs.xverse.app/sats-connect/wallet-providers/getinfo.md) - \[getProviders & getProviderById\](https://docs.xverse.app/sats-connect/wallet-providers/getproviders-and-getproviderbyid.md) - \[Connecting to the wallet\](https://docs.xverse.app/sats-connect/connecting-to-the-wallet.md) - \[Connect to Xverse Wallet\](https://docs.xverse.app/sats-connect/connecting-to-the-wallet/connect-to-xverse-wallet.md) - \[Disconnect from Xverse Wallet\](https://docs.xverse.app/sats-connect/connecting-to-the-wallet/disconnect-from-xverse-wallet.md) - \[Connect to other wallets\](https://docs.xverse.app/sats-connect/connecting-to-the-wallet/connect-to-other-wallets.md) - \[Manage a user's default wallet\](https://docs.xverse.app/sats-connect/connecting-to-the-wallet/connect-to-other-wallets/manage-a-users-default-wallet.md) - \[\\\[Legacy ⚠️\\\] getAccounts\](https://docs.xverse.app/sats-connect/connecting-to-the-wallet/legacy-getaccounts.md) - \[Wallet Methods\](https://docs.xverse.app/sats-connect/wallet-methods.md) - \[request methods\](https://docs.xverse.app/sats-connect/wallet-methods/request-methods.md) - \[wallet\\\_getAccount\](https://docs.xverse.app/sats-connect/wallet-methods/wallet\_getaccount.md) - \[wallet\\\_getNetwork\](https://docs.xverse.app/sats-connect/wallet-methods/wallet\_getnetwork.md): Get the network the wallet is currently connected to - \[wallet\\\_changeNetwork\](https://docs.xverse.app/sats-connect/wallet-methods/wallet\_changenetwork.md): Switch the selected network within the wallet. - \[wallet\\\_addNetwork\](https://docs.xverse.app/sats-connect/wallet-methods/wallet\_addnetwork.md) - \[wallet\\\_open\](https://docs.xverse.app/sats-connect/wallet-methods/wallet\_open.md) - \[wallet\\\_openReceive\](https://docs.xverse.app/sats-connect/wallet-methods/wallet\_open/wallet\_openreceive.md) - \[wallet\\\_openBuy\](https://docs.xverse.app/sats-connect/wallet-methods/wallet\_open/wallet\_openbuy.md) - \[wallet\\\_openBridge\](https://docs.xverse.app/sats-connect/wallet-methods/wallet\_open/wallet\_openbridge.md) - \[wallet\\\_openEarn\](https://docs.xverse.app/sats-connect/wallet-methods/wallet\_open/wallet\_openearn.md) - \[Xverse Custom Methods\](https://docs.xverse.app/sats-connect/wallet-methods/xverse-custom-methods.md) - \[Xverse Wallet Permissions\](https://docs.xverse.app/sats-connect/xverse-wallet-permissions.md) - \[Xverse Wallet events\](https://docs.xverse.app/sats-connect/xverse-wallet-events.md): How apps can respond to user actions using wallet events - \[getAddresses\](https://docs.xverse.app/sats-connect/bitcoin-methods/getaddresses.md) - \[getBalance\](https://docs.xverse.app/sats-connect/bitcoin-methods/getbalance.md) - \[signPsbt\](https://docs.xverse.app/sats-connect/bitcoin-methods/signpsbt.md) - \[signMultipleTransactions\](https://docs.xverse.app/sats-connect/bitcoin-methods/signmultipletransactions.md) - \[sendTransfer\](https://docs.xverse.app/sats-connect/bitcoin-methods/sendtransfer.md) - \[signMessage\](https://docs.xverse.app/sats-connect/bitcoin-methods/signmessage.md) - \[signMultipleMessages\](https://docs.xverse.app/sats-connect/bitcoin-methods/signmultiplemessages.md) - \[createInscription\](https://docs.xverse.app/sats-connect/bitcoin-methods/createinscription.md) - \[createRepeatInscriptions\](https://docs.xverse.app/sats-connect/bitcoin-methods/createrepeatinscriptions.md) - \[ord\\\_getInscriptions\](https://docs.xverse.app/sats-connect/bitcoin-methods/ord\_getinscriptions.md) - \[ord\\\_sendInscriptions\](https://docs.xverse.app/sats-connect/bitcoin-methods/ord\_sendinscriptions.md) - \[runes\\\_getBalance\](https://docs.xverse.app/sats-connect/bitcoin-methods/runes\_getbalance.md) - \[runes\\\_transfer\](https://docs.xverse.app/sats-connect/bitcoin-methods/runes\_transfer.md) - \[Mint Runes\](https://docs.xverse.app/sats-connect/bitcoin-methods/mint-runes.md) - \[runes\\\_estimateMint\](https://docs.xverse.app/sats-connect/bitcoin-methods/mint-runes/runes\_estimatemint.md) - \[runes\\\_mint\](https://docs.xverse.app/sats-connect/bitcoin-methods/mint-runes/runes\_mint.md) - \[Etch Runes\](https://docs.xverse.app/sats-connect/bitcoin-methods/etch-runes.md) - \[runes\\\_estimateEtch\](https://docs.xverse.app/sats-connect/bitcoin-methods/etch-runes/runes\_estimateetch.md) - \[runes\\\_etch\](https://docs.xverse.app/sats-connect/bitcoin-methods/etch-runes/runes\_etch.md) - \[runes\\\_getOrder\](https://docs.xverse.app/sats-connect/bitcoin-methods/runes\_getorder.md) - \[Speed up a Rune Mint or Etch order\](https://docs.xverse.app/sats-connect/bitcoin-methods/speed-up-a-rune-mint-or-etch-order.md) - \[runes\\\_estimateRbfOrder\](https://docs.xverse.app/sats-connect/bitcoin-methods/speed-up-a-rune-mint-or-etch-order/runes\_estimaterbforder.md) - \[runes\\\_rbfOrder\](https://docs.xverse.app/sats-connect/bitcoin-methods/speed-up-a-rune-mint-or-etch-order/runes\_rbforder.md) - \[stx\\\_getAccounts\](https://docs.xverse.app/sats-connect/stacks-methods/stx\_getaccounts.md) - \[stx\\\_signMessage\](https://docs.xverse.app/sats-connect/stacks-methods/stx\_signmessage.md) - \[stx\\\_signStructuredMessage\](https://docs.xverse.app/sats-connect/stacks-methods/stx\_signstructuredmessage.md) - \[stx\\\_transferStx\](https://docs.xverse.app/sats-connect/stacks-methods/stx\_transferstx.md) - \[stx\\\_signTransaction\](https://docs.xverse.app/sats-connect/stacks-methods/stx\_signtransaction.md) - \[stx\\\_callContract\](https://docs.xverse.app/sats-connect/stacks-methods/stx\_callcontract.md) - \[stx\\\_deployContract\](https://docs.xverse.app/sats-connect/stacks-methods/stx\_deploycontract.md) - \[spark\\\_getAddress\](https://docs.xverse.app/sats-connect/spark-methods/spark\_getaddress.md) - \[spark\\\_getBalance\](https://docs.xverse.app/sats-connect/spark-methods/spark\_getbalance.md) - \[spark\\\_transfer\](https://docs.xverse.app/sats-connect/spark-methods/spark\_transfer.md) - \[spark\\\_transferToken\](https://docs.xverse.app/sats-connect/spark-methods/spark\_transfertoken.md) - \[spark\\\_signMessage\](https://docs.xverse.app/sats-connect/spark-methods/spark\_signmessage.md) - \[Flashnet Trading\](https://docs.xverse.app/sats-connect/spark-methods/flashnet-trading.md) - \[spark\\\_flashnet\\\_getJWT\](https://docs.xverse.app/sats-connect/spark-methods/flashnet-trading/spark\_flashnet\_getjwt.md) - \[spark\\\_flashnet\\\_signIntent\](https://docs.xverse.app/sats-connect/spark-methods/flashnet-trading/spark\_flashnet\_signintent.md) - \[spark\\\_flashnet\\\_signStructuredMessage\](https://docs.xverse.app/sats-connect/spark-methods/flashnet-trading/spark\_flashnet\_signstructuredmessage.md) - \[spark\\\_flashnet\\\_executeSwap\](https://docs.xverse.app/sats-connect/spark-methods/flashnet-trading/spark\_flashnet\_executeswap.md) - \[spark\\\_flashnet\\\_executeRouteSwap\](https://docs.xverse.app/sats-connect/spark-methods/flashnet-trading/spark\_flashnet\_executerouteswap.md) - \[spark\\\_flashnet\\\_createCPPool\](https://docs.xverse.app/sats-connect/spark-methods/flashnet-trading/spark\_flashnet\_createcppool.md) - \[spark\\\_flashnet\\\_createBondingPool\](https://docs.xverse.app/sats-connect/spark-methods/flashnet-trading/spark\_flashnet\_createbondingpool.md) - \[spark\\\_flashnet\\\_confirmInitialDeposit\](https://docs.xverse.app/sats-connect/spark-methods/flashnet-trading/spark\_flashnet\_confirminitialdeposit.md) - \[spark\\\_flashnet\\\_addLiquidity\](https://docs.xverse.app/sats-connect/spark-methods/flashnet-trading/spark\_flashnet\_addliquidity.md) - \[spark\\\_flashnet\\\_removeLiquidity\](https://docs.xverse.app/sats-connect/spark-methods/flashnet-trading/spark\_flashnet\_removeliquidity.md) - \[spark\\\_flashnet\\\_getClawbackEligibleTransfers\](https://docs.xverse.app/sats-connect/spark-methods/flashnet-trading/spark\_flashnet\_getclawbackeligibletransfers.md) - \[spark\\\_flashnet\\\_clawbackFunds\](https://docs.xverse.app/sats-connect/spark-methods/flashnet-trading/spark\_flashnet\_clawbackfunds.md) - \[Spark BTKN Airdrops\](https://docs.xverse.app/sats-connect/spark-methods/spark-btkn-airdrops.md) - \[Verify Bitcoin message signatures\](https://docs.xverse.app/sats-connect/guides/verify-bitcoin-message-signatures.md) - \[Creating Bitcoin PSBTs\](https://docs.xverse.app/sats-connect/guides/creating-bitcoin-psbts.md) - \[Mobile Integration\](https://docs.xverse.app/sats-connect/guides/mobile-integration.md) - \[Next.js support\](https://docs.xverse.app/sats-connect/guides/next.js-support.md): Sats Connect is meant to be run client-side only. When using Next.js, import \\\`sats-connect\\\` dynamically: ## Xverse Agent Wallet - \[Xverse Agent Wallet\](https://docs.xverse.app/xverse-agentic-wallet/xverse-agent-wallet.md) - \[Getting Started\](https://docs.xverse.app/xverse-agentic-wallet/getting-started.md) - \[Agent Mode\](https://docs.xverse.app/xverse-agentic-wallet/agent-mode.md) - \[Bitcoin\](https://docs.xverse.app/xverse-agentic-wallet/capabilities/bitcoin.md) - \[Spark and Lightning\](https://docs.xverse.app/xverse-agentic-wallet/capabilities/spark-and-lightning.md) - \[Starknet\](https://docs.xverse.app/xverse-agentic-wallet/capabilities/starknet.md) - \[Stacks\](https://docs.xverse.app/xverse-agentic-wallet/capabilities/stacks.md) - \[Portfolio & Treasury\](https://docs.xverse.app/xverse-agentic-wallet/capabilities/portfolio-and-treasury.md) - \[Swaps\](https://docs.xverse.app/xverse-agentic-wallet/capabilities/swaps.md) - \[Runes\](https://docs.xverse.app/xverse-agentic-wallet/capabilities/runes.md) - \[Agentic Lightning Commerce\](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-lightning-commerce.md) - \[Agentic Flashnet Trading\](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-flashnet-trading.md) - \[Agentic Starknet Trading\](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-starknet-trading.md) --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on a page URL with the \`ask\` query parameter: \`\`\` GET https://docs.xverse.app/readme.md?ask= \`\`\` 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. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs.xverse.app/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs.xverse.app/xverse-agentic-wallet/xverse-agent-wallet.md). # Xverse Agent Wallet ## \*\*The first Bitcoin-native wallet built for AI agents.\*\* Xverse Agent Wallet is a headless, developer-first wallet that gives AI agents the ability to hold, send, receive, swap, and trade assets across Bitcoin and its layer 2s — without a browser extension, without a UI, and without human intervention. Agentic wallets are emerging across EVM and Solana ecosystems. Bitcoin has been left behind. Xverse fills that gap — with native support for Bitcoin L1, Spark (Lightning), Starknet, and Stacks from day one. ### ⚡ What makes it different Xverse Agent Wallet isn't an embedded wallet with an agent wrapper. It's purpose-built infrastructure for autonomous Bitcoin operations: \* \*\*Bitcoin-native\*\* — built on the same \`xverse-core\` that powers the Xverse wallet used by millions. Same derivation paths, same transaction builders, same vault encryption. \* \*\*Multi-chain from birth\*\* — your agent can hold BTC, trade on Starknet DEXes (AVNU), swap on Flashnet (Spark), pay Lightning invoices, and manage Runes — all from one wallet. \* \*\*Headless CLI\*\* — no browser, no popups. Every operation is a CLI command with \`--json\` output. Built for scripts, bots, and AI agent frameworks. \* \*\*Machine-payable APIs\*\* — built-in support for the Machine Payments Protocol (MPP). Your agent can call paid APIs and settle over Lightning automatically — no checkout flows, no human approval. \* \*\*Self-custodial\*\* — the agent owns its keys. The vault is encrypted at rest with a passphrase from an environment variable, compatible with any secret manager. ### 🚀 What your agent can do #### 💲 Agentic Payments Pay and get paid on Lightning rails via Spark. Sub-cent fees, sub-second settlement. Your agent can create invoices, pay invoices, and call MPP-enabled APIs that settle over Lightning automatically. #### 📈 Agentic Trading Execute spot trades across integrated DEXes — AVNU on Starknet, Flashnet on Spark, Dotswap and Sats Terminal for Runes. Quote, compare, and execute from the command line. #### 🏦 Treasury Management Sweep profits to cold BTC storage, rebalance between stables and BTC, harvest staking rewards, and manage funds across hot wallets and cold vaults. #### 📊 Portfolio Intelligence Query balances across all chains, scan multiple accounts, and monitor your full asset allocation — Bitcoin, Starknet, Spark, Stacks, Runes, stablecoins, and staking positions — in a single command. ### 🏗️ Architecture \`\`\` ┌──────────────────────────────────────┐ │ AI Agent (any framework) │ │ ┌──────────────────────────────┐ │ │ │ xverse-wallet CLI │ │ │ │ (wraps xverse-core) │ │ │ │ │ │ │ │ • Wallet creation & vault │ │ │ │ • Balance retrieval │ │ │ │ • Sign & broadcast txns │ │ ┌──────────────┐ │ │ • BTC / Spark / Starknet / │────┼────▶│ Blockchain │ │ │ Stacks / Runes / LN │ │ │ Networks │ │ └──────────────────────────────┘ │ └──────────────┘ └──────────────────────────────────────┘ \`\`\` The CLI wraps \`xverse-core\` directly — the same library that powers the Xverse browser extension and mobile app. If something works in the CLI, it works everywhere. ### 📦 Install \`\`\`bash npx @secretkeylabs/xverse-agent-wallet --install \`\`\` ### ⚡ Quickstart Run the command in your terminal to start Claude Code with wallet access. It will handle wallet setup and password authentication automatically. \`\`\`bash xverse-wallet agent \`\`\` For other AI agents, use: \`\`\`bash xverse-wallet agent --agent \`\`\` From here, explore the capabilities your agent needs: | I want to... | Start here | | ----------------------------------- | ------------------------------------------------------------------------------------- | | Pay or receive on Lightning | \[Spark & Lightning\](/xverse-agentic-wallet/capabilities/spark-and-lightning.md) | | Call paid APIs over Lightning | \[Machine Payments (MPP)\](/xverse-agentic-wallet/guides/agentic-lightning-commerce.md) | | Trade on Starknet DEXes | \[Starknet Trading Guide\](/xverse-agentic-wallet/guides/agentic-starknet-trading.md) | | Trade on Flashnet (Spark) | \[Flashnet Trading Guide\](/xverse-agentic-wallet/guides/agentic-flashnet-trading.md) | | Manage balances across all chains | \[Portfolio & Treasury\](/xverse-agentic-wallet/capabilities/portfolio-and-treasury.md) | | Swap between any assets/chains | \[Swaps\](/xverse-agentic-wallet/capabilities/swaps.md) | | Manage and send Runes on Bitcoin L1 | \[Runes\](/xverse-agentic-wallet/capabilities/runes.md) | ### 🤝 Join the community Building with the Xverse Agent Wallet? Join our \[developer forum\](https://discord.gg/tN84HhSDrz) to connect with the team and other builders. --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## 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, and the optional \`goal\` query parameter: \`\`\` GET https://docs.xverse.app/xverse-agentic-wallet/xverse-agent-wallet.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. 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. --- # Getting Started | Xverse Agent Wallet | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/xverse-agentic-wallet/getting-started.md) . This page walks you through installing the Xverse Agent Wallet CLI, creating your first wallet, and understanding the core concepts you'll need for everything else. ### Prerequisites[](https://docs.xverse.app/xverse-agentic-wallet/getting-started#prerequisites) * **Node.js** 18+ installed * A terminal (the CLI is headless — no browser or GUI required) ### Install[](https://docs.xverse.app/xverse-agentic-wallet/getting-started#install) Copy npx @secretkeylabs/xverse-agent-wallet --install This installs the CLI globally and drops a Claude Code skill into `~/.claude/skills/xverse-agent-wallet/SKILL.md` that teaches AI agents how to operate every command. Verify the installation: Copy xverse-wallet --help ### Two ways to run[](https://docs.xverse.app/xverse-agentic-wallet/getting-started#two-ways-to-run) There are two ways to use the wallet: Mode Command Best for **Agent mode** `xverse-wallet agent` Letting Claude Code (or another AI agent) run the wallet for you. Handles wallet setup and auth automatically. **Direct mode** `xverse-wallet ` Running CLI commands yourself, in scripts, or from a custom agent framework. For agent mode, see [Agent Mode](https://claude.ai/chat/agent-mode.md) . For everything else, keep reading. ### Authentication[](https://docs.xverse.app/xverse-agentic-wallet/getting-started#authentication) The CLI encrypts your wallet vault at rest using a passphrase provided via environment variable. Set it before any direct-mode wallet operation: This pattern is compatible with any secret manager (AWS Secrets Manager, HashiCorp Vault, 1Password CLI, etc.). > Your password is the only thing protecting your funds. Use a strong, unique one. ### Create a wallet[](https://docs.xverse.app/xverse-agentic-wallet/getting-started#create-a-wallet) This generates a new BIP-39 mnemonic, encrypts it into a local vault, and derives your first account (account 0) with addresses for all supported chains. To display the mnemonic (for backup): To restore an existing wallet: > **Tip:** The leading space before the command prevents the mnemonic from being saved in shell history. ### Check your wallet[](https://docs.xverse.app/xverse-agentic-wallet/getting-started#check-your-wallet) ### Output modes[](https://docs.xverse.app/xverse-agentic-wallet/getting-started#output-modes) Every command supports three output modes: Flag Output Use when... _(default)_ Human-readable tables You're exploring interactively `--json` Structured JSON Your agent parses the output `-q`/`--quiet` Single value (e.g. just an address or txid) You need one value for piping **Always use** `**--json**` **when your agent needs to parse the output programmatically.** ### Profiles and accounts[](https://docs.xverse.app/xverse-agentic-wallet/getting-started#profiles-and-accounts) The CLI supports two levels of organization: **Profiles** are independent wallets — each has its own mnemonic, vault, and set of accounts. Use profiles to manage separate wallets (e.g. `default`, `trading`, `savings`). **Accounts** are BIP-44 derived addresses within a single wallet. Account 0 is created automatically. You can derive more: #### Switching vs. on-demand[](https://docs.xverse.app/xverse-agentic-wallet/getting-started#switching-vs.-on-demand) You can either **switch** the active profile/account (persistent) or target one **on-demand** (one-off): Use on-demand (`-a`, `-p`) for quick queries. Use switching when you want all subsequent commands to target a specific context. #### Creating a new profile[](https://docs.xverse.app/xverse-agentic-wallet/getting-started#creating-a-new-profile) ### Transaction safety: dry-run by default[](https://docs.xverse.app/xverse-agentic-wallet/getting-started#transaction-safety-dry-run-by-default) All commands that modify state (`send`, `swap execute`, `spark deposit`, etc.) support a dry-run pattern: * **Without** `**--yes**`: the command shows a preview and returns `"dryRun": true` in JSON mode. Nothing is broadcast. * **With** `**--yes**`: the transaction is signed and broadcast. **Always preview first, then confirm.** If you're building an agent, have it show the preview to the user (or log it) before adding `--yes`. ### Fund your wallet[](https://docs.xverse.app/xverse-agentic-wallet/getting-started#fund-your-wallet) Once created, your wallet is empty. Fund it in one of these ways: **Buy with fiat** (easiest — opens a checkout page in your browser): Supports BTC, STX, WBTC, STRK, and USDC. Most providers require a $20+ minimum. **Receive from another wallet:** Send BTC to the `native` address from any exchange or wallet. **Check your balances:** ### Next steps[](https://docs.xverse.app/xverse-agentic-wallet/getting-started#next-steps) With your wallet created and funded, explore the capabilities: 🚀 Getting Started[](https://docs.xverse.app/xverse-agentic-wallet/getting-started#getting-started) ---------------------------------------------------------------------------------------------------- This page walks you through installing the Xverse Agent Wallet CLI, creating your first wallet, and understanding the core concepts you'll need for everything else. ### Prerequisites[](https://docs.xverse.app/xverse-agentic-wallet/getting-started#prerequisites-1) * **Node.js** 18+ installed * A terminal (the CLI is headless — no browser or GUI required) ### Install[](https://docs.xverse.app/xverse-agentic-wallet/getting-started#install-1) This installs the CLI globally and drops a Claude Code skill into `~/.claude/skills/xverse-agent-wallet/SKILL.md` that teaches AI agents how to operate every command. Verify the installation: ### Two ways to run[](https://docs.xverse.app/xverse-agentic-wallet/getting-started#two-ways-to-run-1) There are two ways to use the wallet: Mode Command Best for **Agent mode** `xverse-wallet agent` Letting Claude Code (or another AI agent) run the wallet for you. Handles wallet setup and auth automatically. **Direct mode** `xverse-wallet ` Running CLI commands yourself, in scripts, or from a custom agent framework. For agent mode, see [Agent Mode](https://claude.ai/chat/agent-mode.md) . For everything else, keep reading. ### Authentication[](https://docs.xverse.app/xverse-agentic-wallet/getting-started#authentication-1) The CLI encrypts your wallet vault at rest using a passphrase provided via environment variable. Set it before any direct-mode wallet operation: This pattern is compatible with any secret manager (AWS Secrets Manager, HashiCorp Vault, 1Password CLI, etc.). > Your password is the only thing protecting your funds. Use a strong, unique one. ### Create a wallet[](https://docs.xverse.app/xverse-agentic-wallet/getting-started#create-a-wallet-1) This generates a new BIP-39 mnemonic, encrypts it into a local vault, and derives your first account (account 0) with addresses for all supported chains. To display the mnemonic (for backup): To restore an existing wallet: > **Tip:** The leading space before the command prevents the mnemonic from being saved in shell history. ### Check your wallet[](https://docs.xverse.app/xverse-agentic-wallet/getting-started#check-your-wallet-1) ### Output modes[](https://docs.xverse.app/xverse-agentic-wallet/getting-started#output-modes-1) Every command supports three output modes: Flag Output Use when... _(default)_ Human-readable tables You're exploring interactively `--json` Structured JSON Your agent parses the output `-q`/`--quiet` Single value (e.g. just an address or txid) You need one value for piping **Always use** `**--json**` **when your agent needs to parse the output programmatically.** ### Profiles and accounts[](https://docs.xverse.app/xverse-agentic-wallet/getting-started#profiles-and-accounts-1) The CLI supports two levels of organization: **Profiles** are independent wallets — each has its own mnemonic, vault, and set of accounts. Use profiles to manage separate wallets (e.g. `default`, `trading`, `savings`). **Accounts** are BIP-44 derived addresses within a single wallet. Account 0 is created automatically. You can derive more: #### Switching vs. on-demand[](https://docs.xverse.app/xverse-agentic-wallet/getting-started#switching-vs.-on-demand-1) You can either **switch** the active profile/account (persistent) or target one **on-demand** (one-off): Use on-demand (`-a`, `-p`) for quick queries. Use switching when you want all subsequent commands to target a specific context. #### Creating a new profile[](https://docs.xverse.app/xverse-agentic-wallet/getting-started#creating-a-new-profile-1) ### Transaction safety: dry-run by default[](https://docs.xverse.app/xverse-agentic-wallet/getting-started#transaction-safety-dry-run-by-default-1) All commands that modify state (`send`, `swap execute`, `spark deposit`, etc.) support a dry-run pattern: * **Without** `**--yes**`: the command shows a preview and returns `"dryRun": true` in JSON mode. Nothing is broadcast. * **With** `**--yes**`: the transaction is signed and broadcast. **Always preview first, then confirm.** If you're building an agent, have it show the preview to the user (or log it) before adding `--yes`. ### Fund your wallet[](https://docs.xverse.app/xverse-agentic-wallet/getting-started#fund-your-wallet-1) Once created, your wallet is empty. Fund it in one of these ways: **Buy with fiat** (easiest — opens a checkout page in your browser): Supports BTC, STX, WBTC, STRK, and USDC. Most providers require a $20+ minimum. **Receive from another wallet:** Send BTC to the `native` address from any exchange or wallet. **Check your balances:** ### Next steps[](https://docs.xverse.app/xverse-agentic-wallet/getting-started#next-steps-1) With your wallet created and funded, explore the capabilities: Capability Page Run with Claude Code [Agent Mode](https://docs.xverse.app/xverse-agentic-wallet/agent-mode) Send and receive BTC on L1 [Bitcoin](https://docs.xverse.app/xverse-agentic-wallet/capabilities/bitcoin) Lightning payments via Spark [Spark & Lightning](https://docs.xverse.app/xverse-agentic-wallet/capabilities/spark-and-lightning) Machine-payable API calls [Machine Payments (MPP)](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-lightning-commerce) Trade on Starknet [Starknet](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-starknet-trading) Swap across chains [Swaps](https://docs.xverse.app/xverse-agentic-wallet/capabilities/swaps) Full portfolio overview [Portfolio & Treasury](https://docs.xverse.app/xverse-agentic-wallet/capabilities/portfolio-and-treasury) [PreviousXverse Agent Wallet](https://docs.xverse.app/xverse-agentic-wallet) [NextAgent Mode](https://docs.xverse.app/xverse-agentic-wallet/agent-mode) Last updated 5 months ago * [Prerequisites](https://docs.xverse.app/xverse-agentic-wallet/getting-started#prerequisites) * [Install](https://docs.xverse.app/xverse-agentic-wallet/getting-started#install) * [Two ways to run](https://docs.xverse.app/xverse-agentic-wallet/getting-started#two-ways-to-run) * [Authentication](https://docs.xverse.app/xverse-agentic-wallet/getting-started#authentication) * [Create a wallet](https://docs.xverse.app/xverse-agentic-wallet/getting-started#create-a-wallet) * [Check your wallet](https://docs.xverse.app/xverse-agentic-wallet/getting-started#check-your-wallet) * [Output modes](https://docs.xverse.app/xverse-agentic-wallet/getting-started#output-modes) * [Profiles and accounts](https://docs.xverse.app/xverse-agentic-wallet/getting-started#profiles-and-accounts) * [Transaction safety: dry-run by default](https://docs.xverse.app/xverse-agentic-wallet/getting-started#transaction-safety-dry-run-by-default) * [Fund your wallet](https://docs.xverse.app/xverse-agentic-wallet/getting-started#fund-your-wallet) * [Next steps](https://docs.xverse.app/xverse-agentic-wallet/getting-started#next-steps) * [🚀 Getting Started](https://docs.xverse.app/xverse-agentic-wallet/getting-started#getting-started) * [Prerequisites](https://docs.xverse.app/xverse-agentic-wallet/getting-started#prerequisites-1) * [Install](https://docs.xverse.app/xverse-agentic-wallet/getting-started#install-1) * [Two ways to run](https://docs.xverse.app/xverse-agentic-wallet/getting-started#two-ways-to-run-1) * [Authentication](https://docs.xverse.app/xverse-agentic-wallet/getting-started#authentication-1) * [Create a wallet](https://docs.xverse.app/xverse-agentic-wallet/getting-started#create-a-wallet-1) * [Check your wallet](https://docs.xverse.app/xverse-agentic-wallet/getting-started#check-your-wallet-1) * [Output modes](https://docs.xverse.app/xverse-agentic-wallet/getting-started#output-modes-1) * [Profiles and accounts](https://docs.xverse.app/xverse-agentic-wallet/getting-started#profiles-and-accounts-1) * [Transaction safety: dry-run by default](https://docs.xverse.app/xverse-agentic-wallet/getting-started#transaction-safety-dry-run-by-default-1) * [Fund your wallet](https://docs.xverse.app/xverse-agentic-wallet/getting-started#fund-your-wallet-1) * [Next steps](https://docs.xverse.app/xverse-agentic-wallet/getting-started#next-steps-1) Copy export XVERSE_PASSWORD="your-secure-passphrase" Copy xverse-wallet wallet create --json Copy xverse-wallet wallet create --show-mnemonic --json Copy XVERSE_MNEMONIC="word1 word2 ... word12" xverse-wallet wallet restore --json Copy # Wallet status (no auth needed) xverse-wallet wallet status --json # Current account addresses xverse-wallet account current --json # All accounts xverse-wallet account list --json Copy xverse-wallet account derive --count 3 --json Copy # Persistent — changes default for all subsequent commands xverse-wallet wallet switch trading xverse-wallet account switch 2 # On-demand — one command only, doesn't change the default xverse-wallet -a 2 bitcoin balance --json # different account xverse-wallet -p trading spark balance --json # different profile xverse-wallet -p trading -a 2 bitcoin balance --json # both Copy xverse-wallet wallet switch trading XVERSE_MNEMONIC="word1 word2 ..." xverse-wallet wallet restore xverse-wallet wallet switch default # switch back Copy # Preview (safe) xverse-wallet bitcoin send --to bc1q... --amount 0.001 --json # Execute (irreversible) xverse-wallet bitcoin send --to bc1q... --amount 0.001 --yes --json Copy xverse-wallet fund buy --crypto BTC --amount 100 Copy xverse-wallet bitcoin receive --json Copy xverse-wallet portfolio --accounts 0-4 --json Copy npx @secretkeylabs/xverse-agent-wallet --install Copy xverse-wallet --help Copy export XVERSE_PASSWORD="your-secure-passphrase" Copy xverse-wallet wallet create --json Copy xverse-wallet wallet create --show-mnemonic --json Copy XVERSE_MNEMONIC="word1 word2 ... word12" xverse-wallet wallet restore --json Copy # Wallet status (no auth needed) xverse-wallet wallet status --json # Current account addresses xverse-wallet account current --json # All accounts xverse-wallet account list --json Copy xverse-wallet account derive --count 3 --json Copy # Persistent — changes default for all subsequent commands xverse-wallet wallet switch trading xverse-wallet account switch 2 # On-demand — one command only, doesn't change the default xverse-wallet -a 2 bitcoin balance --json # different account xverse-wallet -p trading spark balance --json # different profile xverse-wallet -p trading -a 2 bitcoin balance --json # both Copy xverse-wallet wallet switch trading XVERSE_MNEMONIC="word1 word2 ..." xverse-wallet wallet restore xverse-wallet wallet switch default # switch back Copy # Preview (safe) xverse-wallet bitcoin send --to bc1q... --amount 0.001 --json # Execute (irreversible) xverse-wallet bitcoin send --to bc1q... --amount 0.001 --yes --json Copy xverse-wallet fund buy --crypto BTC --amount 100 Copy xverse-wallet bitcoin receive --json Copy xverse-wallet portfolio --accounts 0-4 --json --- # Bitcoin | Xverse Agent Wallet | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/xverse-agentic-wallet/capabilities/bitcoin.md) . Send, receive, and manage BTC on Bitcoin L1. ### Check balance[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/bitcoin#check-balance) Copy xverse-wallet bitcoin balance --json Returns `native` (spendable, used for sends and Spark deposits), `taproot` (may be locked by Ordinals/Runes), and `total`. > **Important:** Only the `native` (segwit) balance is spendable for BTC sends and Spark deposits. The `taproot` balance may contain Ordinals or Runes and should not be spent directly. To check balances across multiple accounts: Copy xverse-wallet bitcoin balance --accounts 0-4 --json ### Receive BTC[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/bitcoin#receive-btc) Copy xverse-wallet bitcoin receive --json Returns both your native segwit address (for receiving BTC) and taproot address (for receiving Ordinals). ### Send BTC[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/bitcoin#send-btc) Amount is in BTC (e.g. `0.001` = 100,000 sats). Copy # Preview (dry run) xverse-wallet bitcoin send --to
--amount 0.001 --json # Execute xverse-wallet bitcoin send --to
--amount 0.001 --yes --json #### Options[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/bitcoin#options) Option Description `--to
` Destination Bitcoin address `--amount ` Amount in BTC (e.g. `0.001`) `--fee-rate ` Fee rate in sat/vB (uses recommended if omitted) `--yes` Execute the transaction (omit for dry run) ### Check fee rates[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/bitcoin#check-fee-rates) Returns recommended fee rates (sat/vB) for different confirmation targets. ### Transaction history[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/bitcoin#transaction-history) [PreviousAgent Mode](https://docs.xverse.app/xverse-agentic-wallet/agent-mode) [NextSpark and Lightning](https://docs.xverse.app/xverse-agentic-wallet/capabilities/spark-and-lightning) Last updated 5 months ago * [Check balance](https://docs.xverse.app/xverse-agentic-wallet/capabilities/bitcoin#check-balance) * [Receive BTC](https://docs.xverse.app/xverse-agentic-wallet/capabilities/bitcoin#receive-btc) * [Send BTC](https://docs.xverse.app/xverse-agentic-wallet/capabilities/bitcoin#send-btc) * [Check fee rates](https://docs.xverse.app/xverse-agentic-wallet/capabilities/bitcoin#check-fee-rates) * [Transaction history](https://docs.xverse.app/xverse-agentic-wallet/capabilities/bitcoin#transaction-history) Copy xverse-wallet bitcoin fees --json Copy xverse-wallet bitcoin history --json xverse-wallet bitcoin history --offset 10 --limit 5 --json --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs.xverse.app/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs.xverse.app/api/xverse-api.md). # Xverse API ## ✨ Welcome to the Xverse API Build powerful Bitcoin applications with production-grade APIs used by \[Xverse wallet \](https://www.xverse.app/)— now available to developers. Our suite of APIs provides everything you need to interact with the modern Bitcoin ecosystem: from Ordinals and Runes, to Bitcoin-native swaps, inscriptions, and Bitcoin L2 integrations. Whether you're building wallets, DeFi platforms, NFT marketplaces, or cross-chain bridges, our infrastructure gives you access to reliable, real-time blockchain data and ready-to-use transaction workflows. \*\*\* ## 🚀 Why use the Xverse API? We built these APIs to solve the real infrastructure problems we faced while building the Xverse wallet. Now we’re opening them up so Bitcoin developers can skip the heavy lifting and focus on building. \*\*Your Bitcoin RPC, indexer, and data layer — all in one API.\*\* \*\*With the Xverse API, you get:\*\* \* ⚡ \*\*Ultra-fast Bitcoin RPC\*\* and real-time mempool data — without running your own node \* 🧩 \*\*Advanced indexing\*\* for transaction history, UTXO data, and Bitcoin asset protocols \* 🔲 \*\*Comprehensive Ordinals, Runes & BRC-20 support\*\* — balances, parsing, and transaction data with zero custom indexing \* 💹 \*\*Live & historical market data\*\* for Bitcoin assets: Ordinals, Runes, BRC-20, and Bitcoin L2 tokens \* 💱 \*\*Swap aggregation\*\* across Bitcoin AMMs & L2s (Spark, Stacks, Starknet, BOB, Runes AMMs, BRC-20, etc.) \* 📊 \*\*Portfolio analytics\*\* with real-time activity and daily balance history \* ✍️ \*\*Automated minting, etching & inscription at scale\*\* — simple endpoints that handle high volumes without custom scripts \* 🌉 \*\*Cross-chain swaps & bridging with aggregated liquidity\*\* — one interface to move assets seamlessly across Bitcoin and L2s \* 🤖 ⚡ \*\*Pay-per-request API access via Lightning\*\* — every endpoint accepts payment over the Machine Payments Protocol (MPP) at 1 sat per call. Built for AI agents that don't want to manage API keys. \*\*\* ### 🧰 What’s Inside Our API suite is organized into powerful modules that serve different needs across the Bitcoin ecosystem:
ModuleDescription
🟠 BitcoinBitcoin RPC, real-time and comprehensive Bitcoin mempool & transaction data, advanced indexing of UTXOs & balances, optimised for apps and dashboards.
💹 Portfolio API &
👀 Watch Addresses
Monitor Bitcoin asset balances and activity across multiple addresses, with automatic daily tracking and historical portfolio insights.
🖼️ OrdinalsFetch detailed information on all inscriptions, UTXOs, rare sats — everything you need to power an Ordinals experience.
Automate Ordinal inscriptions with advanced features. Estimate costs, create orders, and track inscription statuses seamlessly.
🔲 RunesQuery Rune balances and detailed information.
Integrate Runes into your apps without building infra.
Mint and etch Runes, with cost estimates, order management and execution.
🪙 BRC-20Query BRC-20 balances and detailed information. Integrate BRC-20 into your apps without building infra.

Mint and deploy BRC-20, with cost estimates, order management and execution.
:sparkle: Spark

Query Spark balances, transactions & activity for Bitcoin & BTKN tokens. Access Flashnet market & trading data.

Integrate Spark & Flashnet into your apps without building infra.

🔄 Swap Aggregator Seamlessly integrate Bitcoin-asset swaps into your application. Aggregate quotes from multiple AMMs across Bitcoin and L2s, generate and execute swap orders, and facilitate cross-chain swaps—all through a unified interface.
\*\*\* ### ⚙️ How It Works All endpoints are \*\*RESTful\*\* and return \*\*JSON\*\* responses. You can use them with your preferred stack — whether you're writing in JavaScript, Python, Rust, or anything else. Authentication, rate limits, and response formats will be covered in the \[Getting Started\](/api/get-started.md) section. Need autonomous, machine-payable access without an API key? See \[MPP Lightning Payments\](/api/mpp-lightning-payments.md). \*\*\* ### 🧑‍💻 Built for Builders This API suite powers real products — including the Xverse wallet and app — and is optimized for scale, speed, and uptime. ✅ \*\*>99% Uptime\*\*\\ ⚡ \*\*Low-latency responses\*\*\\ 🔒 \*\*Secure & production-tested\*\*\\ 📈 \*\*Scalable for any app size\*\* \*\*\* ### 💡 Start Building If you're ready to dive in, check out our \[Getting Started\](/api/get-started.md) guide or \[get your API key\](https://api-dashboard.xverse.app/login) to start exploring endpoints. Looking to integrate specific functionality like portfolio monitoring, swaps or Ordinals support? Each section is fully documented with example requests, response formats, and real-world use cases. --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## 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, and the optional \`goal\` query parameter: \`\`\` GET https://docs.xverse.app/api/xverse-api.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. 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. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs.xverse.app/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs.xverse.app/sats-connect/sats-connect.md). # Sats Connect \[\*\*Sats Connect\*\*\](https://github.com/secretkeylabs/sats-connect) is a simple javascript library that connects apps to \*\*Bitcoin\*\*, \*\*Spark\*\*, \*\*Starknet\*\*, \*\*Stacks\*\*, and other \*\*Bitcoin Layer 2 wallets\*\* like \[\*\*Xverse\*\*\](https://www.xverse.app/). It’s already powering apps across the BitcoinFi ecosystem, with close to \*\*2 million downloads\*\* — making it one of the most widely used ways for developers to integrate Bitcoin wallets today. ## ✨ What you can do with Sats Connect Developers building on Bitcoin and its L2s can use Sats Connect to interact directly with users’ wallets: \* 🔑 \*\*Retrieve wallet addresses\*\* for Bitcoin, Spark, Starknet, Stacks, and more \* ✍️ \*\*Request signatures\*\* of messages for authentication or verification \* 🔗 \*\*Sign & send transactions\*\*: \* Bitcoin PSBTs \* Spark BTC & token transfers \* Starknet & Stacks transfers & contract calls \* :frame\\\_photo::black\\\_square\\\_button:🪙 \*\*Ordinals, Runes & BRC-20\*\*: \* Track balances across assets \* Transfer tokens and inscriptions \* Inscribe sats with arbitrary content, create and mint tokens ### 🛠️ Why Sats Connect? \* \*\*Wallet-first\*\* – every interaction happens directly in the user’s wallet, with explicit approval \* \*\*Bitcoin-native & multi-asset\*\* – supports Bitcoin L1 (BTC, Ordinals, Runes, BRC-20) as well as emerging L2s like Spark, Starknet, and Stacks \* \*\*Comprehensive toolkit\*\* – from simple address retrieval to advanced features like signing PSBTs, transferring Spark tokens, or inscribing Ordinals \* \*\*Battle-tested\*\* – trusted by leading BitcoinFi apps, with close to \*\*2M downloads\*\* and a growing developer ecosystem ## 🚀 Get started To get started, import \`sats-connect\` into your project. \`\`\`sh npm install sats-connect@4.2.x \`\`\` Then request a \[wallet connection \](/sats-connect/connecting-to-the-wallet/connect-to-xverse-wallet.md)— and explore the docs to unlock the full Bitcoin stack: Bitcoin L1, Spark, Starknet, Stacks, and the assets built on top. ## ⚡ Power your Bitcoin apps with plug-and-play infra Sats Connect lets your app connect directly to users’ wallets.\\ The \[Xverse API\](https://docs.xverse.app/api) gives you \*\*plug-and-play access to Bitcoin data and infrastructure\*\* — Ordinals, Runes, mempool, balances, transactions, collections, and more — without running your own nodes or indexers. Together, they remove the heavy lifting so you can focus on building the next generation of Bitcoin apps. ## 🤝 Join the community If you’re building with Sats Connect or Xverse API and need help with integration, join our \[developer forum\](https://discord.gg/tN84HhSDrz) to connect with the community and the Xverse team. --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## 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, and the optional \`goal\` query parameter: \`\`\` GET https://docs.xverse.app/sats-connect/sats-connect.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. 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. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs.xverse.app/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs.xverse.app/xverse-agentic-wallet/capabilities/bitcoin.md). # Bitcoin Send, receive, and manage BTC on Bitcoin L1. ### Check balance \`\`\`bash xverse-wallet bitcoin balance --json \`\`\` Returns \`native\` (spendable, used for sends and Spark deposits), \`taproot\` (may be locked by Ordinals/Runes), and \`total\`. > \*\*Important:\*\* Only the \`native\` (segwit) balance is spendable for BTC sends and Spark deposits. The \`taproot\` balance may contain Ordinals or Runes and should not be spent directly. To check balances across multiple accounts: \`\`\`bash xverse-wallet bitcoin balance --accounts 0-4 --json \`\`\` ### Receive BTC \`\`\`bash xverse-wallet bitcoin receive --json \`\`\` Returns both your native segwit address (for receiving BTC) and taproot address (for receiving Ordinals). ### Send BTC Amount is in BTC (e.g. \`0.001\` = 100,000 sats). \`\`\`bash # Preview (dry run) xverse-wallet bitcoin send --to
--amount 0.001 --json # Execute xverse-wallet bitcoin send --to
--amount 0.001 --yes --json \`\`\` #### Options | Option | Description | | ------------------- | ------------------------------------------------ | | \`--to
\` | Destination Bitcoin address | | \`--amount \` | Amount in BTC (e.g. \`0.001\`) | | \`--fee-rate \` | Fee rate in sat/vB (uses recommended if omitted) | | \`--yes\` | Execute the transaction (omit for dry run) | ### Check fee rates \`\`\`bash xverse-wallet bitcoin fees --json \`\`\` Returns recommended fee rates (sat/vB) for different confirmation targets. ### Transaction history \`\`\`bash xverse-wallet bitcoin history --json xverse-wallet bitcoin history --offset 10 --limit 5 --json \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## 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, and the optional \`goal\` query parameter: \`\`\` GET https://docs.xverse.app/xverse-agentic-wallet/capabilities/bitcoin.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. 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. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs.xverse.app/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs.xverse.app/api/mcp-server.md). # MCP Server The Xverse MCP server provides a standardized interface that allows any compatible AI model or agent to access Bitcoin blockchain data through the Xverse API — including Bitcoin transactions, Ordinals, Runes, BRC-20, Spark, and swap quotes. Connect to the MCP server natively in Claude, Cursor, and other clients, or use the \`mcp-remote\` module for backwards compatibility with clients that do not support remote MCP. The Xverse MCP server is centrally hosted, uses \[Streamable HTTP\](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#streamable-http) transport, and authenticates with your existing Xverse API key. It exposes \*\*54 read-only tools\*\* across Bitcoin, Ordinals, Runes, BRC-20, Spark, and Swaps — with more functionality on the way. \*\*\* ## Setup Instructions ### General The MCP server supports Streamable HTTP transport and authenticates via your Xverse API key passed as a Bearer token: \`\`\` https://mcp.secretkeylabs.io/mcp \`\`\` Authentication: \`Authorization: Bearer \` You can get an API key from the Get Started page. \*\*\* ### Claude Code \`\`\`bash claude mcp add --transport http xverse https://mcp.secretkeylabs.io/mcp \\ --header "Authorization: Bearer " \`\`\` Then run \`/mcp\` once you've opened a Claude Code session to verify the connection. \*\*\* ### Cursor \`CTRL/CMD\` + \`,\` to open Cursor settings. Navigate to the MCP tools page and add a new server with the following configuration: \`\`\`json { "mcpServers": { "xverse": { "command": "npx", "args": \[\ "-y", "mcp-remote", "https://mcp.secretkeylabs.io/mcp",\ "--header", "Authorization: Bearer "\ \] } } } \`\`\` \*\*\* ### Visual Studio Code \`CTRL/CMD\` + \`P\` and search for \*\*MCP: Add Server\*\*. Select \*\*Command (stdio)\*\* and enter: \`\`\` npx mcp-remote https://mcp.secretkeylabs.io/mcp --header "Authorization: Bearer " \`\`\` Enter the name \*\*Xverse\*\* and hit enter. Activate the server using \*\*MCP: List Servers\*\*, selecting Xverse, and selecting \*\*Start Server\*\*. Alternatively, add to your VS Code MCP settings file: \`\`\`json { "mcpServers": { "xverse": { "command": "npx", "args": \[\ "-y", "mcp-remote", "https://mcp.secretkeylabs.io/mcp",\ "--header", "Authorization: Bearer "\ \] } } } \`\`\` \*\*\* ### Codex Run the following command in Terminal: \`\`\`bash codex mcp add xverse --url https://mcp.secretkeylabs.io/mcp \`\`\` If this is your first MCP in Codex, enable the \`rmcp\` feature first: \`\`\`toml # ~/.codex/config.toml \[features\] experimental\_use\_rmcp\_client = true \`\`\` \*\*\* ### Windsurf \`CTRL/CMD\` + \`,\` to open Windsurf settings. Scroll to \*\*Cascade → MCP servers\*\*, select \*\*Add Server → Add custom server\*\*, and add: \`\`\`json { "mcpServers": { "xverse": { "command": "npx", "args": \[\ "-y", "mcp-remote", "https://mcp.secretkeylabs.io/mcp",\ "--header", "Authorization: Bearer "\ \] } } } \`\`\` \*\*\* ### Zed \`CMD\` + \`,\` to open Zed settings. Add the following: \`\`\`json { "context\_servers": { "xverse": { "source": "custom", "command": "npx", "args": \[\ "-y", "mcp-remote", "https://mcp.secretkeylabs.io/mcp",\ "--header", "Authorization: Bearer "\ \], "env": {} } } } \`\`\` \*\*\* ### Others Many tools now support MCP servers. Configure them with the following settings: | Setting | Value | | --------------- | ------------------------------------------------------------------------------------------------ | | \*\*Command\*\* | \`npx\` | | \*\*Arguments\*\* | \`-y mcp-remote https://mcp.secretkeylabs.io/mcp --header "Authorization: Bearer "\` | | \*\*Environment\*\* | None | \*\*\* ## Available Tools The MCP server exposes 54 read-only tools organized by domain. All tools correspond to endpoints in the Xverse API. ### 🟠 Bitcoin | Tool | Description | | ------------------------------------- | ---------------------------------------------------------------- | | \`bitcoin\_get\_fee\_estimates\` | Current mempool fee estimates for next blocks | | \`bitcoin\_get\_mempool\_stats\` | Projected mempool block statistics | | \`bitcoin\_get\_transaction\` | Transaction details including inputs, outputs, and confirmations | | \`bitcoin\_get\_transaction\_hex\` | Raw transaction hex | | \`bitcoin\_get\_address\_balance\` | Confirmed and unconfirmed balance for an address | | \`bitcoin\_get\_address\_utxos\` | Mempool-aware UTXOs with inscription filtering | | \`bitcoin\_get\_address\_summary\` | Address summary with recent transaction IDs | | \`bitcoin\_get\_address\_unconfirmed\_txs\` | Pending mempool transactions for an address | | \`bitcoin\_get\_price\` | Current BTC price | ### 🖼️ Ordinals & Collections | Tool | Description | | -------------------------------------- | ------------------------------------------ | | \`ordinals\_get\_address\_utxos\` | UTXOs containing inscriptions or rare sats | | \`ordinals\_get\_address\_inscriptions\` | Inscriptions owned by an address | | \`ordinals\_get\_address\_collections\` | Collections held by an address | | \`ordinals\_get\_inscription\` | Single inscription details | | \`ordinals\_get\_inscription\_activity\` | Inscription transfer history | | \`ordinals\_batch\_get\_inscriptions\` | Batch inscription lookup (max 25) | | \`ordinals\_get\_transaction\` | Inscription-enriched transaction details | | \`ordinals\_get\_transaction\_inputs\` | Inscription-enriched transaction inputs | | \`ordinals\_get\_transaction\_outputs\` | Inscription-enriched transaction outputs | | \`ordinals\_batch\_get\_outputs\` | Batch output details (max 20) | | \`ordinals\_list\_collections\` | Browse ordinal collections | | \`ordinals\_get\_collection\` | Collection metadata and market info | | \`ordinals\_get\_collection\_holders\` | Collection holder list | | \`ordinals\_get\_collection\_inscriptions\` | Inscriptions in a collection | | \`ordinals\_get\_collection\_floor\_prices\` | Historical floor price data | | \`ordinals\_top\_collections\_by\_volume\` | Top collections ranked by trading volume | ### 🔲 Runes | Tool | Description | | ---------------------------- | -------------------------------------------------------- | | \`runes\_get\_address\_balances\` | All Runes balances for an address | | \`runes\_get\_address\_activity\` | Rune activity for a specific address and rune | | \`runes\_get\_address\_utxos\` | Mempool-aware Rune UTXOs | | \`runes\_get\_info\` | Rune details — supply, symbol, divisibility, market data | | \`runes\_get\_holders\` | Top holders for a rune | | \`runes\_get\_activity\` | Recent transfer and mint activity | | \`runes\_batch\_get\_info\` | Batch rune info (max 10) | | \`runes\_top\_by\_volume\` | Top runes ranked by trading volume | | \`runes\_top\_gainers\_losers\` | Top gainers and losers by price change | | \`runes\_get\_floor\_prices\` | Historical floor price data | | \`runes\_decode\_runestone\` | Decode runestone data from raw transaction hex | ### 🪙 BRC-20 | Tool | Description | | ------------------------------------- | -------------------------------------------- | | \`brc20\_get\_address\_balances\` | All BRC-20 balances for an address | | \`brc20\_get\_address\_ticker\_balance\` | Balance for a specific BRC-20 token | | \`brc20\_get\_address\_unspent\_transfers\` | Unspent BRC-20 transfer inscriptions | | \`brc20\_get\_ticker\_info\` | Token details — supply, holders, deploy info | | \`brc20\_batch\_get\_tickers\` | Batch BRC-20 token info | ### ⚡ Spark | Tool | Description | | -------------------------------- | ----------------------------------------- | | \`spark\_get\_token\_info\` | Token info with pool metadata and pricing | | \`spark\_get\_token\_holders\` | Token holder list | | \`spark\_get\_token\_transactions\` | Token transaction history | | \`spark\_get\_token\_details\` | Token details or search by name/ticker | | \`spark\_get\_address\_balances\` | All BTKN token balances for an address | | \`spark\_get\_address\_transactions\` | Address transaction history | | \`spark\_get\_address\_summary\` | Address summary | | \`spark\_get\_transaction\` | Transaction details | | \`spark\_get\_latest\_transactions\` | Latest network transactions | | \`spark\_get\_token\_rankings\` | Top tokens by volume and TVL | | \`spark\_batch\_get\_token\_metadata\` | Batch token metadata (max 100) | ### 🔄 Swaps | Tool | Description | | ------------------------------ | ----------------------------------------------------- | | \`swaps\_get\_destination\_tokens\` | Available destination tokens for a swap | | \`swaps\_get\_quotes\` | Aggregated swap quotes from multiple AMMs (read-only) | \*\*\* ## FAQ #### What authentication does the MCP server use? The MCP server uses your Xverse API key as a Bearer token. Pass it in the \`Authorization\` header on connection. The same API key you use for REST API calls works with the MCP server — no separate credentials needed. #### Does the MCP support Streamable HTTP? Yes, at the \`https://mcp.secretkeylabs.io/mcp\` endpoint. #### Can the MCP server execute transactions? No. The MCP server is currently \*\*read-only\*\*. It provides data access and swap quotes but does not execute transactions, mint tokens, or modify any on-chain state. Write operations may be added in the future. #### What rate limits apply? The same rate limits from your Xverse API plan apply. If you hit a rate limit, the MCP server will return an error with \`Retry-After\` guidance so the AI agent can wait and retry automatically. #### I'm getting connection errors — what should I do? 1. Verify your API key is valid and correctly formatted (UUID format: \`8-4-4-4-12\` hex characters). 2. If using \`mcp-remote\`, make sure you have a recent version of Node.js installed. 3. Try clearing cached auth info: \`rm -rf ~/.mcp-auth\` and reconnect. #### Which AI clients are supported? Any client that supports the \[Model Context Protocol\](https://modelcontextprotocol.io) can connect. This includes Claude (Code, Desktop, and claude.ai), Cursor, VS Code, Codex, Windsurf, Zed, and many others. Clients that support Streamable HTTP can connect directly; older clients can use the \`mcp-remote\` bridge. --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## 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, and the optional \`goal\` query parameter: \`\`\` GET https://docs.xverse.app/api/mcp-server.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. 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. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs.xverse.app/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs.xverse.app/xverse-agentic-wallet/getting-started.md). # Getting Started This page walks you through installing the Xverse Agent Wallet CLI, creating your first wallet, and understanding the core concepts you'll need for everything else. ### Prerequisites \* \*\*Node.js\*\* 18+ installed \* A terminal (the CLI is headless — no browser or GUI required) ### Install \`\`\`bash npx @secretkeylabs/xverse-agent-wallet --install \`\`\` This installs the CLI globally and drops a Claude Code skill into \`~/.claude/skills/xverse-agent-wallet/SKILL.md\` that teaches AI agents how to operate every command. Verify the installation: \`\`\`bash xverse-wallet --help \`\`\` ### Two ways to run There are two ways to use the wallet: | Mode | Command | Best for | | --------------- | --------------------- | -------------------------------------------------------------------------------------------------------------- | | \*\*Agent mode\*\* | \`xverse-wallet agent\` | Letting Claude Code (or another AI agent) run the wallet for you. Handles wallet setup and auth automatically. | | \*\*Direct mode\*\* | \`xverse-wallet \` | Running CLI commands yourself, in scripts, or from a custom agent framework. | For agent mode, see \[Agent Mode\](https://claude.ai/chat/agent-mode.md). For everything else, keep reading. ### Authentication The CLI encrypts your wallet vault at rest using a passphrase provided via environment variable. Set it before any direct-mode wallet operation: \`\`\`bash export XVERSE\_PASSWORD="your-secure-passphrase" \`\`\` This pattern is compatible with any secret manager (AWS Secrets Manager, HashiCorp Vault, 1Password CLI, etc.). > Your password is the only thing protecting your funds. Use a strong, unique one. ### Create a wallet \`\`\`bash xverse-wallet wallet create --json \`\`\` This generates a new BIP-39 mnemonic, encrypts it into a local vault, and derives your first account (account 0) with addresses for all supported chains. To display the mnemonic (for backup): \`\`\`bash xverse-wallet wallet create --show-mnemonic --json \`\`\` To restore an existing wallet: \`\`\`bash XVERSE\_MNEMONIC="word1 word2 ... word12" xverse-wallet wallet restore --json \`\`\` > \*\*Tip:\*\* The leading space before the command prevents the mnemonic from being saved in shell history. ### Check your wallet \`\`\`bash # Wallet status (no auth needed) xverse-wallet wallet status --json # Current account addresses xverse-wallet account current --json # All accounts xverse-wallet account list --json \`\`\` ### Output modes Every command supports three output modes: | Flag | Output | Use when... | | -------------- | ------------------------------------------- | ------------------------------ | | \*(default)\* | Human-readable tables | You're exploring interactively | | \`--json\` | Structured JSON | Your agent parses the output | | \`-q\`/\`--quiet\` | Single value (e.g. just an address or txid) | You need one value for piping | \*\*Always use \`--json\` when your agent needs to parse the output programmatically.\*\* ### Profiles and accounts The CLI supports two levels of organization: \*\*Profiles\*\* are independent wallets — each has its own mnemonic, vault, and set of accounts. Use profiles to manage separate wallets (e.g. \`default\`, \`trading\`, \`savings\`). \*\*Accounts\*\* are BIP-44 derived addresses within a single wallet. Account 0 is created automatically. You can derive more: \`\`\`bash xverse-wallet account derive --count 3 --json \`\`\` #### Switching vs. on-demand You can either \*\*switch\*\* the active profile/account (persistent) or target one \*\*on-demand\*\* (one-off): \`\`\`bash # Persistent — changes default for all subsequent commands xverse-wallet wallet switch trading xverse-wallet account switch 2 # On-demand — one command only, doesn't change the default xverse-wallet -a 2 bitcoin balance --json # different account xverse-wallet -p trading spark balance --json # different profile xverse-wallet -p trading -a 2 bitcoin balance --json # both \`\`\` Use on-demand (\`-a\`, \`-p\`) for quick queries. Use switching when you want all subsequent commands to target a specific context. #### Creating a new profile \`\`\`bash xverse-wallet wallet switch trading XVERSE\_MNEMONIC="word1 word2 ..." xverse-wallet wallet restore xverse-wallet wallet switch default # switch back \`\`\` ### Transaction safety: dry-run by default All commands that modify state (\`send\`, \`swap execute\`, \`spark deposit\`, etc.) support a dry-run pattern: \* \*\*Without \`--yes\`\*\*: the command shows a preview and returns \`"dryRun": true\` in JSON mode. Nothing is broadcast. \* \*\*With \`--yes\`\*\*: the transaction is signed and broadcast. \`\`\`bash # Preview (safe) xverse-wallet bitcoin send --to bc1q... --amount 0.001 --json # Execute (irreversible) xverse-wallet bitcoin send --to bc1q... --amount 0.001 --yes --json \`\`\` \*\*Always preview first, then confirm.\*\* If you're building an agent, have it show the preview to the user (or log it) before adding \`--yes\`. ### Fund your wallet Once created, your wallet is empty. Fund it in one of these ways: \*\*Buy with fiat\*\* (easiest — opens a checkout page in your browser): \`\`\`bash xverse-wallet fund buy --crypto BTC --amount 100 \`\`\` Supports BTC, STX, WBTC, STRK, and USDC. Most providers require a $20+ minimum. \*\*Receive from another wallet:\*\* \`\`\`bash xverse-wallet bitcoin receive --json \`\`\` Send BTC to the \`native\` address from any exchange or wallet. \*\*Check your balances:\*\* \`\`\`bash xverse-wallet portfolio --accounts 0-4 --json \`\`\` ### Next steps With your wallet created and funded, explore the capabilities: ## 🚀 Getting Started This page walks you through installing the Xverse Agent Wallet CLI, creating your first wallet, and understanding the core concepts you'll need for everything else. ### Prerequisites \* \*\*Node.js\*\* 18+ installed \* A terminal (the CLI is headless — no browser or GUI required) ### Install \`\`\`bash npx @secretkeylabs/xverse-agent-wallet --install \`\`\` This installs the CLI globally and drops a Claude Code skill into \`~/.claude/skills/xverse-agent-wallet/SKILL.md\` that teaches AI agents how to operate every command. Verify the installation: \`\`\`bash xverse-wallet --help \`\`\` ### Two ways to run There are two ways to use the wallet: | Mode | Command | Best for | | --------------- | --------------------- | -------------------------------------------------------------------------------------------------------------- | | \*\*Agent mode\*\* | \`xverse-wallet agent\` | Letting Claude Code (or another AI agent) run the wallet for you. Handles wallet setup and auth automatically. | | \*\*Direct mode\*\* | \`xverse-wallet \` | Running CLI commands yourself, in scripts, or from a custom agent framework. | For agent mode, see \[Agent Mode\](https://claude.ai/chat/agent-mode.md). For everything else, keep reading. ### Authentication The CLI encrypts your wallet vault at rest using a passphrase provided via environment variable. Set it before any direct-mode wallet operation: \`\`\`bash export XVERSE\_PASSWORD="your-secure-passphrase" \`\`\` This pattern is compatible with any secret manager (AWS Secrets Manager, HashiCorp Vault, 1Password CLI, etc.). > Your password is the only thing protecting your funds. Use a strong, unique one. ### Create a wallet \`\`\`bash xverse-wallet wallet create --json \`\`\` This generates a new BIP-39 mnemonic, encrypts it into a local vault, and derives your first account (account 0) with addresses for all supported chains. To display the mnemonic (for backup): \`\`\`bash xverse-wallet wallet create --show-mnemonic --json \`\`\` To restore an existing wallet: \`\`\`bash XVERSE\_MNEMONIC="word1 word2 ... word12" xverse-wallet wallet restore --json \`\`\` > \*\*Tip:\*\* The leading space before the command prevents the mnemonic from being saved in shell history. ### Check your wallet \`\`\`bash # Wallet status (no auth needed) xverse-wallet wallet status --json # Current account addresses xverse-wallet account current --json # All accounts xverse-wallet account list --json \`\`\` ### Output modes Every command supports three output modes: | Flag | Output | Use when... | | -------------- | ------------------------------------------- | ------------------------------ | | \*(default)\* | Human-readable tables | You're exploring interactively | | \`--json\` | Structured JSON | Your agent parses the output | | \`-q\`/\`--quiet\` | Single value (e.g. just an address or txid) | You need one value for piping | \*\*Always use \`--json\` when your agent needs to parse the output programmatically.\*\* ### Profiles and accounts The CLI supports two levels of organization: \*\*Profiles\*\* are independent wallets — each has its own mnemonic, vault, and set of accounts. Use profiles to manage separate wallets (e.g. \`default\`, \`trading\`, \`savings\`). \*\*Accounts\*\* are BIP-44 derived addresses within a single wallet. Account 0 is created automatically. You can derive more: \`\`\`bash xverse-wallet account derive --count 3 --json \`\`\` #### Switching vs. on-demand You can either \*\*switch\*\* the active profile/account (persistent) or target one \*\*on-demand\*\* (one-off): \`\`\`bash # Persistent — changes default for all subsequent commands xverse-wallet wallet switch trading xverse-wallet account switch 2 # On-demand — one command only, doesn't change the default xverse-wallet -a 2 bitcoin balance --json # different account xverse-wallet -p trading spark balance --json # different profile xverse-wallet -p trading -a 2 bitcoin balance --json # both \`\`\` Use on-demand (\`-a\`, \`-p\`) for quick queries. Use switching when you want all subsequent commands to target a specific context. #### Creating a new profile \`\`\`bash xverse-wallet wallet switch trading XVERSE\_MNEMONIC="word1 word2 ..." xverse-wallet wallet restore xverse-wallet wallet switch default # switch back \`\`\` ### Transaction safety: dry-run by default All commands that modify state (\`send\`, \`swap execute\`, \`spark deposit\`, etc.) support a dry-run pattern: \* \*\*Without \`--yes\`\*\*: the command shows a preview and returns \`"dryRun": true\` in JSON mode. Nothing is broadcast. \* \*\*With \`--yes\`\*\*: the transaction is signed and broadcast. \`\`\`bash # Preview (safe) xverse-wallet bitcoin send --to bc1q... --amount 0.001 --json # Execute (irreversible) xverse-wallet bitcoin send --to bc1q... --amount 0.001 --yes --json \`\`\` \*\*Always preview first, then confirm.\*\* If you're building an agent, have it show the preview to the user (or log it) before adding \`--yes\`. ### Fund your wallet Once created, your wallet is empty. Fund it in one of these ways: \*\*Buy with fiat\*\* (easiest — opens a checkout page in your browser): \`\`\`bash xverse-wallet fund buy --crypto BTC --amount 100 \`\`\` Supports BTC, STX, WBTC, STRK, and USDC. Most providers require a $20+ minimum. \*\*Receive from another wallet:\*\* \`\`\`bash xverse-wallet bitcoin receive --json \`\`\` Send BTC to the \`native\` address from any exchange or wallet. \*\*Check your balances:\*\* \`\`\`bash xverse-wallet portfolio --accounts 0-4 --json \`\`\` ### Next steps With your wallet created and funded, explore the capabilities: | Capability | Page | | ---------------------------- | ------------------------------------------------------------------------------------- | | Run with Claude Code | \[Agent Mode\](/xverse-agentic-wallet/agent-mode.md) | | Send and receive BTC on L1 | \[Bitcoin\](/xverse-agentic-wallet/capabilities/bitcoin.md) | | Lightning payments via Spark | \[Spark & Lightning\](/xverse-agentic-wallet/capabilities/spark-and-lightning.md) | | Machine-payable API calls | \[Machine Payments (MPP)\](/xverse-agentic-wallet/guides/agentic-lightning-commerce.md) | | Trade on Starknet | \[Starknet\](/xverse-agentic-wallet/guides/agentic-starknet-trading.md) | | Swap across chains | \[Swaps\](/xverse-agentic-wallet/capabilities/swaps.md) | | Full portfolio overview | \[Portfolio & Treasury\](/xverse-agentic-wallet/capabilities/portfolio-and-treasury.md) | --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## 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, and the optional \`goal\` query parameter: \`\`\` GET https://docs.xverse.app/xverse-agentic-wallet/getting-started.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. 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. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs.xverse.app/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs.xverse.app/readme.md). # Xverse Developer Documentation Build with the world's leading Bitcoin self-custodial platform ## 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/). 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. \* 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. [Get started](https://docs.xverse.app/api/xverse-api.md) [MCP server](https://docs.xverse.app/api/mcp-server.md) {% 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. [Get started](https://docs.xverse.app/sats-connect/sats-connect.md) [AI Agent integration](https://docs.xverse.app/sats-connect/ai-agent-integration.md) {% 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 Agent Wallet -\*\* The Agent Economy on Bitcoin Rails {% 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. [Get started](https://docs.xverse.app/xverse-agentic-wallet/xverse-agent-wallet.md#the-first-bitcoin-native-wallet-built-for-ai-agents) [Agent Mode](https://docs.xverse.app/xverse-agentic-wallet/agent-mode.md) {% 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\](/sats-connect/sats-connect.md) | | Request transaction signatures from my users | \[Sats Connect\](/sats-connect/sats-connect.md) | | Query balances, UTXOs, or mempool data server-side | \[Xverse API\](/api/xverse-api.md) | | Fetch Ordinals, Runes, or BRC-20 data | \[Xverse API\](/api/xverse-api.md) | | Get market data or floor prices | \[Xverse API\](/api/xverse-api.md) | | Give my AI agent a Bitcoin wallet to pay and trade | \[Agent Wallet\](/xverse-agentic-wallet/xverse-agent-wallet.md#the-first-bitcoin-native-wallet-built-for-ai-agents) | | Use Bitcoin data inside Claude or Cursor | \[MCP Server\](/api/mcp-server.md) | | Build a full-stack Bitcoin app | Both \[Xverse API\](/api/xverse-api.md) + \[Sats Connect\](/sats-connect/sats-connect.md) | ## Developer resources | | | | | | | --- | --- | --- | --- | --- | | #### _:discord:_ | **Discord community** | Post questions, feature requests, get help, and share resources with other developers. | [Join Discord](https://discord.gg/tN84HhSDrz) | | | #### _:github:_ | **GitHub** | Check out our GitHub repository and submit your first PR. | [Go to Github](https://github.com/secretkeylabs) | | \--- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## 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, and the optional \`goal\` query parameter: \`\`\` GET https://docs.xverse.app/readme.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. 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. --- # Agent Mode | Xverse Agent Wallet | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/xverse-agentic-wallet/agent-mode.md) . The fastest way to put an AI agent in control of your wallet. The CLI ships with a **Claude Code skill** and a built-in **agent launcher** that handles wallet setup, password authentication, and gives the agent full access to every CLI command. ### Why this matters[](https://docs.xverse.app/xverse-agentic-wallet/agent-mode#why-this-matters) If you're building agentic workflows, you don't want to wire up wallet auth, prompt for passwords, manage env vars, and teach the agent every command yourself. Agent mode does all of that for you. * **One command to install:** `npx @secretkeylabs/xverse-agent-wallet --install` installs the CLI and the Claude Code skill in one go. * **One command to launch:** `xverse-wallet agent` boots Claude Code with the wallet authenticated. * **No plaintext secrets on disk:** the password is prompted from stdin, masked, and passed as an env var to the agent process. * * * ### Install[](https://docs.xverse.app/xverse-agentic-wallet/agent-mode#install) Copy npx @secretkeylabs/xverse-agent-wallet --install This installs the CLI globally and drops a Claude Code skill into `~/.claude/skills/xverse-agent-wallet/SKILL.md`. The skill teaches AI agents how to operate the wallet — every command, every option, token guides, agentic workflows, and common patterns. Once installed, Claude Code automatically picks it up the next time you launch an agent session. To uninstall: Copy xverse-wallet --uninstall ### Launch an agent with wallet access[](https://docs.xverse.app/xverse-agentic-wallet/agent-mode#launch-an-agent-with-wallet-access) Copy xverse-wallet agent What this does: 1. **Checks for an existing wallet.** On first run, it interactively prompts you to create a new wallet or restore from a mnemonic. 2. **Prompts for your password** (masked stdin input). 3. **Authenticates the vault.** 4. **Launches Claude Code** with `XVERSE_PASSWORD` set in the agent's environment, so every CLI command works inside the session without re-auth. From the agent's perspective, it can run any CLI command — `portfolio`, `bitcoin send`, `swap execute`, `pay request`, `spark lightning pay` — and they all just work. #### Other agent providers[](https://docs.xverse.app/xverse-agentic-wallet/agent-mode#other-agent-providers) The default agent is Claude Code, but the launcher can target other providers: #### Non-interactive mode[](https://docs.xverse.app/xverse-agentic-wallet/agent-mode#non-interactive-mode) For automated environments (CI, scripts, scheduled jobs): In quiet mode, the launcher skips the password prompt and uses the env var directly. ### Security model[](https://docs.xverse.app/xverse-agentic-wallet/agent-mode#security-model) * The password is **prompted from stdin** with masked input — it never appears in your shell history. * It's **passed to the agent subprocess as an environment variable**, then cleared from the launcher's memory. * It is **never written to disk**. * The vault itself is encrypted at rest with a passphrase from an environment variable, compatible with any secret manager. * Session state is **ephemeral** — it's cleared when the agent process exits. ### What the agent can do once it's running[](https://docs.xverse.app/xverse-agentic-wallet/agent-mode#what-the-agent-can-do-once-its-running) Once the agent is launched, it has access to the full CLI command tree. Some examples of what you can ask Claude Code to do: * _"Show me all my balances across every chain and account."_ → Agent runs `xverse-wallet portfolio --accounts 0-4 --json` and summarizes the result. * _"DCA $50 of USDC into WBTC on Starknet."_ → Agent runs `xverse-wallet swap execute --from starknet:USDC --to starknet:WBTC --amount 50` (preview), shows you the quote, then executes with `--yes` after confirmation. * _"Pay this Lightning invoice: lnbc..."_ → Agent estimates the fee with `spark lightning estimate`, shows you the cost, and pays with `spark lightning pay --yes`. * _"Sweep my Spark profits to cold storage."_ → Agent checks the Spark balance, then runs `spark withdraw --amount --speed fast`. * _"Call the Xverse rune price API for DOG and tell me the floor."_ → Agent runs `pay request --yes` (which auto-pays the Lightning fee via MPP) and parses the response. > **Safety note:** The skill teaches the agent to **always preview transactions before executing them**. The agent should never run a `--yes` command without first showing you the dry-run output and getting your confirmation. ### What the skill covers[](https://docs.xverse.app/xverse-agentic-wallet/agent-mode#what-the-skill-covers) The installed skill (`~/.claude/skills/xverse-agent-wallet/SKILL.md`) is a comprehensive reference covering: * Every CLI command, with options and examples * Token format guide (BTC-pegged tokens, stablecoins, native chain tokens) * How to move assets across layers (fast same-chain vs slow cross-chain routes) * Funding strategies (fiat on-ramp, swaps, deposits) * Agentic workflows (Lightning commerce, treasury management, trading patterns) * Common gotchas (native vs taproot BTC, multi-account scanning, Lightning fee budgets) * Onboarding strategies for new wallets ### Next steps[](https://docs.xverse.app/xverse-agentic-wallet/agent-mode#next-steps) * New to the CLI? Start with [Getting Started](https://claude.ai/chat/getting-started.md) . * Building a Lightning commerce agent? See the [Agentic Lightning Commerce guide](https://claude.ai/chat/guide-lightning-commerce.md) . * Building a trading agent? See the [Starknet Trading guide](https://claude.ai/chat/guide-starknet-trading.md) or [Flashnet Trading guide](https://claude.ai/chat/guide-flashnet-trading.md) . [PreviousGetting Started](https://docs.xverse.app/xverse-agentic-wallet/getting-started) [NextBitcoin](https://docs.xverse.app/xverse-agentic-wallet/capabilities/bitcoin) Last updated 5 months ago * [Why this matters](https://docs.xverse.app/xverse-agentic-wallet/agent-mode#why-this-matters) * [Install](https://docs.xverse.app/xverse-agentic-wallet/agent-mode#install) * [Launch an agent with wallet access](https://docs.xverse.app/xverse-agentic-wallet/agent-mode#launch-an-agent-with-wallet-access) * [Security model](https://docs.xverse.app/xverse-agentic-wallet/agent-mode#security-model) * [What the agent can do once it's running](https://docs.xverse.app/xverse-agentic-wallet/agent-mode#what-the-agent-can-do-once-its-running) * [What the skill covers](https://docs.xverse.app/xverse-agentic-wallet/agent-mode#what-the-skill-covers) * [Next steps](https://docs.xverse.app/xverse-agentic-wallet/agent-mode#next-steps) Copy xverse-wallet agent --agent Copy export XVERSE_PASSWORD="your-secure-passphrase" xverse-wallet agent --quiet --- # Portfolio & Treasury | Xverse Agent Wallet | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/xverse-agentic-wallet/capabilities/portfolio-and-treasury.md) . Unified views of all your assets, stablecoins, and staking positions across every chain — plus patterns for managing funds between hot wallets and cold BTC storage. ### Portfolio overview[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/portfolio-and-treasury#portfolio-overview) See everything you own in one command: Copy xverse-wallet portfolio --json To scan multiple accounts (recommended — funds may be on a different account): Copy xverse-wallet portfolio --accounts 0-4 --json Output includes tags like `staked`, `unclaimed rewards`, `withdrawing`, `stable`, and `rune` so your agent can categorize holdings. > **Always use** `**portfolio --accounts 0-4 --json**` **first** when searching for funds — assets may be on a different account than the default. ### Stablecoin overview[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/portfolio-and-treasury#stablecoin-overview) Unified view of stablecoins across all chains: USDC (Starknet), USDB (Spark), USDCx (Stacks). Copy # All stablecoin balances xverse-wallet cash balance --json # Receive addresses for each stablecoin xverse-wallet cash receive --json # Stablecoin transaction history xverse-wallet cash history --json ### Earning overview[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/portfolio-and-treasury#earning-overview) Check staking position, claimable rewards, and suggested next actions: For a step-by-step walkthrough of WBTC staking: * * * ### Treasury management patterns[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/portfolio-and-treasury#treasury-management-patterns) #### Sweep to cold BTC vault[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/portfolio-and-treasury#sweep-to-cold-btc-vault) Move funds from hot wallets (Spark, Starknet, Stacks) to cold Bitcoin L1 storage: #### Rebalance between stables and BTC[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/portfolio-and-treasury#rebalance-between-stables-and-btc) #### Periodic reward harvesting[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/portfolio-and-treasury#periodic-reward-harvesting) ### Buy crypto with fiat[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/portfolio-and-treasury#buy-crypto-with-fiat) Buy BTC, STX, WBTC, STRK, or USDC using credit card, bank transfer, or Apple Pay via on-ramp providers (MoonPay, Revolut, Banxa, etc.). [PreviousStacks](https://docs.xverse.app/xverse-agentic-wallet/capabilities/stacks) [NextSwaps](https://docs.xverse.app/xverse-agentic-wallet/capabilities/swaps) Last updated 5 months ago * [Portfolio overview](https://docs.xverse.app/xverse-agentic-wallet/capabilities/portfolio-and-treasury#portfolio-overview) * [Stablecoin overview](https://docs.xverse.app/xverse-agentic-wallet/capabilities/portfolio-and-treasury#stablecoin-overview) * [Earning overview](https://docs.xverse.app/xverse-agentic-wallet/capabilities/portfolio-and-treasury#earning-overview) * [Treasury management patterns](https://docs.xverse.app/xverse-agentic-wallet/capabilities/portfolio-and-treasury#treasury-management-patterns) * [Buy crypto with fiat](https://docs.xverse.app/xverse-agentic-wallet/capabilities/portfolio-and-treasury#buy-crypto-with-fiat) Copy xverse-wallet earn status --json Copy xverse-wallet earn guide Copy # Spark → BTC L1 xverse-wallet spark withdraw --amount 0.01 --speed fast --yes --json # Starknet WBTC → BTC L1 xverse-wallet swap execute --from starknet:WBTC --to bitcoin:BTC --amount 0.01 --yes --json # Starknet STRK → BTC L1 xverse-wallet swap execute --from starknet:STRK --to bitcoin:BTC --amount 100 --yes --json # Stacks STX → BTC L1 xverse-wallet swap execute --from stacks:STX --to bitcoin:BTC --amount 100 --yes --json Copy # Check current allocation xverse-wallet portfolio --json xverse-wallet cash balance --json # BTC → stables xverse-wallet swap execute --from bitcoin:BTC --to starknet:USDC --amount 0.01 --yes --json # Stables → BTC xverse-wallet swap execute --from starknet:USDC --to bitcoin:BTC --amount 100 --yes --json Copy # Check and claim staking rewards xverse-wallet earn status --json xverse-wallet starknet staking claim --yes --json # Convert STRK rewards to BTC xverse-wallet swap execute --from starknet:STRK --to bitcoin:BTC --amount 50 --yes --json Copy # Simplest — auto-detects everything, opens browser xverse-wallet fund buy --crypto BTC --amount 100 # Specific provider xverse-wallet fund buy --crypto BTC --amount 100 --provider moonpay # Check provider limits xverse-wallet fund providers --fiat usd --crypto BTC --json # Get quotes before buying xverse-wallet fund quote --crypto BTC --amount 100 --json --- # Stacks | Xverse Agent Wallet | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/xverse-agentic-wallet/capabilities/stacks.md) . Send, receive, and manage STX and SIP-10 tokens on the Stacks blockchain. ### Check balance[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/stacks#check-balance) Copy xverse-wallet stacks balance --json Returns STX balance and all SIP-10 token balances. Filter for specific tokens: Copy xverse-wallet stacks balance --filter "STX|sBTC" --json ### Receive on Stacks[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/stacks#receive-on-stacks) Copy xverse-wallet stacks receive --json ### Send STX or SIP-10 tokens[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/stacks#send-stx-or-sip-10-tokens) Copy # Preview xverse-wallet stacks send --token STX --to
--amount 10 --json # Execute xverse-wallet stacks send --token STX --to
--amount 10 --yes --json #### Options[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/stacks#options) Option Description `--token ` Token to send (`STX` or SIP-10 token name) `--to
` Destination Stacks address `--amount ` Amount in human-readable units (e.g. `1.5` STX) `--memo` Optional memo `--fee ` Fee in microSTX (uses estimate if omitted) `--yes` Execute (omit for dry run) ### Transaction history[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/stacks#transaction-history) [PreviousStarknet](https://docs.xverse.app/xverse-agentic-wallet/capabilities/starknet) [NextPortfolio & Treasury](https://docs.xverse.app/xverse-agentic-wallet/capabilities/portfolio-and-treasury) Last updated 5 months ago * [Check balance](https://docs.xverse.app/xverse-agentic-wallet/capabilities/stacks#check-balance) * [Receive on Stacks](https://docs.xverse.app/xverse-agentic-wallet/capabilities/stacks#receive-on-stacks) * [Send STX or SIP-10 tokens](https://docs.xverse.app/xverse-agentic-wallet/capabilities/stacks#send-stx-or-sip-10-tokens) * [Transaction history](https://docs.xverse.app/xverse-agentic-wallet/capabilities/stacks#transaction-history) Copy xverse-wallet stacks history --token STX --json xverse-wallet stacks history --token STX --limit 10 --json --- # Runes | Xverse Agent Wallet | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/xverse-agentic-wallet/capabilities/runes.md) . Send, receive, and inspect Runes on Bitcoin L1. ### Check balance[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/runes#check-balance) Copy xverse-wallet runes balance --json Filter for specific runes: Copy xverse-wallet runes balance --filter "DOG" --json ### Receive Runes[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/runes#receive-runes) Copy xverse-wallet runes receive --json Returns your taproot address for receiving Runes. ### Rune details[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/runes#rune-details) Look up a rune's etching info, divisibility, and supply before sending: Copy xverse-wallet runes details --rune "DOG•GO•TO•THE•MOON" --json xverse-wallet runes details --rune 840000:3 --json > **Important:** Rune amounts are raw integers (not decimal). Use `runes details` to check the rune's divisibility before sending. ### Send Runes[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/runes#send-runes) Copy # Preview xverse-wallet runes send --to
--rune 840000:3 --amount 1000 --json # Execute xverse-wallet runes send --to
--rune 840000:3 --amount 1000 --yes --json #### Options[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/runes#options) Option Description `--to
` Destination taproot address `--rune ` Rune name or ID (e.g. `840000:3`) `--amount ` Amount as raw integer `--fee-rate ` Fee rate in sat/vB `--yes` Execute (omit for dry run) ### Transaction history[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/runes#transaction-history) [PreviousSwaps](https://docs.xverse.app/xverse-agentic-wallet/capabilities/swaps) [NextAgentic Lightning Commerce](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-lightning-commerce) Last updated 5 months ago * [Check balance](https://docs.xverse.app/xverse-agentic-wallet/capabilities/runes#check-balance) * [Receive Runes](https://docs.xverse.app/xverse-agentic-wallet/capabilities/runes#receive-runes) * [Rune details](https://docs.xverse.app/xverse-agentic-wallet/capabilities/runes#rune-details) * [Send Runes](https://docs.xverse.app/xverse-agentic-wallet/capabilities/runes#send-runes) * [Transaction history](https://docs.xverse.app/xverse-agentic-wallet/capabilities/runes#transaction-history) Copy xverse-wallet runes history --rune 840000:3 --json --- # Swaps | Xverse Agent Wallet | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/xverse-agentic-wallet/capabilities/swaps.md) . 🔄 Swaps[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/swaps#swaps) ----------------------------------------------------------------------------------- Swap any asset across any supported chain — Bitcoin ↔ Starknet, Bitcoin ↔ Spark, Starknet ↔ Starknet, Runes ↔ BTC, and more. The CLI routes through integrated DEXes including AVNU (Starknet), Flashnet (Spark), Dotswap, and Sats Terminal (Runes). ### Token format[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/swaps#token-format) Tokens are specified as `protocol:ticker` or `protocol:contract.name`: Token Example Bitcoin BTC `bitcoin:BTC` Spark BTC `spark:BTC` Rune (by ID) `runes:840000:3` Starknet WBTC `starknet:WBTC` Starknet STRK `starknet:STRK` Starknet USDC `starknet:USDC` Stacks STX `stacks:STX` Stacks sBTC `stacks:SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-token` ### Get a quote[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/swaps#get-a-quote) Copy xverse-wallet swap quote --from bitcoin:BTC --to starknet:WBTC --amount 0.01 --json Returns quotes from all available providers with rates, fees, and estimated output. #### Options[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/swaps#options) Option Description `--from ` Source token (required) `--to ` Destination token (required) `--amount ` Amount of the source token `--provider ` Filter by specific provider ### Execute a swap[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/swaps#execute-a-swap) #### Options[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/swaps#options-1) Option Description `--from ` Source token (required) `--to ` Destination token (required) `--amount ` Amount of the source token `--provider ` Use a specific provider `--slippage ` Slippage tolerance (percentage) `--fee-rate ` Fee rate for Bitcoin L1 transactions `--yes` Execute (omit for dry run) ### Common swap routes[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/swaps#common-swap-routes) #### Same-chain (instant, seconds)[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/swaps#same-chain-instant-seconds) #### Cross-chain (minutes — involves BTC L1 confirmations)[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/swaps#cross-chain-minutes-involves-btc-l1-confirmations) > **Tip:** Prefer same-chain swaps when possible — they settle in seconds. Cross-chain routes involving Bitcoin L1 require block confirmations (~10-30 minutes). [PreviousPortfolio & Treasury](https://docs.xverse.app/xverse-agentic-wallet/capabilities/portfolio-and-treasury) [NextRunes](https://docs.xverse.app/xverse-agentic-wallet/capabilities/runes) Last updated 5 months ago * [🔄 Swaps](https://docs.xverse.app/xverse-agentic-wallet/capabilities/swaps#swaps) * [Token format](https://docs.xverse.app/xverse-agentic-wallet/capabilities/swaps#token-format) * [Get a quote](https://docs.xverse.app/xverse-agentic-wallet/capabilities/swaps#get-a-quote) * [Execute a swap](https://docs.xverse.app/xverse-agentic-wallet/capabilities/swaps#execute-a-swap) * [Common swap routes](https://docs.xverse.app/xverse-agentic-wallet/capabilities/swaps#common-swap-routes) Copy # Preview xverse-wallet swap execute --from bitcoin:BTC --to starknet:WBTC --amount 0.01 --json # Execute (auto-selects best quote) xverse-wallet swap execute --from bitcoin:BTC --to starknet:WBTC --amount 0.01 --yes --json Copy # Starknet ↔ Starknet swap quote --from starknet:STRK --to starknet:WBTC --amount 100 --json swap quote --from starknet:USDC --to starknet:WBTC --amount 100 --json # Spark ↔ Spark swap quote --from spark:BTC --to spark:USDB --amount 0.001 --json Copy # Bitcoin ↔ Starknet swap quote --from bitcoin:BTC --to starknet:WBTC --amount 0.005 --json swap quote --from starknet:WBTC --to bitcoin:BTC --amount 0.005 --json # Bitcoin ↔ Stacks swap quote --from bitcoin:BTC --to stacks:STX --amount 0.01 --json # Bitcoin ↔ Spark swap quote --from bitcoin:BTC --to spark:BTC --amount 0.001 --json # Runes ↔ BTC swap quote --from runes:840000:3 --to bitcoin:BTC --amount 1000 --json --- # Spark and Lightning | Xverse Agent Wallet | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/xverse-agentic-wallet/capabilities/spark-and-lightning.md) . Spark is a Bitcoin L2 that enables instant, low-cost BTC transfers and Lightning Network payments. It's the payment backbone of the Xverse Agentic Wallet — your agent's primary rail for programmatic commerce. ### Why Spark matters for agents[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/spark-and-lightning#why-spark-matters-for-agents) Lightning via Spark is the fastest and cheapest way for an agent to send and receive BTC. Sub-cent fees, sub-second settlement, and native support for creating and paying invoices — making it ideal for machine-to-machine payments, micropayments, and paid API access. ### Check balance[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/spark-and-lightning#check-balance) Copy xverse-wallet spark balance --json > **Note:** `spark balance` automatically claims any pending incoming Spark transfers. Always run it before operations that need Spark BTC. To check across multiple accounts: Copy xverse-wallet spark balance --accounts 0-4 --json ### Receive on Spark[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/spark-and-lightning#receive-on-spark) Copy xverse-wallet spark receive --json Returns your Spark address for receiving BTC transfers on the Spark network. ### Send on Spark[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/spark-and-lightning#send-on-spark) Send BTC or tokens instantly on Spark: Copy # Preview xverse-wallet spark send --token BTC --to --amount 0.001 --json # Execute xverse-wallet spark send --token BTC --to --amount 0.001 --yes --json #### Options[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/spark-and-lightning#options) Option Description `--token ` Token to send (e.g. `BTC`, `USDB`) `--to
` Destination Spark address `--amount ` Amount to send `--yes` Execute (omit for dry run) ### Deposit BTC from L1 to Spark[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/spark-and-lightning#deposit-btc-from-l1-to-spark) Move BTC from Bitcoin L1 into Spark. Requires 3 block confirmations (~30 minutes). ### Withdraw BTC from Spark to L1[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/spark-and-lightning#withdraw-btc-from-spark-to-l1) Option Description `--amount ` Amount to withdraw `--to
` L1 destination (defaults to your native address) `--speed` `slow`, `medium`, or `fast` `--yes` Execute ### Transaction history[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/spark-and-lightning#transaction-history) * * * ### ⚡ Lightning Network[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/spark-and-lightning#lightning-network) Lightning payments are powered by Spark. You need BTC on Spark to pay or create Lightning invoices. #### Create a Lightning invoice (receive payments)[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/spark-and-lightning#create-a-lightning-invoice-receive-payments) Returns an encoded BOLT11 invoice string. Give this to the payer. Option Description `--amount ` Invoice amount in satoshis (required) `--memo` Optional memo/description #### Estimate a Lightning payment fee[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/spark-and-lightning#estimate-a-lightning-payment-fee) For zero-amount invoices, specify the amount: #### Pay a Lightning invoice[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/spark-and-lightning#pay-a-lightning-invoice) Option Description `--invoice ` BOLT11 invoice to pay (required) `--max-fee ` Maximum routing fee in sats (default: 5) `--amount ` Amount for zero-amount invoices `--yes` Execute payment #### Lightning funding tips[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/spark-and-lightning#lightning-funding-tips) * You need enough Spark BTC for the **payment amount + routing fee**. A 1-sat payment with `--max-fee 10` needs at least 11 sats on Spark. * `spark balance` auto-claims incoming transfers — always run it before paying. * Check all accounts for Spark BTC: `xverse-wallet portfolio --accounts 0-4 --json` * If needed, consolidate from another account: `xverse-wallet -a 2 spark send --token BTC --to --amount 0.0001 --yes --json` [PreviousBitcoin](https://docs.xverse.app/xverse-agentic-wallet/capabilities/bitcoin) [NextStarknet](https://docs.xverse.app/xverse-agentic-wallet/capabilities/starknet) Last updated 5 months ago * [Why Spark matters for agents](https://docs.xverse.app/xverse-agentic-wallet/capabilities/spark-and-lightning#why-spark-matters-for-agents) * [Check balance](https://docs.xverse.app/xverse-agentic-wallet/capabilities/spark-and-lightning#check-balance) * [Receive on Spark](https://docs.xverse.app/xverse-agentic-wallet/capabilities/spark-and-lightning#receive-on-spark) * [Send on Spark](https://docs.xverse.app/xverse-agentic-wallet/capabilities/spark-and-lightning#send-on-spark) * [Deposit BTC from L1 to Spark](https://docs.xverse.app/xverse-agentic-wallet/capabilities/spark-and-lightning#deposit-btc-from-l1-to-spark) * [Withdraw BTC from Spark to L1](https://docs.xverse.app/xverse-agentic-wallet/capabilities/spark-and-lightning#withdraw-btc-from-spark-to-l1) * [Transaction history](https://docs.xverse.app/xverse-agentic-wallet/capabilities/spark-and-lightning#transaction-history) * [⚡ Lightning Network](https://docs.xverse.app/xverse-agentic-wallet/capabilities/spark-and-lightning#lightning-network) Copy # Deposit xverse-wallet spark deposit --amount 0.001 --yes --json # Check deposit status (without --amount shows pending deposits) xverse-wallet spark deposit --json # Claim after 3+ confirmations xverse-wallet spark claim --json Copy xverse-wallet spark withdraw --amount 0.001 --speed fast --yes --json Copy xverse-wallet spark history --token BTC --json xverse-wallet spark history --token BTC --offset 10 --limit 5 --json Copy xverse-wallet spark lightning invoice --amount 50000 --memo "Order #1234" --json Copy xverse-wallet spark lightning estimate --invoice --json Copy xverse-wallet spark lightning estimate --invoice --amount 1000 --json Copy # Preview xverse-wallet spark lightning pay --invoice --json # Execute xverse-wallet spark lightning pay --invoice --yes --json --- # Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/xverse-api.md) . ✨ Welcome to the Xverse API[](https://docs.xverse.app/api#welcome-to-the-xverse-api) ------------------------------------------------------------------------------------- Build powerful Bitcoin applications with production-grade APIs used by [Xverse wallet](https://www.xverse.app/) — now available to developers. Our suite of APIs provides everything you need to interact with the modern Bitcoin ecosystem: from Ordinals and Runes, to Bitcoin-native swaps, inscriptions, and Bitcoin L2 integrations. Whether you're building wallets, DeFi platforms, NFT marketplaces, or cross-chain bridges, our infrastructure gives you access to reliable, real-time blockchain data and ready-to-use transaction workflows. * * * 🚀 Why use the Xverse API?[](https://docs.xverse.app/api#why-use-the-xverse-api) --------------------------------------------------------------------------------- We built these APIs to solve the real infrastructure problems we faced while building the Xverse wallet. Now we’re opening them up so Bitcoin developers can skip the heavy lifting and focus on building. **Your Bitcoin RPC, indexer, and data layer — all in one API.** **With the Xverse API, you get:** * ⚡ **Ultra-fast Bitcoin RPC** and real-time mempool data — without running your own node * 🧩 **Advanced indexing** for transaction history, UTXO data, and Bitcoin asset protocols * 🔲 **Comprehensive Ordinals, Runes & BRC-20 support** — balances, parsing, and transaction data with zero custom indexing * 💹 **Live & historical market data** for Bitcoin assets: Ordinals, Runes, BRC-20, and Bitcoin L2 tokens * 💱 **Swap aggregation** across Bitcoin AMMs & L2s (Spark, Stacks, Starknet, BOB, Runes AMMs, BRC-20, etc.) * 📊 **Portfolio analytics** with real-time activity and daily balance history * ✍️ **Automated minting, etching & inscription at scale** — simple endpoints that handle high volumes without custom scripts * 🌉 **Cross-chain swaps & bridging with aggregated liquidity** — one interface to move assets seamlessly across Bitcoin and L2s * 🤖 ⚡ **Pay-per-request API access via Lightning** — every endpoint accepts payment over the Machine Payments Protocol (MPP) at 1 sat per call. Built for AI agents that don't want to manage API keys. * * * ### 🧰 What’s Inside[](https://docs.xverse.app/api#whats-inside) Our API suite is organized into powerful modules that serve different needs across the Bitcoin ecosystem: Module Description 🟠 [**Bitcoin**](https://docs.xverse.app/api/bitcoin) Bitcoin RPC, real-time and comprehensive **Bitcoin mempool & transaction data**, advanced indexing of **UTXOs & balances**, optimised for apps and dashboards. 💹 [**Portfolio API**](https://docs.xverse.app/api/portfolio) **&** 👀 [**Watch Addresses**](https://docs.xverse.app/api/watch-addresses) Monitor **Bitcoin asset balances** and **activity** across **multiple addresses**, with automatic daily tracking and historical portfolio **insights**. 🖼️ [**Ordinals**](https://docs.xverse.app/api/ordinals) Fetch detailed information on all **inscriptions**, **UTXOs**, **rare sats** — everything you need to power an **Ordinals experience**. **Automate Ordinal inscriptions** with advanced features. Estimate costs, create orders, and track inscription statuses seamlessly. **🔲** [**Runes**](https://docs.xverse.app/api/runes) Query **Rune balances** and **detailed information**. Integrate Runes into your apps without building infra. **Mint** and **etch Runes**, with cost estimates, order management and execution. 🪙 [**BRC-20**](https://docs.xverse.app/api/brc-20) Query **BRC-20 balances** and **detailed information**. Integrate BRC-20 into your apps without building infra. **Mint** and **deploy** BRC-20, with cost estimates, order management and execution. [**Spark**](https://docs.xverse.app/api/spark) Query [**Spark**](https://www.spark.money/) **balances, transactions & activity** for **Bitcoin** & **BTKN** tokens. Access [**Flashnet**](https://www.flashnet.xyz/) market & trading data. Integrate **Spark** & **Flashnet** into your apps without building infra. **🔄** [**Swap Aggregator**](https://docs.xverse.app/api/swaps) Seamlessly **integrate Bitcoin-asset swaps into your application.** Aggregate **quotes** from multiple **AMMs** across **Bitcoin and L2s**, generate and execute swap orders, and facilitate cross-chain swaps—all through a unified interface. * * * ### ⚙️ How It Works[](https://docs.xverse.app/api#how-it-works) All endpoints are **RESTful** and return **JSON** responses. You can use them with your preferred stack — whether you're writing in JavaScript, Python, Rust, or anything else. Authentication, rate limits, and response formats will be covered in the [Getting Started](https://docs.xverse.app/api/get-started) section. Need autonomous, machine-payable access without an API key? See [MPP Lightning Payments](https://docs.xverse.app/api/mpp-lightning-payments) . * * * ### 🧑‍💻 Built for Builders[](https://docs.xverse.app/api#built-for-builders) This API suite powers real products — including the Xverse wallet and app — and is optimized for scale, speed, and uptime. ✅ **\>99% Uptime** ⚡ **Low-latency responses** 🔒 **Secure & production-tested** 📈 **Scalable for any app size** * * * ### 💡 Start Building[](https://docs.xverse.app/api#start-building) If you're ready to dive in, check out our [Getting Started](https://docs.xverse.app/api/get-started) guide or [get your API key](https://api-dashboard.xverse.app/login) to start exploring endpoints. Looking to integrate specific functionality like portfolio monitoring, swaps or Ordinals support? Each section is fully documented with example requests, response formats, and real-world use cases. [NextGet Started](https://docs.xverse.app/api/get-started) Last updated 4 months ago * [✨ Welcome to the Xverse API](https://docs.xverse.app/api#welcome-to-the-xverse-api) * [🚀 Why use the Xverse API?](https://docs.xverse.app/api#why-use-the-xverse-api) * [🧰 What’s Inside](https://docs.xverse.app/api#whats-inside) * [⚙️ How It Works](https://docs.xverse.app/api#how-it-works) * [🧑‍💻 Built for Builders](https://docs.xverse.app/api#built-for-builders) * [💡 Start Building](https://docs.xverse.app/api#start-building) --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs.xverse.app/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs.xverse.app/sats-connect/ai-agent-integration.md). # 🤖 AI agent integration ### :robot: Integrate Sats Connect with AI coding agents Sats Connect ships a library of \*\*Agent Skills\*\* — one per method — so that AI coding agents can more easily integrate Sats Connect into your app. \*\*\* #### How it works \[Agent Skills\](https://agentskills.io/) is an open standard for giving coding agents reusable, method-level expertise. Each skill is a small folder containing precise instructions and usage examples that an agent loads on demand. The \[\`sats-connect-skills\`\](https://github.com/secretkeylabs/sats-connect-skills) repository contains a skill for every Sats Connect method — \`getAddresses\`, \`signPsbt\`, \`runes\_transfer\`, \`spark\_transfer\`, and more. When an agent picks up these skills, it knows exactly how to call each method, what parameters to pass, and how to handle the response. \*\*\* #### Quick start Skills are automatically picked up by AI coding agents that support the \[Agent Skills\](https://agentskills.io) standard. To use them, clone the \[sats-connect-skills\](https://github.com/secretkeylabs/sats-connect-skills) repository into a location scanned by your agent. For details on how agents locate skills, see \[Where to Scan\](https://agentskills.io/client-implementation/adding-skills-support#where-to-scan). \*\*\* #### Available skills Skills are organized by method category. Each skill covers the full method: parameters, TypeScript types, request/response shape, and a working code example. | Category | Skills | | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | \*\*Wallet\*\* | \`wallet-connect\`, \`wallet-disconnect\`, \`wallet-getAccount\`, \`wallet-getNetwork\`, \`wallet-changeNetwork\`, \`wallet-addNetwork\`, \`wallet-openBuy\`, \`wallet-openReceive\`, \`wallet-openEarn\`, \`wallet-openBridge\` | | \*\*Bitcoin\*\* | \`getAddresses\`, \`getBalance\`, \`signPsbt\`, \`signMultipleTransactions\`, \`sendTransfer\`, \`signMessage\`, \`signMultipleMessages\` | | \*\*Ordinals\*\* | \`createInscription\`, \`createRepeatInscriptions\`, \`ord-getInscriptions\`, \`ord-sendInscriptions\` | | \*\*Runes\*\* | \`runes-getBalance\`, \`runes-transfer\`, \`runes-mint\`, \`runes-etch\`, \`runes-getOrder\`, \`runes-estimateMint\`, \`runes-estimateEtch\`, \`runes-estimateRbfOrder\`, \`runes-rbfOrder\` | | \*\*Spark\*\* | \`spark-getAddress\`, \`spark-getBalance\`, \`spark-transfer\`, \`spark-transferToken\`, \`spark-signMessage\` | | \*\*Spark / Flashnet\*\* | \`spark-flashnet-getJWT\`, \`spark-flashnet-signIntent\`, \`spark-flashnet-signStructuredMessage\`, \`spark-flashnet-executeSwap\`, \`spark-flashnet-executeRouteSwap\`, \`spark-flashnet-createCPPool\`, \`spark-flashnet-createBondingPool\`, \`spark-flashnet-addLiquidity\`, \`spark-flashnet-removeLiquidity\`, \`spark-flashnet-confirmInitialDeposit\`, \`spark-flashnet-clawbackFunds\`, \`spark-flashnet-getClawbackEligibleTransfers\` | | \*\*Stacks\*\* | \`stx-getAccounts\`, \`stx-signMessage\`, \`stx-signStructuredMessage\`, \`stx-transferStx\`, \`stx-signTransaction\`, \`stx-callContract\`, \`stx-deployContract\` | Browse the full list and source: \[github.com/secretkeylabs/sats-connect-skills\](https://github.com/secretkeylabs/sats-connect-skills) \*\*\* #### Example prompts Here are ready-to-use prompts you can give your agent depending on what you're building. \*\*Connect a wallet and get addresses\*\* \`\`\` Using Sats Connect, connect to the Xverse Wallet and retrieve the user's Bitcoin and Ordinals addresses. \`\`\` \*\*Sign a Bitcoin transaction\*\* \`\`\` Implement PSBT signing in my app using Sats Connect. \`\`\` \*\*Transfer Runes\*\* \`\`\` Add a Runes transfer feature to my app using Sats Connect. \`\`\` \*\*Full Spark integration\*\* \`\`\` Integrate the full Spark wallet flow — address, balance, and BTC transfer. \`\`\` \*\*\* #### Always-on Sats Connect context If you're building a Bitcoin app and want AI agents to always have Sats Connect context when working in your codebase, add the following to an \`AGENTS.md\` file at the root of your project: \`\`\`markdown ## Sats Connect This app uses Sats Connect for Bitcoin wallet integration. When implementing or modifying wallet functionality, load the relevant Sats Connect skill. Examples: - Wallet connection → sats-connect-wallet-connect - Get addresses → sats-connect-getAddresses - Sign PSBT → sats-connect-signPsbt - Runes transfer → sats-connect-runes-transfer - Spark transfer → sats-connect-spark-transfer \`\`\` This means any developer who opens your repo in an AI agent gets Sats Connect expertise loaded automatically — no prompt needed. \*\*\* #### Resources \* \[sats-connect-skills on GitHub\](https://github.com/secretkeylabs/sats-connect-skills) \* \[Agent Skills specification\](https://agentskills.io/specification) \* \[Sats Connect npm package\](https://www.npmjs.com/package/sats-connect) \* \[Developer Discord\](https://discord.gg/tN84HhSDrz) Collapse --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## 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, and the optional \`goal\` query parameter: \`\`\` GET https://docs.xverse.app/sats-connect/ai-agent-integration.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. 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. --- # Get Started | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/get-started.md) . 🔌 Endpoints[](https://docs.xverse.app/api/get-started#endpoints) ------------------------------------------------------------------ Network Endpoint URL **Mainnet** https://api.secretkeylabs.io **Signet** https://api-signet.secretkeylabs.io 🔑 Get your API keys[](https://docs.xverse.app/api/get-started#get-your-api-keys) ---------------------------------------------------------------------------------- [Start your free trial to get API keys](https://api-dashboard.xverse.app/login) . Happy building! ⚡ Alternative: pay-per-request via Lightning[](https://docs.xverse.app/api/get-started#alternative-pay-per-request-via-lightning) ---------------------------------------------------------------------------------------------------------------------------------- Don't want to manage an API key? Every Xverse API endpoint also accepts payment over the [**Machine Payments Protocol (MPP)**](https://docs.xverse.app/api/mpp-lightning-payments) — pay 1 satoshi per request via Lightning, no key required. This is the recommended path for AI agents and autonomous clients. See MPP Lightning Payments for the full flow. 💬 Developer Support & Feedback[](https://docs.xverse.app/api/get-started#developer-support-and-feedback) ---------------------------------------------------------------------------------------------------------- Have feedback, feature requests, or want to partner? [Contact us](https://discord.com/invite/tN84HhSDrz) — we’d love to hear from you. [PreviousXverse API](https://docs.xverse.app/api) [Next⚡ MPP Lightning Payments](https://docs.xverse.app/api/mpp-lightning-payments) Last updated 2 months ago * [🔌 Endpoints](https://docs.xverse.app/api/get-started#endpoints) * [🔑 Get your API keys](https://docs.xverse.app/api/get-started#get-your-api-keys) * [⚡ Alternative: pay-per-request via Lightning](https://docs.xverse.app/api/get-started#alternative-pay-per-request-via-lightning) * [💬 Developer Support & Feedback](https://docs.xverse.app/api/get-started#developer-support-and-feedback) --- # Starknet | Xverse Agent Wallet | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/xverse-agentic-wallet/capabilities/starknet.md) . Send, receive, and manage assets on Starknet — including STRK, WBTC, USDC, and any ERC-20 token. Starknet provides instant, low-cost transactions with programmable smart contracts, making it ideal for agentic trading and DeFi. ### Check balance[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/starknet#check-balance) Copy xverse-wallet starknet balance --json Returns all ERC-20 token balances on Starknet. Filter for specific tokens: Copy xverse-wallet starknet balance --filter "WBTC|USDC" --json ### Receive on Starknet[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/starknet#receive-on-starknet) Copy xverse-wallet starknet receive --json Returns your Starknet address for receiving tokens. ### Send tokens[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/starknet#send-tokens) Send STRK, WBTC, USDC, or any ERC-20 token: Copy # Preview xverse-wallet starknet send --to
--amount 10 --token STRK --json # Execute xverse-wallet starknet send --to
--amount 10 --token STRK --yes --json #### Options[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/starknet#options) Option Description `--to
` Destination Starknet address `--amount ` Amount to send `--token ` Token to send (default: STRK). Symbol or contract address. `--fee-token ` Token to pay gas with (if sponsorship unavailable) `--yes` Execute (omit for dry run) > **Note:** Transaction sponsorship is automatic when available. If unavailable, you must specify `--fee-token` with a token you hold a balance of. ### Transaction history[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/starknet#transaction-history) ### WBTC Staking[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/starknet#wbtc-staking) Stake WBTC on Starknet to earn STRK rewards. #### Check staking position[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/starknet#check-staking-position) #### Stake WBTC[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/starknet#stake-wbtc) #### Withdraw (7-day cooldown)[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/starknet#withdraw-7-day-cooldown) #### Claim STRK rewards[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/starknet#claim-strk-rewards) #### Earning overview[](https://docs.xverse.app/xverse-agentic-wallet/capabilities/starknet#earning-overview) For a guided view of your staking position, claimable rewards, and suggested next actions: [PreviousSpark and Lightning](https://docs.xverse.app/xverse-agentic-wallet/capabilities/spark-and-lightning) [NextStacks](https://docs.xverse.app/xverse-agentic-wallet/capabilities/stacks) Last updated 5 months ago * [Check balance](https://docs.xverse.app/xverse-agentic-wallet/capabilities/starknet#check-balance) * [Receive on Starknet](https://docs.xverse.app/xverse-agentic-wallet/capabilities/starknet#receive-on-starknet) * [Send tokens](https://docs.xverse.app/xverse-agentic-wallet/capabilities/starknet#send-tokens) * [Transaction history](https://docs.xverse.app/xverse-agentic-wallet/capabilities/starknet#transaction-history) * [WBTC Staking](https://docs.xverse.app/xverse-agentic-wallet/capabilities/starknet#wbtc-staking) Copy xverse-wallet starknet history --token STRK --json xverse-wallet starknet history --token WBTC --limit 10 --json Copy xverse-wallet starknet staking status --json Copy # Preview xverse-wallet starknet staking deposit --token wbtc --amount 0.01 --json # Execute xverse-wallet starknet staking deposit --token wbtc --amount 0.01 --fee-token --yes --json Copy # Start withdrawal xverse-wallet starknet staking withdraw-intent --amount 0.01 --fee-token --yes --json # Complete after cooldown xverse-wallet starknet staking withdraw --fee-token --yes --json Copy xverse-wallet starknet staking claim --fee-token --yes --json Copy xverse-wallet earn status --json xverse-wallet earn guide --- # Agentic Starknet Trading | Xverse Agent Wallet | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-starknet-trading.md) . ◆ Guide: Agentic Starknet Trading[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-starknet-trading#guide-agentic-starknet-trading) -------------------------------------------------------------------------------------------------------------------------------------------------- Build AI agents that **trade on Starknet** via AVNU — with high throughput, low fees, and access to the deepest liquidity pools in the Bitcoin L2 ecosystem. Starknet processes $400M+ in monthly DEX volume, making it the strongest venue for agentic trading on Bitcoin rails. ### What you'll build[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-starknet-trading#what-youll-build) An agent that can: 1. **Get swap quotes** across Starknet DEX pairs (AVNU) 2. **Execute spot trades** between WBTC, STRK, USDC, and any ERC-20 token 3. **Run DCA strategies** — accumulate WBTC over time from stablecoins 4. **Rebalance** across multiple Starknet assets 5. **Harvest staking rewards** — claim STRK from WBTC staking and compound or convert 6. **Cross-chain arbitrage** — compare prices across Starknet and other chains ### Prerequisites[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-starknet-trading#prerequisites) * Xverse Agentic Wallet CLI installed (`npm i -g @secretkeylabs/xverse-wallet-cli`) * A funded wallet with assets on Starknet (see [Getting Started](https://docs.xverse.app/xverse-agentic-wallet/getting-started) ) ### Why Starknet?[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-starknet-trading#why-starknet) For agentic trading, Starknet offers the best mix of speed, cost, and liquidity in the Bitcoin ecosystem: * **High throughput, low fees** — instant finality, fraction-of-a-cent gas * **Deep DEX liquidity** — $400M+ monthly volume via AVNU and integrated pools * **BTC-native assets** — WBTC is the primary BTC representation, stakeable for STRK rewards * **Stablecoin access** — USDC on Starknet for stable trading pairs * **Programmable** — smart contracts enable complex DeFi strategies * * * ### Step 1: Get assets onto Starknet[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-starknet-trading#step-1-get-assets-onto-starknet) Bridge BTC to Starknet as WBTC, or buy USDC/STRK directly: Check your Starknet balances: ### Step 2: Get swap quotes[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-starknet-trading#step-2-get-swap-quotes) Use `swap quote` to get pricing from AVNU and other integrated providers: Starknet-to-Starknet swaps settle instantly — no block confirmations needed. ### Step 3: Execute a swap[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-starknet-trading#step-3-execute-a-swap) #### Options[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-starknet-trading#options) Option Description `--from ` Source token (e.g. `starknet:USDC`) `--to ` Destination token (e.g. `starknet:WBTC`) `--amount ` Amount of the source token `--provider ` Use a specific provider `--slippage ` Slippage tolerance (percentage) `--yes` Execute (omit for dry run) ### Step 4: DCA into WBTC[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-starknet-trading#step-4-dca-into-wbtc) A DCA agent that accumulates WBTC from USDC at regular intervals: **Agent pseudocode:** ### Step 5: Harvest staking rewards[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-starknet-trading#step-5-harvest-staking-rewards) If your agent has staked WBTC, periodically claim STRK rewards and compound or convert: ### Step 6: Portfolio rebalancing[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-starknet-trading#step-6-portfolio-rebalancing) An agent that maintains a target allocation (e.g. 60% WBTC / 30% USDC / 10% STRK): ### Step 7: Cross-chain arbitrage[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-starknet-trading#step-7-cross-chain-arbitrage) Compare prices across chains and execute where the rate is best: * * * ### Putting it all together: Starknet trading agent[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-starknet-trading#putting-it-all-together-starknet-trading-agent) ### Available Starknet trading pairs[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-starknet-trading#available-starknet-trading-pairs) All Starknet-to-Starknet swaps settle instantly. Common pairs: From To Settlement `starknet:USDC` `starknet:WBTC` Instant `starknet:WBTC` `starknet:STRK` Instant `starknet:STRK` `starknet:USDC` Instant `starknet:USDC` `starknet:STRK` Instant Any Starknet ERC-20 Any Starknet ERC-20 Instant Cross-chain routes (BTC L1 ↔ Starknet) take ~10-30 minutes due to Bitcoin block confirmations. ### What's next[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-starknet-trading#whats-next) * Combine Starknet trading with [Lightning commerce](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-lightning-commerce) for agents that trade and accept payments * Add [Flashnet trading](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-flashnet-trading) for Spark-native trading pairs * Explore [treasury management](https://docs.xverse.app/xverse-agentic-wallet/capabilities/portfolio-and-treasury) for full cross-chain fund management [PreviousAgentic Flashnet Trading](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-flashnet-trading) Last updated 5 months ago * [◆ Guide: Agentic Starknet Trading](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-starknet-trading#guide-agentic-starknet-trading) * [What you'll build](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-starknet-trading#what-youll-build) * [Prerequisites](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-starknet-trading#prerequisites) * [Why Starknet?](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-starknet-trading#why-starknet) * [Step 1: Get assets onto Starknet](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-starknet-trading#step-1-get-assets-onto-starknet) * [Step 2: Get swap quotes](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-starknet-trading#step-2-get-swap-quotes) * [Step 3: Execute a swap](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-starknet-trading#step-3-execute-a-swap) * [Step 4: DCA into WBTC](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-starknet-trading#step-4-dca-into-wbtc) * [Step 5: Harvest staking rewards](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-starknet-trading#step-5-harvest-staking-rewards) * [Step 6: Portfolio rebalancing](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-starknet-trading#step-6-portfolio-rebalancing) * [Step 7: Cross-chain arbitrage](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-starknet-trading#step-7-cross-chain-arbitrage) * [Putting it all together: Starknet trading agent](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-starknet-trading#putting-it-all-together-starknet-trading-agent) * [Available Starknet trading pairs](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-starknet-trading#available-starknet-trading-pairs) * [What's next](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-starknet-trading#whats-next) Copy # Cross-chain swap: BTC L1 → Starknet WBTC (~10-30 min) xverse-wallet swap execute --from bitcoin:BTC --to starknet:WBTC --amount 0.01 --yes --json # Or BTC L1 → Starknet STRK xverse-wallet swap execute --from bitcoin:BTC --to starknet:STRK --amount 0.01 --yes --json # Or buy directly with fiat xverse-wallet fund buy --crypto WBTC --amount 100 xverse-wallet fund buy --crypto USDC --amount 100 Copy xverse-wallet starknet balance --json Copy # WBTC → STRK xverse-wallet swap quote --from starknet:WBTC --to starknet:STRK --amount 0.001 --json # USDC → WBTC xverse-wallet swap quote --from starknet:USDC --to starknet:WBTC --amount 100 --json # STRK → USDC xverse-wallet swap quote --from starknet:STRK --to starknet:USDC --amount 50 --json Copy # Preview xverse-wallet swap execute --from starknet:USDC --to starknet:WBTC --amount 100 --json # Execute xverse-wallet swap execute --from starknet:USDC --to starknet:WBTC --amount 100 --yes --json Copy # Run daily: xverse-wallet swap execute --from starknet:USDC --to starknet:WBTC --amount 50 --yes --json Copy every 24 hours: 1. Check USDC balance starknet balance --filter USDC --json 2. If balance >= target_amount: swap execute --from starknet:USDC --to starknet:WBTC --amount --yes --json 3. Optionally stake accumulated WBTC for STRK rewards: starknet staking deposit --token wbtc --amount --yes --json 4. Log trade result Copy # Check staking position and pending rewards xverse-wallet earn status --json # Claim STRK rewards xverse-wallet starknet staking claim --yes --json # Option A: Compound — swap STRK to WBTC and re-stake xverse-wallet swap execute --from starknet:STRK --to starknet:WBTC --amount 100 --yes --json xverse-wallet starknet staking deposit --token wbtc --amount 0.001 --yes --json # Option B: Take profit — swap STRK to USDC xverse-wallet swap execute --from starknet:STRK --to starknet:USDC --amount 100 --yes --json # Option C: Sweep to cold BTC storage xverse-wallet swap execute --from starknet:STRK --to bitcoin:BTC --amount 100 --yes --json Copy # 1. Check current allocation xverse-wallet starknet balance --json # 2. Rebalance overweight position xverse-wallet swap execute --from starknet:WBTC --to starknet:USDC --amount 0.0005 --yes --json # 3. Rebalance underweight position xverse-wallet swap execute --from starknet:USDC --to starknet:STRK --amount 20 --yes --json # 4. Verify xverse-wallet starknet balance --json Copy # Compare BTC → WBTC rates xverse-wallet swap quote --from bitcoin:BTC --to starknet:WBTC --amount 0.01 --json xverse-wallet swap quote --from bitcoin:BTC --to spark:BTC --amount 0.01 --json # Execute on the better rate xverse-wallet swap execute --from bitcoin:BTC --to starknet:WBTC --amount 0.01 --yes --json Copy ┌──────────────────────────────────────────────────────┐ │ Starknet Trading Agent │ │ │ │ 1. Check portfolio & Starknet balances │ │ portfolio --json │ │ starknet balance --json │ │ │ │ 2. Get quotes for target pairs │ │ swap quote --from starknet:USDC --to starknet:WBTC│ │ │ │ 3. Execute trades if conditions met │ │ swap execute ... --yes --json │ │ │ │ 4. Stake idle WBTC for STRK rewards │ │ starknet staking deposit --token wbtc ... │ │ │ │ 5. Periodically harvest + compound rewards │ │ starknet staking claim --yes │ │ swap execute --from starknet:STRK --to ... │ │ │ │ 6. Sweep profits to cold BTC storage │ │ swap execute --from starknet:WBTC --to bitcoin:BTC│ │ │ │ Loop on schedule or market signal. │ └──────────────────────────────────────────────────────┘ --- # Agentic Flashnet Trading | Xverse Agent Wallet | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-flashnet-trading.md) . ✨ Guide: Agentic Flashnet Trading[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-flashnet-trading#guide-agentic-flashnet-trading) -------------------------------------------------------------------------------------------------------------------------------------------------- Build AI agents that **trade on Flashnet** — the decentralized trading protocol on Spark. Instant swaps between Spark BTC and Spark-based tokens, powered by an offchain orderbook with on-chain settlement. ### What you'll build[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-flashnet-trading#what-youll-build) An agent that can: 1. **Get swap quotes** between Spark BTC and Spark tokens 2. **Execute trades** on Flashnet via the Xverse swap engine 3. **Run DCA strategies** — periodic small buys at regular intervals 4. **Rebalance a portfolio** between BTC and stablecoins on Spark 5. **Manage treasury** — sweep profits back to cold BTC storage ### Prerequisites[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-flashnet-trading#prerequisites) * Xverse Agentic Wallet CLI installed (`npm i -g @secretkeylabs/xverse-wallet-cli`) * A funded wallet with BTC on Spark (see [Getting Started](https://docs.xverse.app/xverse-agentic-wallet/getting-started) ) ### Why Flashnet?[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-flashnet-trading#why-flashnet) Flashnet is a trading protocol built on Spark that combines an offchain orderbook with fast, low-fee on-chain settlement. For agents, this means: * **Instant settlement** — swaps complete in seconds, not minutes * **Low fees** — no Bitcoin L1 confirmation overhead * **BTC-native** — trade between BTC and Spark-based tokens without leaving the Bitcoin ecosystem * **Programmatic access** — the Xverse swap engine routes through Flashnet automatically * * * ### Step 1: Fund Spark with BTC[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-flashnet-trading#step-1-fund-spark-with-btc) Your agent needs BTC on Spark to trade. Check and fund: Or if you have USDB or other Spark tokens, you're already set to swap. ### Step 2: Get swap quotes[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-flashnet-trading#step-2-get-swap-quotes) Use `swap quote` to get pricing from Flashnet and other available providers: The response includes quotes from all available providers with rates, output amounts, and fees. Your agent can compare and pick the best. ### Step 3: Execute a swap[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-flashnet-trading#step-3-execute-a-swap) #### Options[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-flashnet-trading#options) Option Description `--from ` Source token (e.g. `spark:BTC`) `--to ` Destination token (e.g. `spark:USDB`) `--amount ` Amount of the source token `--provider ` Use a specific provider `--slippage ` Slippage tolerance (percentage) `--yes` Execute (omit for dry run) ### Step 4: DCA strategy — periodic buys[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-flashnet-trading#step-4-dca-strategy-periodic-buys) A Dollar-Cost Averaging agent buys a fixed amount at regular intervals, regardless of price: **Agent pseudocode:** ### Step 5: Portfolio rebalancing[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-flashnet-trading#step-5-portfolio-rebalancing) An agent that maintains a target allocation between BTC and stablecoins: ### Step 6: Sweep to cold BTC storage[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-flashnet-trading#step-6-sweep-to-cold-btc-storage) Periodically move profits from Spark to Bitcoin L1: * * * ### Putting it all together: trading agent loop[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-flashnet-trading#putting-it-all-together-trading-agent-loop) ### Available Spark trading pairs[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-flashnet-trading#available-spark-trading-pairs) Run `swap quote` to discover currently available pairs. Common routes: From To Settlement `spark:BTC` `spark:USDB` Instant `spark:USDB` `spark:BTC` Instant Any Spark token Any Spark token Instant ### What's next[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-flashnet-trading#whats-next) * Combine Flashnet trading with [Lightning commerce](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-lightning-commerce) for agents that both trade and accept payments * Add [Starknet trading](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-starknet-trading) for deeper liquidity across AVNU DEX pairs * Explore [treasury management](https://docs.xverse.app/xverse-agentic-wallet/capabilities/portfolio-and-treasury) for cross-chain fund sweeping [PreviousAgentic Lightning Commerce](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-lightning-commerce) [NextAgentic Starknet Trading](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-starknet-trading) Last updated 5 months ago * [✨ Guide: Agentic Flashnet Trading](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-flashnet-trading#guide-agentic-flashnet-trading) * [What you'll build](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-flashnet-trading#what-youll-build) * [Prerequisites](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-flashnet-trading#prerequisites) * [Why Flashnet?](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-flashnet-trading#why-flashnet) * [Step 1: Fund Spark with BTC](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-flashnet-trading#step-1-fund-spark-with-btc) * [Step 2: Get swap quotes](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-flashnet-trading#step-2-get-swap-quotes) * [Step 3: Execute a swap](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-flashnet-trading#step-3-execute-a-swap) * [Step 4: DCA strategy — periodic buys](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-flashnet-trading#step-4-dca-strategy-periodic-buys) * [Step 5: Portfolio rebalancing](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-flashnet-trading#step-5-portfolio-rebalancing) * [Step 6: Sweep to cold BTC storage](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-flashnet-trading#step-6-sweep-to-cold-btc-storage) * [Putting it all together: trading agent loop](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-flashnet-trading#putting-it-all-together-trading-agent-loop) * [Available Spark trading pairs](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-flashnet-trading#available-spark-trading-pairs) * [What's next](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-flashnet-trading#whats-next) Copy # Check Spark balance xverse-wallet spark balance --json # If empty, deposit from L1 xverse-wallet spark deposit --amount 0.005 --yes --json # Wait ~30 min for confirmations, then: xverse-wallet spark claim --json Copy # BTC → USDB on Spark xverse-wallet swap quote --from spark:BTC --to spark:USDB --amount 0.001 --json # USDB → BTC on Spark xverse-wallet swap quote --from spark:USDB --to spark:BTC --amount 50 --json Copy # Preview (dry run) xverse-wallet swap execute --from spark:BTC --to spark:USDB --amount 0.001 --json # Execute (auto-selects best quote) xverse-wallet swap execute --from spark:BTC --to spark:USDB --amount 0.001 --yes --json # Or specify a provider xverse-wallet swap execute --from spark:BTC --to spark:USDB --amount 0.001 --provider --yes --json Copy # Run daily (or on any schedule): xverse-wallet swap execute --from spark:USDB --to spark:BTC --amount 10 --yes --json Copy every 24 hours: 1. Check USDB balance on Spark spark balance --json 2. If balance >= target_amount: swap execute --from spark:USDB --to spark:BTC --amount --yes --json 3. Log the trade result 4. Optionally sweep accumulated BTC to cold storage: spark withdraw --amount --speed fast --yes --json Copy # 1. Check current allocation xverse-wallet portfolio --json # 2. If overweight BTC, swap excess to USDB xverse-wallet swap execute --from spark:BTC --to spark:USDB --amount 0.0005 --yes --json # 3. If underweight BTC, swap USDB back xverse-wallet swap execute --from spark:USDB --to spark:BTC --amount 25 --yes --json # 4. Verify new allocation xverse-wallet portfolio --json Copy xverse-wallet spark withdraw --amount 0.01 --speed fast --yes --json Copy ┌──────────────────────────────────────────────────┐ │ Flashnet Trading Agent │ │ │ │ 1. Check portfolio & Spark balances │ │ portfolio --json │ │ spark balance --json │ │ │ │ 2. Get quotes for target trade │ │ swap quote --from spark:BTC --to spark:USDB │ │ │ │ 3. Execute if conditions met │ │ swap execute ... --yes --json │ │ │ │ 4. Verify result │ │ spark balance --json │ │ │ │ 5. Periodically sweep to cold BTC storage │ │ spark withdraw --amount --speed fast │ │ │ │ Loop on schedule or market signal. │ └──────────────────────────────────────────────────┘ --- # Register Portfolio Address | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/portfolio/register-portfolio-address.md) . Copy On this page Use this endpoint to register a portfolio address for continuous balance tracking. Xverse API will automatically keep its daily balance and activity updated. Once a portfolio address is registered, use [Get Portfolio Address History](https://docs.xverse.app/api/portfolio/get-portfolio-address-history) to query its balances posthttps://api.secretkeylabs.io/v1/portfolio/register Register an address to the portfolio for balance tracking. Authorizations apiKey x-api-keystringRequired Body application/json assetTypestringRequired addressesstring\[\]Required Responses 200 Default Response No content post/v1/portfolio/register HTTP Copy POST /v1/portfolio/register HTTP/1.1 Host: api.secretkeylabs.io x-api-key: YOUR_API_KEY Content-Type: application/json Accept: */* Content-Length: 41 { "assetType": "text", "addresses": [\ "text"\ ] } Test it 200 Default Response No content [PreviousPortfolio](https://docs.xverse.app/api/portfolio) [NextList Registered Portfolio Addresses](https://docs.xverse.app/api/portfolio/list-registered-portfolio-addresses) Last updated 7 months ago --- # Ordinals | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/ordinals.md) . Fetch detailed information on all **inscriptions**, **UTXOs**, **rare sats** — everything you need to power an **Ordinals experience**. **Automate Ordinal inscriptions** with advanced features. Estimate costs, create orders, and track inscription statuses seamlessly. [PreviousWatch Addresses](https://docs.xverse.app/api/watch-addresses) [NextOrdinals by Address](https://docs.xverse.app/api/ordinals/ordinals-by-address) Last updated 10 months ago --- # Bitcoin | Xverse Agent Wallet | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/xverse-agentic-wallet/capabilities/bitcoin.md) . Send, receive, and manage BTC on Bitcoin L1. ### Check balance[](https://docs.xverse.app/xverse-agentic-wallet/capabilities#check-balance) Copy xverse-wallet bitcoin balance --json Returns `native` (spendable, used for sends and Spark deposits), `taproot` (may be locked by Ordinals/Runes), and `total`. > **Important:** Only the `native` (segwit) balance is spendable for BTC sends and Spark deposits. The `taproot` balance may contain Ordinals or Runes and should not be spent directly. To check balances across multiple accounts: Copy xverse-wallet bitcoin balance --accounts 0-4 --json ### Receive BTC[](https://docs.xverse.app/xverse-agentic-wallet/capabilities#receive-btc) Copy xverse-wallet bitcoin receive --json Returns both your native segwit address (for receiving BTC) and taproot address (for receiving Ordinals). ### Send BTC[](https://docs.xverse.app/xverse-agentic-wallet/capabilities#send-btc) Amount is in BTC (e.g. `0.001` = 100,000 sats). Copy # Preview (dry run) xverse-wallet bitcoin send --to
--amount 0.001 --json # Execute xverse-wallet bitcoin send --to
--amount 0.001 --yes --json #### Options[](https://docs.xverse.app/xverse-agentic-wallet/capabilities#options) Option Description `--to
` Destination Bitcoin address `--amount ` Amount in BTC (e.g. `0.001`) `--fee-rate ` Fee rate in sat/vB (uses recommended if omitted) `--yes` Execute the transaction (omit for dry run) ### Check fee rates[](https://docs.xverse.app/xverse-agentic-wallet/capabilities#check-fee-rates) Copy xverse-wallet bitcoin fees --json Returns recommended fee rates (sat/vB) for different confirmation targets. ### Transaction history[](https://docs.xverse.app/xverse-agentic-wallet/capabilities#transaction-history) Copy xverse-wallet bitcoin history --json xverse-wallet bitcoin history --offset 10 --limit 5 --json [PreviousAgent Mode](https://docs.xverse.app/xverse-agentic-wallet/agent-mode) [NextSpark and Lightning](https://docs.xverse.app/xverse-agentic-wallet/capabilities/spark-and-lightning) Last updated 5 months ago --- # Portfolio | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/portfolio.md) . Monitor Bitcoin asset balances and activity across multiple addresses, with automatic daily tracking and historical portfolio insights. [PreviousBitcoin Price](https://docs.xverse.app/api/bitcoin/bitcoin-price) [NextRegister Portfolio Address](https://docs.xverse.app/api/portfolio/register-portfolio-address) Last updated 7 months ago --- # Address | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/spark/address.md) . [Spark Balances](https://docs.xverse.app/api/spark/address/spark-balances) [Spark Transaction History](https://docs.xverse.app/api/spark/address/spark-transaction-history) [Spark Address Summary](https://docs.xverse.app/api/spark/address/spark-address-summary) [PreviousSpark](https://docs.xverse.app/api/spark) [NextSpark Balances](https://docs.xverse.app/api/spark/address/spark-balances) --- # Watch Addresses | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/watch-addresses.md) . Copy On this page The Xverse API lets you **watch blockchain addresses** and receive transaction events as they happen. This is built for apps that need to react to on-chain activity — **without polling** — such as wallets, payment flows, portfolio trackers, and backend reconciliation systems. Address watching is currently available for **Bitcoin**. Support for **Spark** and **Starknet** webhooks is coming soon. * * * 🔔 Transaction Webhooks[](https://docs.xverse.app/api/watch-addresses#transaction-webhooks) -------------------------------------------------------------------------------------------- Webhooks are how Xverse delivers **address activity events** to your application. Once a webhook subscription is registered for a set of addresses: * Xverse monitors the addresses * Transaction events are pushed to your backend via HTTP POST * No custom indexing or node infrastructure is required #### Supported networks[](https://docs.xverse.app/api/watch-addresses#supported-networks) Network Status Bitcoin ✅ Live Runes, Ordinals and BRC-20 ✅ Live Spark ⏳ Coming soon Starknet ⏳ Coming soon Stacks ⏳ Coming soon You can subscribe to: * Incoming transactions * Outgoing transactions * * * 👀 Register a Webhook Subscription[](https://docs.xverse.app/api/watch-addresses#register-a-webhook-subscription) ------------------------------------------------------------------------------------------------------------------ Start watching a set of addresses. * Registers the address for transaction monitoring * Enables webhook notifications for relevant transactions involving the addresses Currently supports Bitcoin addresses only. Spark & Starknet will be added soon and follow the same model. posthttps://api.secretkeylabs.io/v1/subscription Register a subscription for events. Authorizations apiKey x-api-keystringRequired Body application/json webhookEndpointobjectRequired Show properties subscriptionAddressPredicateobjectRequired Show properties Responses 200 Default Response No content post/v1/subscription HTTP Copy POST /v1/subscription HTTP/1.1 Host: api.secretkeylabs.io x-api-key: YOUR_API_KEY Content-Type: application/json Accept: */* Content-Length: 88 { "webhookEndpoint": { "url": "text" }, "subscriptionAddressPredicate": { "addresses": [\ "text"\ ] } } Test it 200 Default Response No content * * * ### 📬 Webhook Payload (Bitcoin)[](https://docs.xverse.app/api/watch-addresses#webhook-payload-bitcoin) When a transaction involving any of the watched addresses is confirmed, Xverse sends a POST request to your webhook URL: Payloads for Spark and Starknet will follow a similar structure. * * * ### 📄 List Webhook Subscriptions[](https://docs.xverse.app/api/watch-addresses#list-webhook-subscriptions) Returns all active address-watching webhook subscriptions for your API key. **Use this to** * Inspect active address watchers * Debug webhook behavior * Manage multiple monitored sets of addresses gethttps://api.secretkeylabs.io/v1/subscription Get registered subscriptions. Authorizations apiKey x-api-keystringRequired Query parameters offsetnumberOptionalDefault: `0` limitnumber · min: 25 · max: 25OptionalDefault: `25` Responses 200 Default Response application/json limitnumberRequired offsetnumberRequired totalnumberRequired itemsobject\[\]Required Show properties 400 Invalid input application/json 401 Unauthorized application/json 404 Not found application/json 429 Rate limit exceeded application/json 500 Internal server error application/json get/v1/subscription HTTP Copy GET /v1/subscription HTTP/1.1 Host: api.secretkeylabs.io x-api-key: YOUR_API_KEY Accept: */* Test it 200 Default Response Copy { "limit": 1, "offset": 1, "total": 1, "items": [\ {\ "id": 1,\ "webhookEndpoint": {\ "url": "text",\ "updatedAt": "text"\ },\ "subscriptionAddressPredicate": {\ "addresses": [\ "text"\ ],\ "updatedAt": "text"\ }\ }\ ] } * * * ### ❌ Delete a Subscription[](https://docs.xverse.app/api/watch-addresses#delete-a-subscription) Stop watching a set of addresses by deleting the webhook subscription. **Use this to** * Stop receiving notifications for an address * Clean up unused subscriptions deletehttps://api.secretkeylabs.io/v1/subscription/{subscriptionId} Delete subscriptions. Authorizations apiKey x-api-keystringRequired Path parameters subscriptionIdnumberRequired Responses 200 Default Response No content delete/v1/subscription/{subscriptionId} HTTP Copy DELETE /v1/subscription/{subscriptionId} HTTP/1.1 Host: api.secretkeylabs.io x-api-key: YOUR_API_KEY Accept: */* Test it 200 Default Response No content [PreviousGet Portfolio Address History](https://docs.xverse.app/api/portfolio/get-portfolio-address-history) [NextOrdinals](https://docs.xverse.app/api/ordinals) Last updated 5 months ago * [🔔 Transaction Webhooks](https://docs.xverse.app/api/watch-addresses#transaction-webhooks) * [👀 Register a Webhook Subscription](https://docs.xverse.app/api/watch-addresses#register-a-webhook-subscription) * [post/v1/subscription](https://docs.xverse.app/api/watch-addresses#post-v1-subscription) * [📬 Webhook Payload (Bitcoin)](https://docs.xverse.app/api/watch-addresses#webhook-payload-bitcoin) * [📄 List Webhook Subscriptions](https://docs.xverse.app/api/watch-addresses#list-webhook-subscriptions) * [get/v1/subscription](https://docs.xverse.app/api/watch-addresses#get-v1-subscription) * [❌ Delete a Subscription](https://docs.xverse.app/api/watch-addresses#delete-a-subscription) * [DEL/v1/subscription/{subscriptionId}](https://docs.xverse.app/api/watch-addresses#delete-v1-subscription-subscriptionid) Copy [\ {\ "status": "confirmed",\ "address": "bc1qjpnsvwgsxtf005x2qd28l3zlmexa3095fa6g4e",\ "totalSatsIn": "0",\ "totalSatsOut": "1421459",\ "txid": "cc46ce35c459cd91585ec3848e0ec58b10a24770da5cdd264da41da7b3f07649",\ "blockHeight": 928800,\ "blockTime": "2025-12-21T07:42:08.000+02:00"\ }\ ] --- # Estimate | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/ordinals/inscription-service/estimate.md) . Copy On this page posthttps://api.secretkeylabs.io/v1/inscriptions/estimate ### Coming soon...[](https://docs.xverse.app/api/ordinals/inscription-service/estimate#) Estimate total cost for a new inscription order. Authorizations apiKey x-api-keystringRequired Body application/json objectOptional Responses 200 Default Response application/json objectOptional post/v1/inscriptions/estimate HTTP Copy POST /v1/inscriptions/estimate HTTP/1.1 Host: api.secretkeylabs.io x-api-key: YOUR_API_KEY Content-Type: application/json Accept: */* Content-Length: 2 {} Test it 200 Default Response Copy {} [PreviousInscription Service](https://docs.xverse.app/api/ordinals/inscription-service) [NextOrder](https://docs.xverse.app/api/ordinals/inscription-service/order) Last updated 1 year ago --- # Transactions | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/spark/transactions.md) . [Spark Transaction Details](https://docs.xverse.app/api/spark/transactions/spark-transaction-details) [Latest Spark Transactions](https://docs.xverse.app/api/spark/transactions/latest-spark-transactions) [PreviousSpark Address Summary](https://docs.xverse.app/api/spark/address/spark-address-summary) [NextSpark Transaction Details](https://docs.xverse.app/api/spark/transactions/spark-transaction-details) --- # BRC-20 | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/brc-20.md) . Query **BRC-20 balances, metadata & market data**. Integrate BRC-20 into your apps without building infra. **Mint** and **deploy BRC-20 tokens**, with cost estimates, order management and execution. [PreviousList Rune Etch Orders](https://docs.xverse.app/api/runes/etch-rune/list-rune-etch-orders) [NextBRC-20 by Address](https://docs.xverse.app/api/brc-20/brc-20-by-address) Last updated 11 months ago --- # ⚡ MPP Lightning Payments | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/mpp-lightning-payments.md) . The Xverse API supports the **Machine Payments Protocol (MPP)** — a pay-per-request authentication method over the Lightning Network. Instead of provisioning an API key, your client can pay a small Lightning invoice for each request. This is built for **AI agents and autonomous clients** that need to access the API without human-managed credentials. Agents using the [Xverse Agent Wallet](https://docs.xverse.app/xverse-agentic-wallet/) handle MPP payments transparently — the agent calls an endpoint, the wallet pays the Lightning invoice in the background, and the response comes back. No checkout, no human approval, no API key. MPP is an open standard defined at [mpp.dev](https://mpp.dev/) . Any Lightning-compatible wallet or SDK can use it. ### 🔁 How it works[](https://docs.xverse.app/api/mpp-lightning-payments#how-it-works) MPP uses an HTTP 402 challenge-response flow: #### Step 1 — Request without credentials[](https://docs.xverse.app/api/mpp-lightning-payments#step-1-request-without-credentials) Send a request to any endpoint without an `x-api-key` or `Authorization` header. The server responds with **HTTP 402 Payment Required** and a Lightning invoice challenge in the `WWW-Authenticate` header: Copy GET /v1/bitcoin/price HTTP/1.1 Host: api.secretkeylabs.io Copy HTTP/1.1 402 Payment Required WWW-Authenticate: Payment id="", realm="https://api.secretkeylabs.io", method="lightning", amount="1", ... Cache-Control: no-store Content-Type: application/problem+json { "type": "https://paymentauth.org/problems/payment-required", "title": "Payment Required", "status": 402 } The `WWW-Authenticate` header contains everything needed to pay the invoice, including the Lightning payment details and the amount in satoshis. #### Step 2 — Pay the Lightning invoice[](https://docs.xverse.app/api/mpp-lightning-payments#step-2-pay-the-lightning-invoice) Extract the Lightning invoice from the 402 challenge and pay it using any Lightning-compatible wallet or SDK. Upon successful payment, you receive a **preimage** — the cryptographic proof of payment. #### Step 3 — Retry with the payment credential[](https://docs.xverse.app/api/mpp-lightning-payments#step-3-retry-with-the-payment-credential) Retry the same request with the payment credential in the `Authorization` header: The credential contains the preimage and is bound to the route it was issued for. On success, the server returns the API response along with a `Payment-Receipt` header: ### 💰 Pricing[](https://docs.xverse.app/api/mpp-lightning-payments#pricing) All API endpoints are priced at **1 satoshi per request**. ### 🔐 Authentication methods[](https://docs.xverse.app/api/mpp-lightning-payments#authentication-methods) Every endpoint supports two authentication methods. You can use either one: Method Header Description **API Key** `x-api-key: ` Traditional API key with rate limiting **MPP Payment** `Authorization: Payment ` Pay-per-request via Lightning, no rate limiting If both headers are present, MPP is checked first. If MPP verification fails but an API key is present, the request falls back to API key authentication. > MPP-authenticated requests **bypass rate limiting** — you pay per request instead. ### 🛣️ Route binding[](https://docs.xverse.app/api/mpp-lightning-payments#route-binding) Payment credentials are bound to the specific endpoint they were issued for. A credential obtained for `/v1/bitcoin/price` cannot be reused on `/v1/runes`. Attempting to use a credential on a different route returns **HTTP 403 Forbidden**: ### ⚠️ Error responses[](https://docs.xverse.app/api/mpp-lightning-payments#error-responses) Status Code Meaning **402 Payment Required** No payment credential provided. Response includes a Lightning invoice challenge in the `WWW-Authenticate` header. **403 Forbidden** Payment credential is valid but was issued for a different route. **500 Payment service unavailable** The payment service encountered an error. Retry the request. ### 🤖 Built for AI agents[](https://docs.xverse.app/api/mpp-lightning-payments#built-for-ai-agents) MPP is designed for autonomous AI agent workflows. Agents can detect 402 challenges, pay Lightning invoices, and retry with credentials — enabling fully autonomous access to Bitcoin data and services. #### Xverse Agent Wallet[](https://docs.xverse.app/api/mpp-lightning-payments#xverse-agent-wallet) The [**Xverse Agent Wallet**](https://docs.xverse.app/xverse-agentic-wallet/) is purpose-built for AI agents that need to interact with Bitcoin. An AI agent equipped with Xverse Agent Wallet can autonomously call any MPP-enabled endpoint and handle the Lightning payment without human intervention. The agent wallet manages: * Lightning payments for MPP 402 challenges * Key management and credential handling * Automatic retry with payment credentials This is the simplest way to give your AI agent full access to the Xverse API via MPP. From the agent's CLI: See the [Machine Payments page in the Agent Wallet docs](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-lightning-commerce#step-4-call-paid-apis-automatically-mpp) for the full agent workflow. #### Other integrations[](https://docs.xverse.app/api/mpp-lightning-payments#other-integrations) You can also integrate MPP using any Lightning-compatible wallet or SDK. Libraries like [`mppx`](https://www.npmjs.com/package/mppx) provide client SDKs that handle the 402 challenge-response flow automatically, and any [Spark](https://www.spark.money/) \-compatible wallet can be used for Lightning payments. ### 📚 Example: full flow[](https://docs.xverse.app/api/mpp-lightning-payments#example-full-flow) A complete example using `curl`: **1\. Request without credentials (get the 402 challenge):** **2\. Parse the** `**WWW-Authenticate**` **header, extract the Lightning invoice, and pay it using your wallet.** **3\. Retry with the payment credential:** The response includes a `Payment-Receipt` header confirming the payment was processed. ### 🟢 Available endpoints[](https://docs.xverse.app/api/mpp-lightning-payments#available-endpoints) **Every endpoint in the Xverse API supports MPP Lightning payments** — Bitcoin, Blocks, BRC-20, Inscriptions, Ordinals, Runes, Spark, Swaps, Subscriptions, Portfolio, and Bitcoin RPC (v1 and v2). Browse the live catalog from the Agent Wallet CLI: Or see the full module reference: * [Bitcoin API](https://docs.xverse.app/api/bitcoin) * [Ordinals API](https://docs.xverse.app/api/ordinals) * [Runes API](https://docs.xverse.app/api/runes) * [BRC-20 API](https://docs.xverse.app/api/brc-20) * [Spark API](https://docs.xverse.app/api/spark) * [Portfolio API](https://docs.xverse.app/api/portfolio) * [Swap Aggregator](https://docs.xverse.app/api/swaps) [PreviousGet Started](https://docs.xverse.app/api/get-started) [NextMCP Server](https://docs.xverse.app/api/mcp-server) Last updated 5 months ago * [🔁 How it works](https://docs.xverse.app/api/mpp-lightning-payments#how-it-works) * [💰 Pricing](https://docs.xverse.app/api/mpp-lightning-payments#pricing) * [🔐 Authentication methods](https://docs.xverse.app/api/mpp-lightning-payments#authentication-methods) * [🛣️ Route binding](https://docs.xverse.app/api/mpp-lightning-payments#route-binding) * [⚠️ Error responses](https://docs.xverse.app/api/mpp-lightning-payments#error-responses) * [🤖 Built for AI agents](https://docs.xverse.app/api/mpp-lightning-payments#built-for-ai-agents) * [📚 Example: full flow](https://docs.xverse.app/api/mpp-lightning-payments#example-full-flow) * [🟢 Available endpoints](https://docs.xverse.app/api/mpp-lightning-payments#available-endpoints) Copy GET /v1/bitcoin/price HTTP/1.1 Host: api.secretkeylabs.io Authorization: Payment Copy HTTP/1.1 200 OK Payment-Receipt: Content-Type: application/json { ... } Copy { "type": "https://paymentauth.org/problems/invalid-credential", "title": "Forbidden", "status": 403, "detail": "Credential was issued for /v1/bitcoin/price, not /v1/runes" } Copy # Preview cost (dry run) xverse-wallet pay request https://api.secretkeylabs.io/v1/bitcoin/price --json # Execute the paid request xverse-wallet pay request https://api.secretkeylabs.io/v1/bitcoin/price --yes --json # Discover MPP-enabled endpoints xverse-wallet pay api --json Copy curl -i https://api.secretkeylabs.io/v1/bitcoin/price Copy curl -H "Authorization: Payment " \ https://api.secretkeylabs.io/v1/bitcoin/price Copy xverse-wallet pay api --json --- # Bitcoin | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/bitcoin.md) . Bitcoin RPC, real-time and comprehensive **Bitcoin mempool & transaction data**, advanced indexing of **UTXOs & balances**, optimised for apps and dashboards. [PreviousMCP Server](https://docs.xverse.app/api/mcp-server) [NextAddress](https://docs.xverse.app/api/bitcoin/address) Last updated 9 months ago --- # Inscription Service | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/ordinals/inscription-service.md) . **Automate Ordinal inscriptions** with advanced features. Estimate costs, create orders, and track inscription statuses seamlessly. [PreviousInscription Activity](https://docs.xverse.app/api/ordinals/inscriptions/inscription-activity) [NextEstimate](https://docs.xverse.app/api/ordinals/inscription-service/estimate) Last updated 10 months ago --- # Swaps | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/swaps.md) . Seamlessly **integrate Bitcoin-asset swaps into your application.** Aggregate **quotes** from multiple **AMMs** across **Bitcoin and L2s**, generate and execute swap orders, and facilitate cross-chain swaps—all through a unified interface. [PreviousBTKN Token Rankings](https://docs.xverse.app/api/spark/btkn-tokens/btkn-token-rankings) [NextGet destination tokens](https://docs.xverse.app/api/swaps/get-destination-tokens) Last updated 1 year ago --- # Mint BRC-20 | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/brc-20/mint-brc-20.md) . [Estimate](https://docs.xverse.app/api/brc-20/mint-brc-20/estimate) [Order](https://docs.xverse.app/api/brc-20/mint-brc-20/order) [PreviousBRC-20 Transfer Validity Check](https://docs.xverse.app/api/brc-20/brc-20-transfer-validity-check) [NextEstimate](https://docs.xverse.app/api/brc-20/mint-brc-20/estimate) --- # Estimate | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/brc-20/deploy-brc-20/estimate.md) . Copy On this page posthttps://api.secretkeylabs.io/v1/brc20/deploy/estimate ### Coming soon...[](https://docs.xverse.app/api/brc-20/deploy-brc-20/estimate#) Estimate the total cost for deploying a new BRC-20 token. Authorizations apiKey x-api-keystringRequired Body application/json objectOptional Responses 200 Default Response application/json objectOptional post/v1/brc20/deploy/estimate HTTP Copy POST /v1/brc20/deploy/estimate HTTP/1.1 Host: api.secretkeylabs.io x-api-key: YOUR_API_KEY Content-Type: application/json Accept: */* Content-Length: 2 {} Test it 200 Default Response Copy {} [PreviousDeploy BRC-20](https://docs.xverse.app/api/brc-20/deploy-brc-20) [NextOrder](https://docs.xverse.app/api/brc-20/deploy-brc-20/order) Last updated 1 year ago --- # Order | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/ordinals/inscription-service/order.md) . Copy On this page posthttps://api.secretkeylabs.io/v1/inscriptions/order ### Coming soon...[](https://docs.xverse.app/api/ordinals/inscription-service/order#) Create an inscription order (returns a funding address to pay). Authorizations apiKey x-api-keystringRequired Body application/json objectOptional Responses 200 Default Response application/json objectOptional post/v1/inscriptions/order HTTP Copy POST /v1/inscriptions/order HTTP/1.1 Host: api.secretkeylabs.io x-api-key: YOUR_API_KEY Content-Type: application/json Accept: */* Content-Length: 2 {} Test it 200 Default Response Copy {} gethttps://api.secretkeylabs.io/v1/inscriptions/order/{orderId} ### Coming soon...[](https://docs.xverse.app/api/ordinals/inscription-service/order#) Retrieve status for a given inscription order. Authorizations apiKey x-api-keystringRequired Path parameters orderIdstringRequired Responses 200 Default Response application/json objectOptional get/v1/inscriptions/order/{orderId} HTTP Copy GET /v1/inscriptions/order/{orderId} HTTP/1.1 Host: api.secretkeylabs.io x-api-key: YOUR_API_KEY Accept: */* Test it 200 Default Response Copy {} [PreviousEstimate](https://docs.xverse.app/api/ordinals/inscription-service/estimate) [NextExecute](https://docs.xverse.app/api/ordinals/inscription-service/order/execute) Last updated 1 year ago * [post/v1/inscriptions/order](https://docs.xverse.app/api/ordinals/inscription-service/order#post-v1-inscriptions-order) * [get/v1/inscriptions/order/{orderId}](https://docs.xverse.app/api/ordinals/inscription-service/order#get-v1-inscriptions-order-orderid) --- # Agentic Lightning Commerce | Xverse Agent Wallet | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-lightning-commerce.md) . Build AI agents that **pay and get paid on Lightning rails** — sub-cent fees, sub-second settlement, fully programmatic. This is the core payment primitive for machine-to-machine commerce on Bitcoin. ### What you'll build[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-lightning-commerce#what-youll-build) An agent that can: 1. **Accept payments** by creating Lightning invoices via Spark 2. **Make payments** by paying Lightning invoices programmatically 3. **Call paid APIs** that settle over Lightning automatically (MPP) 4. **Manage a continuous commerce loop** — receive payments, process orders, sweep profits to cold BTC storage ### Prerequisites[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-lightning-commerce#prerequisites) * Xverse Agentic Wallet CLI installed (`npm i -g @secretkeylabs/xverse-wallet-cli`) * A funded wallet with BTC on Spark (see [Getting Started](https://claude.ai/chat/getting-started.md) ) * * * ### Step 1: Fund your Spark balance[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-lightning-commerce#step-1-fund-your-spark-balance) Lightning payments require BTC on Spark. If your agent's Spark balance is empty, fund it from Bitcoin L1: Copy # Check current Spark balance xverse-wallet spark balance --json # If empty, deposit from L1 (requires ~30 min for 3 confirmations) xverse-wallet bitcoin balance --json # confirm you have native BTC xverse-wallet spark deposit --amount 0.001 --yes --json # Wait for confirmations, then claim xverse-wallet spark claim --json > **Tip:** If you have BTC on another account, check all accounts first: `xverse-wallet portfolio --accounts 0-4 --json`. You can pay from a specific account using `-a `. ### Step 2: Accept payments — create Lightning invoices[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-lightning-commerce#step-2-accept-payments-create-lightning-invoices) Your agent acts as a merchant and generates invoices for incoming payments: This returns a BOLT11 invoice string that any Lightning-enabled wallet or agent can pay. The amount is in satoshis. **Example agent loop — accept and process orders:** ### Step 3: Make payments — pay Lightning invoices[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-lightning-commerce#step-3-make-payments-pay-lightning-invoices) Your agent pays another service or merchant: The agent can pay any valid BOLT11 invoice — from another Xverse wallet, a BTCPay Server merchant, a Lightning-enabled API, or any node on the Lightning Network. ### Step 4: Call paid APIs automatically (MPP)[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-lightning-commerce#step-4-call-paid-apis-automatically-mpp) The Machine Payments Protocol (MPP) lets your agent call HTTP APIs that require Lightning payment — without any manual payment flow. The CLI handles the full cycle: request → 402 challenge → Lightning payment → credential → response. **The Xverse API is fully MPP-enabled.** Every endpoint in the [Xverse API](https://docs.xverse.app/api/) — Bitcoin RPC, Ordinals, Runes, BRC-20, Spark, Swaps, Portfolio — accepts Lightning payment at **1 satoshi per request**, with no API key required. See [MPP Lightning Payments](https://docs.xverse.app/api/mpp-lightning-payments) in the Xverse API docs for the full spec. Your agent can call any MPP-enabled endpoint the same way — data APIs, RPC calls, indexer queries: ### Step 5: Treasury management — sweep profits[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-lightning-commerce#step-5-treasury-management-sweep-profits) Periodically move accumulated BTC from Spark to cold Bitcoin L1 storage: Or rebalance into stablecoins: * * * ### Putting it all together: continuous commerce loop[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-lightning-commerce#putting-it-all-together-continuous-commerce-loop) Here's the full agent pattern for a Lightning-powered service: ### Key numbers[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-lightning-commerce#key-numbers) Metric Value Settlement time < 1 second Transaction fees Sub-cent (< $0.001) Invoice creation Instant L1 deposit time ~30 min (3 confirmations) L1 withdrawal time Depends on speed setting ### What's next[](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-lightning-commerce#whats-next) * Explore the full MPP API catalog to see what paid APIs are available * Explore the [**Xverse API**](https://docs.xverse.app/api/) — every endpoint is MPP-enabled and pays via Lightning at 1 sat per request. See [MPP Lightning Payments](https://docs.xverse.app/api/mpp-lightning-payments) for the full spec, or run `xverse-wallet pay api --json` to discover endpoints from the CLI. * Add [treasury management](https://docs.xverse.app/xverse-agentic-wallet/capabilities/portfolio-and-treasury) patterns for rebalancing and yield * Combine with [Starknet trading](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-starknet-trading) or [Flashnet trading](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-flashnet-trading) for agents that both pay and trade [PreviousRunes](https://docs.xverse.app/xverse-agentic-wallet/capabilities/runes) [NextAgentic Flashnet Trading](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-flashnet-trading) Last updated 5 months ago * [What you'll build](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-lightning-commerce#what-youll-build) * [Prerequisites](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-lightning-commerce#prerequisites) * [Step 1: Fund your Spark balance](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-lightning-commerce#step-1-fund-your-spark-balance) * [Step 2: Accept payments — create Lightning invoices](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-lightning-commerce#step-2-accept-payments-create-lightning-invoices) * [Step 3: Make payments — pay Lightning invoices](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-lightning-commerce#step-3-make-payments-pay-lightning-invoices) * [Step 4: Call paid APIs automatically (MPP)](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-lightning-commerce#step-4-call-paid-apis-automatically-mpp) * [Step 5: Treasury management — sweep profits](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-lightning-commerce#step-5-treasury-management-sweep-profits) * [Putting it all together: continuous commerce loop](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-lightning-commerce#putting-it-all-together-continuous-commerce-loop) * [Key numbers](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-lightning-commerce#key-numbers) * [What's next](https://docs.xverse.app/xverse-agentic-wallet/guides/agentic-lightning-commerce#whats-next) Copy xverse-wallet spark lightning invoice --amount 50000 --memo "Order #1234" --json Copy #!/bin/bash # 1. Create an invoice for the order INVOICE=$(xverse-wallet spark lightning invoice --amount 50000 --memo "Order #1234" --quiet) echo "Invoice: $INVOICE" # 2. Poll for payment (check balance / history) while true; do BALANCE=$(xverse-wallet spark balance --json) LATEST=$(xverse-wallet spark history --token BTC --limit 1 --json) # Parse and check if payment received... sleep 5 done # 3. Process the order # 4. Optionally sweep to cold storage Copy # Estimate the fee first xverse-wallet spark lightning estimate --invoice --json # Pay the invoice xverse-wallet spark lightning pay --invoice --yes --json Copy # Preview cost (no payment) xverse-wallet pay request https://api.secretkeylabs.io/v1/bitcoin/price --json # Pay and get the response xverse-wallet pay request https://api.secretkeylabs.io/v1/bitcoin/price --yes --json Copy # Get rune info (paid) xverse-wallet pay request https://api.secretkeylabs.io/v1/runes/DOG%E2%80%A2GO%E2%80%A2TO%E2%80%A2THE%E2%80%A2MOON --yes --json # Broadcast a transaction (paid POST) xverse-wallet pay request https://api.secretkeylabs.io/v1/rpc/bitcoin/tx \ --method POST --body '{"tx":"0200..."}' --yes --json # Discover all available endpoints xverse-wallet pay api --json Copy # Check accumulated balance xverse-wallet spark balance --json # Sweep to cold BTC vault xverse-wallet spark withdraw --amount 0.005 --speed fast --yes --json Copy xverse-wallet swap execute --from spark:BTC --to spark:USDB --amount 0.001 --yes --json Copy ┌─────────────────────────────────────────────────┐ │ Agent Loop │ │ │ │ 1. Create invoice for customer order │ │ spark lightning invoice --amount │ │ │ │ 2. Wait for payment │ │ Poll spark history / spark balance │ │ │ │ 3. Process the order │ │ (your business logic) │ │ │ │ 4. Call paid APIs if needed │ │ pay request --yes │ │ │ │ 5. Periodically sweep profits to cold storage │ │ spark withdraw --amount --speed fast │ │ │ │ Loop back to 1. │ └─────────────────────────────────────────────────┘ --- # Spark | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/spark.md) . Query [**Spark**](https://www.spark.money/) **balances, transactions & activity** for **Bitcoin** & **BTKN** tokens. Access **BTKN Tokens** & [**Flashnet**](https://www.flashnet.xyz/) market & trading data. Integrate **Spark** & **Flashnet** into your apps without building infra. [PreviousExecute](https://docs.xverse.app/api/brc-20/deploy-brc-20/order/execute) [NextAddress](https://docs.xverse.app/api/spark/address) Last updated 10 months ago --- # Inscriptions | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/ordinals/inscriptions.md) . [Inscription by ID](https://docs.xverse.app/api/ordinals/inscriptions/inscription-by-id) [Inscription Thumbnail](https://docs.xverse.app/api/ordinals/inscriptions/inscription-thumbnail) [Inscriptions by IDs](https://docs.xverse.app/api/ordinals/inscriptions/inscriptions-by-ids) [Inscription Activity](https://docs.xverse.app/api/ordinals/inscriptions/inscription-activity) [Previous\[v2\] Collection Historical Floor Prices](https://docs.xverse.app/api/ordinals/collections/v2-collection-historical-floor-prices) [NextInscription by ID](https://docs.xverse.app/api/ordinals/inscriptions/inscription-by-id) Last updated 10 months ago --- # MCP Server | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/mcp-server.md) . The Xverse MCP server provides a standardized interface that allows any compatible AI model or agent to access Bitcoin blockchain data through the Xverse API — including Bitcoin transactions, Ordinals, Runes, BRC-20, Spark, and swap quotes. Connect to the MCP server natively in Claude, Cursor, and other clients, or use the `mcp-remote` module for backwards compatibility with clients that do not support remote MCP. The Xverse MCP server is centrally hosted, uses [Streamable HTTP](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#streamable-http) transport, and authenticates with your existing Xverse API key. It exposes **54 read-only tools** across Bitcoin, Ordinals, Runes, BRC-20, Spark, and Swaps — with more functionality on the way. * * * Setup Instructions[](https://docs.xverse.app/api/mcp-server#setup-instructions) -------------------------------------------------------------------------------- ### General[](https://docs.xverse.app/api/mcp-server#general) The MCP server supports Streamable HTTP transport and authenticates via your Xverse API key passed as a Bearer token: Copy https://mcp.secretkeylabs.io/mcp Authentication: `Authorization: Bearer ` You can get an API key from the Get Started page. * * * ### Claude Code[](https://docs.xverse.app/api/mcp-server#claude-code) Copy claude mcp add --transport http xverse https://mcp.secretkeylabs.io/mcp \ --header "Authorization: Bearer " Then run `/mcp` once you've opened a Claude Code session to verify the connection. * * * ### Cursor[](https://docs.xverse.app/api/mcp-server#cursor) `CTRL/CMD` + `,` to open Cursor settings. Navigate to the MCP tools page and add a new server with the following configuration: * * * ### Visual Studio Code[](https://docs.xverse.app/api/mcp-server#visual-studio-code) `CTRL/CMD` + `P` and search for **MCP: Add Server**. Select **Command (stdio)** and enter: Enter the name **Xverse** and hit enter. Activate the server using **MCP: List Servers**, selecting Xverse, and selecting **Start Server**. Alternatively, add to your VS Code MCP settings file: * * * ### Codex[](https://docs.xverse.app/api/mcp-server#codex) Run the following command in Terminal: If this is your first MCP in Codex, enable the `rmcp` feature first: * * * ### Windsurf[](https://docs.xverse.app/api/mcp-server#windsurf) `CTRL/CMD` + `,` to open Windsurf settings. Scroll to **Cascade → MCP servers**, select **Add Server → Add custom server**, and add: * * * ### Zed[](https://docs.xverse.app/api/mcp-server#zed) `CMD` + `,` to open Zed settings. Add the following: * * * ### Others[](https://docs.xverse.app/api/mcp-server#others) Many tools now support MCP servers. Configure them with the following settings: Setting Value **Command** `npx` **Arguments** `-y mcp-remote https://mcp.secretkeylabs.io/mcp --header "Authorization: Bearer "` **Environment** None * * * Available Tools[](https://docs.xverse.app/api/mcp-server#available-tools) -------------------------------------------------------------------------- The MCP server exposes 54 read-only tools organized by domain. All tools correspond to endpoints in the Xverse API. ### 🟠 Bitcoin[](https://docs.xverse.app/api/mcp-server#bitcoin) Tool Description `bitcoin_get_fee_estimates` Current mempool fee estimates for next blocks `bitcoin_get_mempool_stats` Projected mempool block statistics `bitcoin_get_transaction` Transaction details including inputs, outputs, and confirmations `bitcoin_get_transaction_hex` Raw transaction hex `bitcoin_get_address_balance` Confirmed and unconfirmed balance for an address `bitcoin_get_address_utxos` Mempool-aware UTXOs with inscription filtering `bitcoin_get_address_summary` Address summary with recent transaction IDs `bitcoin_get_address_unconfirmed_txs` Pending mempool transactions for an address `bitcoin_get_price` Current BTC price ### 🖼️ Ordinals & Collections[](https://docs.xverse.app/api/mcp-server#ordinals-and-collections) Tool Description `ordinals_get_address_utxos` UTXOs containing inscriptions or rare sats `ordinals_get_address_inscriptions` Inscriptions owned by an address `ordinals_get_address_collections` Collections held by an address `ordinals_get_inscription` Single inscription details `ordinals_get_inscription_activity` Inscription transfer history `ordinals_batch_get_inscriptions` Batch inscription lookup (max 25) `ordinals_get_transaction` Inscription-enriched transaction details `ordinals_get_transaction_inputs` Inscription-enriched transaction inputs `ordinals_get_transaction_outputs` Inscription-enriched transaction outputs `ordinals_batch_get_outputs` Batch output details (max 20) `ordinals_list_collections` Browse ordinal collections `ordinals_get_collection` Collection metadata and market info `ordinals_get_collection_holders` Collection holder list `ordinals_get_collection_inscriptions` Inscriptions in a collection `ordinals_get_collection_floor_prices` Historical floor price data `ordinals_top_collections_by_volume` Top collections ranked by trading volume ### 🔲 Runes[](https://docs.xverse.app/api/mcp-server#runes) Tool Description `runes_get_address_balances` All Runes balances for an address `runes_get_address_activity` Rune activity for a specific address and rune `runes_get_address_utxos` Mempool-aware Rune UTXOs `runes_get_info` Rune details — supply, symbol, divisibility, market data `runes_get_holders` Top holders for a rune `runes_get_activity` Recent transfer and mint activity `runes_batch_get_info` Batch rune info (max 10) `runes_top_by_volume` Top runes ranked by trading volume `runes_top_gainers_losers` Top gainers and losers by price change `runes_get_floor_prices` Historical floor price data `runes_decode_runestone` Decode runestone data from raw transaction hex ### 🪙 BRC-20[](https://docs.xverse.app/api/mcp-server#brc-20) Tool Description `brc20_get_address_balances` All BRC-20 balances for an address `brc20_get_address_ticker_balance` Balance for a specific BRC-20 token `brc20_get_address_unspent_transfers` Unspent BRC-20 transfer inscriptions `brc20_get_ticker_info` Token details — supply, holders, deploy info `brc20_batch_get_tickers` Batch BRC-20 token info ### ⚡ Spark[](https://docs.xverse.app/api/mcp-server#spark) Tool Description `spark_get_token_info` Token info with pool metadata and pricing `spark_get_token_holders` Token holder list `spark_get_token_transactions` Token transaction history `spark_get_token_details` Token details or search by name/ticker `spark_get_address_balances` All BTKN token balances for an address `spark_get_address_transactions` Address transaction history `spark_get_address_summary` Address summary `spark_get_transaction` Transaction details `spark_get_latest_transactions` Latest network transactions `spark_get_token_rankings` Top tokens by volume and TVL `spark_batch_get_token_metadata` Batch token metadata (max 100) ### 🔄 Swaps[](https://docs.xverse.app/api/mcp-server#swaps) Tool Description `swaps_get_destination_tokens` Available destination tokens for a swap `swaps_get_quotes` Aggregated swap quotes from multiple AMMs (read-only) * * * FAQ[](https://docs.xverse.app/api/mcp-server#faq) -------------------------------------------------- #### What authentication does the MCP server use?[](https://docs.xverse.app/api/mcp-server#what-authentication-does-the-mcp-server-use) The MCP server uses your Xverse API key as a Bearer token. Pass it in the `Authorization` header on connection. The same API key you use for REST API calls works with the MCP server — no separate credentials needed. #### Does the MCP support Streamable HTTP?[](https://docs.xverse.app/api/mcp-server#does-the-mcp-support-streamable-http) Yes, at the `https://mcp.secretkeylabs.io/mcp` endpoint. #### Can the MCP server execute transactions?[](https://docs.xverse.app/api/mcp-server#can-the-mcp-server-execute-transactions) No. The MCP server is currently **read-only**. It provides data access and swap quotes but does not execute transactions, mint tokens, or modify any on-chain state. Write operations may be added in the future. #### What rate limits apply?[](https://docs.xverse.app/api/mcp-server#what-rate-limits-apply) The same rate limits from your Xverse API plan apply. If you hit a rate limit, the MCP server will return an error with `Retry-After` guidance so the AI agent can wait and retry automatically. #### I'm getting connection errors — what should I do?[](https://docs.xverse.app/api/mcp-server#im-getting-connection-errors-what-should-i-do) 1. Verify your API key is valid and correctly formatted (UUID format: `8-4-4-4-12` hex characters). 2. If using `mcp-remote`, make sure you have a recent version of Node.js installed. 3. Try clearing cached auth info: `rm -rf ~/.mcp-auth` and reconnect. #### Which AI clients are supported?[](https://docs.xverse.app/api/mcp-server#which-ai-clients-are-supported) Any client that supports the [Model Context Protocol](https://modelcontextprotocol.io/) can connect. This includes Claude (Code, Desktop, and claude.ai), Cursor, VS Code, Codex, Windsurf, Zed, and many others. Clients that support Streamable HTTP can connect directly; older clients can use the `mcp-remote` bridge. [Previous⚡ MPP Lightning Payments](https://docs.xverse.app/api/mpp-lightning-payments) [NextBitcoin](https://docs.xverse.app/api/bitcoin) Last updated 5 months ago * [Setup Instructions](https://docs.xverse.app/api/mcp-server#setup-instructions) * [General](https://docs.xverse.app/api/mcp-server#general) * [Claude Code](https://docs.xverse.app/api/mcp-server#claude-code) * [Cursor](https://docs.xverse.app/api/mcp-server#cursor) * [Visual Studio Code](https://docs.xverse.app/api/mcp-server#visual-studio-code) * [Codex](https://docs.xverse.app/api/mcp-server#codex) * [Windsurf](https://docs.xverse.app/api/mcp-server#windsurf) * [Zed](https://docs.xverse.app/api/mcp-server#zed) * [Others](https://docs.xverse.app/api/mcp-server#others) * [Available Tools](https://docs.xverse.app/api/mcp-server#available-tools) * [🟠 Bitcoin](https://docs.xverse.app/api/mcp-server#bitcoin) * [🖼️ Ordinals & Collections](https://docs.xverse.app/api/mcp-server#ordinals-and-collections) * [🔲 Runes](https://docs.xverse.app/api/mcp-server#runes) * [🪙 BRC-20](https://docs.xverse.app/api/mcp-server#brc-20) * [⚡ Spark](https://docs.xverse.app/api/mcp-server#spark) * [🔄 Swaps](https://docs.xverse.app/api/mcp-server#swaps) * [FAQ](https://docs.xverse.app/api/mcp-server#faq) Copy { "mcpServers": { "xverse": { "command": "npx", "args": [\ "-y", "mcp-remote", "https://mcp.secretkeylabs.io/mcp",\ "--header", "Authorization: Bearer "\ ] } } } Copy npx mcp-remote https://mcp.secretkeylabs.io/mcp --header "Authorization: Bearer " Copy { "mcpServers": { "xverse": { "command": "npx", "args": [\ "-y", "mcp-remote", "https://mcp.secretkeylabs.io/mcp",\ "--header", "Authorization: Bearer "\ ] } } } Copy codex mcp add xverse --url https://mcp.secretkeylabs.io/mcp Copy # ~/.codex/config.toml [features] experimental_use_rmcp_client = true Copy { "mcpServers": { "xverse": { "command": "npx", "args": [\ "-y", "mcp-remote", "https://mcp.secretkeylabs.io/mcp",\ "--header", "Authorization: Bearer "\ ] } } } Copy { "context_servers": { "xverse": { "source": "custom", "command": "npx", "args": [\ "-y", "mcp-remote", "https://mcp.secretkeylabs.io/mcp",\ "--header", "Authorization: Bearer "\ ], "env": {} } } } --- # Deploy BRC-20 | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/brc-20/deploy-brc-20.md) . [Estimate](https://docs.xverse.app/api/brc-20/deploy-brc-20/estimate) [Order](https://docs.xverse.app/api/brc-20/deploy-brc-20/order) [PreviousExecute](https://docs.xverse.app/api/brc-20/mint-brc-20/order/execute) [NextEstimate](https://docs.xverse.app/api/brc-20/deploy-brc-20/estimate) --- # Blocks | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/bitcoin/blocks.md) . [Get Current Block](https://docs.xverse.app/api/bitcoin/blocks/get-current-block) [Get Block by Height](https://docs.xverse.app/api/bitcoin/blocks/get-block-by-height) [PreviousMempool Acceptance Test](https://docs.xverse.app/api/bitcoin/node-and-mempool/mempool-acceptance-test) [NextGet Current Block](https://docs.xverse.app/api/bitcoin/blocks/get-current-block) --- # Execute | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/ordinals/inscription-service/order/execute.md) . Copy On this page posthttps://api.secretkeylabs.io/v1/inscriptions/order/{orderId}/execute ### Coming soon...[](https://docs.xverse.app/api/ordinals/inscription-service/order/execute#) Once funded, finalize (execute) the inscription order. Authorizations apiKey x-api-keystringRequired Path parameters orderIdstringRequired Body application/json objectOptional Responses 200 Default Response application/json objectOptional post/v1/inscriptions/order/{orderId}/execute HTTP Copy POST /v1/inscriptions/order/{orderId}/execute HTTP/1.1 Host: api.secretkeylabs.io x-api-key: YOUR_API_KEY Content-Type: application/json Accept: */* Content-Length: 2 {} Test it 200 Default Response Copy {} [PreviousOrder](https://docs.xverse.app/api/ordinals/inscription-service/order) [NextRunes](https://docs.xverse.app/api/runes) Last updated 1 year ago --- # Ordinals by Address | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/ordinals/ordinals-by-address.md) . [📦UTXOs](https://docs.xverse.app/api/ordinals/ordinals-by-address/utxos) [🖼️Collections](https://docs.xverse.app/api/ordinals/ordinals-by-address/collections) [🎨Inscriptions](https://docs.xverse.app/api/ordinals/ordinals-by-address/inscriptions) [🎨Unconfirmed Inscriptions (Mempool)](https://docs.xverse.app/api/ordinals/ordinals-by-address/unconfirmed-inscriptions-mempool) [🎨Inscriptions of a Collection](https://docs.xverse.app/api/ordinals/ordinals-by-address/inscriptions-of-a-collection) [🎨Void inscriptions](https://docs.xverse.app/api/ordinals/ordinals-by-address/void-inscriptions) [PreviousOrdinals](https://docs.xverse.app/api/ordinals) [NextUTXOs](https://docs.xverse.app/api/ordinals/ordinals-by-address/utxos) --- # UTXO Listings | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/swaps/utxo-listings.md) . [Get utxos](https://docs.xverse.app/api/swaps/utxo-listings/get-utxos) [Place order](https://docs.xverse.app/api/swaps/utxo-listings/place-order) [Execute order](https://docs.xverse.app/api/swaps/utxo-listings/execute-order) [PreviousExecute order](https://docs.xverse.app/api/swaps/runes-swaps/execute-order) [NextGet utxos](https://docs.xverse.app/api/swaps/utxo-listings/get-utxos) --- # Execute order | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/swaps/stacks-swaps/execute-order.md) . Copy On this page posthttps://api.secretkeylabs.io/v1/swaps/stx/execute-order ### Coming soon...[](https://docs.xverse.app/api/swaps/stacks-swaps/execute-order#) Execute order for STX swaps. Authorizations apiKey x-api-keystringRequired Body application/json objectOptional Responses 200 Default Response application/json objectOptional post/v1/swaps/stx/execute-order HTTP Copy POST /v1/swaps/stx/execute-order HTTP/1.1 Host: api.secretkeylabs.io x-api-key: YOUR_API_KEY Content-Type: application/json Accept: */* Content-Length: 52 { "signedTransaction": "...", "providerCode": "bitflow" } Test it 200 Default Response Copy { "orderId": "", "unsignedTransaction": "..." } [PreviousPlace order](https://docs.xverse.app/api/swaps/stacks-swaps/place-order) [NextCrosschain Swaps](https://docs.xverse.app/api/swaps/crosschain-swaps) Last updated 1 year ago --- # Execute | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/brc-20/deploy-brc-20/order/execute.md) . Copy On this page posthttps://api.secretkeylabs.io/v1/brc20/deploy/order/{orderId}/execute ### Coming soon...[](https://docs.xverse.app/api/brc-20/deploy-brc-20/order/execute#) Execute the deployment order after funding. Authorizations apiKey x-api-keystringRequired Path parameters orderIdstringRequired Body application/json objectOptional Responses 200 Default Response application/json objectOptional post/v1/brc20/deploy/order/{orderId}/execute HTTP Copy POST /v1/brc20/deploy/order/{orderId}/execute HTTP/1.1 Host: api.secretkeylabs.io x-api-key: YOUR_API_KEY Content-Type: application/json Accept: */* Content-Length: 2 {} Test it 200 Default Response Copy {} [PreviousOrder](https://docs.xverse.app/api/brc-20/deploy-brc-20/order) [NextSpark](https://docs.xverse.app/api/spark) Last updated 1 year ago --- # Order | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/brc-20/deploy-brc-20/order.md) . Copy On this page posthttps://api.secretkeylabs.io/v1/brc20/deploy/order ### Coming soon...[](https://docs.xverse.app/api/brc-20/deploy-brc-20/order#) Create a BRC-20 deployment order. Authorizations apiKey x-api-keystringRequired Body application/json objectOptional Responses 200 Default Response application/json objectOptional post/v1/brc20/deploy/order HTTP Copy POST /v1/brc20/deploy/order HTTP/1.1 Host: api.secretkeylabs.io x-api-key: YOUR_API_KEY Content-Type: application/json Accept: */* Content-Length: 2 {} Test it 200 Default Response Copy {} gethttps://api.secretkeylabs.io/v1/brc20/deploy/order/{orderId} ### Coming soon...[](https://docs.xverse.app/api/brc-20/deploy-brc-20/order#) Check the status of a deploy order. Authorizations apiKey x-api-keystringRequired Path parameters orderIdstringRequired Responses 200 Default Response application/json objectOptional get/v1/brc20/deploy/order/{orderId} HTTP Copy GET /v1/brc20/deploy/order/{orderId} HTTP/1.1 Host: api.secretkeylabs.io x-api-key: YOUR_API_KEY Accept: */* Test it 200 Default Response Copy {} [PreviousEstimate](https://docs.xverse.app/api/brc-20/deploy-brc-20/estimate) [NextExecute](https://docs.xverse.app/api/brc-20/deploy-brc-20/order/execute) Last updated 1 year ago * [post/v1/brc20/deploy/order](https://docs.xverse.app/api/brc-20/deploy-brc-20/order#post-v1-brc20-deploy-order) * [get/v1/brc20/deploy/order/{orderId}](https://docs.xverse.app/api/brc-20/deploy-brc-20/order#get-v1-brc20-deploy-order-orderid) --- # Order | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/brc-20/mint-brc-20/order.md) . Copy On this page posthttps://api.secretkeylabs.io/v1/brc20/mint/order ### Coming soon...[](https://docs.xverse.app/api/brc-20/mint-brc-20/order#) Create a BRC-20 batch mint order. Authorizations apiKey x-api-keystringRequired Body application/json objectOptional Responses 200 Default Response application/json objectOptional post/v1/brc20/mint/order HTTP Copy POST /v1/brc20/mint/order HTTP/1.1 Host: api.secretkeylabs.io x-api-key: YOUR_API_KEY Content-Type: application/json Accept: */* Content-Length: 2 {} Test it 200 Default Response Copy {} gethttps://api.secretkeylabs.io/v1/brc20/mint/order/{orderId} ### Coming soon...[](https://docs.xverse.app/api/brc-20/mint-brc-20/order#) Check the status of a mint order. Authorizations apiKey x-api-keystringRequired Path parameters orderIdstringRequired Responses 200 Default Response application/json objectOptional get/v1/brc20/mint/order/{orderId} HTTP Copy GET /v1/brc20/mint/order/{orderId} HTTP/1.1 Host: api.secretkeylabs.io x-api-key: YOUR_API_KEY Accept: */* Test it 200 Default Response Copy {} [PreviousEstimate](https://docs.xverse.app/api/brc-20/mint-brc-20/estimate) [NextExecute](https://docs.xverse.app/api/brc-20/mint-brc-20/order/execute) Last updated 1 year ago * [post/v1/brc20/mint/order](https://docs.xverse.app/api/brc-20/mint-brc-20/order#post-v1-brc20-mint-order) * [get/v1/brc20/mint/order/{orderId}](https://docs.xverse.app/api/brc-20/mint-brc-20/order#get-v1-brc20-mint-order-orderid) --- # Node & Mempool | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/bitcoin/node-and-mempool.md) . [Estimate Transaction Fee](https://docs.xverse.app/api/bitcoin/node-and-mempool/estimate-transaction-fee) [Mempool Fees](https://docs.xverse.app/api/bitcoin/node-and-mempool/mempool-fees) [Send Transaction](https://docs.xverse.app/api/bitcoin/node-and-mempool/send-transaction) [Mempool Acceptance Test](https://docs.xverse.app/api/bitcoin/node-and-mempool/mempool-acceptance-test) [PreviousOutputs](https://docs.xverse.app/api/bitcoin/outputs) [NextEstimate Transaction Fee](https://docs.xverse.app/api/bitcoin/node-and-mempool/estimate-transaction-fee) --- # Execute | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/brc-20/mint-brc-20/order/execute.md) . Copy On this page posthttps://api.secretkeylabs.io/v1/brc20/mint/order/{orderId}/execute ### Coming soon...[](https://docs.xverse.app/api/brc-20/mint-brc-20/order/execute#) Execute the mint order after funding. Authorizations apiKey x-api-keystringRequired Path parameters orderIdstringRequired Body application/json objectOptional Responses 200 Default Response application/json objectOptional post/v1/brc20/mint/order/{orderId}/execute HTTP Copy POST /v1/brc20/mint/order/{orderId}/execute HTTP/1.1 Host: api.secretkeylabs.io x-api-key: YOUR_API_KEY Content-Type: application/json Accept: */* Content-Length: 2 {} Test it 200 Default Response Copy {} [PreviousOrder](https://docs.xverse.app/api/brc-20/mint-brc-20/order) [NextDeploy BRC-20](https://docs.xverse.app/api/brc-20/deploy-brc-20) Last updated 1 year ago --- # Address | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/bitcoin/address.md) . [Balance](https://docs.xverse.app/api/bitcoin/address/balance) [Bitcoin Address Summary](https://docs.xverse.app/api/bitcoin/address/bitcoin-address-summary) [\[v1\] Get Bitcoin UTXOs](https://docs.xverse.app/api/bitcoin/address/v1-get-bitcoin-utxos) [\[v2\] Get Bitcoin UTXOs (Mempool-Aware)](https://docs.xverse.app/api/bitcoin/address/v2-get-bitcoin-utxos-mempool-aware) [🕑Activity](https://docs.xverse.app/api/bitcoin/address/activity) [PreviousBitcoin](https://docs.xverse.app/api/bitcoin) [NextBalance](https://docs.xverse.app/api/bitcoin/address/balance) --- # Collections | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/ordinals/collections.md) . [Collection by ID](https://docs.xverse.app/api/ordinals/collections/collection-by-id) [Top Collections by Volume](https://docs.xverse.app/api/ordinals/collections/top-collections-by-volume) [Collections](https://docs.xverse.app/api/ordinals/collections/collections) [Holders by Collection](https://docs.xverse.app/api/ordinals/collections/holders-by-collection) [Inscriptions by Collection](https://docs.xverse.app/api/ordinals/collections/inscriptions-by-collection) [\[v1\] Collection Historical Floor Prices](https://docs.xverse.app/api/ordinals/collections/v1-collection-historical-floor-prices) [\[v2\] Collection Historical Floor Prices](https://docs.xverse.app/api/ordinals/collections/v2-collection-historical-floor-prices) [PreviousVoid inscriptions](https://docs.xverse.app/api/ordinals/ordinals-by-address/void-inscriptions) [NextCollection by ID](https://docs.xverse.app/api/ordinals/collections/collection-by-id) Last updated 1 year ago --- # Transactions | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/bitcoin/transactions.md) . [Get Bitcoin Transaction](https://docs.xverse.app/api/bitcoin/transactions/get-bitcoin-transaction) [Get Raw Bitcoin Transaction Hex](https://docs.xverse.app/api/bitcoin/transactions/get-raw-bitcoin-transaction-hex) [Decode Raw Bitcoin Transaction](https://docs.xverse.app/api/bitcoin/transactions/decode-raw-bitcoin-transaction) [Ordinal Transaction](https://docs.xverse.app/api/bitcoin/transactions/ordinal-transaction) [Ordinal Transaction Outputs](https://docs.xverse.app/api/bitcoin/transactions/ordinal-transaction-outputs) [Ordinal Transaction Inputs](https://docs.xverse.app/api/bitcoin/transactions/ordinal-transaction-inputs) [PreviousUnconfirmed Transactions](https://docs.xverse.app/api/bitcoin/address/activity/unconfirmed-transactions) [NextGet Bitcoin Transaction](https://docs.xverse.app/api/bitcoin/transactions/get-bitcoin-transaction) --- # Decode Raw Bitcoin Transaction | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/bitcoin/transactions/decode-raw-bitcoin-transaction.md) . Copy On this page This endpoint decodes a raw Bitcoin transaction. Optimized to use the RPC node only for parsing, while transaction hex and I/O data are retrieved from our indexer. posthttps://api.secretkeylabs.io/v1/rpc/bitcoin/rawtx Retrieve raw transaction details by txid. Authorizations apiKey x-api-keystringRequired Body application/json txidstring · regexRequired Transaction id Example: `6c5ffa32f6942bb82bf36239fb8a6d233c4da6f91bde81869accef2ef6be674e`Pattern: `^[a-fA-F0-9]{64}$` Responses 200 Default Response No content post/v1/rpc/bitcoin/rawtx HTTP Copy POST /v1/rpc/bitcoin/rawtx HTTP/1.1 Host: api.secretkeylabs.io x-api-key: YOUR_API_KEY Content-Type: application/json Accept: */* Content-Length: 75 { "txid": "6c5ffa32f6942bb82bf36239fb8a6d233c4da6f91bde81869accef2ef6be674e" } Test it 200 Default Response No content [PreviousGet Raw Bitcoin Transaction Hex](https://docs.xverse.app/api/bitcoin/transactions/get-raw-bitcoin-transaction-hex) [NextOrdinal Transaction](https://docs.xverse.app/api/bitcoin/transactions/ordinal-transaction) Last updated 1 year ago --- # Runes | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/runes.md) . Query **Rune balances, metadata & trading data**. Integrate Runes into your apps without building infra. **Mint** and **etch Runes**, with cost estimates, order management and execution. [PreviousExecute](https://docs.xverse.app/api/ordinals/inscription-service/order/execute) [NextRunes by Address](https://docs.xverse.app/api/runes/runes-by-address) Last updated 11 months ago --- # Place order | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/swaps/crosschain-swaps/place-order.md) . Copy On this page posthttps://api.secretkeylabs.io/v1/swaps/crosschain/place-order ### Coming soon...[](https://docs.xverse.app/api/swaps/crosschain-swaps/place-order#) Place cross-chain swap orders (via Changelly). Authorizations apiKey x-api-keystringRequired Body application/json objectOptional Responses 200 Default Response application/json objectOptional post/v1/swaps/crosschain/place-order HTTP Copy POST /v1/swaps/crosschain/place-order HTTP/1.1 Host: api.secretkeylabs.io x-api-key: YOUR_API_KEY Content-Type: application/json Accept: */* Content-Length: 258 { "from": { "protocol": "btc", "ticker": "btc" }, "receiveAddress": "...", "sendAmount": "0.0004", "to": { "protocol": "stx", "symbol": "STX", "logo": "https://cdn.changelly.com/icons-colored/stx.png", "ticker": "stx", "name": "STX" }, "providerCode": "changelly", "fromAddress": "..." } Test it 200 Default Response Copy { "orderId": "...", "payinAddress": "...", "status": "new" } [PreviousCrosschain Swaps](https://docs.xverse.app/api/swaps/crosschain-swaps) Last updated 1 year ago --- # Crosschain Swaps | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/swaps/crosschain-swaps.md) . [Place order](https://docs.xverse.app/api/swaps/crosschain-swaps/place-order) [PreviousExecute order](https://docs.xverse.app/api/swaps/stacks-swaps/execute-order) [NextPlace order](https://docs.xverse.app/api/swaps/crosschain-swaps/place-order) --- # Activity | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/bitcoin/address/activity.md) . [Historical Activity (Confirmed)](https://docs.xverse.app/api/bitcoin/address/activity/historical-activity-confirmed) [Real-Time Mempool Activity (Unconfirmed)](https://docs.xverse.app/api/bitcoin/address/activity/real-time-mempool-activity-unconfirmed) [Unconfirmed Transactions](https://docs.xverse.app/api/bitcoin/address/activity/unconfirmed-transactions) [Previous\[v2\] Get Bitcoin UTXOs (Mempool-Aware)](https://docs.xverse.app/api/bitcoin/address/v2-get-bitcoin-utxos-mempool-aware) [NextHistorical Activity (Confirmed)](https://docs.xverse.app/api/bitcoin/address/activity/historical-activity-confirmed) --- # Historical Activity (Confirmed) | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/bitcoin/address/activity/historical-activity-confirmed.md) . Copy On this page This endpoint returns the combined historical activity across BTC, inscriptions, and runes for a set of addresses, including all incoming/outgoing transfers. gethttps://api.secretkeylabs.io/v1/global/ordinals/multi-address/activity Retrieve efficient aggregated confirmed history (Bitcoin, Runes, Inscriptions) for multiple addresses. Up to 3 addresses(comma separated) can be queried via `addresses` query param. Authorizations apiKey x-api-keystringRequired Query parameters addressesstring · BitcoinAddressList · min: 10RequiredDefault: `bc1q0egjvlcfq77cxd9kvpgppyuxckzvws46e3sxch,bc1px3kttdtg479vqfu0s2lhxvyuz2snhl8jct3f84k5heerl750n28scr9qt6` offsetnumberOptionalDefault: `0` limitnumber · min: 25 · max: 60OptionalDefault: `60` Responses 200 Default Response application/json transactionsobject\[\]Required Show properties offsetnumberRequired limitnumberRequired 400 Invalid input application/json 401 Unauthorized application/json 404 Not found application/json 429 Rate limit exceeded application/json 500 Internal server error application/json get/v1/global/ordinals/multi-address/activity HTTP Copy GET /v1/global/ordinals/multi-address/activity?addresses=bc1q0egjvlcfq77cxd9kvpgppyuxckzvws46e3sxch%2Cbc1px3kttdtg479vqfu0s2lhxvyuz2snhl8jct3f84k5heerl750n28scr9qt6 HTTP/1.1 Host: api.secretkeylabs.io x-api-key: YOUR_API_KEY Accept: */* Test it 200 Default Response Copy { "transactions": [\ {\ "txid": "text",\ "blockHeight": 1,\ "blockTime": 1,\ "ownActivity": [\ {\ "address": "text",\ "sent": 1,\ "received": 1,\ "outgoing": 1,\ "incoming": 1\ }\ ],\ "totalOut": 1,\ "totalIn": 1,\ "addressList": {\ "hasMore": true,\ "items": [\ {\ "address": "text",\ "type": "text",\ "isInput": true,\ "isOutput": true\ }\ ]\ },\ "runes": {\ "ownActivity": {\ "items": [\ {\ "runeId": "text",\ "runeName": "text",\ "divisibility": 1,\ "symbol": "text",\ "address": "text",\ "sent": "text",\ "received": "text",\ "outgoing": "text",\ "incoming": "text"\ }\ ],\ "hasMore": true\ },\ "allActivity": {\ "items": [\ {\ "runeId": "text",\ "runeName": "text",\ "divisibility": 1,\ "symbol": "text",\ "outgoing": "text",\ "incoming": "text",\ "isMint": true,\ "isEtch": true,\ "isBurn": true\ }\ ],\ "hasMore": true\ }\ },\ "inscriptions": {\ "items": [\ {\ "inscriptionId": "text",\ "contentType": "text",\ "address": "text",\ "sent": true,\ "received": true,\ "inscribed": true,\ "burned": true\ }\ ],\ "hasMore": true\ }\ }\ ], "offset": 1, "limit": 1 } [PreviousActivity](https://docs.xverse.app/api/bitcoin/address/activity) [NextReal-Time Mempool Activity (Unconfirmed)](https://docs.xverse.app/api/bitcoin/address/activity/real-time-mempool-activity-unconfirmed) Last updated 11 months ago --- # Real-Time Mempool Activity (Unconfirmed) | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/bitcoin/address/activity/real-time-mempool-activity-unconfirmed.md) . Copy On this page This endpoint returns the real-time mempool activity across BTC, inscriptions, and runes for a set of addresses, including all incoming/outgoing transfers. gethttps://api.secretkeylabs.io/v1/global/ordinals/multi-address/activity/mempool Retrieve efficient aggregated unconfirmed activity (Bitcoin, Runes, Inscriptions) for multiple addresses. Up to 3 addresses(comma separated) can be queried via `addresses` query param. Authorizations apiKey x-api-keystringRequired Query parameters addressesstring · BitcoinAddressList · min: 10RequiredDefault: `bc1q0egjvlcfq77cxd9kvpgppyuxckzvws46e3sxch,bc1px3kttdtg479vqfu0s2lhxvyuz2snhl8jct3f84k5heerl750n28scr9qt6` offsetnumberOptionalDefault: `0` limitnumber · min: 25 · max: 60OptionalDefault: `60` Responses 200 Default Response application/json transactionsobject\[\]Required Show properties offsetnumberRequired limitnumberRequired 400 Invalid input application/json 401 Unauthorized application/json 404 Not found application/json 429 Rate limit exceeded application/json 500 Internal server error application/json get/v1/global/ordinals/multi-address/activity/mempool HTTP Copy GET /v1/global/ordinals/multi-address/activity/mempool?addresses=bc1q0egjvlcfq77cxd9kvpgppyuxckzvws46e3sxch%2Cbc1px3kttdtg479vqfu0s2lhxvyuz2snhl8jct3f84k5heerl750n28scr9qt6 HTTP/1.1 Host: api.secretkeylabs.io x-api-key: YOUR_API_KEY Accept: */* Test it 200 Default Response Copy { "transactions": [\ {\ "txid": "text",\ "ownActivity": [\ {\ "address": "text",\ "sent": 1,\ "received": 1,\ "outgoing": 1,\ "incoming": 1\ }\ ],\ "totalOut": 1,\ "totalIn": 1,\ "addressList": {\ "hasMore": true,\ "items": [\ {\ "address": "text",\ "type": "text",\ "isInput": true,\ "isOutput": true\ }\ ]\ },\ "runes": {\ "ownActivity": {\ "items": [\ {\ "runeId": "text",\ "runeName": "text",\ "divisibility": 1,\ "symbol": "text",\ "address": "text",\ "sent": "text",\ "received": "text",\ "outgoing": "text",\ "incoming": "text"\ }\ ],\ "hasMore": true\ },\ "allActivity": {\ "items": [\ {\ "runeId": "text",\ "runeName": "text",\ "divisibility": 1,\ "symbol": "text",\ "outgoing": "text",\ "incoming": "text",\ "isMint": true,\ "isEtch": true,\ "isBurn": true\ }\ ],\ "hasMore": true\ }\ },\ "inscriptions": {\ "items": [\ {\ "inscriptionId": "text",\ "contentType": "text",\ "address": "text",\ "sent": true,\ "received": true,\ "inscribed": true,\ "burned": true\ }\ ],\ "hasMore": true\ }\ }\ ], "offset": 1, "limit": 1 } [PreviousHistorical Activity (Confirmed)](https://docs.xverse.app/api/bitcoin/address/activity/historical-activity-confirmed) [NextUnconfirmed Transactions](https://docs.xverse.app/api/bitcoin/address/activity/unconfirmed-transactions) Last updated 11 months ago --- # Runes by Address | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/runes/runes-by-address.md) . [\[v1\] Rune Balances](https://docs.xverse.app/api/runes/runes-by-address/v1-rune-balances) [\[v2\] Rune Balances (Mempool-Aware)](https://docs.xverse.app/api/runes/runes-by-address/v2-rune-balances-mempool-aware) [Rune Activity](https://docs.xverse.app/api/runes/runes-by-address/rune-activity) [UTXOs](https://docs.xverse.app/api/runes/runes-by-address/utxos) [PreviousRunes](https://docs.xverse.app/api/runes) [Next\[v1\] Rune Balances](https://docs.xverse.app/api/runes/runes-by-address/v1-rune-balances) --- # Estimate | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/brc-20/mint-brc-20/estimate.md) . Copy On this page posthttps://api.secretkeylabs.io/v1/brc20/mint/estimate ### Coming soon...[](https://docs.xverse.app/api/brc-20/mint-brc-20/estimate#) Estimate the total cost for a BRC-20 batch mint order. Authorizations apiKey x-api-keystringRequired Body application/json objectOptional Responses 200 Default Response application/json objectOptional post/v1/brc20/mint/estimate HTTP Copy POST /v1/brc20/mint/estimate HTTP/1.1 Host: api.secretkeylabs.io x-api-key: YOUR_API_KEY Content-Type: application/json Accept: */* Content-Length: 2 {} Test it 200 Default Response Copy {} [PreviousMint BRC-20](https://docs.xverse.app/api/brc-20/mint-brc-20) [NextOrder](https://docs.xverse.app/api/brc-20/mint-brc-20/order) Last updated 1 year ago --- # Place order | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/swaps/stacks-swaps/place-order.md) . Copy On this page posthttps://api.secretkeylabs.io/v1/swaps/stx/place-order ### Coming soon...[](https://docs.xverse.app/api/swaps/stacks-swaps/place-order#) Handle STX-based swaps (Velar, Bitflow, Alex). Authorizations apiKey x-api-keystringRequired Body application/json objectOptional Responses 200 Default Response application/json objectOptional post/v1/swaps/stx/place-order HTTP Copy POST /v1/swaps/stx/place-order HTTP/1.1 Host: api.secretkeylabs.io x-api-key: YOUR_API_KEY Content-Type: application/json Accept: */* Content-Length: 203 { "receiveAmount": "6", "providerCode": "bitflow", "stxAddress": "...", "from": { "protocol": "sip10", "ticker": "token" }, "slippage": 0.04, "stxPublicKey": "...", "sendAmount": "4", "to": { "ticker": "STX", "protocol": "stx" } } Test it 200 Default Response Copy { "orderId": "", "unsignedTransaction": "..." } [PreviousStacks Swaps](https://docs.xverse.app/api/swaps/stacks-swaps) [NextExecute order](https://docs.xverse.app/api/swaps/stacks-swaps/execute-order) Last updated 1 year ago --- # Get utxos | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/swaps/utxo-listings/get-utxos.md) . Copy On this page posthttps://api.secretkeylabs.io/v1/swaps/utxo/get-utxos ### Coming soon...[](https://docs.xverse.app/api/swaps/utxo-listings/get-utxos#) Retrieve marketplace UTXO data (Magic Eden, Unisat, OKX). Authorizations apiKey x-api-keystringRequired Body application/json objectOptional Responses 200 Default Response application/json objectOptional post/v1/swaps/utxo/get-utxos HTTP Copy POST /v1/swaps/utxo/get-utxos HTTP/1.1 Host: api.secretkeylabs.io x-api-key: YOUR_API_KEY Content-Type: application/json Accept: */* Content-Length: 137 { "providerCode": "magiceden_utxo", "from": { "ticker": "BTC", "protocol": "btc" }, "to": { "ticker": "840000:3", "protocol": "runes" }, "amount": "20000" } Test it 200 Default Response Copy { "items": [\ {\ "identifier": "...",\ "token": {\ "ticker": "840000:3",\ "protocol": "runes"\ },\ "amount": "80000",\ "price": "198344"\ },\ {\ "identifier": "...",\ "token": {\ "ticker": "840000:3",\ "protocol": "runes"\ },\ "amount": "100000",\ "price": "247930"\ }\ ] } [PreviousUTXO Listings](https://docs.xverse.app/api/swaps/utxo-listings) [NextPlace order](https://docs.xverse.app/api/swaps/utxo-listings/place-order) Last updated 1 year ago --- # Execute order | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/swaps/utxo-listings/execute-order.md) . Copy On this page posthttps://api.secretkeylabs.io/v1/swaps/utxo/execute-order ### Coming soon...[](https://docs.xverse.app/api/swaps/utxo-listings/execute-order#) Execute a signed PSBT on a UTXO-based marketplace. Authorizations apiKey x-api-keystringRequired Body application/json objectOptional Responses 200 Default Response application/json objectOptional post/v1/swaps/utxo/execute-order HTTP Copy POST /v1/swaps/utxo/execute-order HTTP/1.1 Host: api.secretkeylabs.io x-api-key: YOUR_API_KEY Content-Type: application/json Accept: */* Content-Length: 238 { "psbt": "...", "orders": [\ {\ "amount": "100000",\ "identifier": "uuid",\ "price": "300"\ },\ {\ "price": "200",\ "identifier": "uuid",\ "amount": "40000"\ }\ ], "providerCode": "magiceden_utxo", "btcAddress": "...", "ordAddress": "...", "btcPubKey": "...", "ordPubKey": "..." } Test it 200 Default Response Copy { "txid": "1234" } [PreviousPlace order](https://docs.xverse.app/api/swaps/utxo-listings/place-order) [NextStacks Swaps](https://docs.xverse.app/api/swaps/stacks-swaps) Last updated 1 year ago --- # Place order | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/swaps/utxo-listings/place-order.md) . Copy On this page posthttps://api.secretkeylabs.io/v1/swaps/utxo/place-order ### Coming soon...[](https://docs.xverse.app/api/swaps/utxo-listings/place-order#) Place a UTXO-based marketplace order and get back an unsigned PSBT. Authorizations apiKey x-api-keystringRequired Body application/json objectOptional Responses 200 Default Response application/json objectOptional post/v1/swaps/utxo/place-order HTTP Copy POST /v1/swaps/utxo/place-order HTTP/1.1 Host: api.secretkeylabs.io x-api-key: YOUR_API_KEY Content-Type: application/json Accept: */* Content-Length: 272 { "providerCode": "magiceden_utxo", "btcPubKey": "...", "to": { "protocol": "runes", "ticker": "840000:28" }, "ordPubKey": "...", "btcAddress": "...", "orders": [\ {\ "price": "100",\ "amount": "0100",\ "identifier": ""\ }\ ], "ordAddress": "...", "feeRate": 7, "from": { "ticker": "BTC", "protocol": "btc" } } Test it 200 Default Response Copy { "orderId": "...", "psbt": "...", "orders": [\ {\ "identifier": "...",\ "amount": "...",\ "price": "..."\ }\ ], "serviceFee": ".." } [PreviousGet utxos](https://docs.xverse.app/api/swaps/utxo-listings/get-utxos) [NextExecute order](https://docs.xverse.app/api/swaps/utxo-listings/execute-order) Last updated 1 year ago --- # Stacks Swaps | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/swaps/stacks-swaps.md) . [Place order](https://docs.xverse.app/api/swaps/stacks-swaps/place-order) [Execute order](https://docs.xverse.app/api/swaps/stacks-swaps/execute-order) [PreviousExecute order](https://docs.xverse.app/api/swaps/utxo-listings/execute-order) [NextPlace order](https://docs.xverse.app/api/swaps/stacks-swaps/place-order) --- # Runes Swaps | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/swaps/runes-swaps.md) . [Place order](https://docs.xverse.app/api/swaps/runes-swaps/place-order) [Execute order](https://docs.xverse.app/api/swaps/runes-swaps/execute-order) [PreviousGet quotes](https://docs.xverse.app/api/swaps/get-quotes) [NextPlace order](https://docs.xverse.app/api/swaps/runes-swaps/place-order) --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs.xverse.app/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs.xverse.app/xverse-agentic-wallet/agent-mode.md). # Agent Mode The fastest way to put an AI agent in control of your wallet. The CLI ships with a \*\*Claude Code skill\*\* and a built-in \*\*agent launcher\*\* that handles wallet setup, password authentication, and gives the agent full access to every CLI command. ### Why this matters If you're building agentic workflows, you don't want to wire up wallet auth, prompt for passwords, manage env vars, and teach the agent every command yourself. Agent mode does all of that for you. \* \*\*One command to install:\*\* \`npx @secretkeylabs/xverse-agent-wallet --install\` installs the CLI and the Claude Code skill in one go. \* \*\*One command to launch:\*\* \`xverse-wallet agent\` boots Claude Code with the wallet authenticated. \* \*\*No plaintext secrets on disk:\*\* the password is prompted from stdin, masked, and passed as an env var to the agent process. \*\*\* ### Install \`\`\`bash npx @secretkeylabs/xverse-agent-wallet --install \`\`\` This installs the CLI globally and drops a Claude Code skill into \`~/.claude/skills/xverse-agent-wallet/SKILL.md\`. The skill teaches AI agents how to operate the wallet — every command, every option, token guides, agentic workflows, and common patterns. Once installed, Claude Code automatically picks it up the next time you launch an agent session. To uninstall: \`\`\`bash xverse-wallet --uninstall \`\`\` ### Launch an agent with wallet access \`\`\`bash xverse-wallet agent \`\`\` What this does: 1. \*\*Checks for an existing wallet.\*\* On first run, it interactively prompts you to create a new wallet or restore from a mnemonic. 2. \*\*Prompts for your password\*\* (masked stdin input). 3. \*\*Authenticates the vault.\*\* 4. \*\*Launches Claude Code\*\* with \`XVERSE\_PASSWORD\` set in the agent's environment, so every CLI command works inside the session without re-auth. From the agent's perspective, it can run any CLI command — \`portfolio\`, \`bitcoin send\`, \`swap execute\`, \`pay request\`, \`spark lightning pay\` — and they all just work. #### Other agent providers The default agent is Claude Code, but the launcher can target other providers: \`\`\`bash xverse-wallet agent --agent \`\`\` #### Non-interactive mode For automated environments (CI, scripts, scheduled jobs): \`\`\`bash export XVERSE\_PASSWORD="your-secure-passphrase" xverse-wallet agent --quiet \`\`\` In quiet mode, the launcher skips the password prompt and uses the env var directly. ### Security model \* The password is \*\*prompted from stdin\*\* with masked input — it never appears in your shell history. \* It's \*\*passed to the agent subprocess as an environment variable\*\*, then cleared from the launcher's memory. \* It is \*\*never written to disk\*\*. \* The vault itself is encrypted at rest with a passphrase from an environment variable, compatible with any secret manager. \* Session state is \*\*ephemeral\*\* — it's cleared when the agent process exits. ### What the agent can do once it's running Once the agent is launched, it has access to the full CLI command tree. Some examples of what you can ask Claude Code to do: \* \*"Show me all my balances across every chain and account."\* → Agent runs \`xverse-wallet portfolio --accounts 0-4 --json\` and summarizes the result. \* \*"DCA $50 of USDC into WBTC on Starknet."\* → Agent runs \`xverse-wallet swap execute --from starknet:USDC --to starknet:WBTC --amount 50\` (preview), shows you the quote, then executes with \`--yes\` after confirmation. \* \*"Pay this Lightning invoice: lnbc..."\* → Agent estimates the fee with \`spark lightning estimate\`, shows you the cost, and pays with \`spark lightning pay --yes\`. \* \*"Sweep my Spark profits to cold storage."\* → Agent checks the Spark balance, then runs \`spark withdraw --amount --speed fast\`. \* \*"Call the Xverse rune price API for DOG and tell me the floor."\* → Agent runs \`pay request --yes\` (which auto-pays the Lightning fee via MPP) and parses the response. > \*\*Safety note:\*\* The skill teaches the agent to \*\*always preview transactions before executing them\*\*. The agent should never run a \`--yes\` command without first showing you the dry-run output and getting your confirmation. ### What the skill covers The installed skill (\`~/.claude/skills/xverse-agent-wallet/SKILL.md\`) is a comprehensive reference covering: \* Every CLI command, with options and examples \* Token format guide (BTC-pegged tokens, stablecoins, native chain tokens) \* How to move assets across layers (fast same-chain vs slow cross-chain routes) \* Funding strategies (fiat on-ramp, swaps, deposits) \* Agentic workflows (Lightning commerce, treasury management, trading patterns) \* Common gotchas (native vs taproot BTC, multi-account scanning, Lightning fee budgets) \* Onboarding strategies for new wallets ### Next steps \* New to the CLI? Start with \[Getting Started\](https://claude.ai/chat/getting-started.md). \* Building a Lightning commerce agent? See the \[Agentic Lightning Commerce guide\](https://claude.ai/chat/guide-lightning-commerce.md). \* Building a trading agent? See the \[Starknet Trading guide\](https://claude.ai/chat/guide-starknet-trading.md) or \[Flashnet Trading guide\](https://claude.ai/chat/guide-flashnet-trading.md). --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## 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, and the optional \`goal\` query parameter: \`\`\` GET https://docs.xverse.app/xverse-agentic-wallet/agent-mode.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. 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. --- # List Rune Etch Orders | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/runes/etch-rune/list-rune-etch-orders.md) . Copy On this page You can use this endpoint to retrieve all the Runes Etch orders involving a specific `destinationAddress` This is the Bitcoin address to which the minted runes should be allocated, as specified when you [created your Etch order](https://docs.xverse.app/api/runes/etch-rune/create-rune-etch-order) Rune Etch orders are identified bu their `orderType` gethttps://api.secretkeylabs.io/v1/runes-managed/orders Get orders summary by destination address. Authorizations apiKey x-api-keystringRequired Query parameters destinationAddressstringRequired Bitcoin address to filter orders Responses 200 Default Response application/json itemsobject\[\]Required Show properties get/v1/runes-managed/orders HTTP Copy GET /v1/runes-managed/orders?destinationAddress=text HTTP/1.1 Host: api.secretkeylabs.io x-api-key: YOUR_API_KEY Accept: */* Test it 200 Default Response Copy { "items": [\ {\ "orderId": "text",\ "orderType": "text",\ "state": "text",\ "reason": "text",\ "createdAt": "text"\ }\ ] } [PreviousMonitor Rune Etch Order](https://docs.xverse.app/api/runes/etch-rune/monitor-rune-etch-order) [NextBRC-20](https://docs.xverse.app/api/brc-20) Last updated 10 months ago --- # Execute Rune Mint Order | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/runes/mint-rune/execute-rune-mint-order.md) . Copy On this page Use this endpoint to execute a Rune Mint order. You need to first [Create a Rune Mint order](https://docs.xverse.app/api/runes/mint-rune/create-rune-mint-order) and **fund your order** before you can call this endpoint. Quick Start[](https://docs.xverse.app/api/runes/mint-rune/execute-rune-mint-order#quick-start) ----------------------------------------------------------------------------------------------- posthttps://api.secretkeylabs.io/v1/runes-managed/mint/orders/{orderId}/execute Finalize minting after sending funds. Authorizations apiKey x-api-keystringRequired Path parameters orderIdstring · uuidRequired Body application/json fundTransactionIdstring · min: 64 · max: 64Required Responses 200 Default Response No content post/v1/runes-managed/mint/orders/{orderId}/execute HTTP Copy POST /v1/runes-managed/mint/orders/{orderId}/execute HTTP/1.1 Host: api.secretkeylabs.io x-api-key: YOUR_API_KEY Content-Type: application/json Accept: */* Content-Length: 28 { "fundTransactionId": "text" } Test it 200 Default Response No content Execute Rune Mint Order - Request[](https://docs.xverse.app/api/runes/mint-rune/execute-rune-mint-order#execute-rune-mint-order-request) ----------------------------------------------------------------------------------------------------------------------------------------- Once you have * [created your mint order](https://docs.xverse.app/api/runes/mint-rune/create-rune-mint-order) and received your `orderID` * funded your mint order and sent the required `fundAmount` to the `fundAddress` \-> you can call the Execute Mint Order endpoint, using the `orderID` as path parameter Execute Rune Mint Order - Response[](https://docs.xverse.app/api/runes/mint-rune/execute-rune-mint-order#execute-rune-mint-order-response) ------------------------------------------------------------------------------------------------------------------------------------------- A successful Execute Mint request will: 1. Return the `fundTransactionId` to your app, confirming that the funding transaction required to execute your order was detected. 2. Prompt the Xverse API Runes Minting service to craft and broadcast the runes minting transaction(s) required to process your order, at the desired `feeRate` specified in your [create Mint Order](https://docs.xverse.app/api/runes/mint-rune/create-rune-mint-order) request, and signing with the `fundAddress`. **Mint transaction(s) broadcast:** The runes minting transaction(s) will be chained to your order funding transaction, and broadcast immediately after the you call the Execute Mint endpoint. ℹ️ Note that the service will automatically process your order after your funding transaction is detected, but we recommend calling the Execute Mint endpoint to ensure immediate execution. **Repeat mints:** If you order repeat mint transactions, the Xverse API Runes Minting service will chain runes mint transactions: the output of mint transaction N will become the input of mint transaction N+1. The final mint transaction of the chain will transfer the total amount of minted runes (# of mint transactions \* fixed mint amount per transaction for the desired Rune) to the specified `destinationAddress` ℹ️ Note that the Bitcoin blockchain limits the number of unconfirmed chained transactions to 25. The mint service will chain up to 23 mint transactions to the funding transaction, depending on the number of unconfirmed inputs involved in the funding transaction. To circumvent this limitation when you order more than 23 repeats, the mint service will split the funding transaction's outputs, and chain up to 23 mint transactions to each output. The confirmation of your mint transactions may span more than 1 block as a result. Next Step -> Monitor Rune Mint Order[](https://docs.xverse.app/api/runes/mint-rune/execute-rune-mint-order#next-step-greater-than-monitor-rune-mint-order) ----------------------------------------------------------------------------------------------------------------------------------------------------------- Once you've sent the required amount to execute your order, you can call the [Monitor Mint Order](https://docs.xverse.app/api/runes/mint-rune/monitor-rune-mint-order) endpoint to track the status. [PreviousCreate Rune Mint Order](https://docs.xverse.app/api/runes/mint-rune/create-rune-mint-order) [NextMonitor Rune Mint Order](https://docs.xverse.app/api/runes/mint-rune/monitor-rune-mint-order) Last updated 10 months ago * [Quick Start](https://docs.xverse.app/api/runes/mint-rune/execute-rune-mint-order#quick-start) * [post/v1/runes-managed/mint/orders/{orderId}/execute](https://docs.xverse.app/api/runes/mint-rune/execute-rune-mint-order#post-v1-runes-managed-mint-orders-orderid-execute) * [Execute Rune Mint Order - Request](https://docs.xverse.app/api/runes/mint-rune/execute-rune-mint-order#execute-rune-mint-order-request) * [Execute Rune Mint Order - Response](https://docs.xverse.app/api/runes/mint-rune/execute-rune-mint-order#execute-rune-mint-order-response) * [Next Step -> Monitor Rune Mint Order](https://docs.xverse.app/api/runes/mint-rune/execute-rune-mint-order#next-step-greater-than-monitor-rune-mint-order) --- # Estimate Rune Mint Order | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/runes/mint-rune/estimate-rune-mint-order.md) . Copy On this page Use this endpoint to estimate the cost of a Rune Mint order, before executing it. Quick Start[](https://docs.xverse.app/api/runes/mint-rune/estimate-rune-mint-order#quick-start) ------------------------------------------------------------------------------------------------ posthttps://api.secretkeylabs.io/v1/runes-managed/mint/estimate Estimate total cost for a batch mint order. Authorizations apiKey x-api-keystringRequired Body application/json runeNamestringRequired repeatsnumber · min: 1Required destinationAddressstringRequired refundAddressstringOptional feeRatenumber · min: 1Required appServiceFeenumberOptional appServiceFeeAddressstringOptional Responses 200 Default Response application/json totalSizenumberRequired totalCostnumberRequired costBreakdownobjectRequired Show properties post/v1/runes-managed/mint/estimate HTTP Copy POST /v1/runes-managed/mint/estimate HTTP/1.1 Host: api.secretkeylabs.io x-api-key: YOUR_API_KEY Content-Type: application/json Accept: */* Content-Length: 142 { "runeName": "text", "repeats": 1, "destinationAddress": "text", "refundAddress": "text", "feeRate": 1, "appServiceFee": 1, "appServiceFeeAddress": "text" } Test it 200 Default Response Copy { "totalSize": 1, "totalCost": 1, "costBreakdown": { "postage": 1, "networkFee": 1, "serviceFee": 1, "appServiceFee": 1 } } Estimate Rune Mint Order - Request[](https://docs.xverse.app/api/runes/mint-rune/estimate-rune-mint-order#estimate-rune-mint-order-request) -------------------------------------------------------------------------------------------------------------------------------------------- You can specify the characteristics of the Runes Create Rune Mint Order[](https://docs.xverse.app/api/runes/mint-rune/estimate-rune-mint-order#next-step-greater-than-create-rune-mint-order) ---------------------------------------------------------------------------------------------------------------------------------------------------------- Use the [Create Mint Order](https://docs.xverse.app/api/runes/mint-rune/create-rune-mint-order) endpoint if you wish to proceed with a Runes Mint order after estimating its cost. [PreviousMint Rune](https://docs.xverse.app/api/runes/mint-rune) [NextCreate Rune Mint Order](https://docs.xverse.app/api/runes/mint-rune/create-rune-mint-order) Last updated 10 months ago * [Quick Start](https://docs.xverse.app/api/runes/mint-rune/estimate-rune-mint-order#quick-start) * [post/v1/runes-managed/mint/estimate](https://docs.xverse.app/api/runes/mint-rune/estimate-rune-mint-order#post-v1-runes-managed-mint-estimate) * [Estimate Rune Mint Order - Request](https://docs.xverse.app/api/runes/mint-rune/estimate-rune-mint-order#estimate-rune-mint-order-request) * [Estimate Rune Mint Order - Response](https://docs.xverse.app/api/runes/mint-rune/estimate-rune-mint-order#estimate-rune-mint-order-response) * [Next Step -> Create Rune Mint Order](https://docs.xverse.app/api/runes/mint-rune/estimate-rune-mint-order#next-step-greater-than-create-rune-mint-order) --- # Create Rune Mint Order | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/runes/mint-rune/create-rune-mint-order.md) . Copy On this page Use this endpoint to create a Rune Mint order. You can use the [Estimate Mint Order](https://docs.xverse.app/api/runes/mint-rune/estimate-rune-mint-order) endpoint to estimate the cost of a Rune mint order before creating it. Quick Start[](https://docs.xverse.app/api/runes/mint-rune/create-rune-mint-order#quick-start) ---------------------------------------------------------------------------------------------- posthttps://api.secretkeylabs.io/v1/runes-managed/mint/orders Create a batch mint order. Authorizations apiKey x-api-keystringRequired Body application/json runeNamestringRequired repeatsnumber · min: 1Required destinationAddressstringRequired refundAddressstringOptional feeRatenumber · min: 1Required appServiceFeenumberOptional appServiceFeeAddressstringOptional Responses 200 Default Response application/json orderIdstringRequired fundAddressstringRequired fundAmountnumberRequired post/v1/runes-managed/mint/orders HTTP Copy POST /v1/runes-managed/mint/orders HTTP/1.1 Host: api.secretkeylabs.io x-api-key: YOUR_API_KEY Content-Type: application/json Accept: */* Content-Length: 142 { "runeName": "text", "repeats": 1, "destinationAddress": "text", "refundAddress": "text", "feeRate": 1, "appServiceFee": 1, "appServiceFeeAddress": "text" } Test it 200 Default Response Copy { "orderId": "text", "fundAddress": "text", "fundAmount": 1 } 🆓 Rune Mint Orders are **free for Xverse API customers**. For free trial users, Xverse API charges a 2,000 sats fee for every mint transaction, with a cap of 36,000 sats (equivalent to 18 mint transactions) per mint order. Create Rune Mint Order - Request[](https://docs.xverse.app/api/runes/mint-rune/create-rune-mint-order#create-rune-mint-order-request) -------------------------------------------------------------------------------------------------------------------------------------- You can specify the characteristics of the Rune Mint order you wish to execute, by passing a request body, with the below properties: Create Mint Order - Request Body Description `runeName` a string representing the [name of the Rune](https://docs.ordinals.com/runes.html#name) to mint `repeats` a number representing the number of mint transactions to create. Every mint transaction creates a [fixed amount](https://docs.ordinals.com/runes.html#amount) of new units of a rune. You can use `repeats` to mint a multiple of that amount. ℹ️ Note that there is a 4000 repeat limit per order `refundAddress` The Bitcoin address to which the amount of the funding transaction should be returned, should the mint order fail. ⚠️ If minting Runes for your user, we recommend managing refunds on their Bitcoin **payment** address. `destinationAddress` The Bitcoin address to which the minted runes should be allocated. ⚠️ If minting Runes for your users, we recommend managing runes holdings on their **taproot/ordinal** address. `feeRate` a number representing the desired fee rate to set for the Rune mint transaction(s), in sats per vbytes `appServiceFee` (ℹ️ optional) a number representing the sats value of the fee to charge your user for your service. `appServiceFeeAddress` (ℹ️ optional) a string representing the Bitcoin address which will receive the `appServiceFee`, if a fee is specified `network` (ℹ️ optional) a string representing the Bitcoin network to use for the transaction: `'Mainnet'` or `'Testnet'` Create Rune Mint Order - Response[](https://docs.xverse.app/api/runes/mint-rune/create-rune-mint-order#create-rune-mint-order-response) ---------------------------------------------------------------------------------------------------------------------------------------- A successful Create Mint Order request will: 1. Create a Runes Mint order for the Xverse API to process, identified by an `orderId` 2. Return a the below response object to your app: Create Mint Order - Response Object Description `orderId` the ID of the Rune Mint order created by the Xverse API. `fundAddress` the BTC address which will collect the funds required to [execute the mint order](https://docs.xverse.app/api/runes/mint-rune/execute-rune-mint-order) , and sign the required mint transactions to process the order. `fundAmount` the amount of sats to send to `fundAddress` the before you [execute the mint order](https://docs.xverse.app/api/runes/mint-rune/execute-rune-mint-order) Next Step -> Fund & Execute Rune Mint Order[](https://docs.xverse.app/api/runes/mint-rune/create-rune-mint-order#next-step-greater-than-fund-and-execute-rune-mint-order) -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Once you've funded your mint order and sent the required `fundAmount` to the `fundAddress` , you can call the [Execute Mint Order](https://docs.xverse.app/api/runes/mint-rune/execute-rune-mint-order) endpoint. [PreviousEstimate Rune Mint Order](https://docs.xverse.app/api/runes/mint-rune/estimate-rune-mint-order) [NextExecute Rune Mint Order](https://docs.xverse.app/api/runes/mint-rune/execute-rune-mint-order) Last updated 10 months ago * [Quick Start](https://docs.xverse.app/api/runes/mint-rune/create-rune-mint-order#quick-start) * [post/v1/runes-managed/mint/orders](https://docs.xverse.app/api/runes/mint-rune/create-rune-mint-order#post-v1-runes-managed-mint-orders) * [Create Rune Mint Order - Request](https://docs.xverse.app/api/runes/mint-rune/create-rune-mint-order#create-rune-mint-order-request) * [Create Rune Mint Order - Response](https://docs.xverse.app/api/runes/mint-rune/create-rune-mint-order#create-rune-mint-order-response) * [Next Step -> Fund & Execute Rune Mint Order](https://docs.xverse.app/api/runes/mint-rune/create-rune-mint-order#next-step-greater-than-fund-and-execute-rune-mint-order) --- # Execute Rune Etch Order | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/runes/etch-rune/execute-rune-etch-order.md) . Copy On this page Use this endpoint to execute a Rune Etch order. You need to first [Create a Rune Etch order](https://docs.xverse.app/api/runes/etch-rune/create-rune-etch-order) and **fund your order** before you can call this endpoint. Quick Start[](https://docs.xverse.app/api/runes/etch-rune/execute-rune-etch-order#quick-start) ----------------------------------------------------------------------------------------------- posthttps://api.secretkeylabs.io/v1/runes-managed/etch/orders/{orderId}/execute Execute an etching order once funded. Authorizations apiKey x-api-keystringRequired Path parameters orderIdstring · uuidRequired Body application/json fundTransactionIdstring · min: 64 · max: 64Required Responses 200 Default Response No content post/v1/runes-managed/etch/orders/{orderId}/execute HTTP Copy POST /v1/runes-managed/etch/orders/{orderId}/execute HTTP/1.1 Host: api.secretkeylabs.io x-api-key: YOUR_API_KEY Content-Type: application/json Accept: */* Content-Length: 28 { "fundTransactionId": "text" } Test it 200 Default Response No content Execute Rune Etch Order - Request[](https://docs.xverse.app/api/runes/etch-rune/execute-rune-etch-order#execute-rune-etch-order-request) ----------------------------------------------------------------------------------------------------------------------------------------- Once you have * [created your Rune Etch order](https://docs.xverse.app/api/runes/etch-rune/create-rune-etch-order) amd received your `orderID` * funded your Rune Etch order and sent the required `fundAmount` to the `fundAddress` \-> you can call the Execute Etch Order endpoint, using the `orderID` as path parameter Execute Rune Etch Order - Response[](https://docs.xverse.app/api/runes/etch-rune/execute-rune-etch-order#execute-rune-etch-order-response) ------------------------------------------------------------------------------------------------------------------------------------------- A successful create Execute Etch request will: 1. Return the `fundTransactionId` to your app, confirming that the funding transaction required to execute your order was detected. 2. Prompt the Xverse API to process the Etch Order. Its Rune Etch service uses a two-phase commit/reveal procedure to process your order and etch the rune: * The funding transaction for the order also acts as a _commit_ transaction: it contains a taproot output committing to a script containing the Rune to etch (and optionally the inscription content, if you chose to link an inscription with either `inscriptionDetails` or `delegateInscriptionId`) * **Once the commit transaction has reached 6 block confirmations**, the Rune Etch service will craft & broadcast a reveal transaction, which etches the rune (and optionally reveals your linked inscription). The reveal transaction is broadcast at the desired `feeRate` specified in the request, and signed with the funding address for the order. This mechanism protects your rune etching from mempool detection and front-running. Next Step -> Monitor Rune Etch Order[](https://docs.xverse.app/api/runes/etch-rune/execute-rune-etch-order#next-step-greater-than-monitor-rune-etch-order) ----------------------------------------------------------------------------------------------------------------------------------------------------------- Once you've sent the required amount to execute your order, you can call the [Monitor Mint Order](https://docs.xverse.app/api/runes/mint-rune/monitor-rune-mint-order) endpoint to track the status. [PreviousCreate Rune Etch Order](https://docs.xverse.app/api/runes/etch-rune/create-rune-etch-order) [NextMonitor Rune Etch Order](https://docs.xverse.app/api/runes/etch-rune/monitor-rune-etch-order) Last updated 10 months ago * [Quick Start](https://docs.xverse.app/api/runes/etch-rune/execute-rune-etch-order#quick-start) * [post/v1/runes-managed/etch/orders/{orderId}/execute](https://docs.xverse.app/api/runes/etch-rune/execute-rune-etch-order#post-v1-runes-managed-etch-orders-orderid-execute) * [Execute Rune Etch Order - Request](https://docs.xverse.app/api/runes/etch-rune/execute-rune-etch-order#execute-rune-etch-order-request) * [Execute Rune Etch Order - Response](https://docs.xverse.app/api/runes/etch-rune/execute-rune-etch-order#execute-rune-etch-order-response) * [Next Step -> Monitor Rune Etch Order](https://docs.xverse.app/api/runes/etch-rune/execute-rune-etch-order#next-step-greater-than-monitor-rune-etch-order) --- # BRC-20 by Address | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/brc-20/brc-20-by-address.md) . [BRC-20 balances](https://docs.xverse.app/api/brc-20/brc-20-by-address/brc-20-balances) [BRC-20 transaction history](https://docs.xverse.app/api/brc-20/brc-20-by-address/brc-20-transaction-history) [BRC-20 Activity](https://docs.xverse.app/api/brc-20/brc-20-by-address/brc-20-activity) [Unspent BRC-20 Transfers](https://docs.xverse.app/api/brc-20/brc-20-by-address/unspent-brc-20-transfers) [Void inscriptions (spent BRC-20 transfers)](https://docs.xverse.app/api/brc-20/brc-20-by-address/void-inscriptions-spent-brc-20-transfers) [PreviousBRC-20](https://docs.xverse.app/api/brc-20) [NextBRC-20 balances](https://docs.xverse.app/api/brc-20/brc-20-by-address/brc-20-balances) --- # Monitor Rune Mint Order | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/runes/mint-rune/monitor-rune-mint-order.md) . Copy On this page The Xverse API Runes Minting service monitors Rune Mint orders and tracks the status & confirmation of their mint transaction(s) You can use this endpoint to track the status of your Rune Mint order and the related mint transactions, using the `orderId` obtained when you [created your mint order](https://docs.xverse.app/api/runes/mint-rune/create-rune-mint-order) Quick Start[](https://docs.xverse.app/api/runes/mint-rune/monitor-rune-mint-order#quick-start) ----------------------------------------------------------------------------------------------- gethttps://api.secretkeylabs.io/v1/runes-managed/orders/{orderId} Get order details by ID. Authorizations apiKey x-api-keystringRequired Path parameters orderIdstring · uuidRequired Responses 200 Default Response application/json orderIdstringRequired orderTypestringRequired statestringRequired reasonstringOptional createdAtstringRequired fundingAddressstringOptional orderDetailsobjectOptional transactionsobject\[\]Optional Show properties get/v1/runes-managed/orders/{orderId} HTTP Copy GET /v1/runes-managed/orders/{orderId} HTTP/1.1 Host: api.secretkeylabs.io x-api-key: YOUR_API_KEY Accept: */* Test it 200 Default Response Copy { "orderId": "text", "orderType": "text", "state": "text", "reason": "text", "createdAt": "text", "fundingAddress": "text", "orderDetails": {}, "transactions": [\ {\ "txid": "text",\ "state": "text",\ "transactionType": "text",\ "broadcastSequence": 1,\ "batchNumber": 1\ }\ ] } Monitor Order - Response[](https://docs.xverse.app/api/runes/mint-rune/monitor-rune-mint-order#monitor-order-response) ----------------------------------------------------------------------------------------------------------------------- Monitor Order - Response Object Description `orderId` a string representing the id of your mint or etch order. `orderType` a string representing the nature of the order. The possible values are: * `runes_mint` for a mint order * `runes_etch` for an etch order `state` A string representing the current status of your order ℹ️See [Execute Rune Mint Order](https://docs.xverse.app/api/runes/mint-rune/execute-rune-mint-order) & [Execute Rune Etch Order](https://docs.xverse.app/api/runes/etch-rune/execute-rune-etch-order) for details on the rune order workflows The possible values are: * `new` when the order has only just been created, and you have not broadcast a funding transaction yet * `pending` when the order awaits the confirmation of the funding transaction before being processed * `executing` when the order is being processed and the required runes mint/etch transactions are being broadcast. * `complete` when the order has been processed and all runes mint/etch transactions have been confirmed. * `failed` when the order has failed. See the `reason` property for the nature of the order failure. * `refunded` when the funding transaction for a failed order has been refunded to your user's specified refund address * `stale` when the order status hasn't progressed from the `new` state for an extended period of time `reason` (ℹ️ optional) If the order is in a `failed` state, a string representing the reason for the failure `createdAt` the creation date for the order (this is the date when the [Create Rune Mint Order](https://docs.xverse.app/api/runes/mint-rune/create-rune-mint-order) or [Create Rune Etch Order](https://docs.xverse.app/api/runes/etch-rune/create-rune-etch-order) endpoint was first called) `fundingAddress` a string representing the BTC address which will collect the funds required to process the order, and sign the required mint/etch transactions to process the order. [PreviousExecute Rune Mint Order](https://docs.xverse.app/api/runes/mint-rune/execute-rune-mint-order) [NextList Rune Mint Orders](https://docs.xverse.app/api/runes/mint-rune/list-rune-mint-orders) Last updated 10 months ago * [Quick Start](https://docs.xverse.app/api/runes/mint-rune/monitor-rune-mint-order#quick-start) * [get/v1/runes-managed/orders/{orderId}](https://docs.xverse.app/api/runes/mint-rune/monitor-rune-mint-order#get-v1-runes-managed-orders-orderid) * [Monitor Order - Response](https://docs.xverse.app/api/runes/mint-rune/monitor-rune-mint-order#monitor-order-response) --- # BTKN Tokens | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/spark/btkn-tokens.md) . [BTKN Token by ID](https://docs.xverse.app/api/spark/btkn-tokens/btkn-token-by-id) [BTKN Tokens by IDs (Batch)](https://docs.xverse.app/api/spark/btkn-tokens/btkn-tokens-by-ids-batch) [BTKN Token by Pubkey/Address or Search BTKN](https://docs.xverse.app/api/spark/btkn-tokens/btkn-token-by-pubkey-address-or-search-btkn) [BTKN Tokens by Pubkey/Address](https://docs.xverse.app/api/spark/btkn-tokens/btkn-tokens-by-pubkey-address) [BTKN Token Transactions](https://docs.xverse.app/api/spark/btkn-tokens/btkn-token-transactions) [Holders by BTKN Token](https://docs.xverse.app/api/spark/btkn-tokens/holders-by-btkn-token) [BTKN Token Rankings](https://docs.xverse.app/api/spark/btkn-tokens/btkn-token-rankings) [PreviousLatest Spark Transactions](https://docs.xverse.app/api/spark/transactions/latest-spark-transactions) [NextBTKN Token by ID](https://docs.xverse.app/api/spark/btkn-tokens/btkn-token-by-id) --- # Runes by Blocks | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/runes/runes-by-blocks.md) . [Get All Rune Transfers by Blocks](https://docs.xverse.app/api/runes/runes-by-blocks/get-all-rune-transfers-by-blocks) [Get All Rune Trades by Blocks](https://docs.xverse.app/api/runes/runes-by-blocks/get-all-rune-trades-by-blocks) [Previous\[v2\] Runes Historical Prices](https://docs.xverse.app/api/runes/v2-runes-historical-prices) [NextGet All Rune Transfers by Blocks](https://docs.xverse.app/api/runes/runes-by-blocks/get-all-rune-transfers-by-blocks) --- # Monitor Rune Etch Order | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/runes/etch-rune/monitor-rune-etch-order.md) . Copy On this page The Xverse API Runes Etching service monitors the confirmation of the confirmation of the minting transaction(s) You can use this endpoint to track the status of your order and the related mint transactions, using the `orderId` obtained when you [created your mint order](https://docs.xverse.app/api/runes/mint-rune/create-rune-mint-order) Quick Start[](https://docs.xverse.app/api/runes/etch-rune/monitor-rune-etch-order#quick-start) ----------------------------------------------------------------------------------------------- gethttps://api.secretkeylabs.io/v1/runes-managed/orders/{orderId} Get order details by ID. Authorizations apiKey x-api-keystringRequired Path parameters orderIdstring · uuidRequired Responses 200 Default Response application/json orderIdstringRequired orderTypestringRequired statestringRequired reasonstringOptional createdAtstringRequired fundingAddressstringOptional orderDetailsobjectOptional transactionsobject\[\]Optional Show properties get/v1/runes-managed/orders/{orderId} HTTP Copy GET /v1/runes-managed/orders/{orderId} HTTP/1.1 Host: api.secretkeylabs.io x-api-key: YOUR_API_KEY Accept: */* Test it 200 Default Response Copy { "orderId": "text", "orderType": "text", "state": "text", "reason": "text", "createdAt": "text", "fundingAddress": "text", "orderDetails": {}, "transactions": [\ {\ "txid": "text",\ "state": "text",\ "transactionType": "text",\ "broadcastSequence": 1,\ "batchNumber": 1\ }\ ] } Monitor Order - Response[](https://docs.xverse.app/api/runes/etch-rune/monitor-rune-etch-order#monitor-order-response) ----------------------------------------------------------------------------------------------------------------------- Monitor Order - Response Object Description `orderId` a string representing the id of your mint or etch order. `orderType` a string representing the nature of the order. The possible values are: * `runes_mint` for a mint order * `runes_etch` for an etch order `state` A string representing the current status of your order ℹ️See [Execute Rune Mint Order](https://docs.xverse.app/api/runes/mint-rune/execute-rune-mint-order) & [Execute Rune Etch Order](https://docs.xverse.app/api/runes/etch-rune/execute-rune-etch-order) for details on the rune order workflows The possible values are: * `new` when the order has only just been created, and you have not broadcast a funding transaction yet * `pending` when the order awaits the confirmation of the funding transaction before being processed * `executing` when the order is being processed and the required runes mint/etch transactions are being broadcast. * `complete` when the order has been processed and all runes mint/etch transactions have been confirmed. * `failed` when the order has failed. See the `reason` property for the nature of the order failure. * `refunded` when the funding transaction for a failed order has been refunded to your user's specified refund address * `stale` when the order status hasn't progressed from the `new` state for an extended period of time `reason` (ℹ️ optional) If the order is in a `failed` state, a string representing the reason for the failure `createdAt` the creation date for the order (this is the date when the [Create Rune Mint Order](https://docs.xverse.app/api/runes/mint-rune/create-rune-mint-order) or [Create Rune Etch Order](https://docs.xverse.app/api/runes/etch-rune/create-rune-etch-order) endpoint was first called) `fundingAddress` a string representing the BTC address which will collect the funds required to process the order, and sign the required mint/etch transactions to process the order. [PreviousExecute Rune Etch Order](https://docs.xverse.app/api/runes/etch-rune/execute-rune-etch-order) [NextList Rune Etch Orders](https://docs.xverse.app/api/runes/etch-rune/list-rune-etch-orders) Last updated 10 months ago * [Quick Start](https://docs.xverse.app/api/runes/etch-rune/monitor-rune-etch-order#quick-start) * [get/v1/runes-managed/orders/{orderId}](https://docs.xverse.app/api/runes/etch-rune/monitor-rune-etch-order#get-v1-runes-managed-orders-orderid) * [Monitor Order - Response](https://docs.xverse.app/api/runes/etch-rune/monitor-rune-etch-order#monitor-order-response) --- # Create Rune Etch Order | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/runes/etch-rune/create-rune-etch-order.md) . Copy On this page Use this endpoint to create a Rune Etch order. You can use the [Estimate Etch Order](https://docs.xverse.app/api/runes/etch-rune/estimate-rune-etch-order) endpoint to estimate the cost of a Rune Etch order before creating it. Quick Start[](https://docs.xverse.app/api/runes/etch-rune/create-rune-etch-order#quick-start) ---------------------------------------------------------------------------------------------- posthttps://api.secretkeylabs.io/v1/runes-managed/etch/orders Create a new Runes etch order. Authorizations apiKey x-api-keystringRequired Body application/json runeNamestringRequired divisibilitynumber · max: 38Optional symbolstring · max: 1Optional preminestringOptional isMintablebooleanRequired termsobjectOptional Show properties inscriptionDetailsobjectOptional Show properties delegateInscriptionIdstringOptional destinationAddressstringRequired refundAddressstringOptional feeRatenumber · min: 1Required appServiceFeenumberOptional appServiceFeeAddressstringOptional turbobooleanOptional Responses 200 Default Response application/json orderIdstringRequired fundAddressstringRequired fundAmountnumberRequired post/v1/runes-managed/etch/orders HTTP Copy POST /v1/runes-managed/etch/orders HTTP/1.1 Host: api.secretkeylabs.io x-api-key: YOUR_API_KEY Content-Type: application/json Accept: */* Content-Length: 428 { "runeName": "text", "divisibility": 1, "symbol": "text", "premine": "text", "isMintable": true, "terms": { "amount": "text", "cap": "text", "heightStart": "text", "heightEnd": "text", "offsetStart": "text", "offsetEnd": "text" }, "inscriptionDetails": { "contentType": "text", "contentBase64": "text" }, "delegateInscriptionId": "text", "destinationAddress": "text", "refundAddress": "text", "feeRate": 1, "appServiceFee": 1, "appServiceFeeAddress": "text", "turbo": true } Test it 200 Default Response Copy { "orderId": "text", "fundAddress": "text", "fundAmount": 1 } 🆓 Rune Etch Orders are **free for Xverse API customers**. For free trial users, Xverse API charges a 2,000 sats fee for every Rune Etch order. Create Rune Etch Order - Request[](https://docs.xverse.app/api/runes/etch-rune/create-rune-etch-order#create-rune-etch-order-request) -------------------------------------------------------------------------------------------------------------------------------------- You can specify the characteristics of the Runes Etch order you wish to execute, by passing a request body, with the below properties: RunesEtchParams Property Description `runeName` a string representing the [name of the Rune](https://docs.ordinals.com/runes.html#name) to etch `divisibility` (ℹ️ optional) a number representing the rune's [divisibility](https://docs.ordinals.com/runes.html#divisibility) , i.e. how finely it may be divided into its atomic units. Divisibility is expressed as the number of digits permissible after the decimal point in an amount of runes. The default value is 0. `symbol` (ℹ️ optional) a string representing the rune's currency [symbol](https://docs.ordinals.com/runes.html#symbol) as a single Unicode code point. If a rune does not have a symbol, the generic currency sign `¤`, also called a scarab, should be used `premine` (ℹ️ optional) a string representing rune [premine](https://docs.ordinals.com/runes.html#premine) : the amount of rune units which the etcher can optionally allocate to themselves. `isMintable` a boolean indicating if the rune may have an open mint, allowing anyone to create and allocate units of that rune for themselves. `terms` (ℹ️ optional) an object describing the [terms](https://docs.ordinals.com/runes.html#terms) governing minting if the rune is mintable, with the below properties: * `amount` a string representing the fixed amount of new units of the rune that each mint transaction creates * `cap` a string representing the number of times a rune may be minted. * `heightStart` the mint is open starting in the block with the given start height. ℹ️Optional * `heightEnd` the rune may not be minted in or after the block with the given end height. ℹ️Optional * `offsetStart` the mint is open starting in the block whose height is equal to the start offset plus the height of the block in which the rune was etched. ℹ️Optional * `offsetEnd` the rune may not be minted in or after the block whose height is equal to the end offset plus the height of the block in which the rune was etched. ℹ️Optional `inscriptionDetails` (ℹ️ optional) You can optionally use the Rune etching transactions to **create an inscription**: - the etched Runes will be **linked** to the inscription, which marketplaces and apps can use as logo - the inscription will be sent to the specified `destinationAddress`, along with the premined Runes If you wish to use that option, pass an `inscriptionDetails` object with the below properties to specify the content to inscribe: * `contentType` a string representing the content/mime type of the content being inscribed. Make sure you extract and pass the correct content type for the content you wish to inscribe * `contentBase64` a string representing the content you wish to inscribe, encoded in Base64 format `delegateInscriptionId` (ℹ️ optional) If you wish to use the Rune etching transactions to create an inscription, you can optionally nominate a [delegate](https://docs.ordinals.com/inscriptions/delegate.html) for your inscription, as an **alternative** to specifying its content with `inscriptionDetail` (see above) You can **instead** choose to pass a `delegateInscriptionId` string representing the inscription ID of the delegate. `turbo` (ℹ️ optional) a boolean marking the rune etching as opting into future rune protocol changes if set to `true` According to the [Runes specifications](https://docs.ordinals.com/runes/specification.html) : _These protocol changes may increase light client validation costs, or just be highly degenerate_ ℹ️the default value is `false` `destinationAddress` The Bitcoin address to which the minted runes should be allocated. ⚠️ When minting Runes for your user, we recommend managing runes holdings on taproot/ordinal address. `feeRate` a number representing the desired fee rate to set for the Rune etch transactions, in sats per vbytes `appServiceFee` (ℹ️ optional) a number representing the sats value of the fee to charge your user for your service. `appServiceFeeAddress` (ℹ️ optional) a string representing the Bitcoin address which will receive the `appServiceFee`, if a fee is specified `refundAddress` The Bitcoin address to which the amount of the funding transaction should be returned, should the etch order fail. ⚠️ When etching Runes for your user, we recommend managing refunds on their Bitcoin **payment** address. `network` (ℹ️ optional) a string representing the Bitcoin network to use for the etch transactions: `'Mainnet'` or `'Testnet'` Create Rune Etch Order - Response[](https://docs.xverse.app/api/runes/etch-rune/create-rune-etch-order#create-rune-etch-order-response) ---------------------------------------------------------------------------------------------------------------------------------------- A successful Create Etch Order request will: 1. Create a Runes Etch order for the Xverse API to process, identified by an `orderId` 2. Return a the below response object to your app: Create Etch Order - Response Description `orderId` a string representing the ID of the Rune Etch order created by the Xverse API `fundAddress` the BTC address which will collect the funds required to [execute the Rune Etch order](https://docs.xverse.app/api/runes/etch-rune/execute-rune-etch-order) , and sign the required transactions to process the order. `fundAmount` the amount of sats to send to `fundAddress` the before you [execute the Rune Etch order](https://docs.xverse.app/api/runes/etch-rune/execute-rune-etch-order) Next Step -> Fund & Execute Etch Order[](https://docs.xverse.app/api/runes/etch-rune/create-rune-etch-order#next-step-greater-than-fund-and-execute-etch-order) ---------------------------------------------------------------------------------------------------------------------------------------------------------------- Once you've funded your Rune Etch order and sent the required `fundAmount` to the `fundAddress` , you can call the [Execute Etch Order](https://docs.xverse.app/api/runes/etch-rune/execute-rune-etch-order) endpoint. [PreviousEstimate Rune Etch Order](https://docs.xverse.app/api/runes/etch-rune/estimate-rune-etch-order) [NextExecute Rune Etch Order](https://docs.xverse.app/api/runes/etch-rune/execute-rune-etch-order) Last updated 10 months ago * [Quick Start](https://docs.xverse.app/api/runes/etch-rune/create-rune-etch-order#quick-start) * [post/v1/runes-managed/etch/orders](https://docs.xverse.app/api/runes/etch-rune/create-rune-etch-order#post-v1-runes-managed-etch-orders) * [Create Rune Etch Order - Request](https://docs.xverse.app/api/runes/etch-rune/create-rune-etch-order#create-rune-etch-order-request) * [Create Rune Etch Order - Response](https://docs.xverse.app/api/runes/etch-rune/create-rune-etch-order#create-rune-etch-order-response) * [Next Step -> Fund & Execute Etch Order](https://docs.xverse.app/api/runes/etch-rune/create-rune-etch-order#next-step-greater-than-fund-and-execute-etch-order) --- # Estimate Rune Etch Order | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/runes/etch-rune/estimate-rune-etch-order.md) . Copy On this page Use this endpoint to estimate the cost of a Rune Etch order, before executing it. Quick Start[](https://docs.xverse.app/api/runes/etch-rune/estimate-rune-etch-order#quick-start) ------------------------------------------------------------------------------------------------ posthttps://api.secretkeylabs.io/v1/runes-managed/etch/estimate Estimate the total cost for an etching order. Authorizations apiKey x-api-keystringRequired Body application/json runeNamestringRequired divisibilitynumber · max: 38Optional symbolstring · max: 1Optional preminestringOptional isMintablebooleanRequired termsobjectOptional Show properties inscriptionDetailsobjectOptional Show properties delegateInscriptionIdstringOptional destinationAddressstringRequired refundAddressstringOptional feeRatenumber · min: 1Required appServiceFeenumberOptional appServiceFeeAddressstringOptional turbobooleanOptional Responses 200 Default Response application/json totalSizenumberRequired totalCostnumberRequired costBreakdownobjectRequired Show properties post/v1/runes-managed/etch/estimate HTTP Copy POST /v1/runes-managed/etch/estimate HTTP/1.1 Host: api.secretkeylabs.io x-api-key: YOUR_API_KEY Content-Type: application/json Accept: */* Content-Length: 428 { "runeName": "text", "divisibility": 1, "symbol": "text", "premine": "text", "isMintable": true, "terms": { "amount": "text", "cap": "text", "heightStart": "text", "heightEnd": "text", "offsetStart": "text", "offsetEnd": "text" }, "inscriptionDetails": { "contentType": "text", "contentBase64": "text" }, "delegateInscriptionId": "text", "destinationAddress": "text", "refundAddress": "text", "feeRate": 1, "appServiceFee": 1, "appServiceFeeAddress": "text", "turbo": true } Test it 200 Default Response Copy { "totalSize": 1, "totalCost": 1, "costBreakdown": { "postage": 1, "networkFee": 1, "serviceFee": 1, "appServiceFee": 1 } } Estimate Rune Etch Order - Request[](https://docs.xverse.app/api/runes/etch-rune/estimate-rune-etch-order#estimate-rune-etch-order-request) -------------------------------------------------------------------------------------------------------------------------------------------- You can specify the characteristics of the Runes Etch order you wish to estimate, by passing a request body, with the below properties: Estimate Etch - Request Body Description `runeName` a string representing the [name of the Rune](https://docs.ordinals.com/runes.html#name) to etch `divisibility` (ℹ️ optional) a number representing the rune's [divisibility](https://docs.ordinals.com/runes.html#divisibility) , i.e. how finely it may be divided into its atomic units. Divisibility is expressed as the number of digits permissible after the decimal point in an amount of runes. The default value is 0. `symbol` (ℹ️ optional) a string representing the rune's currency [symbol](https://docs.ordinals.com/runes.html#symbol) as a single Unicode code point. If a rune does not have a symbol, the generic currency sign `¤`, also called a scarab, should be used `premine` (ℹ️ optional) a string representing rune [premine](https://docs.ordinals.com/runes.html#premine) : the amount of rune units which the etcher can optionally allocate to themselves. `isMintable` a boolean indicating if the rune may have an open mint, allowing anyone to create and allocate units of that rune for themselves. `terms` (ℹ️ optional) an object describing the [terms](https://docs.ordinals.com/runes.html#terms) governing minting if the rune is mintable, with the below properties: * `amount` a string representing the fixed amount of new units of the rune that each mint transaction creates * `cap` a string representing the number of times a rune may be minted. * `heightStart` the mint is open starting in the block with the given start height. ℹ️Optional * `heightEnd` the rune may not be minted in or after the block with the given end height. ℹ️Optional * `offsetStart` the mint is open starting in the block whose height is equal to the start offset plus the height of the block in which the rune was etched. ℹ️Optional * `offsetEnd` the rune may not be minted in or after the block whose height is equal to the end offset plus the height of the block in which the rune was etched. ℹ️Optional `inscriptionDetails` (ℹ️ optional) You can optionally use the Rune etching transactions to inscribe some content for your user: - the inscription will be sent to the specified `destinationAddress`, along with the etched Runes - the etched Runes will be linked to the inscription If you wish to use that option, pass an `inscriptionDetails` object with the below properties to specify the content to inscribe: * `contentType` a string representing the content/mime type of the content being inscribed. Make sure you extract and pass the correct content type for the content you wish to inscribe * `contentBase64` a string representing the content you wish to inscribe, encoded in Base64 format `delegateInscriptionId` (ℹ️ optional) If you wish to use the Rune etching transactions to create an inscription, you can optionally nominate a [delegate](https://docs.ordinals.com/inscriptions/delegate.html) for your inscription, as an **alternative** to specifying its content with `inscriptionDetail` (see above) You can **instead** choose to pass a `delegateInscriptionId` string representing the serialized binary inscription ID of the delegate. `turbo` (ℹ️ optional) a boolean marking the rune etching as opting into future rune protocol changes if set to `true` According to the [Runes specifications](https://docs.ordinals.com/runes/specification.html) : _These protocol changes may increase light client validation costs, or just be highly degenerate_ ℹ️the default value is `false` `destinationAddress` The Bitcoin address to which the minted runes should be allocated. ⚠️ When minting Runes for your user, we recommend managing runes holdings on taproot/ordinal addresses. `feeRate` a number representing the desired fee rate to set for the Rune etch transactions, in sats per vbytes `appServiceFee` (ℹ️ optional) a number representing the sats value of the fee to charge your user for your service. `appServiceFeeAddress` (ℹ️ optional) a string representing the Bitcoin address which will receive the `appServiceFee`, if a fee is specified `network` (ℹ️ optional) a string representing the Bitcoin network to use for the etch transactions: `'Mainnet'` or `'Testnet'` Estimate Rune Etch Order - Response[](https://docs.xverse.app/api/runes/etch-rune/estimate-rune-etch-order#estimate-rune-etch-order-response) ---------------------------------------------------------------------------------------------------------------------------------------------- The response object is intended for you and your user to anticipate the costs of your specified etch order, with a clear breakdown: Estimate Etch - Response Object Description `totalSize` a number representing the total size of the etch transactions, in vbytes `totalCost` a number representing the total cost of the etch transactions in sats `costBreakdown` An object representing the cost breakdown of the etch transactions, with the below properties: * `postage` a number representing the total size of the Rune UTXOs etched, in sats * `networkFee` a number representing the total network fee for the etch transactions, in sats * `serviceFee` a number representing the total Sats Connect fee for processing the etch order, in sats * `appServiceFee` a number representing the optional service fee your app charges the user for the etch order Next Step -> Create Mint Order[](https://docs.xverse.app/api/runes/etch-rune/estimate-rune-etch-order#next-step-greater-than-create-mint-order) ------------------------------------------------------------------------------------------------------------------------------------------------ Use the [Create Etch Order](https://docs.xverse.app/api/runes/etch-rune/create-rune-etch-order) endpoint if you wish to proceed with a Runes Etch order after estimating its cost. [PreviousValidate Rune Name](https://docs.xverse.app/api/runes/etch-rune/validate-rune-name) [NextCreate Rune Etch Order](https://docs.xverse.app/api/runes/etch-rune/create-rune-etch-order) Last updated 10 months ago * [Quick Start](https://docs.xverse.app/api/runes/etch-rune/estimate-rune-etch-order#quick-start) * [post/v1/runes-managed/etch/estimate](https://docs.xverse.app/api/runes/etch-rune/estimate-rune-etch-order#post-v1-runes-managed-etch-estimate) * [Estimate Rune Etch Order - Request](https://docs.xverse.app/api/runes/etch-rune/estimate-rune-etch-order#estimate-rune-etch-order-request) * [Estimate Rune Etch Order - Response](https://docs.xverse.app/api/runes/etch-rune/estimate-rune-etch-order#estimate-rune-etch-order-response) * [Next Step -> Create Mint Order](https://docs.xverse.app/api/runes/etch-rune/estimate-rune-etch-order#next-step-greater-than-create-mint-order) --- # List Rune Mint Orders | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/runes/mint-rune/list-rune-mint-orders.md) . Copy On this page You can use this endpoint to retrieve all the Runes Mint orders involving a specific `destinationAddress` This is the Bitcoin address to which the minted runes should be allocated, as specified when you [created your mint order](https://docs.xverse.app/api/runes/mint-rune/create-rune-mint-order) Rune Mint orders are identified bu their `orderType` gethttps://api.secretkeylabs.io/v1/runes-managed/orders Get orders summary by destination address. Authorizations apiKey x-api-keystringRequired Query parameters destinationAddressstringRequired Bitcoin address to filter orders Responses 200 Default Response application/json itemsobject\[\]Required Show properties get/v1/runes-managed/orders HTTP Copy GET /v1/runes-managed/orders?destinationAddress=text HTTP/1.1 Host: api.secretkeylabs.io x-api-key: YOUR_API_KEY Accept: */* Test it 200 Default Response Copy { "items": [\ {\ "orderId": "text",\ "orderType": "text",\ "state": "text",\ "reason": "text",\ "createdAt": "text"\ }\ ] } [PreviousMonitor Rune Mint Order](https://docs.xverse.app/api/runes/mint-rune/monitor-rune-mint-order) [NextEtch Rune](https://docs.xverse.app/api/runes/etch-rune) Last updated 10 months ago --- # Mint Rune | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/runes/mint-rune.md) . You can use Xverse API to mint Runes. The Xverse API Runes Minting service lets you place a mint order for your app, and orchestrates the required transactions. This documentation will guide you through the required steps: 1. Estimate the cost of a Rune mint order-> see [Estimate Rune Mint Order](https://docs.xverse.app/api/runes/mint-rune/estimate-rune-mint-order) 2. Create a rune mint order -> see [Create Rune Mint Order](https://docs.xverse.app/api/runes/mint-rune/create-rune-mint-order) 3. Execute a Rune mint order -> see [Execute Rune Mint Order](https://docs.xverse.app/api/runes/mint-rune/execute-rune-mint-order) 4. List and monitor Rune mint orders -> [List Rune Mint Orders](https://docs.xverse.app/api/runes/mint-rune/list-rune-mint-orders) & [Monitor Rune Mint Order](https://docs.xverse.app/api/runes/mint-rune/monitor-rune-mint-order) [PreviousDecode Runestone](https://docs.xverse.app/api/runes/decode-runestone) [NextEstimate Rune Mint Order](https://docs.xverse.app/api/runes/mint-rune/estimate-rune-mint-order) Last updated 10 months ago --- # Verify Bitcoin message signatures | Sats Connect | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/sats-connect/guides/verify-bitcoin-message-signatures.md) . Signature verification depends on the type of address the message was signed with ### Ordinals Address `P2TR`[](https://docs.xverse.app/sats-connect/guides/verify-bitcoin-message-signatures#ordinals-address-p2tr) Message signing for P2TR addresses conform to the BIP-322 standard. The following options are available to verify the message signature. * Calling the `verifymessage` RPC command on a Bitcoin node built from the source of the unreleased BIP-322 feature branch. Reference: [https://developer.bitcoin.org/reference/rpc/verifymessage.html](https://developer.bitcoin.org/reference/rpc/verifymessage.html) [https://github.com/bitcoin/bitcoin/pull/24058](https://github.com/bitcoin/bitcoin/pull/24058) * Use the NPM package BIP322-js [https://www.npmjs.com/package/bip322-js](https://www.npmjs.com/package/bip322-js) ℹ️ Note that due to the experimental nature of BIP-322 none of the above options are officially endorsed or audited. Use at your own risk. ### Payment Address `P2SH(P2WPKH)`[](https://docs.xverse.app/sats-connect/guides/verify-bitcoin-message-signatures#payment-address-p2sh-p2wpkh) Messages from the payment address are signed with an ECDSA signature, conforming to the standard described here: [https://en.bitcoin.it/wiki/Message\_signing](https://en.bitcoin.it/wiki/Message_signing) You can decode the signed message and use a cryptographic library to verify the signature. Using `bitcoinjs-message` can also be a convenient option if you're working within a JavaScript or Node.js environment. It abstracts away the lower-level details of ECDSA verification and the Bitcoin message signing standard, allowing you to verify signed messages with minimal code: #### Step 1: Install bitcoinjs-message[](https://docs.xverse.app/sats-connect/guides/verify-bitcoin-message-signatures#step-1-install-bitcoinjs-message) First, you need to install the `bitcoinjs-message` library. If you're using npm, you can install it by running: Copy npm install bitcoinjs-message #### Step 2: Verify the Message[](https://docs.xverse.app/sats-connect/guides/verify-bitcoin-message-signatures#step-2-verify-the-message) Once installed, you can use the library to verify a message with just a few lines of code. Here's a simple example: ℹ️ Note that none of the above options are officially endorsed or audited. Use at your own risk. [PreviousSpark BTKN Airdrops](https://docs.xverse.app/sats-connect/spark-methods/spark-btkn-airdrops) [NextCreating Bitcoin PSBTs](https://docs.xverse.app/sats-connect/guides/creating-bitcoin-psbts) * [Ordinals Address P2TR](https://docs.xverse.app/sats-connect/guides/verify-bitcoin-message-signatures#ordinals-address-p2tr) * [Payment Address P2SH(P2WPKH)](https://docs.xverse.app/sats-connect/guides/verify-bitcoin-message-signatures#payment-address-p2sh-p2wpkh) Copy const bitcoinMessage = require('bitcoinjs-message'); // The message that was signed const message = "This is a test message"; // The signature in base64 format const signature = "H8yAIxMVQfVcY4J//yA8hI3Fy2kL...base64signature..."; // The Bitcoin address of the signer const address = "1ExampleOnlyDoNotSendToThisAddressDoNotTryToDecodeIt"; // Verify the message const isValid = bitcoinMessage.verify(message, address, signature); console.log("Is the signature valid?", isValid); --- # Mobile Integration | Sats Connect | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/sats-connect/guides/mobile-integration.md) . To have access to sats-connect methods on mobile you need to direct your users to the Xverse in-app browser you can do so using the following methods ### **1\. Custom URL Scheme**[](https://docs.xverse.app/sats-connect/guides/mobile-integration#id-1.-custom-url-scheme) Xverse provides a custom URL scheme for deep linking: Copy xverse:// #### **1.1. Opening the In-App Browser**[](https://docs.xverse.app/sats-connect/guides/mobile-integration#id-1.1.-opening-the-in-app-browser) To open the in-app browser of Xverse, use the following link: Copy xverse://browser #### **1.2. Navigating to a Specific URL in the In-App Browser**[](https://docs.xverse.app/sats-connect/guides/mobile-integration#id-1.2.-navigating-to-a-specific-url-in-the-in-app-browser) To open a specific URL in the in-app browser of Xverse, use the following format: Copy xverse://browser?url=YOUR_URL_HERE For example, to open `www.magiceden.io` in the in-app browser, use: Copy xverse://browser?url=www.magiceden.io **Note**: The custom URL scheme for Xverse is deprecated. Instead, it's advised to utilize Universal Links for iOS and Application Links for Android when linking with Xverse. ### **2\. Universal Links and Application Links**[](https://docs.xverse.app/sats-connect/guides/mobile-integration#id-2.-universal-links-and-application-links) For enhanced security, Xverse utilizes Universal Links on iOS and Application Links on Android. #### **2.1. iOS: Universal Links**[](https://docs.xverse.app/sats-connect/guides/mobile-integration#id-2.1.-ios-universal-links) To link to Xverse using Universal Links on iOS, use the following format: To open the in-app browser of Xverse, use the following link: For instance, to navigate to `www.gamma.io` in the in-app browser, use: The only deep linking parameter currently supported by Xverse is `browser`. To navigate to the in-app browser, include the `browser` parameter in your link. #### **2.2. Android: Application Links**[](https://docs.xverse.app/sats-connect/guides/mobile-integration#id-2.2.-android-application-links) On Android, Xverse utilizes Application Links, which function similarly to iOS's Universal Links. To deep link into Xverse on Android, use the same format as for iOS: Opening this link will launch the Xverse app and navigate to the browser screen inside the app. [PreviousCreating Bitcoin PSBTs](https://docs.xverse.app/sats-connect/guides/creating-bitcoin-psbts) [NextNext.js support](https://docs.xverse.app/sats-connect/guides/next.js-support) Last updated 2 years ago * [1\. Custom URL Scheme](https://docs.xverse.app/sats-connect/guides/mobile-integration#id-1.-custom-url-scheme) * [2\. Universal Links and Application Links](https://docs.xverse.app/sats-connect/guides/mobile-integration#id-2.-universal-links-and-application-links) Copy https://connect.xverse.app/ Copy https://connect.xverse.app/browser?url=YOUR_URL_HERE Copy https://connect.xverse.app/browser?url=www.gamma.io Copy https://connect.xverse.app/browser?url=YOUR_URL_HERE --- # Etch Rune | Xverse API | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/api/runes/etch-rune.md) . You can use Xverse API to etch Runes. The Xverse API runes etching service lets you place an etch order for your app, and orchestrates the required transactions. This documentation will guide you through the required steps: 1. Validate you rune name & estimate the cost of a Rune Etch order-> see [Validate Rune Name](https://docs.xverse.app/api/runes/etch-rune/validate-rune-name) & [Estimate Rune Etch Order](https://docs.xverse.app/api/runes/etch-rune/estimate-rune-etch-order) 2. Create a Rune Etch order -> see [Create Rune Etch Order](https://docs.xverse.app/api/runes/etch-rune/create-rune-etch-order) 3. Execute a Rune Etch order -> see [Execute Rune Etch Order](https://docs.xverse.app/api/runes/etch-rune/execute-rune-etch-order) 4. List and monitor Rune Etch orders -> [List Rune Etch Orders](https://docs.xverse.app/api/runes/etch-rune/list-rune-etch-orders) &[Monitor Rune Etch Order](https://docs.xverse.app/api/runes/etch-rune/monitor-rune-etch-order) [PreviousList Rune Mint Orders](https://docs.xverse.app/api/runes/mint-rune/list-rune-mint-orders) [NextValidate Rune Name](https://docs.xverse.app/api/runes/etch-rune/validate-rune-name) Last updated 10 months ago --- # Mint Runes | Sats Connect | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/sats-connect/bitcoin-methods/mint-runes.md) . You can use Sats Connect to let your users mint [Runes](https://docs.ordinals.com/runes.html) through your app, using their wallet. Sats Connect's Runes minting service lets you place a mint order on behalf of your user, and orchestrates the required transactions. This documentation will guide you through the required steps: 1. Estimate the cost of a Rune mint order for your user -> see [runes\_estimateMint](https://docs.xverse.app/sats-connect/bitcoin-methods/mint-runes/runes_estimatemint) 2. Execute a Rune mint order, and prompt your user to sign the funding transaction required to process the order -> see [runes\_mint](https://docs.xverse.app/sats-connect/bitcoin-methods/mint-runes/runes_mint) 3. Fetch the status of a Rune mint order -> see [runes\_getOrder](https://docs.xverse.app/sats-connect/bitcoin-methods/runes_getorder) [Previousrunes\_transfer](https://docs.xverse.app/sats-connect/bitcoin-methods/runes_transfer) [Nextrunes\_estimateMint](https://docs.xverse.app/sats-connect/bitcoin-methods/mint-runes/runes_estimatemint) Last updated 2 years ago --- # Speed up a Rune Mint or Etch order | Sats Connect | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/sats-connect/bitcoin-methods/speed-up-a-rune-mint-or-etch-order.md) . Bitcoin fee rates can fluctuate quickly when the network is congested. This can cause the transactions involved in your [Rune mint order](https://docs.xverse.app/sats-connect/bitcoin-methods/mint-runes) or [Rune etch order](https://docs.xverse.app/sats-connect/bitcoin-methods/etch-runes) to remain stuck in the mempool, if the fee rate initially specified for your order has become too low for the present network conditions. You can use Sats Connect to speed up an order, using the [Replace-by-Fee (RBF)](https://www.xverse.app/blog/replace-by-fee-rbf) mechanism. Sats Connect will replace the stuck transactions with new transactions broadcast at a higher fee rate. This documentation will guide you through the required steps: 1. Estimate the cost of a speeding up a Rune mint or etch order for your user -> see [runes\_estimateRbfOrder](https://docs.xverse.app/sats-connect/bitcoin-methods/speed-up-a-rune-mint-or-etch-order/runes_estimaterbforder) 2. Speed up your Rune mint or etch order, and prompt your user to sign the funding transaction required to process the order at an increased fee rate -> see [runes\_rbfOrder](https://docs.xverse.app/sats-connect/bitcoin-methods/speed-up-a-rune-mint-or-etch-order/runes_rbforder) 3. Fetch the new status of a Rune mint or etch order -> see [runes\_getOrder](https://docs.xverse.app/sats-connect/bitcoin-methods/runes_getorder) [Previousrunes\_getOrder](https://docs.xverse.app/sats-connect/bitcoin-methods/runes_getorder) [Nextrunes\_estimateRbfOrder](https://docs.xverse.app/sats-connect/bitcoin-methods/speed-up-a-rune-mint-or-etch-order/runes_estimaterbforder) Last updated 2 years ago --- # ord_sendInscriptions | Sats Connect | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/sats-connect/bitcoin-methods/ord_sendinscriptions.md) . You can use the `ord_sendInscriptions` method to request inscription transfers from your user's [connected wallet's ordinal address](https://docs.xverse.app/sats-connect/connecting-to-the-wallet) . You can request multiple transfers in a single request, each transfer involving: * an inscription * a recipient address The method accepts a `transfers` array as request parameter: Request parameters Description `transfers` an array of transfer objects with <`inscriptionId`, `recipient`\> properties: * `inscriptionId` - string: the [id](https://docs.ordinals.com/inscriptions.html#inscription-ids) of the inscription. ℹ️ You can use the [`ord_getInscriptions`](https://docs.xverse.app/sats-connect/bitcoin-methods/ord_getinscriptions) method to retrieve your user's inscriptions * `address` - string: the Bitcoin address of the inscription transfer recipient ⚠️ We recommend managing inscriptions on taproot/ordinal addresses. Copy import { request } from "sats-connect"; const response = await request('ord_sendInscriptions', {transfers: [\ {\ inscriptionId: '22e63b19dede2882b2478f7182aa4ea8cd4a8289acd7a7d5dde96fcaaf4cd089i0',\ address: ordinalsAddress1,\ },\ {\ inscriptionId: '9a83420dbe566531114066a03d8022425064a78992710fab7006948eaa1d3546i0',\ address: ordinalsAddress2,\ }] }); if (response.status === "success") { // handle success } else { if (response.error.code === RpcErrorCode.USER_REJECTION) { // handle user cancellation error } else { // handle error } } } catch (err) { alert(err.error.message); } The user will be prompted to review the inscription transfer transaction in the wallet, and to confirm: * the inscriptions to send and their recipients * their desired Bitcoin transaction fee The transaction will be signed and broadcasted upon user approval. The `ord_sendInscriptions` method returns a Promise that resolves to the `sendInscriptionsResultSchema` object: Property Description `txid` The Bitcoin transaction id as a hex-encoded string. [Previousord\_getInscriptions](https://docs.xverse.app/sats-connect/bitcoin-methods/ord_getinscriptions) [Nextrunes\_getBalance](https://docs.xverse.app/sats-connect/bitcoin-methods/runes_getbalance) Last updated 8 months ago --- # stx_transferStx | Sats Connect | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/sats-connect/stacks-methods/stx_transferstx.md) . You can use the `stx_transferStx` method to request a transfer of any amount of Stacks to any recipient from the user's wallet. Request parameters Description `amount` a string representing the amount of STX tokens to transfer, in microstacks units. (Anything parseable by `BigInt` is acceptable) `recipient` a string representing the recipient's Crockford base-32 encoded Stacks address `memo` ℹ️ Optional a string representing the transaction memo Copy import { request } from "sats-connect"; try { const response = await request("stx_transferStx", { recipient, amount: Number(amount), memo, }); if ("result" in response) { alert(response.result.txid); } else { alert(response.error.message); } } catch (error) { console.error(error); alert(error.message); } }; The user will be prompted to review the Stacks transfer transaction in the wallet, with the recipient, memo and amount to send. Xverse browser extension UI shown as example: ![](https://docs.xverse.app/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2F33DLypUqgcjkBSmN0gZn%2Fblobs%2FKxLPikP6g8V3ktgpBEdn%2Fimage.png&width=768&dpr=3&quality=100&sign=4784c6ac76f1bd219f087a05fb383e57&sv=3) The transaction will be signed and broadcasted upon user approval. The `stx_transferStx` method returns a Promise that resolves to the `TransferStxResult` object: Property Description `txid` a hex-encoded string representing the ID of the transfer STX transaction signed `transaction` a hex-encoded string reperesenting the transfer STX transaction signed [Previousstx\_signStructuredMessage](https://docs.xverse.app/sats-connect/stacks-methods/stx_signstructuredmessage) [Nextstx\_signTransaction](https://docs.xverse.app/sats-connect/stacks-methods/stx_signtransaction) Last updated 1 year ago --- # spark_transfer | Sats Connect | xverse For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt) . This page is also available as [Markdown](https://docs.xverse.app/sats-connect/spark-methods/spark_transfer.md) . You can use the `spark_transfer` method to send **Spark BTC** from the user’s wallet to any valid Spark address. Parameters[](https://docs.xverse.app/sats-connect/spark-methods/spark_transfer#parameters) ------------------------------------------------------------------------------------------- Request parameters Description `reciverSparkAddress` a string representing the destination Spark address Example: "sprt1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu" `amountSats` a string representing the amount of BTC to transfer, in satoshis. Example[](https://docs.xverse.app/sats-connect/spark-methods/spark_transfer#example) ------------------------------------------------------------------------------------- Copy import { request } from "sats-connect"; try { const response = await request("spark_transfer", { receiverSparkAddress: "sprt1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu", amountSats: 100, // Amount to send, in satoshis }); if ("result" in response) { console.log("Spark transfer successful:", response.result.txid); } else { console.error("Spark transfer failed:", response.error.message); } } catch (error) { console.error("Unexpected error:", error); } What `spark_transfer` does[](https://docs.xverse.app/sats-connect/spark-methods/spark_transfer#what-spark_transfer-does) ------------------------------------------------------------------------------------------------------------------------- Calling this method prompts the user to: 1. Review the **recipient address** and **amount** of Spark BTC to send. 2. **Approve the transaction** in their Xverse wallet. 3. Upon approval, the transaction is **signed and broadcasted** to the Spark network. The `spark_transfer` method returns a Promise that resolves to a `SparkTransferResult` : Property Description `txid` a hex-encoded string representing the ID of the broadcasted BTC transfer transaction on Spark [Previousspark\_getBalance](https://docs.xverse.app/sats-connect/spark-methods/spark_getbalance) [Nextspark\_transferToken](https://docs.xverse.app/sats-connect/spark-methods/spark_transfertoken) Last updated 8 months ago * [Parameters](https://docs.xverse.app/sats-connect/spark-methods/spark_transfer#parameters) * [Example](https://docs.xverse.app/sats-connect/spark-methods/spark_transfer#example) * [What spark\_transfer does](https://docs.xverse.app/sats-connect/spark-methods/spark_transfer#what-spark_transfer-does) ---