Skip to content

meetsiraja/eth-key-pair

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eth-key-pair

npm License: MIT

Convert Ethereum private key, public key and address with each other.

Feature:

  • Convert Ethereum private key to public key
  • More functions coming soon...

Installation

npm install eth-key-pair

Initialization

const EthKey = require('eth-key-pair');

Generate PublicKey from PrivateKey:

This creates the uncompressed publicKey from privateKey, where 04 has stripped from left.

let publicKey = EthKey.publicKeyByPrivateKey("72fdf5bfe391b520129ce1b4e256c79af1ddf4e95e5124803c58f7da28e64727")

console.log(publicKey)

Output:

 e06740583be9fbdabaa26fc1795e2bbaacb95fabbd47f7ed5454d4c3033906fb8d6080f1b601da0a746ab39d5bde4c26c118638cbc77367b49dd65d086897ba3

Contributing

  • Issues & Pull requests are welcome! Fork, branch, and submit PR.

Changelog

Licence

MIT

Releases

No releases published

Packages

No packages published