Skip to content

edyionescu/ecdsa-node

Repository files navigation

ECDSA node

Ask DeepWiki GitHub License

React frontend that communicates with a Node.js server responsible for transferring balances between addresses by creating digital signatures with the appropriate private keys and verifying them on the backend.

It uses the Ethereum Cryptography library, specifically the elliptic curve operations on the curve secp256k1.

demo

Prerequisites

Usage

  1. Open the /client folder from terminal.
  2. cat .env.example > .env
  3. Run pnpm install to install all the dependencies.
  4. Run pnpm dev to start the application1.
  5. Visit the application at http://127.0.0.1:5173/.

Server (Express)

  1. Open the /server folder from terminal.

  2. cat .env.example > .env

  3. Run pnpm install to install all the dependencies.

  4. Get private key/address pairs by running pnpm generate and copy them into accounts.config.json using the JSON structure below:

    {
      "address_1": {
        "label": "Account 1",
        "balance": 10,
        "privateKey": "privateKey_1"
      },
      "address_2": {
        "label": "Account 2",
        "balance": 20,
        "privateKey": "privateKey_2"
      }
    }
    
  5. Run pnpm dev to start the server1.

Footnotes

  1. Alternatively, you can run both the client and server in parallel. Either use pnpm dev in the root directory, or run the task included in .vscode/tasks.json with Ctrl+Shift+P / Cmd+Shift+P > Tasks: Run Task > Start: Client & Server. 2

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •