The failure of a computer, drive, or Sparkswap daemon, although unlikely, is a real risk when using cryptocurrencies and can unfortunately lead to the loss of funds if preventative steps are not taken. During the setup of your Sparkswap broker, you created a backup of your wallet, which can protect you against computer failures and many human mistakes.
The following guide will run you through the steps of using this backup for recovering a wallet on a Sparkswap platform. Currently, this method will only recover funds that are on-chain and not funds committed to the Relayer. However, enhancements are being made to the Lightning Network software and protocol to make committed fund recovery possible.
Recovering Funds from LND
The instructions below will assume that you are trying to recover a single currency (BTC) wallet, however these steps should be interchangeable for any currency that was used on the Sparkswap exchange. These steps are only supported for the lnd engine engine type.
Before You Begin
- Have your recovery cipher seeds available that were generated during the Setting Up Wallets steps.
- On a new Sparkswap installation, execute the following command to log into your BTC LND node.
docker-compose exec lnd_btc bash
- From this bash shell, you can run the following command to start the recovery of a wallet:
lncli -macaroonpath=/shared/lnd-engine-admin-btc.macaroon -tlscertpath=/shared/lnd-engine-tls-btc.cert create
- Input a wallet password
Input wallet password: Confirm wallet password:
This password should be a NEW password for your wallet.
- Enter your recovery cipher seed
Do you have an existing cipher seed mnemonic you want to use? (Enter y/n): y
When prompted for an existing cipher see, enter
y into the prompt. You will then be asked to input your cipher seed, each word separated by spaces.
Input your 24-word mnemonic separated by spaces:
The format should look like the following:
about leg sugar river surround spread burden same ...
Once the seed is entered, you will then be prompted for your passphrase:
Input your cipher seed passphrase (press enter if your seed doesn't have a passphrase):
Leave this option blank and hit enter to continue. You will then be prompted for an optional address look-ahead value:
Input an optional address look-ahead used to scan for used keys (default 250):
If you think you have generated more than 250 addresses on your broker daemon (using
sparkswap wallet new-deposit-address) then you will need to change the optional address look-ahead number to a higher value.
At this point, your node will sync with the blockchain. This may take between 24/48 hours. After your node is synced you will see your balance which should contain all on-chain funds.