Bitcoin Forum

Bitcoin => Electrum => Topic started by: fillippone on November 24, 2019, 11:32:39 PM



Title: Recover BRD Wallet (BreadWallet) in Electrum
Post by: fillippone on November 24, 2019, 11:32:39 PM
BRD (https://brd.com/) Wallet (formerly BreadWallet) is one of the best wallets for iOS, allowing a decent control on your coins, privacy and ease of use.

Sometimes, you might want to recover your wallet outside BRD to recover your funds without that app or even do some slightly advanced things (like setting fees manually or sending money to yourself, operations not allowed by the wallet).

A very easy and convenient way of doing so is using Electrum, the best wallet for desktop systems.

Importing your wallet in Electrum is relatively easy.

First thing, in case you haven't already done so, is to write down your BRD recovery key.

You can find it in Menu, Security Settings, Recover Key.

https://talkimg.com/images/2023/05/16/blobff0bb07ac93eec58.png
https://talkimg.com/images/2023/05/16/blob156afd04d91b236a.png
https://talkimg.com/images/2023/05/16/blob1b7c9d95665844e8.png

After that, you have to enter the PIN and write down the key:
https://talkimg.com/images/2023/05/16/blobf577bf0899472ff3.png
https://talkimg.com/images/2023/05/16/blob9984d466422b3f87.jpeg
https://talkimg.com/images/2023/05/16/blobe2e8c5689c6873fd.png
https://talkimg.com/images/2023/05/16/blobda04740a2ce8c8bb.png

So we have written down our phrase:
 
Code:
tree bracket loop market logic wheel potato canal act travel nice force

This is a BIP39 passphrase  (https://en.bitcoin.it/wiki/Seed_phrase), defined as a list of 12 words chosen from a 1024-word dictionary.

We need to import this in Electrum to be able to use the same wallet.

First, download the latest available release from https://www.electrum.org/#download. I suggest you to download the portable version.

https://talkimg.com/images/2023/05/16/blob43dea40a4a8ae658.jpeg

Run the executable.

We need to start a new wallet, if you already have one on your machine, create a new one by overwriting a new name in the dialog, otherwise name your wallet:

https://talkimg.com/images/2023/05/16/blobecb089bb90e4cb2c.jpeg

Select which kind of wallet: we need a standard wallet:

https://talkimg.com/images/2023/05/16/blob5c1df04126ca802d.jpeg

We want to recover an already used wallet, so we specify we already have a seed.

https://talkimg.com/images/2023/05/16/blob5b3bdd7ac5d916c8.jpeg

We enter the seed and then click options, as we have to specify that we want to use the BIP39 (https://en.bitcoin.it/wiki/Seed_phrase) Standard implementation, which is slightly different from the Electrum implementation.

https://talkimg.com/images/2023/05/16/blob86fa3c8423a08418.jpeg

Select the BIP39 tickbox and click OK.

https://talkimg.com/images/2023/05/16/blob66630b4c6849393d.jpeg

We have a visual confirmation of the correctness of the seed, click Next.

https://talkimg.com/images/2023/05/16/blob60cf989930989534.jpeg

Then, we have to specify which kind of address we want to recover.
The latest versions of BRD create bech32 addresses (the ones starting with bc1... ), so we have to tick the appropriate radio button: "native (segwit p2wpkh)."
The second customisation is to select the correct derivation of the BIP32  (https://en.bitcoin.it/wiki/BIP_0032)hierarchical deterministic wallet. Just type:
Code:
 m/0'/0
Click Next

https://talkimg.com/images/2023/05/16/blob6e6594e982184a65.jpeg

Pick a strong password to protect wyour wallet. This can be different from the one you used in BRD.
Click Next

https://talkimg.com/images/2023/05/16/blob7c92ae493870407c.jpeg

Now you have your funds in Electrum.

https://talkimg.com/images/2023/05/16/blobf8fc06b41d7774a0.jpeg

Now, you can use Electrum to control your funds. Everything you do in the wallet will be reflected in the BRD wallet, as they are effectively the exact same wallet.
Note:
  • If you have problems recovering all your funds, you can try to edit the code the following way:
Code:
 m/0'
  • This procedure works only for the funds in the derivation of the seed phrase. If you swept some private keys with BRD you need to recover those funds using that private keys, as they are not in the derivations of the seed phrase





















 



Title: Re: Recover BRD Wallet (BreadWallet) in Electrum
Post by: Abdussamad on February 05, 2025, 04:29:40 PM
m/0' is the correct derivation path not m/0'/0.


Title: Re: Recover BRD Wallet (BreadWallet) in Electrum
Post by: fillippone on February 05, 2025, 09:56:08 PM
m/0' is the correct derivation path not m/0'/0.

I checked myself that the m/0'/0 derivation worked ok for my case.

In addition, you can check it here:

For Breadwallet, it uses a derivation path of m/0'/0 for receive addresses and m/0'/1 for change addresses... (the same as MultiBit HD)... so you can enter your recovery phrase where it says "BIP39 Mnemonic"... then click "BIP32" under Derivation Path... then set Client to "Custom" and set the BIP32 Derivation Path to m/0'/0...
https://talkimg.com/images/2023/11/15/zqtv2.png


Anyway, m/0' can work as an alternative.


Title: Re: Recover BRD Wallet (BreadWallet) in Electrum
Post by: BitMaxz on February 05, 2025, 10:37:42 PM
Older wallet derivation path for BRD wallet, it uses m/0' for legacy wallet and for newer wallets and segwit, it uses m/0'/0
It is based on my old BRD wallet and newly created wallet, or maybe BRD wallet generated randomly between these two derivation paths?

Most of the complaints on Brd wallet in their github say they can't recover their wallet using derivation path m/0' but some of them claim that they can recover their wallet using m/0'/0.


Title: Re: Recover BRD Wallet (BreadWallet) in Electrum
Post by: nc50lc on February 06, 2025, 04:38:54 AM
m/0' is the correct derivation path not m/0'/0.
In addition, you can check it here:

For Breadwallet, it uses a derivation path of m/0'/0 for receive addresses and m/0'/1 for change addresses... (the same as MultiBit HD)...
Not here to argue about the correct derivation path but based from HCP's quoted post:
It should be m/0h in Electrum; or m/0h/0 and m/0h/1 in IanColeman's BIP39 tool.

Because what he said and the one you type in BIP39 tool is the complete derivation path to its internal (change addesses) and external (receiving addresses) chain indexes.
While the derivation path in Electrum's Script type selection screen should only be up to the "Account index", it'll automatically derive the receiving or change addresses by adding .../0 or .../1 to the given derivation path when the keys are needed.

Older wallet derivation path for BRD wallet, it uses m/0' for legacy wallet and for newer wallets and segwit, it uses m/0'/0
It is based on my old BRD wallet and newly created wallet, or maybe BRD wallet generated randomly between these two derivation paths?
Now this is interesting, if this is true they've followed quite the same technique like how Electrum derive its SegWit wallet's master (extended) private key.
Electrum's Legacy wallet is derived with m/; while SegWit is derived with m/0h.
BRD-Legacy use m/0h for legacy, then just like Electrum, derive the first index child m/0h/0 for the SegWit wallet's xprv key.
(instead of using the same xprv, they also used the first index at a lower level in the hierarchy)

Someone may have to check the code to confirm that, but if it works and reproducible (I don't have BRD to test), it's good enough for this thread.


Title: Re: Recover BRD Wallet (BreadWallet) in Electrum
Post by: Abdussamad on February 06, 2025, 02:27:54 PM
m/0' is the correct derivation path not m/0'/0.

I checked myself that the m/0'/0 derivation worked ok for my case.


m/0' is the correct derivation path for use in electrum. electrum automatically derives external (receive) addresses at m/0'/0/i and internal i.e. change addresses at m/0'/1/i.