Skip to content

Vineetkg20/WalletConnect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

Wallet Connect Project

This repository is dedicated to the development of a project using Wallet Connect, a protocol that allows decentralized applications (dApps) to connect with mobile wallets, enabling secure and easy transactions for users.

Overview

Wallet Connect is a protocol that facilitates the secure connection between dApps and mobile wallets. This project aims to implement Wallet Connect functionality, allowing users to interact with dApps directly from their mobile wallets.

Features

  • Secure Connections: Establish secure connections between dApps and mobile wallets.
  • Multi-Chain Support: Interact with various blockchain networks through compatible wallets.
  • User-Friendly Interface: An intuitive interface for users to connect their wallets with minimal effort.
  • Transaction Management: Users can manage and confirm transactions directly from their wallets.

Getting Started

Prerequisites

To run this project, ensure you have the following:

  • Node.js: Make sure you have Node.js installed. You can download it from nodejs.org.
  • npm: This is usually bundled with Node.js, but you can check by running:
    npm -v

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/wallet-connect-project.git
    cd wallet-connect-project
  2. Install Dependencies:

    npm install
  3. Run the Project:

    npm start

Usage

  1. Connect Your Wallet:

    • On the front end, provide an option for users to connect their wallets using Wallet Connect.
    • Use the Wallet Connect SDK to handle wallet connections.
  2. Sign Transactions:

    • Implement functionality to sign transactions and send them to the blockchain directly from the user’s wallet.
  3. Listen for Events:

    • Utilize event listeners to track the connection status and any incoming transactions.

Example Code

Here’s a basic example of how to set up Wallet Connect in your dApp:

import WalletConnectProvider from "@walletconnect/web3-provider";
import { ethers } from "ethers";

// Create a WalletConnect Provider
const provider = new WalletConnectProvider({
  infuraId: "YOUR_INFURA_ID", // Required
});

// Enable session (triggers QR Code modal)
await provider.enable();

// Create an ethers.js provider
const web3Provider = new ethers.providers.Web3Provider(provider);

// Now you can interact with the blockchain
const signer = web3Provider.getSigner();
const address = await signer.getAddress();
console.log("Connected wallet address:", address);

Contributing

Contributions to the Wallet Connect Project are welcome! If you have suggestions for improvements or new features, please open an issue or submit a pull request.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published