Learning Bitcoin
NOTE: This is a draft in progress, so that I can get some feedback from early reviewers. It is not yet ready for use.
Copyright
Unless otherwise noted, the contents of this repository areCopyright ©2017 by Christopher Allen <ChristopherA@LifeWithAlacrity.com> and are licensed CC-BY.
Introduction
The best way to learn to learn deeply about bitcoin is to avoid GUIs (even bitcoin-qt), and instead learn it from the command line.
Requirements
This tutorial assumes that you have some minimal background of how to use the command line interface. If not, there are many tutorials available, and I have one for Mac users at https://github.com/ChristopherA/intro-mac-command-line
Files
PART ONE: PREPARING FOR BITCOIN
PART TWO: BITCOIN-CLI
- 3.0: Understanding Your Bitcoin Setup
- 4.0: Creating Basic Bitcoin Transactions
- 5.0: Controlling Bitcoin Transactions
- 6.0: Expanding Bitcoin Transactions
PART THREE: BITCOIN SCRIPTING
- 7.0: Introducing Bitcoin Scripts
- 8.0: Embedding Bitcoin Scripts in P2SH Transactions — Needs Edit
- 8.1: Understanding the Foundation of P2SH — Needs Edit
- 8.2: Building the Structure of P2SH — Needs Edit
- 8.3: Running a Bitcoin Script with P2SH — Needs Edit
- 8.4: Scripting a Multisig — Needs Edit
- 8.5: Testing a Bitcoin Script — Needs Edit
- 8.6: Spending a Transaction with a Bitcoin Script — Awaiting API Work
- 9.0: Empowering Timelock with Bitcoin Scripts
- 9.1: Understanding Timelock Options — Needs Edit
- 9.2: Using CLTV in Scripts — Needs Edit
- 9.3: Using CSV in Scripts — Needs Edit
Planned Future Work
- 10.0: Expanding Bitcoin Transactions with Scripts
- 10.X: Understanding Conditions in Scripts
- Verify
- If
- DOn't know inputs (in unlocking!)
- 10.X: Easy Examples https://medium.com/@alcio/non-standard-p2sh-scripts-508fa6292df5
- 10.X: Scripting Multigs by Hand
- Complex 1 or 1 OR 2 of 3 [corporation]
- Escrow: 2 of 3 (A | B | E); then 2 of 2 (AE) OR 2 of 2 (BE); then 2 of 2 (AE) OR 2 of 2 (BE) OR 2 of 2 after time-delay (AB)
- 10.X: Programming Complex Scripts
- BIP 112: Lightning
- Peg-in Chains?
- 10.X: Understanding Conditions in Scripts
** PART FOUR: BITCOIN APIS **
- 11.0: Talking to Bitcoind
- 11.1: Accessing Bitcoind with Curl
- 11.2: Accessing Bitcoind with JavaScript
- 11.3: Accessing Bitcoind with C
- Watching Bitcoin Addresses in C?
- 12.0: Programming with LibWally
- 12.1: Programming Transactions
- 12.2: Programming Scripts
- 13.0: Programming with secp256k1
** PART FIVE: BITCOIN FUTURES **
- 14.0: Setting Up a Bitcoin Regtest
- 14.1: Building the Regtest
- 14.2: Testing with Regtest
- 14.3: Mining with Regtest
This is probably all a future section on Elements.
-
X.0: Introducing SegWit
- X.X Scripting a Pay to Witness
-
X.0: Introducing Elements
-
X.0: Individual Elements
-
Appendix: Compiling Bitcoin