<p>Actually, both receiving funds at and spending funds from a multi-sig address is already supported.</p>

<p>You can find the code to do so, plus comments, by Gavin:</p>

<p><a href="https://gist.github.com/gavinandresen/3966071">TwoOfThree.sh</a></p>

CC BY-SA 3.0
2013-05-05T15:09:08.717Z
2013-05-05T15:09:08.717Z
awfm9
<p>It seems some partial implementation exists. <a href="https://bitcointalk.org/index.php?topic=82213.msg906833#msg906833" rel="noreferrer">Quoting Gavin</a>:</p>
<h3>Generate a multisig address:</h3>
<ol>
<li><p>Gather (or generate) 3 bitcoin addresses, on whichever machines will be participating, using getnewaddress or getaccountaddress  RPC commands (or copy and paste from the GUI).</p>
</li>
<li><p>Get their public keys using the <code>validateaddress</code> RPC command 3 times.</p>
</li>
<li><p>Then create a 2-of-3 multisig address using <code>addmultisigaddress</code>; e.g.</p>
<blockquote>
<p>bitcoind addmultisigaddress 2 '[&quot;044322868cb17d64dcc22185ae2d4493111d73244c3668f8ac79ecc79c0ba8d30a6756d0fa20157 709af3281cc721c7f53321a8cabda29b77900b7e4fe0174b114&quot;,&quot;..second pubkey..&quot;,&quot;..third pubkey..&quot;]'</p>
</blockquote>
</li>
</ol>
<p><code>addmultisigaddress</code> returns the multisignature address. Be a little careful, the public keys are raw hexadecimal and don't contain checksums like bitcoin addresses do. You can then send funds into that 2-of-3 transaction using the normal sendtoaddress/sendmany RPC commands, or the GUI (or anything that's been updated to recognize multisig addresses).</p>
<h3>Spend from a multisig address:</h3>
<p>This isn't implemented yet (RPC calls mechanism). You could gather up all addresses into one wallet, and then you would be able to spend the funds.</p>
<p><strong>Update March 2014</strong></p>
<p>Multisig is still hard. I believe the <a href="https://github.com/spesmilo/sx#multisignature-n-m-transactions" rel="noreferrer">SX library</a> is an easy tool (by people like Vitalik Buterin and Amir Taaki) for working with multisig, but I haven't tested that myself.</p>

CC BY-SA 3.0
2015-06-01T20:07:25.550Z
Multisig is no longer hard. See my new answer below
Alex Millar
CC BY-SA 3.0
2013-05-04T20:29:17.800Z
2014-12-08T05:42:09.687Z
2020-06-16T11:10:03.350Z
ripper234
<p>A m-of-n multisig address is created as follows:</p>
<ol>
<li>Gather all <code>n</code> public keys.<br />
<strong>e.g.</strong> <code>3-of-3</code><br />
<code>03730a151f545f5dcdb1c6d99fb1251f5c70f216f39ba2681bcf10db16bd582e67</code>, <code>03a9bb9d28dfcd2e58ca7b3fa39f4051a6496fc7928f993f1758aeff7c0fee0f03</code>, <code>03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd</code></li>
<li>Create the multisig script<br />
<code>OP_m &lt;bytes-in-Pubkey1&gt; &lt;pubKey1&gt; ... OP_n OP_CHECKMULTISIG</code><br />
<strong>e.g.</strong> <code>532103730a151f545f5dcdb1c6d99fb1251f5c70f216f39ba2681bcf10db16bd582e672103a9bb9d28dfcd2e58ca7b3fa39f4051a6496fc7928f993f1758aeff7c0fee0f032103a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd53ae</code></li>
<li>Hash the script <code>HASH160(&lt;script&gt;)</code><br />
<strong>e.g.</strong><br />
<code>8b58c2f47cd3000e42c82138f7678dc978bc109a</code></li>
<li>Append <code>0x05</code> for <code>P2SH</code> address on mainnet: <code>05&lt;scriptHash&gt;</code><br />
<strong>e.g.</strong><br />
<code>058b58c2f47cd3000e42c82138f7678dc978bc109a</code></li>
<li>Apply Base58Check: <code>BASE58CHECK(05&lt;scriptHash&gt;)</code><br />
<strong>e.g.</strong><br />
<code>3EPpBU7fXq1PfG6JkLnJNUUmEGcSr9rdmh</code></li>
</ol>
<p>You can send bitcoin to this address, but to spend from it, you must provide the scriptSig: <code>0 &lt;sigM&gt; ... &lt;script&gt;</code> where <code>&lt;sigM&gt;</code> is signed from each of the <code>m</code> private keys.</p>
<p>See <a href="https://en.bitcoin.it/wiki/Script" rel="nofollow noreferrer">Bitcoin Wiki - Script</a> for opcodes, <a href="https://en.bitcoin.it/wiki/List_of_address_prefixes" rel="nofollow noreferrer">Bitcoin Wiki - Address Prefixes, </a>and <a href="https://en.bitcoin.it/wiki/Transaction#Pay-to-Script-Hash" rel="nofollow noreferrer">Bitcoin Wiki - Transaction</a> for multisig <code>P2SH</code> script format.</p>

CC BY-SA 4.0
2018-08-16T15:28:08.940Z
2021-05-10T22:30:26.927Z
2021-05-10T22:30:26.927Z
JBaczuk
<p>The easiest way to create a multi signature 2-of-3 transaction is with Coinb.in.</p>

<ol>
<li><p>If necessary, create 3 key pairs using the "New Address" drop down command.</p></li>
<li><p>Use the "New Multisig Address" together with the 3 public keys to create a 2-of-3 address.</p></li>
<li><p>Fund the address with bitcoin.</p></li>
<li><p>Create a new transaction by pasting in the "redeem script" from step 3, defining the receiving addresses and amounts. (All unspent inputs not assigned to a receiving address will be used as transaction fees. If change is desired include that in a new output address by clicking the "+".)</p></li>
<li><p>Sign the transaction by one of the private keys, then sign that transaction with another of the private keys.</p></li>
<li><p>Broadcast the transaction to the network.</p></li>
</ol>

CC BY-SA 3.0
2015-06-01T20:09:21.493Z
I made a video documenting these steps here: https://www.youtube.com/watch?v=oUSVmLegj8k
Alex Millar
CC BY-SA 3.0
2015-06-01T20:05:31.077Z
2015-06-01T20:05:31.077Z
Alex Millar
<p>Can somebody help me with step-by-step list of how to create a multi signature 2-of-3 transaction?</p>

CC BY-SA 3.0
2013-05-04T19:26:20.067Z
It's been a year since this was asked. What gives? See also https://bitcointalk.org/index.php?topic=195168.0
ripper234
CC BY-SA 3.0
2014-03-23T10:43:06.877Z
See also - https://bitcoin.stackexchange.com/questions/23889/how-do-i-create-a-2-of-3-multisig-address-using-bitcoind
ripper234
CC BY-SA 3.0
2014-07-01T19:54:15.573Z
To build a multisig transaction, the easiest API I know of:
http://dev.blockcypher.com/#multisig
Matthieu
CC BY-SA 3.0
2012-05-17T22:14:41.760Z
It's worth mentioning that this other question http://bitcoin.stackexchange.com/questions/3557/how-does-one-make-multisignature-transactions-with-the-bitcoin-client doesn't appear to be a duplicate because it relates to the Bitcoin client app
Highly Irregular
CC BY-SA 3.0
2012-08-28T05:42:28.363Z
Do you mean create the raw transaction, or do you just mean that you'd like to send such a transaction? If the former, then look into OP_CHECKMULTISIG and BIP-11; if the latter, then you may want to use an online wallet such as blockchain.info, which I believe handles this.
Daniel H
<transactions><bitcoind><multi-signature>
How can I create a multi signature 2-of-3 transaction?
Andrew Vorobyov
# How can I create a multi signature 2-of-3 transaction?

(Asked by: username_0 on 2012-05-17)

Can somebody help me with step-by-step list of how to create a multi signature 2-of-3 transaction?

**Tags:** transactions, bitcoind, multi-signature

> **Comments:**
> **username_3**: It's worth mentioning that this other question http://bitcoin.stackexchange.com/questions/3557/how-does-one-make-multisignature-transactions-with-the-bitcoin-client doesn't appear to be a duplicate because it relates to the Bitcoin client app  
> **username_4**: Do you mean create the raw transaction, or do you just mean that you'd like to send such a transaction? If the former, then look into OP_CHECKMULTISIG and BIP-11; if the latter, then you may want to use an online wallet such as blockchain.info, which I believe handles this.  
> **username_1**: It's been a year since this was asked. What gives? See also https://bitcointalk.org/index.php?topic=195168.0  
> **username_1**: See also - https://bitcoin.stackexchange.com/questions/23889/how-do-i-create-a-2-of-3-multisig-address-using-bitcoind  
> **username_2**: To build a multisig transaction, the easiest API I know of: http://dev.blockcypher.com/#multisig  

---

## 4 answers

### Answer by username_5 on 2013-05-05. Score: 14

Actually, both receiving funds at and spending funds from a multi-sig address is already supported.

