Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0 and 1 are valid miniscript fragments #57

Open
bigspider opened this issue Feb 12, 2024 · 1 comment
Open

0 and 1 are valid miniscript fragments #57

bigspider opened this issue Feb 12, 2024 · 1 comment

Comments

@bigspider
Copy link

bigspider commented Feb 12, 2024

It appears that the 0 and 1 fragments are not supported. However they are valid in miniscripts, and they are occasionally produced by the policy compilers.

Some examples of valid descriptors that fail to parse:

wsh(and_b(pk(tpubDDcmHJ6bsQqSRDzXrF1cgyPfXpFTHmqBUcq5cevfszh83XJtjqXZXDYwP3N82bA51dBVhbe3uaaWwAxW2tEsjgZPXmupQpNwdmULXq1WXDU/0/*),a:or_d(pk(tpubDFAqEGNyad35aBCKUAXbQGDjdVhNueno5ZZVEn3sQbW5ci457gLR7HyTmHBg93oourBssgUxuWz1jX5uhc1qaqFo9VsybY1J5FuedLfm4dK/0/*),0)))

wsh(and_b(pk(tpubDFAqEGNyad35aBCKUAXbQGDjdVhNueno5ZZVEn3sQbW5ci457gLR7HyTmHBg93oourBssgUxuWz1jX5uhc1qaqFo9VsybY1J5FuedLfm4dK/0/*),a:1))

wsh(and_b(pk(tpubDDcmHJ6bsQqSRDzXrF1cgyPfXpFTHmqBUcq5cevfszh83XJtjqXZXDYwP3N82bA51dBVhbe3uaaWwAxW2tEsjgZPXmupQpNwdmULXq1WXDU/0/*),a:and_b(1,s:pk(tpubDFAqEGNyad35aBCKUAXbQGDjdVhNueno5ZZVEn3sQbW5ci457gLR7HyTmHBg93oourBssgUxuWz1jX5uhc1qaqFo9VsybY1J5FuedLfm4dK/0/*))))```

(sorry for the very not minimal examples, they came out from my test suite)

@bigspider
Copy link
Author

I added the two fragments with this commit in my clone of embit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant