GithubHelp home page GithubHelp logo

pinkdiamond1 / wallet-connect-sdk Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cityofzion/wallet-connect-sdk

0.0 1.0 0.0 3.86 MB

A Wallet Connect SDK for ecosystem tools

JavaScript 0.10% TypeScript 7.40% CSS 25.66% HTML 66.84%

wallet-connect-sdk's Introduction

WalletConnect SDK

A COZ WalletConnect 2.0 SDK for ecosystem tools. WcSdk is an auxiliary library built to help the usage of walletconnect with NEO 3 Wallets.

WalletConnect integration is a secure solution for signing transactions sent to a blockchain, such as are needed when creating Decentralized Applications that require the user's account authentication. This SDK comes in handy to help on such integration.

Why do I need WalletConnect in my dApp?

Almost every dApp needs a user's authentication to send a signed transaction to the blockchain. From minting tokens to making a simple transfer, users must always sign their transactions whenever the client-side application needs to call a SmartContract method that requires the user's Account.

Signing a transaction means that, without a solution like WalletConnect's integration, the user would need to trust his privateKey to the dApp. For obvious reasons, outside of testing environments, this is a huge security issue, as the dApp could simply use it maliciously stealing funds or signing something not approved by the user.

From a security perspective, providing your key to an application is a HUGE risk. WalletConnect mitigates this risk by delegating all transaction signing operations to the user's wallet. Applications instead, given the ability to communicate directly with the wallet to request a user's signature.

WalletConnect is an established solution to tackle this issue, and it's already used by many dApps and users.

Usage example video

Video

This example is showing Crypsydra dApp connecting with Aero Wallet

How does it work?

  • The dApp shows a QRCode, so the user can use their wallet to establish a connection
    • It's an encrypted websocket connection between dApp and wallet, passing by a relay server
  • Now, every time the dApp needs to call a SmartContract, instead of doing it by itself, it will ask the wallet to do so
    • It will send a JSON-RPC message with all the information it needs to send to the SmartContract
    • The wallet will ask for the user to approve this message
    • It will sign the transaction, make the call and respond back to the dApp with the response from the blockchain

Installation and Setup Guide

This repository contains multiple packages and from here on you need to choose your path. If you are planning to use it on a React.js application it's highly recommended using our WC React SDK that handles all state changes for you, but if you plan to use with a different technology we have all the same features on the WC Core SDK.

How to test my dApp?

This SDK uses WalletConnect 2.0 protocol and was designed to work on the NEO 3 blockchain. You will need a Wallet application that fits these requirements, we recommend Aero Web Wallet for testing or Neon Wallet for production.

wallet-connect-sdk's People

Contributors

apisit avatar ixje avatar lllwvlvwlll avatar melanke avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.