Stellar are giving away some of their cryptocurrency, Lumens, to anyone who owns Bitcoin.

To get the Stellar, you need to prove you own the Bitcoin by providing your Bitcoin address(es) and then signing a message to prove you control that address.

I’ve used a lot of addresses, over time, so figuring out which of these addresses I need to provide can be time-consuming.

Bash to the rescue;

To use this, I first export a CSV of all the bitcoin transactions I’ve ever done. Then I run the script like this;

./ tx.csv

…where tx.csv is the filename of my exported transaction data.

The script works through all the addresses I’ve ever interacted with, and looks up the details for that address on

NB: I included both sent and received transactions, because sometimes I’ve sent bitcoin to another wallet address, so it’s useful to find out the balance of addresses I’ve sent bitcoin to as well as bitcoin I’ve received. Be aware that if you’ve sent BTC to someone else, this script will show you their current bitcoin balance, if they haven’t sent the funds on to another address.

Blog Logo

David Salgado



Ronin on Rails

Give a man a fish and he’ll eat for a day.
Give a fish a man and he’ll eat for weeks.

Back to Overview