Skip to main content
Add more information about how the public key is computed; tldr no network needed, just cryptography
Source Link

Transforming a private key to a public key does not require the network. It's only cryptography. The network does not do any computation for you to give you the answer.

An easier solution using Node.js:

> const Wallet = require('ethereumjs-wallet');
undefined
> Wallet.fromPrivateKey(Buffer.from('208065a247edbe5df4d86fbdc0171303f23a76961be9f6013850dd2bdc759bbb', 'hex')).getAddress().toString('hex');
'0bed7abd61247635c1973eb38474a2516ed1d884'

An easier solution using Node.js:

> const Wallet = require('ethereumjs-wallet');
undefined
> Wallet.fromPrivateKey(Buffer.from('208065a247edbe5df4d86fbdc0171303f23a76961be9f6013850dd2bdc759bbb', 'hex')).getAddress().toString('hex');
'0bed7abd61247635c1973eb38474a2516ed1d884'

Transforming a private key to a public key does not require the network. It's only cryptography. The network does not do any computation for you to give you the answer.

An easier solution using Node.js:

> const Wallet = require('ethereumjs-wallet');
undefined
> Wallet.fromPrivateKey(Buffer.from('208065a247edbe5df4d86fbdc0171303f23a76961be9f6013850dd2bdc759bbb', 'hex')).getAddress().toString('hex');
'0bed7abd61247635c1973eb38474a2516ed1d884'
Source Link
user19510
  • 28.1k
  • 2
  • 32
  • 49

An easier solution using Node.js:

> const Wallet = require('ethereumjs-wallet');
undefined
> Wallet.fromPrivateKey(Buffer.from('208065a247edbe5df4d86fbdc0171303f23a76961be9f6013850dd2bdc759bbb', 'hex')).getAddress().toString('hex');
'0bed7abd61247635c1973eb38474a2516ed1d884'