RainbowKit
RainbowKit is a popular wallet connection library that simplifies the integration of various wallet providers into your dApp. It offers a highly customizable user experience for wallet connections, making it an excellent choice to use alongside the JustWeb3 Widget.
Here’s how to set up RainbowKit as a wallet provider in your project, along with the JustWeb3 Widget for ENS management and other features.
Install Required Dependencies
To get started, you’ll need to install the necessary packages for RainbowKit, Wagmi, and JustWeb3. You can use the package manager of your choice:
Initial Code Setup
In your main provider file (e.g., Providers.tsx
or App.tsx
), import the necessary components from RainbowKit, Wagmi, and JustWeb3:
This setup allows you to use RainbowKit for wallet connections, while JustWeb3 handles ENS subname issuance, social verification, and other features.
Configuration
You can configure RainbowKit and JustWeb3 to handle wallet connections and ENS management. In the code example below, RainbowKit is configured to work with mainnet and sepolia chains, and several wallets like Argent, Trust Wallet, and Ledger are added to the wallet options.
The JustWeb3 widget is set up to allow any ENS name for sign-in and provides the capability to issue subnames under a specified ENS domain.
Note: Every dApp that relies on WalletConnect now needs to obtain a projectId
from WalletConnect Cloud. This is absolutely free and only takes a few minutes.
Additional Wallet Configuration
In the example above, we’ve included Argent, Trust Wallet, and Ledger as additional wallet providers. You can easily add or remove wallets based on your dApp’s needs.
You can also configure other wallet providers by replacing the wallets
array with your desired wallet providers.
Last updated