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

Is sortedmulti fragment supported? #8

Open
louneskmt opened this issue Nov 24, 2023 · 1 comment
Open

Is sortedmulti fragment supported? #8

louneskmt opened this issue Nov 24, 2023 · 1 comment

Comments

@louneskmt
Copy link

Hi! Is the sortedmulti operator supported?

I've tried this descriptor: wsh(sortedmulti(2,tpubD6NzVbkrYhZ4YgjDd2FXNM3LVEHhopeVTfQmnUXWB8bGSoNKNzWHzTT3G8HYof6pLxn9qEwC5c9vVKWaFBUmqRzvZkdcXAzKWBFn9ETKMy5/0/*,tpubD6NzVbkrYhZ4Y33j8px4EZnUb3pxaz13AEc6QJTzWj3kcXpQc2Q4zKHhmMk4KsQV7CBjVUQYsfmdVCuQkT84zqYqKPbtFgiHyaGZ6KcC94N/0/*)) but I get the error Miniscript sortedmulti(2,@0,@1) is not sane. If I change sortedmulti to multi, it works as expected and doesn't raise any error.

I don't see SORTEDMULTI in the bindings, is that why?

case miniscript::Fragment::MULTI: return Props(node, "multi(" + std::to_string(node->k) + " of " + std::to_string(node->keys.size()) + ")");

Thanks!

@landabaso
Copy link
Member

Hi,

The error message is misleading. Currently, the library supports only miniscript expressions within sh/wsh script tags.

The sortedmulti operator isn't part of the miniscript specification, which is why it's not functioning.

I'll look into making this clearer in our documentation and error messages to avoid future confusion.

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

2 participants