Is there a way with bitcoinjs-lib to import a WIF pubkey:


and get the hexadecimal version like this:


closed as unclear what you're asking by JBaczuk, Pieter Wuille, Anonymous, chytrik, Andrew Chow Dec 2 '18 at 19:14

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    WIF is Wallet Input Format for a private key, not a pubkey: en.bitcoin.it/wiki/Wallet_import_format. Also that looks like a P2PKH address – JBaczuk Nov 26 '18 at 22:56
  • OK: is it possible to convert P2PKH back to hexadecimal ? – jfjobidon Nov 26 '18 at 23:07
  • 2
    No, an address is not a public key. It only encodes a hash of a public key, which cannot be reversed. – Pieter Wuille Nov 26 '18 at 23:08

WIF pubkey

There is no such thing as a wallet import format pubkey. What you have shared is an address, which is HASH160(pubkey). There is no way to recover the original public key from an address. You could, however, recover the public key from an outgoing transaction from that address, as it would be revealed as part of the unlocking script.

Not the answer you're looking for? Browse other questions tagged or ask your own question.