-
Notifications
You must be signed in to change notification settings - Fork 94
How to fix non BIP32 compliant wallet?
Some wallets have lookahead value that's non-BIP32 compliant (larger than 20) due this this issue. Wallets with this problem will see incomplete account history and balance after import.
This solution requires:
- Bob Wallet 0.7.0-rc.2 (unreleased) or above
-
hs-client
(can be installed bynpm install -g hs-client
) -
hsd
(can be installed bynpm install -g hsd
) - Node.js v10 or higher
-
Save the file scan-and-fill-gap.js to a new directory.
-
Enter your API key from Bob Wallet to line 13.
-
Enter the wallet id you want to fix to line 14.
-
Execute the script by entering
node {NEW_DIRECTORY}/scan-and-fill-gap.js
. The script will scan your wallet for account gaps larger than 20, and then generate keys for your account gap in wallet db. It will also trigger adeepclean
+rescan
to temporarily fix your wallet. -
After you wallet is finished rescanning, you will find a file containing empty outputs in
{NEW_DIRECTORY}/empty-outputs.json
. This file contains outputs to all account addresses that needs to be filled in order to fix your wallet. -
Your wallet should now be restored after rescan is done - you will need to perform this after every import.
You wallet should be functional again after the steps above. We recommend transferring your balance and names to a new wallet after this fix is applied.