diff options
| author | mtg0001 <106211915+mtg0001@users.noreply.github.com> | 2026-08-03 15:11:55 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-03 15:11:55 -0300 |
| commit | aba252206bf39ac81e6627354062c28fae05b0aa (patch) | |
| tree | 751691f0baaf925c54a2c03f9f02ca87fb29956f /src/walletcmd.h | |
| parent | 1aee805b232a33484e3db1dc8ea4bfb3f585212e (diff) | |
Activate BIP44 wallet derivation (#124)
* Add BIP32 path derivation foundation
* Add HD wallet schema metadata
* Add provisional BIP44 coin type metadata
* Activate BIP44 wallet derivation
* wallet: scan BIP44 restore depth per branch
* wallet: widen default BIP44 restore lookahead
---------
Co-authored-by: Gilcimar Duarte <ti@gpm.infra>
Diffstat (limited to 'src/walletcmd.h')
| -rw-r--r-- | src/walletcmd.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/walletcmd.h b/src/walletcmd.h index 69874e4..32d3eef 100644 --- a/src/walletcmd.h +++ b/src/walletcmd.h | |||
| @@ -32,6 +32,15 @@ bool RestoreFromPhrase(const std::string& strMnemonic, | |||
| 32 | int& nRecoveredRet, | 32 | int& nRecoveredRet, |
| 33 | int& nDerivedRet); | 33 | int& nDerivedRet); |
| 34 | 34 | ||
| 35 | // Restore scans stop only after the requested depth is reached. BIP44 has more | ||
| 36 | // than one branch, so the depth has to be satisfied per branch, not by summing | ||
| 37 | // receive + change + compatibility keys. | ||
| 38 | bool RestoreScanReachedDepth(int nSchema, | ||
| 39 | unsigned int nReceiveNext, | ||
| 40 | unsigned int nChangeNext, | ||
| 41 | unsigned int nLegacyNext, | ||
| 42 | int nStopDepth); | ||
| 43 | |||
| 35 | // Take the next address from the key pool and print it. With a recovery phrase | 44 | // Take the next address from the key pool and print it. With a recovery phrase |
| 36 | // installed the address is derived, so the phrase can bring back whatever is | 45 | // installed the address is derived, so the phrase can bring back whatever is |
| 37 | // paid to it. | 46 | // paid to it. |