MultiversX Tracker is Live!

I can't figure out how to use importpubkey

Bitcoin Stack Exchange

Bitcoin News / Bitcoin Stack Exchange 158 Views

I have been trying to import a public key into my bitcoin[1] node, but it keeps saying that it isn't valid.

The address '18uLJohita1yWTAcDpoLPpd2vNAtnsLW4E' publishes front-pages of the New York times into the BSV ledger and I want to add its public key to my bitcoin server so I can see new UTXOs. The key must be in HEX, per the command.

bitcoin-cli validateaddress 18uLJohita1yWTAcDpoLPpd2vNAtnsLW4E

{ "isvalid": true, "address": "18uLJohita1yWTAcDpoLPpd2vNAtnsLW4E", "scriptPubKey": "76a91456aea08d8feaefb18222fcef953366da2a7f200588ac", "ismine": false, "iswatchonly": false, "isscript": false }

bitcoin-cli importpubkey 76a91456aea08d8feaefb18222fcef953366da2a7f200588ac error code: -5 error message: Pubkey is not a valid public key

It accepts that I have sent hex, but it doesn't like it. This is clearly more than just the public key, I can see that from a vout:

"asm": "OP_DUP OP_HASH160 56aea08d8feaefb18222fcef953366da2a7f2005 OP_EQUALVERIFY # OP_CHECKSIG",

So maybe it wants me to remove the OP_DUP, OP_HASH160 and OP_EQUALVERIFY:

bitcoin-cli importpubkey 56aea08d8feaefb18222fcef953366da2a7f2005 Pubkey is not a valid public key

Hmm? Maybe it wants the checksum at the end...

echo 18uLJohita1yWTAcDpoLPpd2vNAtnsLW4E | base58 -d | xxd -p 0056aea08d8feaefb18222fcef953366da2a7f200559461147 bitcoin-cli importpubkey 0056aea08d8feaefb18222fcef953366da2a7f200559461147 error code: -5 error message: Pubkey is not a valid public key

I them write a bigendian reversal script and tried it, didn't help either.

I am official stumped.

Thanks in advance.

[1] I currently run bitcoin.sv and digibyte and have the same problem on both.


Get BONUS $200 for FREE!

You can get bonuses upto $100 FREE BONUS when you:
πŸ’° Install these recommended apps:
πŸ’² SocialGood - 100% Crypto Back on Everyday Shopping
πŸ’² xPortal - The DeFi For The Next Billion
πŸ’² CryptoTab Browser - Lightweight, fast, and ready to mine!
πŸ’° Register on these recommended exchanges:
🟑 Binance🟑 Bitfinex🟑 Bitmart🟑 Bittrex🟑 Bitget
🟑 CoinEx🟑 Crypto.com🟑 Gate.io🟑 Huobi🟑 Kucoin.



Comments