<p><a href="https://en.bitcoin.it/wiki/Mnemonic_phrase" rel="nofollow noreferrer">mnemonics are the seed</a>. you use that to get your <code>private key</code>.</p>

<p>the rest of the story as you have pointed out, is about deriving child key pairs. The process is deterministic (as the letter D in HD), meaning that you can get the same tree of child keys from the root seed whenever you do that. This could go "indefinitely", so how would you know when to stop? The answer is that you need additional information about the depths.</p>

<p>In the case without branches, you simply need to know how many keys have been generated (whether they received payment or not) to get the full balance. Most implementations of default look-ahead and will stop checking after a certain number of addresses don't have any UTXO.</p>

<p>With branches, it gets a bit more complicated. But in theory, if you know where things branch and how deep it go, you can restore the full tree.</p>

<p><strong><code>[EDIT]</code></strong> in response to your comment, there are standard ways though. For example, this picture here shows the hierarchy.</p>

<p><a href="https://i.sstatic.net/tv1Xz.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/tv1Xz.png" alt="enter image description here"></a></p>

CC BY-SA 3.0
2018-04-19T17:25:58.833Z
So mnemonics are used to generate the private key, and mnemonics are derived from some random number. 

I was hoping that there was a standard for branching out indefinitely. I was looking up derivation paths, but I was not able to infer any standard.

Thanks for the answer
Kyle Graham
CC BY-SA 3.0
2018-04-19T17:31:30.117Z
@KyleGraham I updated my answer with a picture showing standard HD wallet structure, if that's the `standard` you are looking for
Will Gu
CC BY-SA 3.0
2018-04-19T17:34:06.493Z
Thanks a lot, the diagram helps clear things up a bit. I will get my feet wet and use it as a guide. It definitely helped!
Kyle Graham
CC BY-SA 3.0
2018-04-19T17:22:40.670Z
2018-04-19T17:30:13.657Z
2018-04-19T17:30:13.657Z
Will Gu
<p>As I understand, a wallet like BRD wallet can have many private keys and receiving addresses.</p>

<p>When I give them the mnemonic, how do they re-generate all of the relevant private keys from that mnemonic alone?</p>

<p>I saw a video on a master private key, and I cannot figure out how it all ties into it because I could generate multiple private keys from the master private keys, or I could generate multiple private keys from any of the children private keys of the master. How does the wallet know from just the mnemonic, which path I took?</p>

CC BY-SA 4.0
2018-07-21T04:08:38.170Z
Can you add the video link please !
Alireza Fattahi
<private-key><public-key><bip32-hd-wallets><mnemonic-seed><deterministic-wallets>
How do HD wallets use mnemonic to recover all private keys?
Kyle Graham
# How do HD wallets use mnemonic to recover all private keys?

(Asked by: username_0 on 2018-04-19)

As I understand, a wallet like BRD wallet can have many private keys and receiving addresses.

When I give them the mnemonic, how do they re-generate all of the relevant private keys from that mnemonic alone?

I saw a video on a master private key, and I cannot figure out how it all ties into it because I could generate multiple private keys from the master private keys, or I could generate multiple private keys from any of the children private keys of the master. How does the wallet know from just the mnemonic, which path I took?

**Tags:** private-key, public-key, bip32-hd-wallets, mnemonic-seed, deterministic-wallets

> **Comments:**
> **username_1**: Can you add the video link please !  

---

## 1 answers

### Answer by username_2 on 2018-04-19. Score: 4 | Accepted answer

[mnemonics are the seed](https://en.bitcoin.it/wiki/Mnemonic_phrase). you use that to get your `private key`.

the rest of the story as you have pointed out, is about deriving child key pairs. The process is deterministic (as the letter D in HD), meaning that you can get the same tree of child keys from the root seed whenever you do that. This could go "indefinitely", so how would you know when to stop? The answer is that you need additional information about the depths.

In the case without branches, you simply need to know how many keys have been generated (whether they received payment or not) to get the full balance. Most implementations of default look-ahead and username_2 stop checking after a certain number of addresses don't have any UTXO.

With branches, it gets a bit more complicated. But in theory, if you know where things branch and how deep it go, you can restore the full tree.

**`[EDIT]`** in response to your comment, there are standard ways though. For example, this picture here shows the hierarchy.

[![enter image description here](https://i.sstatic.net/tv1Xz.png)](https://i.sstatic.net/tv1Xz.png)

> **Comments:**
> **username_0**: So mnemonics are used to generate the private key, and mnemonics are derived from some random number.   I was hoping that there was a standard for branching out indefinitely. I was looking up derivation paths, but I was not able to infer any standard.  Thanks for the answer  
> **username_2**: @username_0 I updated my answer with a picture showing standard HD wallet structure, if that's the `standard` you are looking for  
> **username_0**: Thanks a lot, the diagram helps clear things up a bit. I username_2 get my feet wet and use it as a guide. It definitely helped!  

---

