Installation
Install the required peer dependencies:Basic usage
Configuration
Required options
Your WalletConnect Cloud project ID. Get one at WalletConnect Cloud.
Optional options
Custom relay server URL.
Custom metadata for your dApp displayed in wallet connection prompts.Properties:
name: dApp namedescription: dApp descriptionurl: dApp URLicons: Array of icon URLs
Show the wallet explorer in the connection modal.
Array of wallet IDs to recommend in the explorer.
URL to your privacy policy.
URL to your terms of service.
Theme mode for the WalletConnect modal.
Custom CSS variables for theming the modal.
Apply a custom skin to this WalletConnect instance. Can be a built-in skin ID (e.g., ‘biatec’) or a custom skin object with
id, name, and icon properties.When a skin is applied, the wallet uses the skin’s metadata and a unique wallet key for state isolation.Type definitions
Features
Universal wallet support
Connect to any Algorand wallet that supports WalletConnect v2, including mobile wallets, browser extensions, and desktop applications.QR code connection
Displays a QR code for mobile wallet connection. Users scan the code with their mobile wallet to establish a connection.Skin support
Use theskin option to customize the appearance and branding of WalletConnect instances. This allows multiple WalletConnect-based wallets with different identities.
Automatic metadata detection
If no metadata is provided, WalletConnect automatically detects your dApp’s metadata from the HTML document (title, description, favicon).Methods
connect()
Initiates WalletConnect session. Opens the WalletConnect modal with QR code. Returns:Promise<WalletAccount[]>
disconnect()
Disconnects the WalletConnect session and closes the modal. Returns:Promise<void>
signTransactions()
Signs transactions via the connected wallet. The wallet will prompt the user for approval. Parameters:txnGroup: Transaction or array of transactions to signindexesToSign?: Optional array of indexes to sign
Promise<(Uint8Array | null)[]>
Session management
WalletConnect v2 sessions persist across page reloads. Sessions are stored in the browser’s localStorage and automatically restored when the app initializes.Network configuration
WalletConnect uses CAIP-2 chain IDs. Ensure your network configuration includes thecaipChainId property:
Platform support
- Web: Full support
- Mobile: Full support (via QR code scanning)
- Desktop: Full support
Troubleshooting
Missing project ID error
Ensure you’ve created a project at WalletConnect Cloud and provided the project ID in the options.Network not supported
Verify that your network configuration includes a validcaipChainId. The library includes CAIP chain IDs for MainNet, TestNet, BetaNet, and Sandbox by default.