You can find the code to do so, plus comments, by Gavin:

[TwoOfThree.sh](https://gist.github.com/gavinandresen/3966071)


---

### Answer by username_1 on 2013-05-04. Score: 13

It seems some partial implementation exists. [Quoting Gavin](https://bitcointalk.org/index.php?topic=82213.msg906833#msg906833):

### Generate a multisig address:

1. Gather (or generate) 3 bitcoin addresses, on whichever machines will be participating, using getnewaddress or getaccountaddress RPC commands (or copy and paste from the GUI).
2. Get their public keys using the `validateaddress` RPC command 3 times.
3. Then create a 2-of-3 multisig address using `addmultisigaddress`; e.g.

   > bitcoind addmultisigaddress 2 '["044322868cb17d64dcc22185ae2d4493111d73244c3668f8ac79ecc79c0ba8d30a6756d0fa20157 709af3281cc721c7f53321a8cabda29b77900b7e4fe0174b114","..second pubkey..","..third pubkey.."]'

`addmultisigaddress` returns the multisignature address. Be a little careful, the public keys are raw hexadecimal and don't contain checksums like bitcoin addresses do. You can then send funds into that 2-of-3 transaction using the normal sendtoaddress/sendmany RPC commands, or the GUI (or anything that's been updated to recognize multisig addresses).

### Spend from a multisig address:

This isn't implemented yet (RPC calls mechanism). You could gather up all addresses into one wallet, and then you would be able to spend the funds.

**Update March 2014**

Multisig is still hard. I believe the [SX library](https://github.com/spesmilo/sx#multisignature-n-m-transactions) is an easy tool (by people like Vitalik Buterin and Amir Taaki) for working with multisig, but I haven't tested that myself.

> **Comments:**
> **username_6**: Multisig is no longer hard. See my new answer below  

---

### Answer by username_7 on 2018-08-16. Score: 4

A m-of-n multisig address is created as follows:

1. Gather all `n` public keys.  
   **e.g.** `3-of-3`  
   `03730a151f545f5dcdb1c6d99fb1251f5c70f216f39ba2681bcf10db16bd582e67`, `03a9bb9d28dfcd2e58ca7b3fa39f4051a6496fc7928f993f1758aeff7c0fee0f03`, `03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd`
2. Create the multisig script  
   `OP_m <bytes-in-Pubkey1> <pubKey1> ... OP_n OP_CHECKMULTISIG`  
   **e.g.** `532103730a151f545f5dcdb1c6d99fb1251f5c70f216f39ba2681bcf10db16bd582e672103a9bb9d28dfcd2e58ca7b3fa39f4051a6496fc7928f993f1758aeff7c0fee0f032103a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd53ae`
3. Hash the script `HASH160(<script>)`  
   **e.g.**  
   `8b58c2f47cd3000e42c82138f7678dc978bc109a`
4. Append `0x05` for `P2SH` address on mainnet: `05<scriptHash>`  
   **e.g.**  
   `058b58c2f47cd3000e42c82138f7678dc978bc109a`
5. Apply Base58Check: `BASE58CHECK(05<scriptHash>)`  
   **e.g.**  
   `3EPpBU7fXq1PfG6JkLnJNUUmEGcSr9rdmh`

You can send bitcoin to this address, but to spend from it, you must provide the scriptSig: `0 <sigM> ... <script>` where `<sigM>` is signed from each of the `m` private keys.

See [Bitcoin Wiki - Script](https://en.bitcoin.it/wiki/Script) for opcodes, [Bitcoin Wiki - Address Prefixes,](https://en.bitcoin.it/wiki/List_of_address_prefixes) and [Bitcoin Wiki - Transaction](https://en.bitcoin.it/wiki/Transaction#Pay-to-Script-Hash) for multisig `P2SH` script format.


---

### Answer by username_6 on 2015-06-01. Score: 2

The easiest way to create a multi signature 2-of-3 transaction is with Coinb.in.

1. If necessary, create 3 key pairs using the "New Address" drop down command.
2. Use the "New Multisig Address" together with the 3 public keys to create a 2-of-3 address.
3. Fund the address with bitcoin.
4. Create a new transaction by pasting in the "redeem script" from step 3, defining the receiving addresses and amounts. (All unspent inputs not assigned to a receiving address will be used as transaction fees. If change is desired include that in a new output address by clicking the "+".)
5. Sign the transaction by one of the private keys, then sign that transaction with another of the private keys.
6. Broadcast the transaction to the network.

> **Comments:**
> **username_6**: I made a video documenting these steps here: https://www.youtube.com/watch?v=oUSVmLegj8k  

---

