I know that in the case of electrum there is a gap limit and it will keep generating addresses until it finds a number of consecutive empty addresses equal to the gap limit.

What about if I want to recover my wallet using my seed offline, suppose that electrum servers are not working and I want to recover my wallet. How can electrum know when to stop generating addresses noting that it has no access to the blockchain since the servers are down.

2 Answers
2

Let's next assume that when you first configured your BIP-39 compliant HD wallet it provided you the following set of words to be used to reconstitute your master seed: small cereal crazy ahead move never galaxy draft draw plunge sort identify embark clerk hard wagon clever torch cruel income episode any debris puppy. Additionally, let's also assume the wallet requested that you enter an additional BIP-39 related salted password that will be set to I'mAbadASS for discussion purposes.

A 512 bit root seed m could be obtained for the situation above by issuing the following bitcoin-explorer (bx) command:

BIP-44 compliant HD trees use the m/purpose'/coin_type'/ account'/change/address_index convention to derive private keys and associated addresses. Let's then assume the wallet only has one account 0. For the Bitcoin the coin_type the private key tree would look like m/44'/0'/0'/c/i where c can be 0 or 1 and i is an index used to synthesize the i-th extended private key, i-th extended public key or address.

Then determine if any funds have been sent to the address above by issuing % bx fetch-balance 1BLQ28VdYxJ4Y89fjpbNP5ihUvy2hMkGgq on a computer attached to the Internet or have a very fresh bitcoin-server full node server available for your bx on your private computer that is offline.

If funds are present, to obtain the private keys to import into another wallet try:

The qrencode command can receive the piped text output immediately above to synthesize a QR image for a smart cell phone or tablet based wallet to easily import from an offline key synthesis computer that retains a network air-gap.