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

ord_sendInscriptions

Previousord_getInscriptionsNextrunes_getBalance

Last updated 5 months ago

You can use the ord_sendInscriptions method to request inscription transfers from your user's . 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:

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.

inscriptionId - string: the of the inscription. You can use the 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.

🎨
connected wallet's ordinal address
âš ī¸
â„šī¸
id
ord_getInscriptions