A spending rule you can reason about
A normal wallet might require one signature. A wallet might require two out of three. Miniscript lets software work with more structured combinations: two keys together now, or a separate recovery key after a delay. It describes a supported subset of Bitcoin Script in a form that software can analyse and satisfy.
Miniscript is not a new coin, blockchain, custodial service or general-purpose program running on Bitcoin. Bitcoin still checks the resulting script and transaction. A policy can add useful recovery options, but a poorly chosen option can also give someone spending authority earlier or more easily than you intended.
Start with the people and failure scenarios. Who should spend during normal operation? Who should recover if a key disappears? How long can you tolerate waiting? Only then choose software and a policy. More branches do not automatically mean more security.
Miniscript: design and analysis ↗
Make a recovery path become available
Try three policies. Remove keys, change the candidate block and compare relative with absolute locks. The diagram lights the conditions that are satisfied and traces a complete path only when every required condition on that branch is met.
These are symbolic examples, not spendable wallet configurations. Key buttons mean “a valid signature from this key can be supplied”. The example assumes correct transaction fields and no other script constraints. It does not generate keys, compile scripts, estimate fees or create transactions.
Choose who can spend
Choose the rule before funding. A recovery route grants spending authority.
Choose the rule before funding. A recovery route grants spending authority.
Inspect the details
Symbolic Miniscript · not an importable descriptor
Symbolic P2WSH Miniscript. The multi() examples are not Tapscript expressions or importable descriptors.
or_d(multi(2,A,B),and_v(v:pk(C),older(12)))Check your understanding
When the recovery delay passes, do the coins move automatically?
Symbolic model: A/B/C are placeholders, not public keys. Assumes correct version, locktime, sequence and signatures. No compiler, address generation, fee estimation or real signing.
Policies combine signatures and time. Opening recovery does not close the primary path or transfer funds. Back up the policy and keys and test the signing software.
Policy, Miniscript, Script and descriptor
The policy is the intention: A and B together, or C after a delay. A policy compiler can choose a Miniscript expression implementing that intention. Miniscript fragments have defined types and properties, which enable checks that are difficult with arbitrary hand-written scripts. The resulting Bitcoin Script is what the network executes.
A descriptor adds the output type and key derivation information around that spending script. It is part of the wallet’s recovery information. “I have the seeds” and “I can reconstruct the correct outputs and spend them” are different claims. The explainer shows symbolic Miniscript with A, B and C placeholders, not a descriptor you should import.
Miniscript organises spending conditions, while multisig is one possible condition. A 2-of-3 policy allows any two signatures; a delayed recovery branch adds another way to spend. In a Taproot wallet, the output tree and any key-path spending route must also be considered. Analysing a single script leaf does not establish the security of the entire wallet.
BIP 379: Miniscript ↗ · BIP 380: descriptors ↗
Alternatives stay alternatives
Consider (A AND B) OR (C AND delay). Before the delay, A and B must cooperate. Afterwards, C can also spend alone. The original A-and-B route does not stop working when C’s route opens. Whichever valid transaction confirms spends the output; the policy does not reserve the funds for the person you consider morally entitled.
For a different balance, A might spend alone while B and C together form a delayed recovery route. A basic 2-of-3 threshold is another option, with no time condition. Test each key-loss combination and each unwanted coalition. A recovery key is spending authority, not a harmless password-reset token.
Miniscript: design and analysis ↗
Two clocks, different meanings
A relative timelock measures age from the confirmation of the output being spent. In the block-based example, an output confirmed at height 840000 with a 12-block relative lock can be included in a spending transaction at height 840012 or later. The example slider selects the candidate block, not a wall-clock estimate.
An absolute height lock refers to a shared chain height. With nLockTime set to 840012, a transaction is eligible for inclusion only in a later block, so our example first permits it at 840013. It also needs an appropriate non-final input sequence. Relative locks require suitable version and sequence fields. Time-based locks use consensus time rules, not your phone clock.
Neither kind of lock transfers funds automatically. It only limits which transactions can be valid. Someone still needs the right keys and script data, must build and sign the transaction, pay fees and get it confirmed. A block interval is variable, so a delay in blocks is not an exact appointment.
BIP 68: relative locktime ↗ · BIP 112: CHECKSEQUENCEVERIFY ↗ · BIP 65: CHECKLOCKTIMEVERIFY ↗
Inheritance without magical assumptions
A delayed recovery path can help an heir or a backup signer, but Bitcoin does not detect death, incapacity, legal entitlement or whether a device was lost. It sees signatures and transaction conditions. Put the human instructions, access arrangements and legal planning alongside the technical policy.
A renewal spends an old output into a new one. A relative clock starts again at that new output’s confirmation; an absolute deadline stays fixed unless the new policy changes it. Renewal requires an available spending route, a fee and confirmation before the recovery route you want to avoid becomes usable.
What analysis can and cannot prove
Miniscript tooling can analyse supported scripts for properties such as satisfiability, witness requirements, resource limits and possible spending costs. The formal specification is BIP 379. Its document status and the existence of implementation support are separate questions: a Draft label does not mean nobody uses Miniscript.
Analysis does not know whether two supposedly independent keys share one backup location, whether a beneficiary understands the instructions or whether the hardware signer will display the policy clearly. It also does not turn all Bitcoin Script into Miniscript. Use the supported fragment set and the correct P2WSH or Tapscript context.
Fees and privacy depend on the path
Different ways of satisfying a policy can require different witness data and therefore different fees. Do not use a single ordinary-wallet input size for every recovery spend. Fee planning matters most when the unusual, larger path is the only one you can use.
A P2WSH spend reveals the witness script. A Taproot script-path spend reveals the executed leaf and its proof, not necessarily every alternative leaf; a key-path spend has different disclosure. Miniscript alone does not provide anonymity, hide transaction amounts or make a complicated wallet look identical in every spending case.
Use a wallet that supports the whole journey
Start with software that explicitly supports the policy, output type and signing devices you intend to use. Liana is one concrete place to study timelocked recovery. Bitcoin Core also documents Miniscript descriptor support, but protocol support is not a promise of a friendly setup screen or compatibility with every hardware signer.
On a supported test network, create the policy, verify its addresses on the signing devices, receive test coins and try each spending route. Check what happens before the delay, at its boundary and after it. Reconstruct the wallet from the recovery materials in another supported setup. Do not fund a policy merely because its diagram looks plausible.
Bitcoin Core: descriptor support ↗ · Liana ↗
The recovery kit is part of the design
Preserve the complete wallet descriptor or supported policy export, key origins and derivation information, enough independent key backups for the intended paths, and understandable instructions. Keep secrets separate from a general inventory. Public-only descriptors can reveal wallet activity; descriptors containing private keys can grant spending access.
Choose a delay that leaves time to discover problems and act. Make sure someone monitors the relevant outputs if the plan relies on renewal. If policy changes are needed, existing outputs keep their old spending rules until they are spent. Software cannot retroactively change a script already committed on-chain.
The useful outcome is a plan you can explain and rehearse: who can spend now, who can spend later, what each route requires, and what remains possible after a failure. Use the Multisig Lab for people and storage planning; use this guide to understand the conditions Bitcoin actually enforces.
BIP 380: descriptors ↗ · Liana: recovery ↗
Sources & further reading
Researched 14 November 2026. Implementation details can change.
