Skip to content

secretkeylabs/sats-connect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

logo

API Docs β€’ Example App β€’ Discord β€’ Xverse

πŸ‘‹ Introduction

Sats Connect is a simple javascript library that connects apps to Bitcoin, Spark, Starknet, Stacks, and other Bitcoin Layer 2 wallets like Xverse.

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
  • πŸ–ΌοΈπŸ”²πŸͺ™ 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

npm i sats-connect@4.2.x

Then request a wallet connection β€” and explore the docs to unlock the full Bitcoin stack: Bitcoin L1, Spark, Starknet, Stacks, and the assets built on top.

πŸ’» Usage

import

import { request } from 'sats-connect';

Connect Wallet

const response = await request('getAccounts', {
  purposes: [AddressPurpose.Payment, AddressPurpose.Ordinals, AddressPurpose.Stacks],
  message: 'Cool app wants to know your addresses!',
});

Request a wallet action

await request('sendTransfer', {...});

Disconnect Wallet

await Wallet.disconnect();

πŸ’» Development

Build the package

npm run build

Run example app

npm run dev:example

πŸ“š Documentation

For full documentation, visit docs.xverse.app.

⚑ Power your Bitcoin apps with plug-and-play infra

Sats Connect lets your app connect directly to users’ wallets.
The Xverse 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 to connect with the community and the Xverse team.