Create an example p2sh script for 2-of-3 where one key must sign to be valid
New here? Learn about Bountify and follow @bountify to get notified of new bounties! x

A standard sort of Bitcoin multisignature transaction would be 2-of-3 where two of three specified ECDSA keys must sign a transaction for it to be valid. I am looking for a transaction in hexadecimal or human-readable OPCODE form that has a logical form of X and (Y or Z). That is the first key X must sign a transaction along with either Y or Z also having signed it, for it to be valid.

Practically it's for a case where the recipient of some funds holds one key and one of two other parties can sign to get them paid. In this case, it also protects the funds against collusion between Y and Z.

I'll be testing the script with Hashmal (https://github.com/mazaclub/hashmal)

Btw, I asked this question on bitcointalk.org and got what seems to be a plausible solution: OPCHECKSIGVERIFY OP1 OP2 OPCHECKMULTISIG What I've not done is test it with hashmal.
weex over 3 years ago

Crowdsource coding tasks.

0 Solutions