eth-key-pair

1.0.1 • Public • Published

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

/eth-key-pair/

    Package Sidebar

    Install

    npm i eth-key-pair

    Weekly Downloads

    1

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    6.06 kB

    Total Files

    6

    Last publish

    Collaborators

    • meetsiraja