Sats Connect - Wallet API for Bitcoin & Stacks
  • Introduction
  • Wallet Providers
    • getInfo
    • getProviders & getProviderById
  • Connecting to the wallet
    • Connect to Xverse Wallet
    • Disconnect from Xverse Wallet
    • Connect to other wallets
      • Manage a user's default wallet
    • [Legacy โš ๏ธ] getAccounts
  • Wallet Methods
    • request methods
    • wallet_getAccount
    • wallet_getNetwork
    • wallet_changeNetwork
    • Xverse Custom Methods
  • Xverse Wallet Permissions
  • Xverse Wallet events
  • BITCOIN METHODS
    • ๐ŸŸ getAddresses
    • ๐ŸŸ signMessage
    • ๐ŸŸ signPsbt
    • ๐ŸŸ sendTransfer
    • ๐ŸŸ signMultipleTransactions
    • ๐ŸŸ getBalance
    • ๐ŸŽจcreateInscription
    • ๐ŸŽจcreateRepeatInscriptions
    • ๐ŸŽจord_getInscriptions
    • ๐ŸŽจord_sendInscriptions
    • ๐Ÿ”ฒrunes_getBalance
    • ๐Ÿ”ฒrunes_transfer
    • ๐Ÿ”ฒMint Runes
      • runes_estimateMint
      • runes_mint
    • ๐Ÿ”ฒEtch Runes
      • runes_estimateEtch
      • runes_etch
    • ๐Ÿ”ฒrunes_getOrder
    • ๐Ÿ”ฒSpeed up a Rune Mint or Etch order
      • ๐Ÿ”ฒrunes_estimateRbfOrder
      • ๐Ÿ”ฒrunes_rbfOrder
  • STACKS METHODS
    • ๐Ÿ”ดstx_getAccounts
    • ๐Ÿ”ดstx_signMessage
    • ๐Ÿ”ดstx_signStructuredMessage
    • ๐Ÿ”ดstx_transferStx
    • ๐Ÿ”ดstx_signTransaction
    • ๐Ÿ”ดstx_callContract
    • ๐Ÿ”ดstx_deployContract
  • GUIDES
    • Verify Bitcoin message signatures
    • Creating Bitcoin PSBTs
    • ๐Ÿ“ฑMobile Integration
    • Next.js support
  • RESOURCES
    • App Template
    • Demo App
    • Changelog
    • Github Issues
    • Developer forum
    • BIP322
Powered by GitBook
On this page
  1. BITCOIN METHODS

runes_getBalance

Previousord_sendInscriptionsNextrunes_transfer

Last updated 1 month ago

You can use the runes_getBalance method to retrieve all your user's Runes balances, i.e. each Rune token that their owns, and in which amount.

Your app must have first and obtained No query parameters are required for the method:

import { request } from 'sats-connect';

const response = await request('runes_getBalance', null);

if (response.status === 'success') {
  console.log(response.result);
} else {
  console.error(response.error);
}

The runes_getBalance method will not trigger any operation or prompt your user to sign any transaction. It will return an array of balance objects, each representing the connected wallet's holdings of a rune token:

balance
Description

runeName

a string representing the for which the balance is returned.

amount

the amount of Rune tokens which the address owns, based on confirmed Runes transactions only.

spendableBalance

the amount of Rune tokens which the address can spend. The spendable balance excludes rune utxos which are waiting transfer confirmation in the mempool.

symbol optional

a string representing the rune's currency as a single . If a rune does not have a symbol, the generic currency sign ยค, also called a scarab, will be used

divisibility optional

a number representing the rune's , 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.

inscriptionId optional

a string representing the ID of the inscription linked to the rune, which marketplaces and apps can use as logo

๐Ÿ”ฒ
connected wallet address
connected to the wallet
account read permissions.
โ„น๏ธ
โ„น๏ธ
โ„น๏ธ
name of the Rune
symbol
divisibility