Comment on page
Download the bitcoin whitepaper
Download the Bitcoin white paper PDF directly from the blockchain data on your own node and witness the power of a decentralized network to fight censorship.
The Bitcoin white paper PDF was encoded in the blockchain in April 2013, in the transaction
The transaction contains 947 outputs and the sender spent almost 60 million sats as miner fee! Some explanations of how the paper is encoded in the transaction are given in a Bitcoin StackExchange post from 2015.
This guide explains how to reconstruct the Bitcoin white paper PDF using your own verified blockchain data. No matter how censored the white paper could become (see this article about white paper copyright claims), you will know how to recreate and share the foundational document of Bitcoin.
jq, a JSON processor that will be used to parse the transaction data
$ sudo apt update && sudo apt full-upgrade
$ sudo apt install jq
- With the
adminuser, go to the temporary folder
$ cd /tmp
bitcoin-clito download and create the PDF
$ bitcoin-cli getrawtransaction 54e48e5f5c656b26c3bca14a8c95aa583d07ebe84dde3b7dd4a78f4e4186e713 true | jq -r '.vout.scriptPubKey.asm' | cut -c3- | xxd -p -r | tail +9c | head -c 184292 > bitcoin.pdf
- Check PDF was correctly created
$ ls -la bitcoin.pdf
> -rw-rw-r-- 1 admin admin 184292 Jul 25 21:08 bitcoin.pdf
Here's how the long command from above actually works:
bitcoin-cli getrawtransaction, you get the raw data of the transaction with this specific transaction id. This command returns the result as a JSON object.You can run
bitcoin-cli help getrawtransactionto learn more.
- The result is handed over ("piped") to the next command:
jq -r '.vout.scriptPubKey.asm'. This instruction extracts the assembly data from the "scriptPubKey" for all transaction outputs, where the Bitcoin whitepaper data is stored.Run
jq --helpfor more information.
- The result is then piped into the
cut -c3-command, which cuts off the first two characters on every line.Check out
cut --helpto learn more.
- The command
xxd -p -rtakes the previous result as input and converts everything from hex into binary encoding.Run
xxd --helpfor more about this command.
tail +9coutput the data starting with the 9th byteUse
tail --helpit to learn more.
- Finally, the data is piped into
head -c 184292. This command sends the first 184292 bytes onwards.Run
head --helpfor more information.
- The argument
> bitcoin.pdfthen takes the whole data input stream and stores it in the file "bitcoin.pdf".
This concatenation of simple commands is a shining example of one of the core principles of Linux. The character
|allows us to string them together to create powerful yet efficient data processing.
- macOS or LinuxOn your local computer, open a terminal window and type the following command. Replace YourNodeIP with the MiniBolt IP address (or
minibolt.localif it works) and do not forget the dot at the end of the line (representing the destination of the file, here the 'Home' folder of your local computer)
$ scp admin@YourNodeIP:/tmp/bitcoin.pdf .
$ pscp admin@YourNodeIP:/tmp/bitcoin.pdf .
- The file should now be located in the Home folder of your local computer.
🚨 Privacy warning: Using this method will leak your IP address to the Telegram server.
- Send the white paper to your bot (replace YourChatID and YourBotID by respectively your chat and bot ID obtained from the previous step). It might take a few seconds
$ curl -v -F "chat_id=YourChatID" -F document=@/tmp/bitcoin.pdf https://api.telegram.org/botYourBotID/sendDocument
- The PDF should now be available for download in your Telegram bot
The BTC-RPC-Explorer has also a functionality to extract the data from the node and display the PDF in the web browser.
- Look up the transaction ID in explorer:
- Click on the link "bitcoin whitepaper" in the top box, this will generate the PDF from the node blockchain and displays it as a pdf file in the browser