web3-react icon indicating copy to clipboard operation
web3-react copied to clipboard

Add official Magic Connect connector to README

Open jamesrp13 opened this issue 2 years ago • 2 comments

This PR adds Magic's official connector to the list of connectors in the README. Below is more information about the connector and its usage. Please let me know if you have questions I can help answer.

Feature

Adds support for Magic Connect, which allows instant non-custodial wallets with a simple UX. Magic is used by over 110k developers who have created over 20M wallets. Given its widespread use, it makes sense to have a Magic connector that integrates with web3-react.

The Magic Connect connector is maintained here We maintain a guide on how to use Web3-React and this connector in Magic's official documentation. You can also find a basic Next.js example of its usage here.

Usage

import { initializeConnector } from "@web3-react/core"
import { MagicConnect } from "web3-react-magic"

export const [magicConnect, hooks] = initializeConnector<MagicConnect>(
  (actions) =>
    new MagicConnect({
      actions,
      options: {
        apiKey: process.env.NEXT_PUBLIC_MAGICKEY, // Magic Connect Publishable API key
        networkOptions: {
          rpcUrl: process.env.NEXT_PUBLIC_GOERLI_RPC, // RPC URL
          chainId: 5, // Chain ID for network
        },
      },
    })
)

229230807-933b338c-a6b7-4b85-a1ef-aa9e0e863dae

jamesrp13 avatar Jun 19 '23 23:06 jamesrp13

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
web3-react ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 26, 2023 8:25pm

vercel[bot] avatar Jun 19 '23 23:06 vercel[bot]

@grabbou this PR addresses the issues discussed in the closed PR #789. The package is now officially supported within the @magiclabs Github org and usage docs are included in Magic docs. I think everything should be good to merge but let me know if there's anything else you need!

jamesrp13 avatar Jul 26 '23 20:07 jamesrp13