The Bitcoin Spellbook

This is a collection of Bitcoin tools: 5 APIs and 3 webservices, along with some useful snippets of code relating to BIP44 HD-wallets that I mainly wrote for developers like myself. APIs are websites that give specific information based on certain parameters. Webservices are configurable websites that actually do something when a certain address receive Bitcoin.

I have tried to make these tools more accessible to everyone, not just developers. I have provided a simple webpage for each tool so even people without coding skills can use them.

Keep in mind though that the Bitcoin Spellbook is intended in the first place as a python library, I made these webpages only as a quick demo.

Since only developers would take the time and effort to read the API documentation, I thought it would be fun to try a different approach to make these tools more interesting to non-developers by making these tools in the format of a magic spellbook, where each chapter is a magic spell or an enchantment. Instead of a boring explanation of what each tool does, I have written it as if a wizard is teaching his tricks to an apprentice. After all, Bitcoin is magic internet money, so the theme fits nicely. And if you think about it, there is little difference between a programmer and a wizard.

I created these tools with the following design principle in mind: All the tools in the Bitcoin Spellbook only use standard functionality of the Bitcoin protocol that is supported by all wallets. So nothing fancy like OP_RETURN or colored coins. Just plain transactions that anyone can send with their favorite wallet. Even though this limits the possibilities a lot, I have still been able to create many useful tools within these constraints.

To achieve this, I’m using the Bitcoin protocol in a few creative but very simple ways, for example by using the last digits of the value to indicate a choice.

Another trick I’m using a lot in this spellbook is something I call a “PrimeInputAddress”, this is one of the input addresses of a transaction that is used as an identifier for the sender of the transaction.

Most transactions have multiple input addresses, and picking one of them to identify the sender is not a trivial thing. There are many ways to choose, for example picking the one with the highest input value, but what if there are more than one with the same value? Another method would be to just pick the first input address, but since most wallet software determines the order of the inputs that would create unpredictable results.

So I have decided on a much simpler way to choose one of the input addresses as a PrimeInputAddress: just pick the one that comes first alphabetically, regardless of the value. This way there is a very simple method to always be sure you are sending a transaction with a specific PrimeInputAddress: just use an old fashioned single address account.


FOLLOW ME