> >

Miniscript

Miniscript is a subset of Bitcoin Script introduced by Blockstream in 2019 that imposes a tree structure on scripts for safer, more extensible smart contracts on Bitcoin.

Miniscript is a structured, composable language designed to simplify the creation, analysis, and security verification of complex spending conditions. Compared to raw Bitcoin Script, it allows developers to write more understandable and analyzable scripts and create more sophisticated applications, including advanced multisig wallets and multi-party escrows.

For example, Miniscript can be used to create an escrow that requires signatures from multiple parties under different conditions: a transaction that can be spent by either A and B together, B and C after a certain time, or A and C after a longer time.

An example of this in the real world is when payment to a contractor is only released after both the client and a third-party inspector sign off on the completion of the work. Another example is in an inheritance situation where funds are released to the heir only after a certain period but can be accessed earlier if multiple trustees agree.

For a deeper understanding of Miniscript, we recommend reading this resource provided by Blockstream Research.