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. Connecting to the wallet

Connect to other wallets

PreviousDisconnect from Xverse WalletNextManage a user's default wallet

Last updated 7 months ago

When making a connection request to your user’s wallet, you can use the Wallet.request method to let them select their preferred wallet first:

import Wallet from 'sats-connect';

export const App = () => {
  const handleConnect = async () => {
    const data = await Wallet.request('getAccounts', null);
  };

  return <button onClick={handleConnect}>Connect</button>;
};

If a , the method resolves to the connected account's addresses.

If the user has not connected a wallet yet, the method will prompt them to select from their preferred wallet from a list of .

Once they select a wallet, they will be presented with a connection request in their selected wallet, according to the parameters passed to the method.

getAccounts
wallet is connected already
Sats Connect-compatible wallets