Home > Security

.  Published

Redeeming forked coins: Sweeping private keys and sweeping addresses


Image: What is sweeping with tutorial for Electrum deskop apps on Windows, Linux and Mac. Bread&butter image via Pexels.

Subscribe to the Altcoin Trading newsletter. (Newsletter Archive)


If you just want to know how to redeem Bitcoin Cash (BCH), jump to the relevant section here.

If you just want to know how to redeem Bitcoin Gold (BTG), jump to the relevant section here.

Sweeping

There are two different types of sweeping, both of which are useful for airdrops and forks.

What is “sweeping dust” vs “sweeping private key”?

Sweeping is a way to collect BTC from more advanced wallets like Electrum, if you have your coins spread around in multiple addresses within one wallet.

Forks

If you are anyone else in crypto other than a Bitcoin maximalist, you can make use of it for your own security when you are preparing to split coins after a fork that generated a new coin. Consider this a preparatory step when a fork is announced - it doesn’t have to be live yet. It doesn’t even have to be certain. It is just organizing your coins so that you can act faster when you need it.

What you do when you sweep addresses within your wallet is you move all your coins into a single address for a very low fee so that you don’t have to do that in a rush when you need it right now to send the coins away before you claim the forked coin.

Airdrops

Another instance where it comes handy is if you are linking an address for an airdrop – such as in the case of Byteball or Stellar airdrops. To get the airdropped altcoin you are required to link your BTC address in the Byteball wallet’s Transition bot chat. If you have swept your coins you will need to link one address only.

But a lot of people have small amounts of BTC per address and they might find it hard to move this “dust”, especially if the money comes from things like display advertising or faucets. Maybe you used different address for each of these sources, to keep check of the separate channels with the use of address labeling in Electrum. Consolidating or just moving the money got difficult because there is a lot of inputs attached to the history of the money, which makes the transaction big even though the monetary value of the money moved is small. In short, your wallet keeps nagging you to set higher fee, perhaps to the point where you spend all the money moved on the miner fee.

So that is it for sweeping dust.

Sweeping private keys is a different operation. By sweeping the keys you can send all the coins a private key “A” controls at the moment to an address that belongs to a private key “B”. It is a one off operation by which you can move coins from one wallet client (and its private key) to another (and its private key).

If you sweep private key you are moving the actual coins from one place to another - Electrum also has a function called “Import” which needs to be repeated every time you restore wallet from your seed phrase. With key sweeping, the swept coins change the private key they belong to so there is no need to ever repeat the process.

Key sweeping will cost you a transaction fee, like address sweeping – both the operations are transactions on the blockchain.

Which cryptocurrency wallets support sweeping?

You are looking for Electrum, the open source software wallet for Bitcoin.

As for hardware wallets - sweeping is currently not possible with Ledger Nano S - Ledger CTO u/btchip said earlier in 2017 sweeping has been long on a to-do list and that technically it is not difficult to code. Nonetheless, it is still not implemented.

How to sweep addresses in Electrum desktop app

Sweep addresses into a single one if you are preparing for an airdrop or fork and want to have all your money in a single address.

It can also be a question of management - maybe you keep monthly track records. Sweep addresses when you are done collecting your records.

  • If you don’t have the app, download it from https://electrum.org/ and import your seed to get access to your wallet.
  • Go to the tab “Addresses”.
  • Select all the addresses you want to spend from. To select multiple addresses at once, hold the CTRL key on Windows or Linux, or the CMD on a Mac.
  • With all addresses selected, right click into the selection and go for “Spend from”.
  • The wallet will redirect you to the “Send” tab but you can click on “Receive” to move there: At this point you are sending coins to yourself, so you need your receiving address.
  • Copy your receiving address and go back to “Send”, where you paste it in the “Pay to”.
  • Go to the field where you set your fee and set it to the lowest value possible: You are sending money to yourself and you are not in a hurry so it doesn’t matter if it takes a day or two to confirm. But still make sure you’ve checked “Replaceable” – if something changes, you will be able to replace-by-fee, in other words to pay higher fee to get the transaction through faster.
  • That’s it, broadcast the transaction. Note that in your history this will only show as the fee expense because you are not sending money out.

How to sweep private keys

Sweep private keys into a newly created wallet if you are moving coins out of your old wallet to claim forked coins or airdropped coins by sharing your seed with a third party app.

To sweep private keys you need two different wallets under your control - the one from where you are sending (“A”) and the one where you are sending (“B”)

  • Wallet A: Sweep coins into a single address, wait for it to confirm.
  • Wallet A: Export private keys - Wallet > Private Keys > Export. Copy the key to the address that holds the coins.
  • Wallet B: Sweep the key - Wallet > Private Keys > Sweep. Paste the key.

Claiming forked coins from a single address

If you have swept your coins into a single address prior to the chain split, to redeem the forked coins you need to work only with the one address that held coins before the split.

It is a slightly better way than importing the whole wallet seed – it is less confusing, less prone to human error, less messy.

However, Electrum will still warn you that exposing a single private key (key to one address only) can still expose access to the whole wallet. So before sweeping keys into forked coin clients you should still move your bitcoins to a new wallet, not just to a new address within your original wallet.

Preparing for a Bitcoin chain split with Electrum step by step

Prior to the fork:

  • Do this a few days before the fork to avoid high fees.
  • You can always check current fee rates in Sat/byte at bitcoinfees.earn.com. Typically the fees will be lower during weekends.
  • Sweep your addresses that have some money in them into a single one within your wallet, as described above.
  • For convenience it is best to label the address that holds all the coins.

After the (replay-protected) fork:

  • Move the coins to another wallet (wait for the transaction to confirm).
  • Install the forked coin wallet client, preferably on a virtual machine so that you can copy-paste but the two wallets are technically not on the same machine.
  • In Electrum, click “Wallet” > “Private keys” > “Export” and wait while the keys decrypt.
  • Copy the key for the address that held your coins pre-fork.
  • Open the forked coin client, such as Electron Cash for BCH, and sweep the key. It will always be in a similar place – something like “Main menu” > “Wallet” > “Private keys” > “Sweep”
  • Paste the private key of the single address and sweep it.

Is sweeping possible with other cryptocurrencies or only with Bitcoin?

There have been third party forks and so new versions of Electrum have been developed to support some altcoins as well but those are a different software. Electrum is not itself a multi-cryptocurrency wallet. Some of the altcoin forks don’t have much of the advanced functionalities of Electrum, they were stripped down to holding the coin only. In Electrum Stratis, for instance, you cannot choose the addresses to spend from. You do however the option to sweep private keys from another client.

Generally high fees are not a problem with most cryptocurrencies other than BTC and sometimes ETH. The fees also generally get lower during the weekends when the network activity is lower.


Safe splitting of coins after Bitcoin fork

Redeeming Bitcoin Cash from BTC that were in Electrum

  • Install the BCH wallet

The official BCH wallet app can be downloaded and verified from https://electroncash.org/. There is Windows, Linux, Mac and Android app available. Anything on app stores is potentially dangerous, and Electron Cash is not meant to be fully trusted either.

The best way is to download the Android APK on your Android phone that doesn’t have another Bitcoin wallet on it. If you don’t have an Android, on Linux you can use a virtual machine with Android OS and on Mac or PC an Android emulator https://www.andyroid.net/.

  • Export your old Electrum private keys

Old wallet: Wallet > Private Keys > Export

If you have swept addresses, you will only need the private key of the address that actually holds the BTC. You can copy it from the table Electrum generates.

  • Create a new Electrum wallet

You will need a new Electrum wallet where you move your BTC so that the private keys you will use for claiming the BCH won’t hold any BTC anymore.

Create a new Electrum wallet, encrypted one, with strong password. Write your seed on a piece of paper.

  • Sweep all BTC from your old Electrum wallet to the new one

New wallet: Wallet > Private Keys > Sweep

Wait for the transaction to have at least one confirmation. Do not proceed with this transaction unconfirmed!

  • Sweep the private keys into Electron Cash

Electron Cash: New Wallet > Import private key / I already have seed …

If you have swept addresses prior to the fork, you will only need the private key of the address that actually held the BTC during the chain split. You can copy it from the table old Electrum wallet generated.

If you didn’t sweep addresses before the fork, you need to import either all private keys or your seed phrase.

If you want to sell BCH, you can send your Bitcoin Cash to Bitfinex.


More about BCH »


 

 

Redeeming Bitcoin Gold from BTC that were in Electrum

Install the BTG wallet

There is no official BTG wallet app but there are several third party apps linked from https://bitcoingold.org/downloads/. Anything else on app stores is potentially dangerous, it is a good practice not to put too much trust in the linked apps either.

Coinomi would be the wallet of choice here because they have been around the longest time without any incidents. The best way is to download the Coinomi Android app from the Play Store on an Android phone that doesn’t have another Bitcoin wallet on it. If you don’t have an Android, on Linux you can use a virtual machine with Android OS and on Mac or PC an Android emulator https://www.andyroid.net/.

  • Export your old Electrum private keys

Old wallet: Wallet > Private Keys > Export

If you have swept addresses, you will only need the private key of the address that actually holds the BTC. You can copy it from the table Electrum generates.

  • Create a new Electrum wallet

You will need a new Electrum wallet where you move your BTC so that the private keys you will use for claiming the BTG won’t hold any BTC anymore.

Create a new Electrum wallet, encrypted one, with strong password. Write your seed on a piece of paper.

  • Sweep all BTC from your old Electrum wallet to the new one

New wallet: Wallet > Private Keys > Sweep

Wait for the transaction to have at least one confirmation. Do not proceed with this transaction unconfirmed!

  • Sweep the private keys into Coinomi

Coinomi: Click the dots to access top right menu > Sweep wallet

If you have swept addresses prior to the fork, you will only need the private key of the address that actually held the BTC when the chains were splitting. You can copy it from the table old Electrum wallet generated.

If you didn’t sweep addresses before the fork, you need to import either all private keys or your seed phrase.

If you want to sell BTG, you can send your Bitcoin Gold to Bitfinex.


More about BTG »


 


The information in this article comes as it is without any guarantees. You are responsible for your own security.

Join our Telegram group: altcointrading_net



Report typo or misinformation