I have to create and broadcast a MULTISIG transaction to the check community. OP_CHECKMULTISIG is for use. I would like a locking script that requires my public key and 1 of different 3 folks’s. The order of the signatures in unlocking script shouldn’t matter.
So far as i do know OP_CHECKMULTISIG requires order, so I do not know the best way to cope with no order state of affairs. Additionally, how am I even going to examine the signature of mine with my public key if its not high of the stack initially. It appears too advanced, but when there’s a neater approach or a sure scheme I might gladly take the assistance.
Additionally, does this imply that solely 2 signature could be given for unlocking script or greater than 2 is feasible? In that case I made one, but it surely’s not utilizing OP_CHECKMULTISIG and unsure if its legitimate:
OP_CHECKSIG
OP_IF
# If sure, second signature should be an worker's
OP_SWAP # [result1, sig2]
OP_DUP OP_CHECKSIG OP_SWAP
OP_DUP OP_CHECKSIG OP_SWAP
OP_DUP OP_CHECKSIG
OP_ADD OP_ADD
OP_1 OP_GREATERTHANOREQUAL # Not less than 1 worker signed
OP_ELSE
# If first shouldn't be supervisor's, examine if it is an worker's
OP_SWAP # [result1, sig2]
OP_DUP OP_CHECKSIG OP_SWAP
OP_DUP OP_CHECKSIG OP_SWAP
OP_DUP OP_CHECKSIG
OP_ADD OP_ADD
OP_1 OP_GREATERTHANOREQUAL OP_IF
# If first is an worker's, second should be supervisor's
OP_CHECKSIG
OP_ELSE
OP_0 # Fail if first sig is neither
OP_ENDIF
OP_ENDIF