<p>First of all, the <code>createmultisig</code> <a href="https://bitcoin.stackexchange.com/questions/36053/difference-between-createmultisig-and-addmultisigaddress">will not add the generated address to your wallet</a>, it will only generate the address and the redeemScript.</p>

<p>The <code>addmultisigaddress</code> was probably working for you because you generated both addresses on the same core-client and then added them with the <code>addmultisigaddress</code> command. However, the <code>addmultisigaddress</code> call will <em>not</em> add the multisig address to the wallet if <a href="https://bitcointalk.org/index.php?topic=1577327.msg15849746#msg15849746" rel="nofollow noreferrer">not at least <code>m</code> of the public keys belong to this wallet</a> (Where <code>m</code> is the minimum number of signatures required to spend from this address). This is because you can't add an address to the wallet if you can't spend from it. However, if you are only interested in adding the address for the purpose of watching it, you can do the following:</p>

<ul>
<li>Generate <code>n</code> public keys for the <code>m-of-n</code> multisig address. Theses can be generated within or outside of the core client</li>
<li>Receive all the public keys on the core client and create the multisig address with <code>createmultisig n '''[&lt;LISTS_OF_M_KEYS&gt;]'''</code></li>
<li>after you execute the step above you will recive the multisig address and the redeem script. You may store these to a DB if you would like</li>
<li>In order for <code>walletNotify</code> to work you need to import the address with <code>importaddress</code> command (you may want to set the <code>rescan</code> parameter to false since you just created the address anyway)</li>
<li>Optionally, you can add the address to a particular account with the <code>setaccount</code> command</li>
</ul>

<p><strong>Note:</strong> The <code>account</code> feature in bitcoind is planned to be deprecated and  replaced by a <code>labels</code> feature (see: <a href="https://github.com/bitcoin-dot-org/bitcoin.org/issues/1287" rel="nofollow noreferrer">[1]</a> <a href="https://github.com/bitcoin/bitcoin/pull/7729" rel="nofollow noreferrer">[2]</a> <a href="https://github.com/bitcoin/bitcoin/issues/3816" rel="nofollow noreferrer">[3]</a>) and this should be taken into account if you want to plan ahead for forward compatability </p>

CC BY-SA 3.0
2016-12-29T11:35:12.157Z
2017-01-03T11:20:08.633Z
2017-04-13T12:47:36.647Z
motatoes
<p>I am new in bitcoin. I started research about bitcoin(Couple of days ago) for my project.I setup bitcoin node on my linux server and it is fully synchronized. here is my bitcoin.conf</p>

<pre><code>prune=600
maxconnections=10
maxuploadtarget=20
rpcuser=XXXXX
rpcpassword=XXXXX
keypool=100
server=1
rescan=1
alertnotify=php \var\www\html\alert.php %s
blocknotify=php \var\www\html\block.php %s
walletnotify=php \var\www\html\wallet.php %s
</code></pre>

<p>Case 1: I created address using <code>getnewaddress</code> [account_name] then I sent some BTC from other wallet and I can get wallet notification.</p>

<p>Case 2: I created address using <code>addmultisigaddress</code> command then I sent some BTC from other wallet and I can get wallet notification.</p>

<p>Case 3 : I have created multisig address using <code>createmultisig</code> command. And I sent some BTC from other wallet (Check transaction <a href="https://blockchain.info/tx/199a83f627477e147d38a6f28be323cb3d93d255b4f7ce46abb88c51f52d81b5" rel="nofollow">status</a> ). That transaction have enough confirmation But I can not get wallet notification. </p>

<p>Why i can not getting wallet notification of multisig address (Case 3)?</p>

<p>addmultisigaddress command will save redeemScript and attache it to that address. this is work for me and I can get notification.</p>

<p>So here i also want to know how secure is my multisig address if i create it using <code>addmultisigaddress</code> command? Suppose my server hacked, Attacker easily get redeemscript(using validateaddress command) and also can get sign address associate with it and privet key of that addresses. My BTC can be easly Theft.</p>

<p>Please suggest me the best way to create multisig address or answer me why I am not getting wallet notification of multisig address and what is alternative solution?</p>

<p>Info: I want to develop BTC wallet website where my user can create BTC address and can send and receive BTC. I want to create multisig address for every user. What is best way to create multisig address for them? any security advice welcome.</p>

