Wagmi
The widget primarily uses Wagmi internally and offers excellent support for all wagmi based libraries such as RainbowKit, ReownAppKit, Dynamic, etc. If your application already handles wallet management using wagmi or wagmi based library the widget will automatically detect if it’s wrapped inWagmiProvider
and reuse your existing wallet management setup without any extra configuration
Here’s an example of how to preconfigure basic wallet management using wagmi:
- Manual Configuration: Manually update both the widget and wagmi chain configurations to include all the chains you want to support in your application and the widget. Refer to the configuration page for more details on the widget’s chain configuration
- Dynamic Updates: Get all available chains supported by GlueX and dynamically update your wagmi configuration. The widget provides hooks to simplify this approach
For a complete working example, check out our example
repository
Ethers.js
If you’re using Ethers.js or any other alternative library in your project, you can still integrate with the widget. You’ll need to convert yourSigner / Provider
objects to wagmi’s injected connector before wrapping the widget with WagmiProvider