Learn how to integrate WalletConnect for Web3 wallet connection. Connect mobile and desktop wallets to your dApp with the WalletConnect protocol.">

WalletConnect API

The standard protocol for connecting Web3 wallets to dApps. Learn how to integrate WalletConnect for seamless wallet connection across mobile and desktop.

What is WalletConnect?

WalletConnect is an open protocol for connecting decentralized applications (dApps) to mobile wallets. It enables users to securely sign transactions from their phone while using dApps on desktop, without exposing private keys.

WalletConnect v2 (Current)

WalletConnect v2 supports multiple chains, improved security, and better user experience. Key features include:

  • Multi-Chain Support - Connect to EVM and non-EVM chains
  • Session Management - Persistent connections
  • Sign Protocol - Modern signing standard
  • Push Notifications - Mobile alerts for dApp requests

Integration with wagmi

import { WagmiConfig, createConfig } from 'wagmi'
import { WalletConnectConnector } from 'wagmi/connectors/walletConnect'

const config = createConfig({
  connectors: [
    new WalletConnectConnector({
      options: {
        projectId: 'YOUR_PROJECT_ID',
        chains: [mainnet, polygon],
        showQrModal: true,
      },
    }),
  ],
})

function App() {
  return (
    <WagmiConfig config={config}>
      <YourApp />
    </WagmiConfig>
  )
}

Supported Wallets

  • MetaMask - Most popular browser extension
  • Rainbow - Beautiful iOS wallet
  • Trust Wallet - Multi-chain mobile wallet
  • Coinbase Wallet - Exchange-backed
  • Ledger - Hardware wallet support

Getting Started

Step 1: Get Project ID

Register at cloud.walletconnect.com to get your project ID.

Step 2: Choose Library

Use wagmi, web3modal, or RainbowKit for easy integration.

Step 3: Connect

Add the connect button and handle session events.

Use Cases

  • dApp Authentication - Replace password login
  • Transaction Signing - Approve blockchain transactions
  • NFT Purchases - Buy NFTs with mobile wallet
  • DeFi Interactions - Connect to lending, trading protocols

Start Using WalletConnect

WalletConnect Docs wagmi Tutorial