הצטרף ל-Nostr
2026-06-05 15:49:12 CEST
in reply to

_kami_gawa on Nostr: I believe you can write this script using 2 leafs thus avoding the need for OP_IF. I ...

I believe you can write this script using 2 leafs thus avoding the need for OP_IF. I could be wrong I am not a script wizard but something similar to the below one should work.
After all, multiple script paths are one of the biggest taproot selling point.

Leaf A
<pubkey1_A> OP_CHECKSIG
<pubkey2_A> OP_CHECKSIGADD
<pubkey3_A> OP_CHECKSIGADD
OP_PUSHNUM_2
OP_NUMEQUAL

Leaf B
OP_PUSHBYTES_2 6432
OP_CSV
OP_DROP
<pubkey1_B> OP_CHECKSIG
<pubkey2_B> OP_CHECKSIGADD
<pubkey3_B> OP_CHECKSIGADD
OP_PUSHNUM_2
OP_NUMEQUAL