Bitcoin Forum
May 04, 2024, 06:44:09 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: help needed: Import priv key from electrum bech32 address into core  (Read 266 times)
bspus (OP)
Legendary
*
Offline Offline

Activity: 2165
Merit: 1002



View Profile
February 10, 2018, 03:26:04 PM
 #1

Here's the situation

I'm trying to claim sbtc. I have claimed from legacy addresses already. There are lots of tools to make that relatively painless.
It's a whole different story when it comes to segwit bech32 addresses. Those are the ones that start with bc1.
I have gone as far as actually downloading the sbtc core wallet and it's syncing. Whatever online wallet for sbtc I found was either a scam (like those sbtc electrum ones) or did not support those addresses.
But even so, it seems my troubles are not over.

Now I'm not asking anyone to help with sbtc core, just bitcoin-core which I assume will be very similar for this process. I understand there is no gui function, I'm OK using the cli for this.
As I said, the private key is exported from electrum bech32 address. Can core parse those? Do they need to be converted with some tool?
I'm surprised that a google search has provided no step by step method. I'm starting to worry it might not even be possible.

1714805049
Hero Member
*
Offline Offline

Posts: 1714805049

View Profile Personal Message (Offline)

Ignore
1714805049
Reply with quote  #2

1714805049
Report to moderator
"With e-currency based on cryptographic proof, without the need to trust a third party middleman, money can be secure and transactions effortless." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714805049
Hero Member
*
Offline Offline

Posts: 1714805049

View Profile Personal Message (Offline)

Ignore
1714805049
Reply with quote  #2

1714805049
Report to moderator
1714805049
Hero Member
*
Offline Offline

Posts: 1714805049

View Profile Personal Message (Offline)

Ignore
1714805049
Reply with quote  #2

1714805049
Report to moderator
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
February 10, 2018, 03:52:37 PM
Merited by bspus (1)
 #2

This will be helpful : https://bitcointalk.org/index.php?topic=2855806.0

Bech32 addresses/private keys can be converted into legacy addresses/private keys. They both hold the coins (technically) but the segwit address allows it to be signed into a smaller transaction size.
bspus (OP)
Legendary
*
Offline Offline

Activity: 2165
Merit: 1002



View Profile
February 10, 2018, 04:29:02 PM
 #3

This will be helpful : https://bitcointalk.org/index.php?topic=2855806.0

Bech32 addresses/private keys can be converted into legacy addresses/private keys. They both hold the coins (technically) but the segwit address allows it to be signed into a smaller transaction size.

Wonderful, thanks!

If I understand correctly, I didn't even need to mess with the sbtc core wallet. I should just be able to convert into legacy priv keys and do the job with those.

achow101
Moderator
Legendary
*
Offline Offline

Activity: 3388
Merit: 6578


Just writing some code


View Profile WWW
February 10, 2018, 05:50:47 PM
Merited by bspus (1)
 #4

If I understand correctly, I didn't even need to mess with the sbtc core wallet. I should just be able to convert into legacy priv keys and do the job with those.
No, "legacy" private keys will correspond to non-segwit addresses. You will need to convert the non-segwit address into a segwit address. You can use the sbtc core wallet and use the addwitnessaddress command once you import the WIF private key.

bspus (OP)
Legendary
*
Offline Offline

Activity: 2165
Merit: 1002



View Profile
February 10, 2018, 09:09:06 PM
 #5

If I understand correctly, I didn't even need to mess with the sbtc core wallet. I should just be able to convert into legacy priv keys and do the job with those.
No, "legacy" private keys will correspond to non-segwit addresses. You will need to convert the non-segwit address into a segwit address. You can use the sbtc core wallet and use the addwitnessaddress command once you import the WIF private key.

Thank you. I was about to write that what I tried didn't work. Those modified priv keys gave legacy addresses that, naturally, had no transaction history. I'll try this command when possible.

bspus (OP)
Legendary
*
Offline Offline

Activity: 2165
Merit: 1002



View Profile
February 12, 2018, 06:54:37 AM
 #6

Using addwitnessaddress with one of the newly derived addresses (with the "legacy" private keys) returns an error because "segregated witness is not enabled on the network"

Is that actually the case or is it just a parameter I need to change? Has anyone actually claimed forked coins from such addresses?

jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
February 12, 2018, 08:10:59 AM
 #7

Using addwitnessaddress with one of the newly derived addresses (with the "legacy" private keys) returns an error because "segregated witness is not enabled on the network"

Is that actually the case or is it just a parameter I need to change? Has anyone actually claimed forked coins from such addresses?

Is your wallet fully synchronised? That's normally what causes the issue of it not being enabled on the network yet (as you haven't gotten up to that block so core doesn't know it's been activated).
bspus (OP)
Legendary
*
Offline Offline

Activity: 2165
Merit: 1002



View Profile
February 12, 2018, 02:24:32 PM
 #8

Using addwitnessaddress with one of the newly derived addresses (with the "legacy" private keys) returns an error because "segregated witness is not enabled on the network"

Is that actually the case or is it just a parameter I need to change? Has anyone actually claimed forked coins from such addresses?

Is your wallet fully synchronised? That's normally what causes the issue of it not being enabled on the network yet (as you haven't gotten up to that block so core doesn't know it's been activated).

Right... I imported the first address and took about 15 minutes to rescan the whole thing. Since it doesn't give me an option to add all my addresses and add witness address beforehand, I thought I could be clever and do it on an empty blockchain wallet, then take the wallet dat to the synced client. But no... it has to give me grief  Angry

This whole thing proved more trouble than it's worth but I'll give it one more chance to see it to the end. I should be very close now.

cellard
Legendary
*
Offline Offline

Activity: 1372
Merit: 1250


View Profile
February 12, 2018, 06:26:37 PM
 #9

Im using Electrum myself for segwit stuff for the time being. I would just wait until 0.16 is out which will have support for all segwit addresses and you will see them on the GUI and everything will be as it should. 0.16 should be out next month.

But if there is not a way to add addresses in batches and then rescan, I will just not do it, I will keep whatever addresses I've used so far in the Electrum wallet. Im not going to spend ages importing my addresses to be honest, I don't have that much money in segwit addresses to bother.
bspus (OP)
Legendary
*
Offline Offline

Activity: 2165
Merit: 1002



View Profile
February 13, 2018, 09:35:09 PM
 #10

Yes indeed, nothing worked after all. I still can't see my segwit transactions.

I'll wait for 0.16 and hope sbtc updates their version soon after.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!