Magic Eden Wallet Developer Docs
  • 👋Welcome
    • Wallet Introduction
  • 📙Bitcoin
    • Diving into Bitcoin
    • Detecting the Provider
    • Connecting to the Wallet
    • Signing a Message
    • Signing a Transaction
    • Sending BTC
    • Provider API Methods
    • Provider Events
    • FAQs
  • 📗Solana
    • Diving Into Solana
    • Solana Wallet Adapter
    • Connect Directly to the ME Solana Provider
    • Signing a Message
    • Sending a Transaction
    • Provider API Methods
    • Provider Events
    • FAQs
  • 📘EVM
    • Diving into the EVM
    • Connect Directly to the ME EVM Provider
    • Signing a Message
    • Sending a Transaction
    • Library Integrations
      • Wallet Connect
      • Rainbow Kit
      • Wagmi
    • Provider API Methods
    • Provider Events
    • FAQs
  • ❓Resources
    • Demo Apps
    • Logos and Brand Assets
Powered by GitBook
On this page
  1. Bitcoin

FAQs

PreviousProvider EventsNextDiving Into Solana

Last updated 10 months ago

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

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 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"),
});
📙
newest documentation
Detecting the Provider