Skip to content

Instantly share code, notes, and snippets.

@antojoseph
Created December 22, 2021 00:24
Show Gist options
  • Save antojoseph/a6b55f6bf20e375fbd51be914c4ae6fc to your computer and use it in GitHub Desktop.
Save antojoseph/a6b55f6bf20e375fbd51be914c4ae6fc to your computer and use it in GitHub Desktop.
Ethereum Simple Wallet
var util = require('ethereumjs-util');
const privateKey = 'your_private_key_here;
const privatKeyBuffer =new Buffer.from(privateKey,'hex');
var publicKey = util.privateToPublic(privatKeyBuffer);
console.log(util.bufferToHex(publicKey));
console.log("address:",util.bufferToHex(util.publicToAddress(publicKey)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment