Giter Site home page Giter Site logo

pacelliv / ecdsa-node Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 1.7 MB

Solution to the project from Week 1 from Alchemy University.

HTML 2.60% JavaScript 82.06% SCSS 15.34%
ethereum-cryptography expressjs nodemon public-key-cryptography reactjs wallet alchemy-university

ecdsa-node's Introduction

Week 1 project - ECDSA Node ๐ŸŒŒ

Quick start ๐Ÿƒโ€โ™€๏ธ๐Ÿƒ

Clone the repo and cd into the folder:

git clone https://github.com/pacelliv/ecdsa-node.git
cd ecdsa-node

To install the dependencies, split your terminal and then run the following commands:

# In one terminal run:
cd client
npm install

# In the other one:
cd server
npm install

Start server and client:

# On the client terminal run:
npm run dev

# On the server terminal run:
npm start

Using the application ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป

After the UI is rendered on the browser, three wallets with a balance of tokens will be avaliable for you. In order to send transactions first you need to connect to a wallet by clicking on it:

wallets
Figure. 1 - Connected wallet.

As shown in the image a connected account will have a soft purple background color.

If you want a new set of wallet just reload the page.

Client overview ๐Ÿ”Ž

The client has the following responsabilities:

  • Render an UI on the brower.
  • Creating a hash message and a Signature using the connected wallet's private key.
  • Creating the transaction to send to the server.

Server overview ๐Ÿ”

The server has the following responsabilities:

  • Creating the wallets and sending them to the client.
  • After a request from the client to execute a transaction, the server will cryptographically prove if the sender of the transaction is in fact the signer by retrieving the public key using the signature and the message.
  • If the sender owns the private will update the balances of the sender and recipient.

Conclusion ๐Ÿ‘€

Users will use their private keys to signed a transactions to create a message and a signature. After sending the transaction a Ethereum node will cryptographically verify if the sender of the transaction controls the private key by deriving the public from the signature and the message.

If the retrieved address is equal to the sender then it's proved only the sender could've sent that transaction, otherwise the transaction will be reverted.

Acknowledgements ๐ŸŽ‰๐ŸŽ‰

Thanks to the Alchemy University team for making the Ethereum Bootcamp accessible to anyone who want to become a web3 engineer.

ecdsa-node's People

Contributors

dan-nolan avatar elanh avatar pacelliv avatar

Watchers

 avatar  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.