If you cannot use Mezo Passport for your dApp, the configuration steps in the Configure your Environment guide are sufficient for traditional EVM development.
Before You Begin
Configure Environment
Set up development with Hardhat or Foundry
RainbowKit Documentation
Learn the basics of RainbowKit
Installation
Install Mezo Passport and its peer dependencies:Make sure to install viem version 2.x as specified. Version 3.x may have compatibility issues.
Configuration
Basic Setup
Use thegetConfig method from @mezo-org/passport to configure your WagmiProvider.
index.tsx
Configuration Options
ThegetConfig function accepts the following options:
Using Mainnet
To use Mezo Mainnet instead of Testnet:Multi-Network Support
Support both Testnet and Mainnet:Connecting Wallets
To connect to wallets, use the standard Wagmi or RainbowKit components.Using Wagmi
YourApp.tsx
Using RainbowKit
YourApp.tsx
Custom Connect Button
Create a custom styled connect button:CustomConnectButton.tsx
Supported Wallets
Mezo Passport supports the following wallet types:Bitcoin Wallets
- Xverse
- Unisat
- Leather (formerly Hiro Wallet)
- OKX Wallet
EVM Wallets
- MetaMask
- Coinbase Wallet
- WalletConnect
- Rainbow Wallet
- Trust Wallet
- And all other RainbowKit supported wallets
Using Wagmi Hooks
Mezo Passport is fully compatible with Wagmi hooks:Advanced Configuration
Custom Chains
WalletConnect Project ID
For production applications, provide your own WalletConnect project ID:Styling
Mezo Passport uses RainbowKit’s styling system. Customize the theme:Troubleshooting
Wallet not connecting
Wallet not connecting
- Ensure you have the wallet extension installed
- Check that you’re on the correct network (Mezo Testnet or Mainnet)
- Clear browser cache and try again
- Check browser console for error messages
Wrong network error
Wrong network error
- Use the chain switcher to change to Mezo network
- Ensure your RPC endpoints are configured correctly
- Verify the chain ID matches (31611 for Testnet, 31612 for Mainnet)
Transaction failures
Transaction failures
- Ensure you have sufficient BTC for gas fees
- Check that your contract addresses are correct
- Verify gas estimation is working properly
- Review transaction parameters
Next Steps
NPM Package
View the Mezo Passport NPM package for additional examples
RainbowKit Docs
Learn more about RainbowKit customization options
Wagmi Documentation
Explore Wagmi hooks and utilities
Deploy Your dApp
Review requirements for Mezo Market listing