Chapter 12: Embedding Bitcoin Scripts in P2SH & P2WSH Transactions
Bitcoin Script moves down several levels of abstraction, allowing you to minutely control the redemption conditions of Bitcoin funds. But, how do you actually incorporate those Bitcoin Scripts into the transactions you've been building to date? The answer is a new sort of Bitcoin transaction, the P2WSH (formerly: the P2SH, which we'll also meet along the way).
Objectives for This Chapter
After working through this chapter, a developer will be able to:
- Design a P2SH Transaction
- Apply a P2SH Bitcoin Script
- Design a P2WSH Transaction
Supporting objectives include the ability to:
- Understand the P2SH Script
- Understand the P2WSH Variation
- Understand the Multisig Script
- Understand How to Spend Funds Sent to a P2SH or P2WSH