web3-react
web3-react copied to clipboard
Add official Magic Connect connector to README
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
},
},
})
)
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 |
@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!