For the complete documentation index, see llms.txt. This page is also available as Markdown.
Wallet Management
Overview
The Blockend Widget features intelligent wallet management that seamlessly integrates with your existing dApp's wallet setup. The widget automatically detects and reuses external wallet providers when available, providing a unified user experience without requiring users to connect multiple times.
Solana Wallet Adapter: Standard Solana wallet library
Integration Examples
Basic Integration (Uses Internal Providers)
Integration for EVM wallets
Integration with Wagmi
Integration with RainbowKit
Important: For the widget to work on all supported chains, you must add the widget-supported chains to your Wagmi configuration. Here is the list of supported EVM chains:
Ethereum (mainnet)
Polygon
Arbitrum
Optimism
BSC
zkSYNC Era
BASE
Avalanche
Gnosis
Fantom
Moonriver
Moonbeam
Fuse
OKXchain
Boba
Aurora
Cronos
Heco
Harmony
Linea
RootStock
Mode
Celo
Mantle
Scroll
Blast
Berachain
Unichain
Sonic
Story
Polygon zkEVM
Alternatively, you can dynamically fetch the latest supported chains by calling the Blockend API and filtering for EVM chains using networkType: 'evm':
This approach ensures you always have the most up-to-date list of supported chains.
or use useUpdateWagmiConfig hook
useUpdateWagmiConfig Hook
Purpose
The useUpdateWagmiConfig hook synchronizes your Wagmi configuration with the Blockend widget's supported chains, ensuring wallet connections work across all widget networks.
Usage
Parameters
config: Wagmi configuration object
connectors: Array of Wagmi connectors
chains: Array of chain data from widget (must have networkType: "evm")
The hook automatically converts widget chains to Wagmi format and updates your config.
Integration for Solana wallets
Integration with Dynamic Labs for Solana wallets
Full Stack Integration
Troubleshooting
Common Issues
1. Widget Not Detecting External Providers
Problem: Widget uses internal providers even when external ones are available.
Solution: Ensure the widget is wrapped inside the provider components:
2. Chain Switching Issues
Problem: Chain switching doesn't work properly.
Solution: Ensure your Wagmi config includes all the chains supported by the widget:
3. Multiple Wallet Connection Prompts
Problem: Users see multiple wallet connection prompts.
Solution: This usually happens when providers are not properly detected. Check the browser console for provider detection logs.
4. Solana Wallet Issues
Problem: Solana wallets not working with Dynamic Labs integration.
Solution: Ensure you have the correct Dynamic Labs environment setup:
Migration Guide
From Internal to External Providers
If you're currently using the widget with internal providers and want to migrate to external providers: