Skip to content

A simple webpack bundled app in vanilla JS to show basic implementation of ethereum signature using web3.eth.personal.sign and web3.eth.personal.ecRecover functions. Used to demonstrate how to manage digital identity with ethereum wallets.

blockdemy/eth_personal_sign

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ethereum sign and recover example

Web3 has its eth.personal.sign function that allows developers to use users private keys to sign messages to prove identity with its reverse function that finds the public key that signed the message.

Requires metamask or some injected Web3 Provider.

preview

How does it works?

Node.JS > 10 required

  • npm install to install dependecies
  • npm run start to run webpack dev server with hot reloading
  • Go to localhost:9000 and start testing
  • Accept the connection request from metamask
  • Write some data to sign
  • Click sign button
  • This process will return a signature, that can be reversed by web3.eth.personal.ecRecover process
  • Copy signature
  • Paste on signature textbox
  • Copy original message signed in original message textbox
  • Click on recover and see the magic

Please try to change parameters on the original message and signature to check how the results vary respect to the original signer aaccount

Licensed

MIT

About

A simple webpack bundled app in vanilla JS to show basic implementation of ethereum signature using web3.eth.personal.sign and web3.eth.personal.ecRecover functions. Used to demonstrate how to manage digital identity with ethereum wallets.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published