Questions tagged [miniscript]

Miniscript is a structured representation of Bitcoin script which allows wallets to be more dynamic about the scripts they use.

Filter by
Sorted by
Tagged with
1 vote
1 answer
40 views

What is a sane Miniscript? How does it differ to a valid Miniscript?

What is a sane Miniscript? How does it differ to a valid Miniscript? This was asked during a Bitcoin Core PR review club on Miniscript hosted by stickies-v on May 18th 2022.
user avatar
4 votes
1 answer
41 views

Which wallets or libraries besides core support (or will support) P2TR descriptors?

I want to help test the WIP Bitcoin Dev Kit "Add support for Taproot and tr() descriptors", PR #593 against other implementations besides Bitcoin Core (already testing again Core 22.0). In ...
user avatar
0 votes
2 answers
54 views

How would one turn a Miniscript tree into a Taproot tree with Taproot'd Miniscript?

How would one turn a Miniscript "tree" into a Taproot tree with Taproot'd Miniscript? (To be clear unlike a Taproot tree a Miniscript tree likely would't be surfaced to the user. Breaking ...
user avatar
2 votes
0 answers
22 views

Simplicity vs Miniscript [duplicate]

It is clear that both simplicity and Miniscript aims to extend and improve upon the bitcoin script. However what are the differences between them and the pros and cons they both have against the other?...
user avatar
0 votes
1 answer
29 views

What is the difference between semantic policy and concrete policy in a Miniscript context?

What is the difference between semantic policy and concrete policy in a Miniscript context? The difference between Policy and Miniscript is defined here.
user avatar
0 votes
1 answer
52 views

What is a Miniscript fragment? And what should I call the underscore letter?

An example Miniscript is: and_v(or_c(pk(B),or_c(pk(C),v:older(1000))),pk(A)) (Generated using this Miniscript site). What would a fragment be here? What should I call the underscore letter (_v)? And ...
user avatar
1 vote
2 answers
140 views

Loops in bitcoin scripting

According to this Q&A there are no loops in bitcoin script: The Bitcoin scripting system is purposefully not Turing-complete - why? I was reading the comments in a reddit post and realized few for ...
user avatar
2 votes
1 answer
130 views

Can output descriptors be used to encode any Miniscript expression?

Output descriptors provide a standard to make address bodies more exchangeable between various wallet implementations. It seems that an output descriptor can be used to encode any Miniscript ...
user avatar
  • 63.3k
1 vote
1 answer
109 views

Is there anything specific to the design of the Sapio language that makes it well suited to writing covenant scripts?

I think I understand at a high level the goals of both CheckTemplateVerify (CTV, BIP 119) and the Sapio language. Is there anything specific to the design of the Sapio language that makes it well ...
user avatar
1 vote
1 answer
107 views

Difference and resources for Miniscript and Simplicity?

I have read about that it is a language for writing Bitcoin Scripts in a structured way, enabling analysis, composition, generic signing and more. http://bitcoin.sipa.be/miniscript/ is helpful but ...
user avatar
1 vote
0 answers
52 views

Bitcoin Script - Beautify

My question is if something exists to do the job in the opposite direction of miniscript. Miniscript's intention is to help:     ...writing (a subset of) Bitcoin Scripts in a structured way, enabling ...
user avatar
1 vote
1 answer
71 views

Miniscript or_i, d: - do they always imply a witness input?

The question: is the following description of the behavior of these fragments correct? The or_i fragment and d: wrappers all have an IF in their script that does not take the value from the argument(s)...
user avatar
0 votes
1 answer
28 views

and(older(10),pk(A)) malleable if top-level, can it be top-level? EDIT: not malleable, was mistaken

$ ./miniscript and(older(10),pk(A)) X 110.0000000000 37 and_v(v:pk(A),older(10)) and(older(10),pk(A)) and_v(v:pk(A),older(10)) 1 scriptlen=37 maxops=2 type=B safe=yes nonmal=yes dissat=...
user avatar
3 votes
1 answer
59 views

How do I write a script such that my funds are locked in a 2-of-2 multisig that converts into a 1-of-2 multisig after 365 days?

I would like my Bitcoin to have the extra security that a 2-of-2 multisig provides. With a single sig I am worried that if a single key gets hacked I will lose my funds. However, with a 2-of-2 ...
user avatar
2 votes
1 answer
88 views

What is the relationship between the Minsc language and Policy language?

Quoting from the Minsc website "Minsc is a high-level scripting language...based on the Miniscript Policy language with additional features and syntactic sugar sprinkled on top including ...
user avatar
3 votes
1 answer
73 views

Should the Policy to Miniscript compiler(s) be considered as deterministic and is this the end goal?

Should the Policy to Miniscript compiler(s) be considered as deterministic and is this the end goal? This question was asked by Jeremy Rubin on ##miniscript on IRC and has been paraphrased. For basic ...
user avatar
8 votes
1 answer
290 views

In theory could we skip the proposed Taproot soft fork, activate Simplicity instead and use Simplicity to write the equivalent of Taproot scripts?

In theory could we skip the proposed Taproot soft fork, activate Simplicity instead and use Simplicity to write the equivalent of Taproot scripts? Or does Simplicity need more development and ...
user avatar
3 votes
1 answer
76 views

With Miniscript why is it not possible to invert conditions with something like not()?

This question was asked by Luke Childs (@lukechilds) on Twitter. In Miniscript would it be possible to invert conditions with something like not()? Could you essentially create a younger() out of not(...
user avatar
4 votes
1 answer
140 views

Where can I find the miniscript policy language specification?

I would like to understand how miniscript works by coding it myself. As I started studying it, I realized that miniscript is more or less a 1-for-1 abstraction of a subset of Script and that the ...
user avatar
  • 7,629
15 votes
3 answers
1k views

What does Bitcoin policy language offer the developer that Miniscript doesn't? What is the difference between Bitcoin policy language and Miniscript?

I understand that policy language compiles to Miniscript and Miniscript is encoded (correction) to Bitcoin Script. This is also a great resource on Miniscript: http://bitcoin.sipa.be/miniscript/ But I ...
user avatar