Hedera Wallet Connect (Reown)
Hedera Wallet Connect is the official open-source library that enables communication between decentralized applications (dApps) and wallets in the Hedera network using Reown (formerly WalletConnect) relays. Kabila is a core contributor and one of the featured wallets that implements this standard.
View the source code and documentation at github.com/hashgraph/hedera-wallet-connect.
What It Does
Hedera Wallet Connect provides tools and recommendations for integrating Hedera into applications that need to communicate with wallets. It acts as a messaging relay, allowing dApps to send transactions to wallets and receive signatures back β all through the Reown (WalletConnect) network.
Two Integration Paths
The library supports two different approaches for integrating Hedera:
- Hedera Native JSON-RPC β Send transactions using Hedera's own JSON-RPC specification over WalletConnect. This is the Hedera-specific approach that works directly with the Hedera SDK.
- Ethereum JSON-RPC β Use the standard Ethereum JSON-RPC API through a Hedera JSON-RPC Relay provider. This is ideal for EVM-compatible tooling and existing Ethereum workflows.
Key Features
- Reown (WalletConnect) v2 support β Built on the latest Reown protocol
- DAppConnector β A ready-to-use connector for dApp developers to interact with Hedera wallets
- Multi-signature transactions β Built-in support for collecting multiple signatures before executing a transaction
- Hedera SDK integration β Works seamlessly with
@hiero-ledger/sdkfor transaction creation - Reown AppKit compatibility β Integrate with Reown's (formerly WalletConnect's) AppKit for a plug-and-play modal experience
- TypeScript β Fully typed, 100% TypeScript codebase
Getting Started
Option 1: Direct Library Integration
Install the required dependencies:
npm install @hashgraph/hedera-wallet-connect @hiero-ledger/sdk @walletconnect/modalInitialize the DAppConnector:
import {
HederaSessionEvent,
HederaJsonRpcMethod,
DAppConnector,
HederaChainId,
} from "@hashgraph/hedera-wallet-connect";
import { LedgerId } from "@hiero-ledger/sdk";
const metadata = {
name: "My Hedera dApp",
description: "Example dApp using Hedera Wallet Connect",
url: "https://example.com",
icons: ["https://example.com/icon.png"],
};
const dAppConnector = new DAppConnector(
metadata,
LedgerId.Mainnet,
projectId,
Object.values(HederaJsonRpcMethod),
[HederaSessionEvent.ChainChanged, HederaSessionEvent.AccountsChanged],
[HederaChainId.Mainnet, HederaChainId.Testnet]
);
await dAppConnector.init({ logger: "error" });Then connect to a wallet:
await dAppConnector.openModal();Option 2: Using Reown's AppKit
For a more streamlined integration with a pre-built modal UI:
npm install @hashgraph/hedera-wallet-connect @hiero-ledger/sdk @walletconnect/universal-providerimport {
HederaAdapter,
HederaChainDefinition,
HederaProvider,
hederaNamespace,
} from "@hashgraph/hedera-wallet-connect";
// Configure EVM adapter
const hederaEVMAdapter = new HederaAdapter({
projectId,
networks: [
HederaChainDefinition.EVM.Mainnet,
HederaChainDefinition.EVM.Testnet,
],
namespace: "eip155",
});
// Configure Native adapter (recommended)
const hederaNativeAdapter = new HederaAdapter({
projectId,
networks: [
HederaChainDefinition.Native.Mainnet,
HederaChainDefinition.Native.Testnet,
],
namespace: hederaNamespace,
});
// Create AppKit with both adapters
createAppKit({
adapters: [hederaEVMAdapter, hederaNativeAdapter],
projectId,
metadata,
networks: [
HederaChainDefinition.EVM.Mainnet,
HederaChainDefinition.EVM.Testnet,
HederaChainDefinition.Native.Mainnet,
HederaChainDefinition.Native.Testnet,
],
});Multi-Signature Transactions
One of the most powerful features of Hedera Wallet Connect is support for multi-signature workflows. This allows multiple parties to sign a transaction before it's executed β essential for:
- Treasury operations requiring multiple approvals
- Escrow services
- Joint accounts
- Backend co-signing for additional security
Frontend + Backend Co-Signing Example
Step 1: The user signs the transaction in their wallet (without executing it):
import { DAppConnector } from "@hashgraph/hedera-wallet-connect";
import { TransferTransaction, Hbar } from "@hiero-ledger/sdk";
const transaction = new TransferTransaction()
.addHbarTransfer(userAccountId, new Hbar(-10))
.addHbarTransfer(recipientAccountId, new Hbar(10));
// Request signature only (does NOT execute)
const signer = dAppConnector.getSigner(userAccountId);
const signedTransaction = await signer.signTransaction(transaction);
// Send to backend for co-signing
const response = await fetch("/api/execute-transaction", {
method: "POST",
body: JSON.stringify({
signedTransaction: Buffer.from(signedTransaction.toBytes()).toString(
"base64"
),
}),
});Step 2: The backend adds its signature and executes:
import { Transaction, PrivateKey, Client } from "@hiero-ledger/sdk";
import { addSignatureToTransaction } from "@hashgraph/hedera-wallet-connect";
const signedTransaction = Transaction.fromBytes(
Buffer.from(req.body.signedTransaction, "base64")
);
const backendPrivateKey = PrivateKey.fromStringED25519(
process.env.BACKEND_PRIVATE_KEY
);
const fullySignedTransaction = await addSignatureToTransaction(
signedTransaction,
backendPrivateKey
);
const txResponse = await fullySignedTransaction.execute(client);
const receipt = await txResponse.getReceipt(client);Supported Wallets
The following wallets implement the Hedera Wallet Connect standard:
Kabila's Contribution
Kabila is both a contributor to the Hedera Wallet Connect library and one of the wallets that natively implements the standard. The Kabila Wallet uses Hedera Wallet Connect to enable seamless interactions between Hedera dApps and Kabila users, providing a secure and smooth signing experience.
Hedera Wallet Connect is fully open-source under the Apache-2.0 license. Kabila actively contributes to its development and maintenance as part of the Hedera ecosystem.
Resources
Was this page helpful?