Completely Offline Bitcoin Transactions
With the advent of Blockstream Satellite and widely broadcasted, passively-receivable Bitcoin data, a new era of Bitcoin adoption can occur. Areas without access to fast broadband connections can now trustlessly verify Bitcoin blocks and transactions, and receive BTC discreetly with common cheap hardware. With the Satellite API, those same areas can now receive arbitrary data — current market data, private messages, and data from exciting new use cases not thought of yet. All free. The broadcasts are free and the software is free with code available for auditing and improvement by the community.
For the first time, most of the planet’s population can receive bitcoin using their own fully validating nodes without expensive data plans. But how do they send bitcoin? There are a few cheap and accessible ways to do so. Transactions can be broadcasted via SMS, by mesh networking devices, and even sneakernet (simply transporting the signed raw transaction data on a flash drive or printed QR code).
GoTenna sells a simple to use mesh networking device, which along with a piece of software called TxTenna can broadcast Bitcoin transactions to a local mesh network of GoTennas. There is also growing interest and work being done on LoRaWAN — a similar mesh networking technology.
With this hardware setup, anyone can send and receive bitcoin without an internet connection. It’s resistant to network outages and can also maintain uptime through power outages since all of the hardware is run off batteries. The hardware can of course be run off of gasoline generators or solar panels if the power outage is longer lasting.
In this tutorial we will be using the following:
- Blockstream Satellite Receiver
- GoTenna Mesh
- Android device (I used a cheap $30 Coolpad)
- A hardware wallet (optional)
- Linux (Ubuntu 18.04 used here)
- Electrum Personal Server
- Electrum Wallet
sudo apt install qrencode) to generate QR codes
- TxTenna smartphone app
Going Offline 🛰
To start, a Blockstream Satellite Receiver is required for passively receiving Bitcoin data without an internet connection. There is comprehensive documentation here, along with the guide I wrote a couple years ago:
Once the satellite receiver is setup, you can begin to install Electrum Personal Server and Electrum Wallet:
Maximally lightweight electrum server for a single user - chris-belcher/electrum-personal-server
Initializing a Hardware Wallet
If you want to use a hardware wallet, Electrum supports most of the popular offerings: Trezor, Ledger, Coldcard, and possibly even OpenDIME.
For this tutorial / demo, I used a Trezor Model T.
Trezor’s blog has a great tutorial for initializing a hardware wallet here:
Now you should have a completely off-the-grid Bitcoin node and wallet; capable of receiving BTC and validating blocks. 🛰
Outbound Transaction Broadcasting
Now we want to spend some of our BTC. With available tools and software, we can broadcast a signed raw transaction via a local mesh network.
GoTennas have a range of up to 4 miles depending on your local geography and “density” — forested areas or urban areas with buildings will reduce the range of the GoTenna. There are ways to modify the GoTenna to attach external antennas for longer range communications. Note that you can broadcast transactions multiple times if you don’t succeed the first time. You could also always save the raw transaction onto your mobile device and carry it to a location where you’re within range, or fall back to broadcasting via SMS.
Combining GoTenna hardware with a piece of software called TxTenna enables Bitcoin transaction broadcasting and relaying without cellular network nor WiFi connectivity. TxTenna also supports transaction relay via SMS.
Simply download the TxTenna app on your Android smartphone using Google Play or other means, and pair your GoTenna with Bluetooth.
Signing Bitcoin Transactions Prior To Broadcasting
Using Electrum Wallet, Bitcoin transactions can be signed with a hardware wallet device and saved locally to be converted into a QR code. To do so, sign the Bitcoin transaction with Electrum like you normally would, but don’t broadcast it with Electrum.
This transaction is spending BTC to an address broadcasted globally via Blockstream Satellite by the anonymous “Post Soviet”:
Sign the transaction.
Once signed, you can click “Copy” at the bottom left of the Electrum UI to copy the raw transaction hex in order to generate a QR code.
Now generate a QR code with the following command:
$ qrencode <paste raw tx data here> -o signedtx.png
Then display it with your GUI:
$ display signedtx.png
Now you’re set to scan the QR code with the TxTenna app and broadcast it to your local mesh network where it will eventually make its way to the TxTenna API endpoint.
Scan the QR code with TxTenna and broadcast it via GoTenna Mesh:
The transaction is now broadcasted to the mesh network!
Once the transaction is included in a block, your offline satnode will display the transaction in Electrum Wallet.
To clarify what just happened:
I run a Blockstream Satellite Receiver which receives Bitcoin data and arbitrary data broadcasted by the Satellite API. An anonymous person in some undisclosed location broadcasted a journal and BTC address.
Using their BTC address, I generated an offline transaction with my satnode, signed it with a hardware wallet, and finally broadcasted it outbound to my local mesh network. The transaction was included in a block, beamed down from space, and my satnode verified the data. Electrum Wallet displayed the transaction as confirmed!
No expensive internet subscription required. 🏄♂️
Thanks for reading!