3

I am using the Electrum wallet for Bitcoin on Windows 10. I'm able to get the private key of my main receiving address. I'm sure this address works to receive BTC as I've been able to before. I was curious about how private keys can be converted to public receiving addresses, so I tried the tool at https://bitcointools.site/tool/pubkey-to-address and was able to get an address from there. However, it is not any of the addresses listed in my client, and definitely not the one I retrieved the private key for (all addresses in the Electrum start with "bc1" whereas the address I got back when converting from my private key began with "1"). I tried sending a small amount (to test) to the address that I got back from https://bitcointools.site/tool/pubkey-to-address but it's not showing up in my wallet and it appears I may have lost that small amount I used as a test send. Am I doing something wrong?

Here are screenshots showing the procedure I'm using to obtain the private key from my Electrum wallet, and then trying to enter it on coinb.in and bitcointools.site, both of which give me the same receiving address, which is incorrect(I tried sending a small amount to this addy and did not receive it). Because my receiving address starts with "bc1" I'm thinking that maybe something else needs to be done to account for the bech32 addresses. Can anyone help please?

https://ibb.co/4MfhJ5p
https://ibb.co/f4cH99Y
https://ibb.co/8NHqJdp
https://ibb.co/FwT6FHB

UPDATE:
I was able to somewhat get it working using the console (View->Show Console) in Electrum and then used a command similar to bitcoin.address_from_private_key("p2wpkh:5Kkzs8XrJNAmf9VQDFeGBfaRvSByAvPK6DbDXw5BVqswWaXSG2Y") which returned the address I was expecting starting with "bc1". My concern is that its returning the value that it has already stored and associated with that private key. Does anyone know of another way I can check if it's working properly? I don't mind entering my private key on a website as long as I can just run it locally so I don't expose myself to security risks. Anyone?


I was able to retrieve the small amount of BTC I used as a "test send" by importing by private key into an online wallet (blockchain.com's wallet for those who care). I then sent back (minus the fees) the BTC to my Electrum wallet. I still cannot figure out why the BTC private key returned by Electrum outputs a BTC address of the form 1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx when my Electrum client shows me that all my receiving addresses are of the form "bc1..."

If anyone could shed some light on this I'd appreciate it. thanks.

1 Answer 1

1

I still cannot figure out why the BTC private key returned by Electrum outputs a BTC address of the form 1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx when my Electrum client shows me that all my receiving addresses are of the form "bc1..."

That's either because the website is out of date and doesn't support SegWit/bech32 or it just assumes you are using legacy addresses unless you tell it otherwise.

3
  • I'm using Electrum wallet which is pretty darn popular. I've tried using coinb.in and bitcointools.site, neither of which even store the private keys you enter. I still cannot seem to generate a bech32 receiving address from my private key, though. Apr 8, 2022 at 9:13
  • As far as I can tell, I followed all the instructions on walletsrecovery.org. The problem is not that I cannot recover my wallet - I'm able to do that using my private key. The problem I am having is that it generates a receiving address, that doesn't appear to belong to my wallet. I'm using Electrum wallet which is pretty darn popular. I've tried using coinb.in and bitcointools.site, neither of which even store the private keys you enter. I still cannot seem to generate a bech32 receiving address from my private key, though. Any other suggestions? Apr 8, 2022 at 9:31
  • You don't have to enter your private key on an external website. If you go to bitaddress.org, you can download the Github source and just run it locally (it uses only javascript). I checked the derivation path for Electrum on walletsrecovery.org but I don't see anywhere to put that in. Do you know of some other way I use the private key I obtained from Electrum to get a working a bech32 recv address? Apr 8, 2022 at 10:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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