FAQs

Lot of talk of Sats Connect, why don't your method calls match their newest documentation?

Sats Connect recently upgraded to a newer version, where RPC calls follow a more general Wallet.request format. The ME wallet currently does not support this new format for invoking requests.

We also do not support any of the Xverse custom methods or Stacks methods

Why is Xverse prompting when I try to connect to Magic Eden wallet?

For apps that try to connect to the ME wallet via the BitcoinProvider, there can be namespace clashing if a user has BOTH the ME wallet and Xverse wallet installed. See Detecting the Provider for more info.

Why is Xverse prompting when I try to invoke Sats Connect functions for the Magic Eden wallet?

Sats Connect will default to their BitcoinProvider object in the window if no provider is explictly passed to ANY of the Sats Connect calls. In the case where a user has multiple BTC wallets installed on their browser, this can create some confusion.

You can ensure that the ME wallet is always called properly by specifying the provider in each and every Sats Connect call. the getProvider param is accepted in all their method calls.

Here's an example, notice the use of getProvider within the sendBtcTransaction call:

import { sendBtcTransaction, BitcoinNetworkType } from "sats-connect";
	
const getBtcProvider = (): any | undefined => {
	if ("magicEden" in window) {
		const anyWindow: any = window;
		if (anyWindow.magicEden.bitcoin) return anyWindow.magicEden.bitcoin;
	}
};
	
// in a real app, you'll use the ME 'payment' address returned after a connection
const nativeSegwitAddress = 'bc1qcdmvsc8qqk8sr2st3mttu6fsmfrjzh5xrf4dch'
const recipientAddress = 'dummyAddress'

await sendBtcTransaction({
  getProvider: getBtcProvider,
  payload: {
    network: {
      type: BitcoinNetworkType.Mainnet,
    },
    recipients: [
      {
        address: recipientAddress!,
        amountSats: BigInt(1500),
      },
    ],
    senderAddress: nativeSegwitAddress!,
  },
  onFinish: (response) => {
    alert(response);
  },
  onCancel: () => alert("Canceled"),
});

Last updated