Questions tagged [miniscript]

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

"Miniscript is a language for writing (a subset of) Bitcoin Scripts in a structured way, enabling analysis, composition, generic signing and more." –via bitcoin.sipa.be/miniscript

You can find an introduction, Miniscript compiler, and analysis tools on bitcoin.sipa.be/miniscript/. Bitcoin Optech collects news items related to Miniscript in the corresponding topic page.

32 questions
16
votes
3 answers

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 know very little about policy language and there…
Michael Folkson
  • 14,337
  • 3
  • 11
  • 45
8
votes
1 answer

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 maturation? This question has been paraphrased and was…
Michael Folkson
  • 14,337
  • 3
  • 11
  • 45
7
votes
3 answers

Multisig where one of the keys specifically is required?

Is it possible to make a multisig wallet that requires one of the keys specifically and any of the other ones in order to sign a transaction? For example, let's say I have a 2-of-3 multisig that has signators A, B, and C. Can I make a multisig that…
rosstripi
  • 203
  • 1
  • 3
5
votes
1 answer

Error when doing a getdescriptorinfo on a Miniscript descriptor (V24.0.1)

I'm trying to play around with miniscript and import them into Bitcoin Core v24.0.1. I created the following descriptor in https://miniscript.fun and tried to validate it in Bitcoin Core bitcoin-cli getdescriptorinfo…
5
votes
1 answer

How do I set up a time-decay multisig?

I want to set up a multisig that requires fewer signatures as time goes by. Let T be some time in the future (e.g. a year from now). Before T, 2/3 signatures are required to unlock the UTXO (send coins). After T, 1/3 signatures is required to unlock…
Yoda
  • 51
  • 1
4
votes
1 answer

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 policy language implementation would shed more light…
Jimmy Song
  • 7,709
  • 16
  • 35
4
votes
2 answers

Conditional MULTISIG transaction

I need a bitcoin lock script that will require my key and 1 of 4 other people. For example, If my key is present and one of the 4 other keys are also present, transaction can be claimed. If my key is not present, even the presence of all of the…
Anıl
  • 41
  • 1
4
votes
1 answer

When is a Miniscript solution malleable?

I'm having some trouble understanding malleability in miniscript. Specifically I cannot get why some solutions can be used instead of other. I think using an example may help. Say, for instance, this…
landabaso
  • 238
  • 1
  • 7
4
votes
1 answer

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 particular we need to test interoperability via PSBTs. BDK…
3
votes
1 answer

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 multisig I am worried that if I lose either key my funds…
Michael Folkson
  • 14,337
  • 3
  • 11
  • 45
3
votes
1 answer

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 explanations of Policy and Miniscript see this…
Michael Folkson
  • 14,337
  • 3
  • 11
  • 45
3
votes
1 answer

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(older())? e.g.…
Michael Folkson
  • 14,337
  • 3
  • 11
  • 45
3
votes
1 answer

How do descriptors work with miniscript in the library bitcoinerLab?

What I want is to be able to spend the funds from an address, either with its private key or with the private key of another address that I designate in the policy. As I understand it, it works like this: When using the descriptor, it provides an…
3
votes
2 answers

Why isn't it possible to add an OP_RETURN (or some arbitrary script) inside a taproot script path with a descriptor?

I'm reading the Bitcoin Core's descriptor documentation and I noticed that the raw() SCRIPT expression can only be used at descriptor top-level. Indeed when called with this descriptor getdescriptorinfo returns -5 error with the message Can only…
2
votes
1 answer

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 variables, functions, infix notation and more." This question…
Michael Folkson
  • 14,337
  • 3
  • 11
  • 45
1
2 3