eosjs
eosjs copied to clipboard
How to get public key if i know private key?
Is there any way to get public key if i know only private key?
I want to get account info only from private key. I know, that account name i can get from get_key_accounts, but it need public key.
for this you need to install eosjs-ecc pakage. eosjs has no public interface to this module
In previous versions we could use:
const ecc = require('eosjs').modules.ecc;
var pub = ecc.privateToPublic(pvk);
Thank you! just will include https://github.com/eosio/eosjs-ecc for now.