Created
December 22, 2021 00:24
-
-
Save antojoseph/a6b55f6bf20e375fbd51be914c4ae6fc to your computer and use it in GitHub Desktop.
Ethereum Simple Wallet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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