Skip to content

Help Wanted, Understanding duplicate keys in conditions #142

Description

@miketwenty1

I'm trying to build some pseudo miniscript code and check my logic with the compiler on bitcoin.sipa.be/miniscript. I'm trying to work my way outward, to a more complicated script. I'm getting stuck with this below nested example. I want to have a threshold 3/4 with timelock 1000, OR, 2/4 with 3000.

It seems the parent or directly going to and's is not the proper syntax. How would I be able to accomplish this sort of multiple or timelock conditions with miniscript?

or(
    and(
        thresh(3, pk(A), pk(B), pk(C), pk(D)),
        older(1000)
    ),
    and(
        thresh(2, pk(A), pk(B), pk(C), pk(D)),
        older(3000)
    )
)

Condensed: or(and(thresh(3, pk(A), pk(B), pk(C), pk(D)),older(1000)), and(thresh(2, pk(A), pk(B), pk(C), pk(D)),older(3000)))

Note, the individual inner and's work fine.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions