Bitcoin VerityOpen comparator

Level 9 · Advanced technical layer

Miniscript, policy and script analysis

How a structured representation helps wallets compose and analyse spending rules without changing consensus.

Article
91
Reading time
15 minutes
Reviewed
10 September 2026

In a nutshell

Miniscript is a structured subset and representation of Script expressions. It lets software compile policies, calculate satisfaction properties and avoid many unsafe combinations, but it neither changes consensus nor replaces key management.

01

Policy describes intent

A policy can say that Alice and Bob sign, or that a recovery key may sign after a delay. Compilation selects a concrete Script form. Different scripts may express related intent with different cost and privacy trade-offs.

02

Types enable analysis

Miniscript fragments carry type and property rules that let tools check stack behavior, malleability conditions, resource limits and maximum satisfaction weight before funds are received.

03

Descriptors provide wallet context

A descriptor wraps the expression in sh(), wsh() or tr(), adds keys and derivations and can include a checksum. It therefore connects a spending policy to reproducible address derivation and recovery.

04

Tools do not choose risk

Analysis can show that a branch is satisfiable and estimate its cost, but cannot decide whether keys are independent, a timeout is sensible or an heir can follow the procedure. BIP 379's status should also be checked by implementers rather than treated as a consensus rule.

Level 9 · Advanced technical layer

Terms to know

Policy
A high-level statement of acceptable spending paths.
Miniscript
A typed, analysable representation for a structured subset of Bitcoin Script.
Satisfaction
Witness data that makes a chosen script path succeed.

Common misconception

Miniscript is a new smart-contract engine activated on Bitcoin.

A more accurate explanation

It is an application-layer representation and compiler for existing Script rules; nodes validate the resulting Script, not a new Miniscript consensus language.

A more accurate explanation

Why not write Script directly?

Experts can, but structured types and analysis reduce composition mistakes and make cost and recovery properties easier for software to inspect.

91

Key takeaways

  1. 01Policy and compiled Script are different layers.
  2. 02Miniscript supports static analysis.
  3. 03Descriptors bind policies to derivation.
  4. 04Operational security still needs human design.

A child-friendly recap

In very simple terms

Miniscript helps wallets build rules from safer pieces and inspect them in advance. Bitcoin nodes ultimately check the ordinary Script it produces.

Reviewed: 10 September 2026

Sources and further reading

Sources support particular facts and definitions; listing one does not mean the editors endorse every view of its author.

01
BIP 379: MiniscriptBitcoin Improvement Proposals
bips.dev
02
BIP 380: output descriptorsBitcoin Improvement Proposals
bips.dev
03
Bitcoin Core: descriptor referenceBitcoin Core
github.com

Educational material, not an investment recommendation.