src/index.js
function privateToAccount(privateKey) {
  const publicKey = privateToPublic(privateKey, true);

  return {
    privateKey: `0x${stripHexPrefix(privateKey)}`,
    publicKey: `0x${publicKey.toString('hex')}`,
    address: publicToAddress(publicKey),
  };
}
function privateToAccount(privateKey) {
  const publicKey = privateToPublic(privateKey, true);

  return {
    privateKey: `0x${stripHexPrefix(privateKey)}`,
    publicKey: `0x${publicKey.toString('hex')}`,
    address: publicToAddress(publicKey),
  };
}
function privateToAccount ( privateKey ) { const publicKey = privateToPublic ( privateKey , true ) ; return { privateKey : ` ${ stripHexPrefix ( privateKey ) } ` , publicKey : ` ${ publicKey . toString ( 'hex' ) } ` , address : publicToAddress ( publicKey ) , } ; }
Returns an Ethereum account address, private and public key based on the public key.

@method privateToAccount
@param {String} privateKey a single string of entropy longer than 32 chars
@returns {Object} output the Ethereum account address, and keys as hex strings
Returns an Ethereum account address private and public key based on the public key .