Author

Topic: Move bech32 private keys into Core? (Read 211 times)

legendary
Activity: 1372
Merit: 1252
March 10, 2019, 10:35:22 PM
#4
you will need to ensure that you update all your backups of wallet.dat as older versions of the wallet.dat will not be able to recover that private key as it was not created by the embedded seed.

Well I just realized this is key. I just wanted to avoid having to contact the chipmixer admin to change my address if I could avoid it since managers are too busy and so I am. There's also the nice feel of having an older coinbase for hodlers but I guess that's just a geeky thing.

Another reason was to have the key on my wallet so I don't need to keep track of an additional wallet (in this case the electrum wallet). Even if you move the coins and the electrum wallet is worth 0 after, you still want to have access to that private key. For instance lets say you sell these coins someday to buy a house, authorities may ask for origin of funds. The key must coincide with the moment where accrual happens, as in being able to prove it came from a legit activity (in this case, the address matching with the payment from the manager, so you can sign it and prove it).

I am just trying to stay ahead when it comes to taxes, trying to get everything in order. When BTC is worth $100k in a couple of years people will want to buy some property with it and then you must be ready for an audit and things like these can make the difference from avoided getting f*cked in the ass by the confiscator.
HCP
legendary
Activity: 2086
Merit: 4361
March 10, 2019, 03:43:37 AM
#3
i am not familiar with core that much but i believe in there you don't have the option to tell the wallet the address type! so it checks all the possible addresses!
Correct... In Bitcoin Core, you don't have the option to tell the wallet the address type when importing... but I believe that it doesn't check all of them. Instead, it simply imports the private key and creates the address for whatever addresstype the wallet is currently set to.

By default, Bitcoin Core uses "ps2h-segwit" addresses, but you can specify the -addresstype option on the commandline (or in bitcoin.conf) when starting up to override this temporarily... import your key to create the address you want, then shutdown and restart without the option specified to return back to default.
Quote
-addresstype

What type of addresses to use ("legacy", "p2sh-segwit", or "bech32", default: "p2sh-segwit")

Note: I have NOT tested this, so would advise running some tests on a dummy wallet.dat before attempting this to ensure that it works as you want before attempting it on a "live" wallet.

OP should also note that as pooya87 suggested, sweeping the coins would be the ideal solution... by importing a private key, you will need to ensure that you update all your backups of wallet.dat as older versions of the wallet.dat will not be able to recover that private key as it was not created by the embedded seed.
legendary
Activity: 3472
Merit: 10611
March 09, 2019, 11:05:06 PM
#2
Which is the correct and definitive best way to do this?

the "correct" way is ALWAYS to move the coins also known as sweeping whenever you want  to change wallets for many reasons including security Wink

How do I exactly do this move? Im not familiar with electrum.
i am assuming you are using the latest version, if you are using a version between 3.0 and 3.0.6, this answer is invalid due to the usage of versioned private keys which need to be converted first (upgrading to latest version takes care of that)

go to your address tab and select the address you want to transfer, right click on it and select Private Key. (if you have password it will be required) a new window will show up showing you the private key which will be in form of type:key
in your case it will be p2wpkh: so just copy the part and import that in your core wallet.

Quote
In Core I don't remember how to import the private keys but I think it was pretty easy, I can look it up.
i am not familiar with core that much but i believe in there you don't have the option to tell the wallet the address type! so it checks all the possible addresses!
legendary
Activity: 1372
Merit: 1252
March 09, 2019, 10:41:22 PM
#1
Which is the correct and definitive best way to do this? I want to move some coins in an electrum wallet, inside a regular wallet.dat Core wallet. I don't want to send the coins, I just want to own the private keys. How do I exactly do this move? Im not familiar with electrum. In Core I don't remember how to import the private keys but I think it was pretty easy, I can look it up. I just want to know if someone has done this recently in recent versions, because many tutorials are now outdated as both the GUi and the cvar commands change over time.
Jump to: