Wagmi
Family is built into ConnectKit. If you are using ConnectKit, you can skip this step.
If you're using Wagmi and want to use Family, you can follow these steps to get started.
1. Install the SDK
Install the family package using your preferred package manager.
Terminal
npm i family
2. Import the connector into your config
Import the familyAccountsConnector from the family package and add it to your Wagmi configuration.
import { createConfig } from "wagmi";import { familyAccountsConnector } from "family";export const config = createConfig({connectors: [familyAccountsConnector()],// ... other wagmi config});
3. Wrap App in Context Provider
Wrap your app in the WagmiProvider React Context Provider and pass the config you created earlier to the config property.
import { WagmiProvider } from "wagmi";import { config } from "./config";function App() {return <WagmiProvider config={config}>{/** ... */}</WagmiProvider>;}
That's it—you can now use Family with Wagmi!