<p>I searched lots of about this multsig address but I can't get any idea how to implement it (Multisig address using <code>createmultisig</code> command) in my project and wonder how other how other website support multisig address and handle it? Are they using <code>addmultisigaddress</code> command ? If yes then how secure is that account ? </p>

<p>if I can't get wallet notification then how can I credit or debit BTC from my user account (In my project).</p>

<p>Thank you in advance.</p>

<bitcoind><multi-signature>
wallet notification not working for multisig address
jyorge maccaline
# wallet notification not working for multisig address

(Asked by: username_0 on 2016-08-06)

I am new in bitcoin. I started research about bitcoin(Couple of days ago) for my project.I setup bitcoin node on my linux server and it is fully synchronized. here is my bitcoin.conf

```
prune=600
maxconnections=10
maxuploadtarget=20
rpcuser=XXXXX
rpcpassword=XXXXX
keypool=100
server=1
rescan=1
alertnotify=php \var\www\html\alert.php %s
blocknotify=php \var\www\html\block.php %s
walletnotify=php \var\www\html\wallet.php %s

```

Case 1: I created address using `getnewaddress` [account\_name] then I sent some BTC from other wallet and I can get wallet notification.

Case 2: I created address using `addmultisigaddress` command then I sent some BTC from other wallet and I can get wallet notification.

Case 3 : I have created multisig address using `createmultisig` command. And I sent some BTC from other wallet (Check transaction [status](https://blockchain.info/tx/199a83f627477e147d38a6f28be323cb3d93d255b4f7ce46abb88c51f52d81b5) ). That transaction have enough confirmation But I can not get wallet notification.

Why i can not getting wallet notification of multisig address (Case 3)?

addmultisigaddress command will save redeemScript and attache it to that address. this is work for me and I can get notification.

So here i also want to know how secure is my multisig address if i create it using `addmultisigaddress` command? Suppose my server hacked, Attacker easily get redeemscript(using validateaddress command) and also can get sign address associate with it and privet key of that addresses. My BTC can be easly Theft.

Please suggest me the best way to create multisig address or answer me why I am not getting wallet notification of multisig address and what is alternative solution?

Info: I want to develop BTC wallet website where my user can create BTC address and can send and receive BTC. I want to create multisig address for every user. What is best way to create multisig address for them? any security advice welcome.

I searched lots of about this multsig address but I can't get any idea how to implement it (Multisig address using `createmultisig` command) in my project and wonder how other how other website support multisig address and handle it? Are they using `addmultisigaddress` command ? If yes then how secure is that account ?

if I can't get wallet notification then how can I credit or debit BTC from my user account (In my project).

Thank you in advance.

**Tags:** bitcoind, multi-signature


---

## 1 answers

### Answer by username_1 on 2016-12-29. Score: 2

First of all, the `createmultisig` [will not add the generated address to your wallet](https://bitcoin.stackexchange.com/questions/36053/difference-between-createmultisig-and-addmultisigaddress), it will only generate the address and the redeemScript.

The `addmultisigaddress` was probably working for you because you generated both addresses on the same core-client and then added them with the `addmultisigaddress` command. However, the `addmultisigaddress` call will *not* add the multisig address to the wallet if [not at least `m` of the public keys belong to this wallet](https://bitcointalk.org/index.php?topic=1577327.msg15849746#msg15849746) (Where `m` is the minimum number of signatures required to spend from this address). This is because you can't add an address to the wallet if you can't spend from it. However, if you are only interested in adding the address for the purpose of watching it, you can do the following:

* Generate `n` public keys for the `m-of-n` multisig address. Theses can be generated within or outside of the core client
* Receive all the public keys on the core client and create the multisig address with `createmultisig n '''[<LISTS_OF_M_KEYS>]'''`
* after you execute the step above you will recive the multisig address and the redeem script. You may store these to a DB if you would like
* In order for `walletNotify` to work you need to import the address with `importaddress` command (you may want to set the `rescan` parameter to false since you just created the address anyway)
* Optionally, you can add the address to a particular account with the `setaccount` command

**Note:** The `account` feature in bitcoind is planned to be deprecated and replaced by a `labels` feature (see: [[1]](https://github.com/bitcoin-dot-org/bitcoin.org/issues/1287) [[2]](https://github.com/bitcoin/bitcoin/pull/7729) [[3]](https://github.com/bitcoin/bitcoin/issues/3816)) and this should be taken into account if you want to plan ahead for forward compatability


---

