<p>You are correct in your understanding: the arguments to the RPC call are just public keys (or addresses, which are hashes of public keys), and if you don't hold all the corresponding private keys, you won't be able to spend coins sent to the resulting address.</p>

<p>But it's far from useless.  The main application of multisig addresses is to require the approval of multiple people in order to spend them, rather like needing two signatures on a check.  In that case, it's desirable for no one person or computer to <em>ever</em> be in possession of all the corresponding private keys  (because then anyone with sufficient access to that computer could spend the coins unilaterally).  Rather, when it's time to spend the coins, the key holders affix their signatures one by one, without ever sharing their private keys with one another.  So in fact, if <code>addmultisigaddress</code> required all the private keys to be available, it would be nearly useless.</p>

<p>For further details on multisig addresses and how to use them, see the rather extensive answer by almel to <a href="https://bitcoin.stackexchange.com/questions/6100/how-will-multisig-addresses-work">How will multisig addresses work?</a> And as with any open-source software, the ultimate documentation is the source code.</p>

CC BY-SA 3.0
2014-10-04T03:28:37.560Z
2014-10-04T03:28:37.560Z
2017-04-13T12:47:36.647Z
Nate Eldredge
<p>I tried the following RPC call via the debug window:</p>

<pre><code>addmultisigaddress 2 '["0304a7aadeb1ae96482a10fa634825d86d80dbad8d43cd9177664eaf6f0ff7d890", "022426f087fd017db9f29759efb9d7ff6101a075e46fb591466208a6a6beb321c7"]'
</code></pre>

<p>The output was:</p>

<pre><code>3MGYcBNapbmYkvfj9CD4hBykzWxukEE61w
</code></pre>

<p>This is a P2SH address, right? </p>

<p>The RPC call just gave the public keys, though, so my wallet won't actually be able to spend any funds sent to that address, correct? </p>

<p>Why even have an RPC call here that let's the user make an address they won't be able to spend from? Is this method just a utility if the private keys aren't known, and the result won't be used in the actual wallet at all?</p>

<p>I guess just an explanation of 'addmultisigaddress' that is more descriptive than the help via the console would be helpful.</p>

<bitcoind><multi-signature><json-rpc>
RPC addmultisigaddress call
morsecoder
# RPC addmultisigaddress call

(Asked by: username_0 on 2014-10-03)

I tried the following RPC call via the debug window:

```
addmultisigaddress 2 '["0304a7aadeb1ae96482a10fa634825d86d80dbad8d43cd9177664eaf6f0ff7d890", "022426f087fd017db9f29759efb9d7ff6101a075e46fb591466208a6a6beb321c7"]'

```

The output was:

```
3MGYcBNapbmYkvfj9CD4hBykzWxukEE61w

```

This is a P2SH address, right?

The RPC call just gave the public keys, though, so my wallet won't actually be able to spend any funds sent to that address, correct?

Why even have an RPC call here that let's the user make an address they won't be able to spend from? Is this method just a utility if the private keys aren't known, and the result won't be used in the actual wallet at all?

I guess just an explanation of 'addmultisigaddress' that is more descriptive than the help via the console would be helpful.

**Tags:** bitcoind, multi-signature, json-rpc


---

## 1 answers

### Answer by username_1 on 2014-10-04. Score: 3 | Accepted answer

You are correct in your understanding: the arguments to the RPC call are just public keys (or addresses, which are hashes of public keys), and if you don't hold all the corresponding private keys, you won't be able to spend coins sent to the resulting address.

But it's far from useless. The main application of multisig addresses is to require the approval of multiple people in order to spend them, rather like needing two signatures on a check. In that case, it's desirable for no one person or computer to *ever* be in possession of all the corresponding private keys (because then anyone with sufficient access to that computer could spend the coins unilaterally). Rather, when it's time to spend the coins, the key holders affix their signatures one by one, without ever sharing their private keys with one another. So in fact, if `addmultisigaddress` required all the private keys to be available, it would be nearly useless.

For further details on multisig addresses and how to use them, see the rather extensive answer by almel to [How will multisig addresses work?](https://bitcoin.stackexchange.com/questions/6100/how-will-multisig-addresses-work) And as with any open-source software, the ultimate documentation is the source code.


---

