Post
Topic
Board Bitcoin Technical Support
Merits 10 from 3 users
Re: Bitcoin Core Stuck at Block 623950
by
nc50lc
on 13/03/2025, 05:28:09 UTC
⭐ Merited by LoyceV (4) ,ABCbits (4) ,Pmalek (2)
Maybe I don't understand something! Let's say, if I have the latest version of Bitcoin Core and I have a compressed WIF... How can I add a legacy uncompressed address for this WIF key through the console?
You can't with that WIF private key.
WIF with compressed flag byte (starts with 'L' or 'K') will generate its compressed public key pair; thus, compressed legacy address.
If you want to derive the uncompressed legacy address, use its WIF without that flag (starts with '5').

To import using the console (testnet):
Compute the checksum:
Code:
getdescriptorinfo "pkh(91dKmbXPRSVp8vemQPWecCFT1esvSeDHYgpoPexzeTkCuowEeM3)"
get the checksum in the result: "zzpvlmvx"
To import:
Code:
importdescriptors "[{\"desc\": \"pkh(91dKmbXPRSVp8vemQPWecCFT1esvSeDHYgpoPexzeTkCuowEeM3)#zzpvlmvx\",\"label\": \"your_label\",\"timestamp\": \"now\"}]"
Timestamp "now" will prevent the client from rescanning once its imported to the wallet, use a specific unix time value or 0 if you want it to rescan.

And if you're expecting P2PK outputs:
Code:
getdescriptorinfo "pk(91dKmbXPRSVp8vemQPWecCFT1esvSeDHYgpoPexzeTkCuowEeM3)"
Checksum: "pxrrw3he"
To import:
Code:
importdescriptors "[{\"desc\": \"pk(91dKmbXPRSVp8vemQPWecCFT1esvSeDHYgpoPexzeTkCuowEeM3)#pxrrw3he\",\"label\": \"your_label\",\"timestamp\": 0}]"