Provide examples of multi-sig scripts

What are the possible Bitcoin scripts to create a multi-sig transaction? Please provide the script code with explanations.

I would like to see at least two types of such scripts explained (OP_CHECKMULTISIG and the one with conditional OP_IF statements that Steve Shadders showed at this CoinGeek Seoul presentation). If there are more options, please list them as well.

Submit an answer See answers Share on Twitter Share on Facebook
Answers
Accepted Answer

Accepted: Pay to Multi Sig from Bitcoin Wiki by Bitcoin Association

Example

scriptPubKey: OP_3 <pubKey1> <pubKey2> <pubKey3> <pubKey4> <pubKey5> OP_5 OP_CHECKMULTISIG

scriptSig: OP_1 <sig1> <sig2> <sig4>

Explanation is at the link: https://wiki.bitcoinsv.io/index.php/Bitcoin_Transactions#Pay_to_Multi_Signature_.28P2MS.29

TLDR;

Complete puzzle is combined (scriptSig /spending script/ + scriptPubKey /locking script/) so: OP_1 <sig1> <sig2> <sig4> OP_3 <pubKey1> <pubKey2> <pubKey3> <pubKey4> <pubKey5> OP_5 OP_CHECKMULTISIG

op_checkmultisig params are: 5(OP_5) pubKeys and 3 (OP_3) signatures

This will yield true (and thus allow transfer of statoshis) if 3 signatures correspond to 3 out of 5 public keys.

THE END

You are creating this answer as an anonymous user. If you log in we will be able to store the draft as you write it.

Submit an Answer

By swiping I acknowledge that the answer will be immutably stored on the Bitcoin SV blockchain forever and that I take full responsibility for any legal or other consequences that might be related to that.
Made with in Slovenia.