Bitcoin Forum
November 09, 2024, 06:02:03 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: I accidentally used BTC xpub key to generate BCH HD wallet addresses  (Read 204 times)
chamfort (OP)
Newbie
*
Offline Offline

Activity: 9
Merit: 12


View Profile
March 31, 2020, 12:23:42 PM
Last edit: March 31, 2020, 01:23:32 PM by chamfort
Merited by vapourminer (1)
 #1

Hi,

I accidentally used the wrong xpub key to generate BCH HD wallet addresses.

I used the BTC BIP44 Account Extended Public Key (from the same mnemonic seed) to generate BCH HD wallet addresses under BIP44. The BIP44 Account Extended Public Key for BTC and BCH is not the same. Only the BIP32 Extended Public Key is the same for BCH and BTC. Is there any way to recover the funds?
Rath_
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3139



View Profile
March 31, 2020, 12:27:33 PM
 #2

I accidentally used a BTC xpub key to generate BCH HD wallet addresses for an online store. The BTC xpub key is from the same seed (mnemonic). Is there any way to recover the funds?

Recovery is fairly easy for legacy and multisig wallets. Download Electron Cash and create a new wallet using your seed. You should be able to access your coins without any problems.
chamfort (OP)
Newbie
*
Offline Offline

Activity: 9
Merit: 12


View Profile
March 31, 2020, 01:21:11 PM
Last edit: March 31, 2020, 04:07:40 PM by mprep
 #3

I looked into it and BIP32 Extended Public Key for BTC and BCH is the same. But I used the BIP44 Account Extended Public Key and these are not the same for BTC and BCH. I set up a wallet in ElectronCash and I do not see the funds either.

Am I out of luck?



Surprisingly, I was able to recover the funds by changing the key derivation path of my BCH wallet to match a BTC wallet!
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4361

<insert witty quote here>


View Profile
March 31, 2020, 10:31:32 PM
Merited by bones261 (4), vapourminer (3), DireWolfM14 (1), Heisenberg_Hunter (1)
 #4

Surprisingly, I was able to recover the funds by changing the key derivation path of my BCH wallet to match a BTC wallet!
Yeah... the reason why the account extended key would be different is because the derivation path that a given coin uses should have a different "coin_type" value:

m / purpose' / coin_type' / account' / change / address_index

So, for Bitcoin it would be m/44'/0'/0'/0/0 but for BCH it would be m/44'/145'/0'/0/0

If you simply use the Bitcoin path in a BCH wallet, it will work and should provide the 'same' addresses (assuming the BCH wallet allows custom derivation paths). This is basically what Ledger did for their "split" wallet when the BCH fork happened. Ie. It allowed you to access the BCH in you BTC derivation path.

So-called "Registered" coin_types can been found here: https://github.com/satoshilabs/slips/blob/master/slip-0044.md

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
Rickorick
Jr. Member
*
Offline Offline

Activity: 107
Merit: 8


View Profile
April 01, 2020, 12:51:54 AM
 #5

What derivation path did you use?
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!