Detecting the Provider
Directly Locating the Provider
const getBtcProvider = () => {
if ("magicEden" in window) {
const anyWindow: any = window;
if (anyWindow.magicEden.bitcoin && anyWindow.magicEden.bitcoin.isMagicEden)
return anyWindow.magicEden.bitcoin;
}
window.location.href = "https://wallet.magiceden.io/";
};Utilizing the Wallet Standard
Install Dependencies
Wrap your application in the Wallet Standard Provider
Detect the Provider via Wallet Standard
Set the Desired Provider
Last updated