BTC locking and unlocking scripts Cheatsheet
I have spent quite a lot of my spare time in the last couple of years self-studying Bitcoin and open, public, borderless, neutral, censorship resistant blockchains world. I really look at the ledgers industry in admiration, not only from a technological and multidisciplinary point of view but mostly as a source of deep inspiration about freedom and about a different way of being an IT professional: a way which seems to bring us back in time, when informatics was mainly a geek affair and the power and opportunities apparently relied on tech skills of people keen of what they were doing, not on business goliaths… maybe a naive memory, but also a reassuring one. I don’t miss the point that huge businesses are growing also in this field, and I don’t demonize it tout-court, nevertheless I think there is still space for a “romantic” approach, full of hopes for a more ethic order of things.
So, becoming an active part of this world, I hope to give back something to the community from which I think to have gotten a lot: it’s a cheatsheet, originally hosted as PDF on my GitHub, about Bitcoin locking and unlocking scripts. I edited it from my self-study hand-written notes, trying to recap in a compact way the similarities and the differences between legacy and Segwit, and how they combine in P2SH(P2W*). I have also added some references/credits in the end, to permit you to go deeper by yourself, and to thanks the many teachers I have “met” during this ongoing journey.
Hope you’ll find it as useful as I did writing it.
November 13th, 2020 EDIT
If you like this kind of stuff, I have created a cheatsheet about Monero addresses as well, check it out!