Connect Directly to the ME Solana Provider
Detecting the Provider
If you've built a custom wallet connection solution and want to add support for the Magic Eden Wallet, you can directly access the Solana Provider at magicEden.solana
in the Window.
A code snippet to find the provider might look like the following:
The above will return the provider if the user has the extension installed, otherwise it'll redirect the user to the magic eden wallet website to download it.
Connecting
Once the magicEden provider object has been found, a user is able to connect their wallet to the site. The connection request will prompt the user to approve the connection, so that their wallet can be used to make requests, such as sending transactions.
The easiest way to connect to the ME wallet is by calling window.magicEden.solana.connect()
The provider saves information like a user's pubkey once a connection has been established.
More Info
A code demo for basic ME wallet connection can be found here. A demo video can be found in the readme.
Last updated