<p>The difference between these two is that with <code>addmultisigaddress</code>, bitcoind stores the <a href="https://bitcoin.org/en/developer-guide#term-redeem-script" rel="nofollow">redeem script</a> and the second one, bitcoind has no idea what the redeem script is and only stores its hash (which is essentially the p2sh address).</p>

<p>For watching the address, the two are essentially equivalent since you'll still know when bitcoins get sent to that p2sh address. The redeem script is necessary if you want to spend from the p2sh address to some other address. Even if you had the private keys in the multisig p2sh address, you wouldn't be able to spend it using <code>importaddress</code> since you still need the redeem script in order to be able to spend it.</p>

CC BY-SA 3.0
2015-02-22T20:17:40.873Z
2015-02-22T20:22:46.277Z
2015-02-22T20:22:46.277Z
Jimmy Song
<p>I am trying to import a 2-of-3 multisignature address into my bitcoind wallet, watch-only. I have the public keys, but not the private keys. Two potential bitcoind JSON-RPC calls that seem to fit are:</p>

<p><code>bitcoin-cli addmultisigaddress 2 ["pubkey1", "pubkey2", "pubkey3"] "my_account"</code></p>

<p>and </p>

<p><code>bitcoin-cli importaddress "multisig-ed_address" "my_account"</code></p>

<p>Assume <code>"multisig-ed_address" == multisig("pubkey1", "pubkey2", "pubkey3")</code></p>

<p>Are these equivalent? Would they both work?</p>

<p>The only difference I can find is that <code>importaddress</code> has an option to rescan the blockchain for transactions that might have involved the imported address. Does <code>addmultisigaddress</code> rescan or not?</p>

<json-rpc><multi-signature><watch-only>
Difference between RPC calls addmultisigaddress and importaddress
JohnDvorak
# Difference between RPC calls addmultisigaddress and importaddress

(Asked by: username_0 on 2015-02-20)

I am trying to import a 2-of-3 multisignature address into my bitcoind wallet, watch-only. I have the public keys, but not the private keys. Two potential bitcoind JSON-RPC calls that seem to fit are:

`bitcoin-cli addmultisigaddress 2 ["pubkey1", "pubkey2", "pubkey3"] "my_account"`

and

`bitcoin-cli importaddress "multisig-ed_address" "my_account"`

Assume `"multisig-ed_address" == multisig("pubkey1", "pubkey2", "pubkey3")`

Are these equivalent? Would they both work?

The only difference I can find is that `importaddress` has an option to rescan the blockchain for transactions that might have involved the imported address. Does `addmultisigaddress` rescan or not?

**Tags:** json-rpc, multi-signature, watch-only


---

## 1 answers

### Answer by username_1 on 2015-02-22. Score: 1 | Accepted answer

The difference between these two is that with `addmultisigaddress`, bitcoind stores the [redeem script](https://bitcoin.org/en/developer-guide#term-redeem-script) and the second one, bitcoind has no idea what the redeem script is and only stores its hash (which is essentially the p2sh address).

For watching the address, the two are essentially equivalent since you'll still know when bitcoins get sent to that p2sh address. The redeem script is necessary if you want to spend from the p2sh address to some other address. Even if you had the private keys in the multisig p2sh address, you wouldn't be able to spend it using `importaddress` since you still need the redeem script in order to be able to spend it.


---

