Skip to content
This repository was archived by the owner on Aug 9, 2023. It is now read-only.

hgraph-io/hedera-walletconnect-dapp

Repository files navigation

Archived

This app was created for R&D purposes. Please refer to the full version of the demo apps linked below:

React dApp (with standalone v2 client)

This demo dApp is a pared down version of WalletConnect's react-dapp-v2 demo. This version of the app only showcases connecting a dApp and a wallet for Ethereum (EVM) chains via JSON-RPC and Hedera via the official @hashgraph/sdk library.

This dApp is meant to be used in conjuction with the corresponding hedera-walletconnect-wallet. Please also set up that project.

For integrating Hedera, The dApp's responsibility is to build the transaction with the Hedera SDK, freeze the transaction, convert the transaction to bytes, and then pass the payload to the wallet via WalletConnect to the wallet. The wallet's responsibility is to use the Hedera SDK to reconstruct the transaction object from bytes, extract and format information about the transaction to present to the user, sign and submit the transaction to the Hedera network if approved, and report approval/rejection results back to the dApp.

Overview

This is an example implementation of a React dApp (generated via create-react-app) using the standalone client for WalletConnect v2 to:

  • handle pairings
  • manage sessions
  • send JSON-RPC requests to a paired wallet

Running locally

  1. Install the app's dependencies:
yarn
  1. To test Hedera integration, go to Hedera Portal to create a Testnet account.
  2. Set up your local environment variables by copying the example into your own .env.local file:
cp .env.local.example .env.local

Your .env.local now contains the following environment variables:

Develop

yarn dev

Then go to http://localhost:3000 (Note that you may have a better experience running in an incognito browser window)

Test

yarn test

Build

yarn build

Demo

Screen.Recording.2023-07-13.at.2.51.34.PM.mov

About

A demo dApp specifically for integrating Hedera with WalletConnect

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •