Skip to content

Miniscript language vs policy (languague?) #331

Answered by sanket1729
dr-orlovsky asked this question in Q&A
Discussion options

You must be logged in to vote

At a high level:

Miniscript is an intermediate more structured representation for actual Bitcoin Scripts. It is useful as a toolbox because it simplifies static analysis of scripts, and things like generic signing.

The policy language is intended to simplify designing Scripts for humans.

In detail:

  • Policy is compiled to Minsicript (using compiler).
  • Miniscript is encoded to bitcoin Script. (One to One Mapping)
  • Bitcoin Script is decoded back to Miniscript. (One to One Mapping)
  • Policy and Miniscript can both be lifted to another representation for static analysis.

Following invariants are respected in Miniscript: Let ms be a miniscript, s be bitcoin script, pol be policy

decode(encode(ms))…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@sanket1729
Comment options

@dr-orlovsky
Comment options

Answer selected by dr-orlovsky
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants