An Introduction to Miniscript for Bitcoiners, Organizations, and Estate Planners
Control, flexibility, and future-proofing your bitcoin stack
Abhilash S Nair
October 19, 2025

Introduction:
Multisig (short for multi-signature) wallets have become a cornerstone of secure bitcoin custody, allowing users to require multiple signatures to authorize a transaction, thus mitigating single points of failure.
However, traditional multisig setups—such as 2-of-3 or 3-of-5—are inherently rigid. They don't allow time delayayed signing, addition or subtraction in minimum number of signers that could broadcast a transaction, or fallback mechanisms in case of emergency. This rigidity becomes a problem in real-world scenarios like inheritance planning, collaborative custody, or business treasury management, where human factors (like unavailability, death, or revocation) must be anticipated and handled programmatically.
Miniscript eliminates many of these limitations by introducing a flexible scripting language that enables fine-grained control over Bitcoin spending conditions. With Miniscript, wallet creators can express complex conditions clearly, verify them safely, and adapt them to new use cases—all while remaining fully compatible with Bitcoin’s consensus rules. This blog introduces the various terms you would need to be familiar with as you setup a Miniscript wallet. The implications and use cases of Miniscript wallets will be explored in a separate blog soon.
1. Miniscript Basics
• Script:
A set of instructions that define how Bitcoin can be spent. Every Bitcoin output (UTXO) is locked by a script that must be satisfied to spend it.
• Miniscript:
A structured, human-readable, and machine-verifiable way of writing Bitcoin scripts. It defines “spending conditions” using a modular logic tree (AND, OR, thresholds, etc.). More on Spending Conditions ahead.
• Descriptor:
A text representation of how keys and scripts are arranged. In Miniscript wallets, the descriptor defines both the wallet structure and spending conditions (e.g., multisig + timelock + recovery paths).
2. Spending Conditions
Spending conditions are the rules you set that decide who can spend your Bitcoin and when they can do it.
Think of them like smart locks — each rule adds a layer of control or safety.
Here are the most common types:
• Single Key (pk() / pkh())
Only one person’s key is needed to unlock the funds — like a normal wallet where only you have access.
• AND / OR Rules (and(), or())
You can mix rules together.
For example:
- “Alice and Bob both must sign” (both keys needed).
- “Alice or Bob can sign” (either one can spend).
• Threshold or Multisig (thresh(k, ...))
This means “k of n people must agree.”
Example: “Any 2 out of 3 family members can approve a transaction.”
It’s safer because no single person controls all the Bitcoin.
• Time Locks (older(n) / after(n))
These rules delay spending.
- “Can’t be spent for 6 months.”
- “Funds become accessible after block X or after date Y.”
Perfect for inheritance or safety recovery plans.
• Hash Locks (sha256() / hash160())
These require a secret “code” to unlock the funds.
You’ll find these used in Bitcoin swaps or more advanced scripts, but everyday users rarely need them.
3. Time-Based Controls
Used in inheritance and safety mechanisms:
• Timelock (Absolute / Relative):
Delays when funds can be spent — for example, “allow recovery key after 1 year.”
• Time-delayed spending:
Creates layered recovery paths:
Example: “Primary key can spend anytime, but recovery key activates only after 365 days.”
4. Multisig and Policy Composition
• Multisig:
Multiple keys control access to funds (e.g., 2-of-3).
Traditional multisig lacks flexibility — it’s fixed once created. Miniscript allows upgrading or downgrading conditions dynamically.
• Expanding Multisig:
Adding more keys or conditions (e.g., adding an inheritance path after a timelock).
• Downgrading/Degrading Multisig:
Allowing fewer keys to spend after certain conditions — useful for recovery or death scenarios.
• Policy:
The human-readable version of a Miniscript — defines intent (“Alice OR Bob can spend, OR Carol after 90 days”).
5. Key Types and Paths
• Hot Key: Online key for regular spending.
• Cold Key: Offline key stored on a hardware wallet.
• Recovery Key: Used for long-term recovery or inheritance.
• Coordinator / Watch-Only Wallet: A software wallet that manages descriptors and monitors policy satisfaction without holding private keys.
6.Security & Recovery Concepts
• Inheritance Path:
A pre-defined route to spend funds after a delay or condition, often for heirs or emergency recovery.
• Key Rotation:
Replacing old keys with new ones while maintaining policy integrity.
In Practice
When setting up a Miniscript wallet within apps like Liana, Nunchuk, or Bitcoin Keeper, you’ll typically:
- Define your policy (e.g., 2-of-3 multisig + time-delayed recovery).
- Generate keys (primary, backup, recovery).
- Compile the descriptor (automatically or manually).
- Test and verify PSBT signing across devices.
- Back up the descriptor, keys, and policy metadata securely.