Andreas M. Antonopoulos: Advanced Bitcoin Scripting
Why Bitcoin Stack Exchange recommends it
Bitcoin Stack Exchange users link it when explaining how Script conditionals like IF/ELSE work and as a companion to Antonopoulos's book on Bitcoin programming.
Recommended by 2 people across 2 different months, 2017 to 2020.
What it is
A 93-minute talk by Andreas M. Antonopoulos, author of Mastering Bitcoin, at the SF Bitcoin Developers meetup on Bitcoin Script. It covers flow control, branching redeem scripts, guard clauses and time locks.
What people said
Recommends pebwindkraft · 2018-03 · Bitcoin Stack Exchange · on “How do I fix my check-multisig if-else output script?”
~30min in the Video Andreas explains the „IF“ handling of script. There must be a value before the IF statement. Either 1 for the If-branch or a 0 for the else branch. [this video]
Recommends Michael Folkson · 2020-10 · Bitcoin Stack Exchange · on “Is there a reference, authoritative resource or book on Bitcoin programming?”
I was asked by Hasan Hasan, a junior developer, which of the following three books I'd recommend. Personally I think all three books are fantastic (I would recommend them all) but they do approach the topic from very different angles. Mastering Bitcoin (2nd edition, Andreas Antonopoulos) was the first technical Bitcoin book to be published. The 2nd edition was published in 2017 so there may be some outdated details but the vast majority should still be accurate today. It does have some chapters on concepts but not as comprehensively as Grokking Bitcoin (see later). It will provide instructions for configuring a Bitcoin Core build from the command line and contains a lot of Python code exampl
Cites Monstrum · 2017-12 · Bitcoin Stack Exchange · on “What is P2PK, P2PKH, P2SH, P2WPKH - ELI5”
P2PKH: "Pay To Public Key Hash" This is how transactions are made. You are requiring the sender to supply a valid signature (from the private key) and public key. The transaction output script will use the signature and public key and through some cryptographic functions will check if it matches with the public key hash, if it does, then the funds will be spendable. This method conceals your public key in the form of a hash for extra security. P2PK: "Pay To Public Key" This is similar to P2PKH; the difference is that it does not conceal your public key. Anyone using this method to send funds over the P2P network is showing people their public key in the transaction details. P2SH: "Pay To Scr