Skip to content

Voting DApp with client-side Ethereum wallet. Implements register / login / logout / vote

License

Notifications You must be signed in to change notification settings

nakov/client-side-ethereum-wallet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Client-Side Wallet - Demo

Play with the demo now: https://client-side-wallet-demo.herokuapp.com

This demon example demonstrates how to build a simple DApp (Voting) with client-side Ethereum wallet. Based on Solidity smart contract and client-side UI (JS + jQuery + Ethers.js) + server-side account management (Node.js + Express + simple REST API). The wallet is encrypted in UTC / JSON format (both private key + mnemonics are encrypted with AES-CRT-128 using SCrypt key derivation).

  • The app implements register / login / logout / vote.
  • Candidates and votes stay in Solidity contract on the Ropsten testnet.
  • Users register in the system and get a wallet (private key + address)
    • The wallet JSON is stored after strong encryption at the server side
    • The wallet password / private key never leave the client app
  • User login -> download the encrypted wallet JSON from the server
  • After login / register, keep the encrypted wallet JSON in the browser session
  • Logout -> clear the browser session
  • Use different passwords for server login and for the wallet
    • Wallet password (client-side): HMAC(password, username + 'wallet')
    • Server password (wallet id): HMAC(username, password + 'server')
  • Lost password cannot be recovered / reset -> use the mnemonics
  • Based on the Ethers.js library

Project Structure

This DApp example is based on JavaScript (server-side + client-side)

Running the Demo

  1. Download the demo from GitHub:
git clone https://github.com/nakov/client-side-ethereum-wallet
  1. Go to the project directory:
cd client-side-ethereum-wallet
  1. Install the NPM packages
npm install
  1. Run the server
npm start
  1. Open the project URL from your Web browser:
http://localhost:80

Slides and Videos

Slides:

Videos:

About

Voting DApp with client-side Ethereum wallet. Implements register / login / logout / vote

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published