This is a tutorial for working with Bitcoin (and Lightning) that teaches direct interact with the severs themselves, as the most robust and secure way to begin cryptocurrency work.
NOTE: This is a draft in progress, so that I can get some feedback from early reviewers. It is not yet ready for use.
Unless otherwise noted, the contents of this repository are Copyright ©2018 by Christopher Allen @ChristopherA <[email protected]> and are licensed CC-BY.
Role | Names |
---|---|
Lead Authors: | Christopher Allen @ChristopherA, Shannon Appelcline @ShannonA |
Contributors: | |
Reviewers: | Glen Willem @gwillem |
Sponsors: | Blockstream Corporation |
The best way to learn deeply about bitcoin is to avoid GUIs (even bitcoin-qt), and instead learn it from the command line.
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
PART ONE: PREPARING FOR BITCOIN
PART TWO: BITCOIN-CLI
- 3.0: Understanding Your Bitcoin Setup
- 4.0: Sending Bitcoin Transactions
- 4.1: Sending Coins the Easy Way
- 4.2: Creating a Raw Transaction
- 4.3: Creating a Raw Transaction with Named Arguments
- 4.4: Sending Coins with Raw Transactions
- Interlude: Using Curl — Needs Rewrite for New Section
- 4.5: Sending Coins with Automated Raw Transactions
- 4.6: Creating a Segwit Transaction — Awaiting Better Integration of Segwit into CLI
- 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
- 9.0: Empowering Timelock with Bitcoin Scripts
- 10.0: Expanding Bitcoin Scripts
- 11.0: Designing Real Bitcoin Scripts
PART FOUR: LIGHTNING-CLI
This section is unwritten currently, and will probably involve chapter 14.0 expanding into at least two chapters.
- 12.0: Setting Up TOR
- 13.0: Setting Up Lightning
- 14.0: Using Lightning
PART FIVE: BITCOIN & LIGHTNING PROGRAMMING
This section is currently a messy set of older writings which are being reorganized as listed below. We're not going to work through this section until we've got chapters 1-11 updated per our current notes, then 12-14 written. But, if you'd like to see what we have to date on programming in correlation with Bitcoin Core, please feel free.
- 15.0: Talking to Bitcoind with C — Needs Rewrite + Editing
- 15.1: Accessing Bitcoind with C — Needs Rewrite
- 15.2: Programming Bitcoind with C — Needs Rewrite + Editing
- 15.3: Receiving Bitcoind Notifications with C — Pending
- 16.0: Talking to Lightningd with C
- 17.0: Programming with LibWally
- 17.1: Using secp256k1 Functions
- 17.2: Writing Wallet Functions
- 17.3: Integrating Libwally and Scripts
- 18.0: Talking to Bitcoind with Other Languages
- 18.1: Accessing Bitcoind with_Node_JS — Needs Rewrite + Editing
- 18.2: Accessing Bitcoind with Python — Needs Info form PR + Expansion + Editing
- 18.3: Accessing Bitcoind with Java — Needs Rewrite + Editing
APPENDICES
Appendix I: Compiling Bitcoin
Appendix II: Using Bitcoin Regtest
- A2.0: Setting Up a Bitcoin Regtest — Needs Rewrite + Editing
- A2.1: Starting the Regtest — Needs Rewrite + Editing
- A2.2: Mining with Regtest — Needs Rewrite + Editing
- A2.3: Testing with Regtest — Needs Rewrite + Editing
- [why is Regtest important if you're compiling it yourself?]