Using a client and server to facilitate transfers between different addresses. Since there is just a single server on the back-end handling transfers, this is clearly very centralized.
I am interested in implementing Public Key Cryptography. By using Elliptic Curve Digital Signatures we can make it so the server only allows transfers that have been signed for by the person who owns the associated address.
-
Public Key Cryptography
-
Ethereum Cryptography library
-
Follow instructions below for initial setup
-
Check that balance is initialized for each private key via UI
-
Run hash_and_sign script on a separate command
-
Enter transaction data into UI and try to transact via server
-
The server will recover the public key from the transaction signature and allow the transaction if it matches the original public key associated with it.
The client folder contains a react app using vite. To get started, follow these steps:
- Open up a terminal in the
/client
folder - Run
npm install
to install all the depedencies - Run
npm run dev
to start the application - Now you should be able to visit the app at http://127.0.0.1:5173/
The server folder contains a node.js server using express. To run the server, follow these steps:
- Open a terminal within the
/server
folder - Run
npm install
to install all the depedencies - Run
node index
to start the server