Author: Daniel Robinson 2018-02-21 00:59:45
Published on: 2018-02-21T00:59:45+00:00
A user named Praveen Baratam posted a question on the bitcoin-dev mailing list, seeking clarity about how OP_CHECKSEQUENCEVERIFY (CSV) works in transactions. In his question, he included an image that depicts multiple CSV endpoints with different conditions at different delays. He wanted to know if this can be achieved using OP_CHECKSEQUENCEVERIFY. The functionality of Bitcoin Script allows for nested IF statements and enforcement of different conditions in each branch. A contract written in Ivy was provided as an example, which compiles to Bitcoin Script. The contract, called MultiCSV, has three clauses for bobSpend, carolSpend, and bothSpend. Each clause has its own set of conditions that must be met before unlocking the value.
Updated on: 2023-06-13T00:48:33.123435+00:00