BJ Patel is an expert user of Umbraco. Always keen to share hints and tips on getting the best out of Umbraco.
WalletConnect Integration Guide
For Umbraco 13 / .NET 8 using Reown SDKs (Non-Deprecated)
⚠️ Critical Update
I. Required Packages
dotnet add package Reown.Sign dotnet add package Reown.WalletKit
✅ Why Reown?
- Officially maintained replacement for WalletConnect
- CAIP-25 compliant namespace handling
- Fixes mobile browser compatibility issues
II. Backend Implementation
1. Initialize Reown Client
using Reown.Sign;
var options = new ClientOptions
{
ProjectId = "YOUR_PROJECT_ID",
OptionalNamespaces = new List<string> { "eip155:1" }, // Ethereum Mainnet
Metadata = new Metadata
{
Name = "Your App",
Description = "Umbraco Wallet Integration",
Url = "https://yourdomain.com",
Icons = new[] { "https://yourdomain.com/icon.png" }
}
};
var client = new WalletConnectClient(options);
2. Handle Connections
[Route("api/wallet")]
public class WalletController : ControllerBase
{
private readonly WalletConnectClient _client;
[HttpPost("connect")]
public async Task<IActionResult> Connect()
{
var session = await _client.Connect();
return Ok(new { uri = session.Uri });
}
[HttpGet("status/{sessionId}")]
public async Task<IActionResult> GetStatus(string sessionId)
{
var session = await _client.GetSession(sessionId);
return Ok(session);
}
}
III. Frontend Integration
1. Install Required Packages
npm install @reown/appkit @reown/walletkit
2. Connection Handler
import { AppKit } from '@reown/appkit';
import { WalletKit } from '@reown/walletkit';
const appKit = new AppKit({
projectId: 'YOUR_PROJECT_ID',
relayUrl: 'wss://relay.reown.com'
});
document.getElementById('connect-btn').addEventListener('click', async () => {
const walletKit = new WalletKit(appKit);
const session = await walletKit.connect();
// Store session data
localStorage.setItem('walletSession', JSON.stringify(session));
});
IV. Key Differences from Deprecated SDKs
| Feature | Old (WalletConnect) | New (Reown) |
|---|---|---|
| Namespace Handling | requiredNamespaces | optionalNamespaces (CAIP-25) |
| Mobile Support | Broken in Chrome | Fixed |
| Smart Wallets | Incompatible | Full support |
V. Migration Checklist
- Remove all WalletConnect.* NuGet packages
- Install Reown.Sign and Reown.WalletKit
- Update namespace handling to use optionalNamespaces
- Replace frontend Web3Modal with @reown/appkit
- Test with:
- Mobile browsers (Chrome/Safari)
- Smart contract wallets (Safe, Argent)
comments powered by Disqus
Join Our Community
Join Our Community Become a part of our developer community. Share your projects, get feedback, and collaborate with like-minded individuals.
Your contributions help us continue creating valuable content. Consider supporting us by sharing our content.
Junagadh, Gujarat
Latest Blog Posts