So you've heard about bitcoin? Ever wondered what's going on with the data in a transaction, or how bitcoin gets locked up and transferred from one holder to another? Are you a programmer, developer, or engineer? This course is for you! We'll get you programming your first bitcoin transactions in no time.
This course by Base58 instructor niftynei, will take you on a deep dive of the fields, bytes, and scripts that make up the bitcoin blockchain data. In an software engineer focused manner, we'll go over everything you need to know to build your own bitcoin transaction parser, write your very own custom bitcoin locking scripts, and adapt your transactions to the modern SegWit format. This class will get you started in bitcoin development. Go farther, faster with Base58!
Step 1: Intro to bitcoin transactions
We'll start off learning about what a bitcoin transaction is. Specifically, what fields do they contain? We learn how to calculate a transaction id and what transaction fees are, and how are they calculated. Finally, we'll talk about coinbases and block rewards.
Topics: transaction fields, endianness, transaction ids, fees + transaction weights, coinbases
Step 2: Enter Script
In week two we start talking about Bitcoin's native "programming language": Script! We'll write our own script this week (and learn about hashes and preimages). Once we've written a script we'll try locking some bitcoins up to it, as well as unlocking them.
Topics: Script, standard scripts, P2SH, opcodes
Step 3: Transacting with SegWit
Now that we've seen how transactions are constructed and built, we'll introduce the bitcoin omnibus update bill, the SegWit soft-fork. SegWit impacted the structure of a transaction and its fee calculations, so we'll dive into how these updates work and two of the 'new' SegWit script types: P2WSH and P2SH-P2WSH.
Topics: SegWit! P2WSH, P2SH-P2WSH