Miniscript
Miniscript is a structured representation of Bitcoin Script that makes complex spending conditions readable, analysable and safe to compose.
Bitcoin Script is powerful but hard to write correctly and securely. Miniscript offers a subset of Script with formal guarantees: you can express conditions like 'key A OR (key B AND time > T)' compositionally. Developers get static verification that their spending conditions hold, without hidden malleability or fee issues.
Example
An inheritance wallet wants: 'only I can always spend; after 1 year my kid + notary can also jointly spend.' In miniscript: or_d(pk(alice),and_v(v:pk(kid),and_v(v:pk(notary),older(52560)))) — compiles to safe Bitcoin script.
Frequently asked questions
Who uses miniscript in practice?
Wallets with advanced spending policies: Liana (inheritance wallet), Specter, Sparrow for custom multisig configurations, and institutional custody solutions needing complex signing schemes.
Related terms
Further reading
- → Our service: Bitcoin sector