<p>There are libraries out there built upon bitcoind. These libraries pull with 'getnewaddress'. However, bitcoind will automatically generate new keys once the keypool is exhausted. I was attempting to avoid having private keys on the server.</p>

<p>Another method could be to regularly sweep incoming funds..</p>

CC BY-SA 3.0
2015-07-24T01:28:25.067Z
Nothing stopping you just generating them on the `bitcoind` server and sending the list of addresses over. There's probably better solutions with HD wallets but this would be at least safe.
Claris
CC BY-SA 3.0
2015-07-23T12:23:04.087Z
2015-07-23T12:23:04.087Z
satbit
<p>I don't thing your approach makes sense. Why would you <code>importaddress</code> as watch only and give them out over <code>getnewaddress</code>? Do you try to missuse bitcoind as a address database (<code>importaddress</code> = store  |   <code>getnewaddress</code> = retrieve)?</p>

<p>If you need endless amounts of addresses, you probably like to switch to Bip32 (a.k.a HDWallets). There is a experimental patch for bitcoin-core (<a href="https://github.com/bitcoin/bitcoin/pull/6265" rel="nofollow">https://github.com/bitcoin/bitcoin/pull/6265</a>) which would allow you to call <code>hdgetaddress</code> without having the master seed (private key) in the wallet.</p>

CC BY-SA 3.0
2015-07-23T09:44:40.437Z
2015-07-23T09:44:40.437Z
Jonas Schnelli
<p>I was attempting to use an existing script which requests "getnewaddress" from bitcoind when it wants a new address. Sure, I could pre-generate keys.. but this script has no method to store them. It relies upon bitcoind. However, this means that the private keys are stored on the bitcoind server. I was attempting to avoid this.</p>

<p>Is this not a valid scenario I am describing ?</p>

CC BY-SA 3.0
2015-07-24T11:10:42.547Z
2015-07-24T11:10:42.547Z
satbit
<p>I am aware it is possible to use "importaddress" to import bitcoin addresses without their associated private keys.</p>

<p>For an online shop that uses "getnewaddress" in order to present a customer with an address, is it possible for "getnewaddress" to only ever serve up "watch-only" addresses?</p>

<p>Ie - I do not want the Bitcoin core wallet to create new addresses. I want to use "importaddress" to import 10k watch-only addresses.</p>

<p>Is the above possible? And, if so, what is the expected behaviour of "getnewaddress" in the event of all 10k watch-only addresses being used up?</p>

<watch-only>
getnewaddress and watch-only addresses (importaddress)
satbit
# getnewaddress and watch-only addresses (importaddress)

(Asked by: username_0 on 2015-07-23)

I am aware it is possible to use "importaddress" to import bitcoin addresses without their associated private keys.

For an online shop that uses "getnewaddress" in order to present a customer with an address, is it possible for "getnewaddress" to only ever serve up "watch-only" addresses?

Ie - I do not want the Bitcoin core wallet to create new addresses. I want to use "importaddress" to import 10k watch-only addresses.

Is the above possible? And, if so, what is the expected behaviour of "getnewaddress" in the event of all 10k watch-only addresses being used up?

**Tags:** watch-only


---

## 3 answers

### Answer by username_0 on 2015-07-23. Score: 1

There are libraries out there built upon bitcoind. These libraries pull with 'getnewaddress'. However, bitcoind will automatically generate new keys once the keypool is exhausted. I was attempting to avoid having private keys on the server.

Another method could be to regularly sweep incoming funds..

> **Comments:**
> **username_1**: Nothing stopping you just generating them on the `bitcoind` server and sending the list of addresses over. There's probably better solutions with HD wallets but this would be at least safe.  

---

### Answer by username_2 on 2015-07-23. Score: 1

I don't thing your approach makes sense. Why would you `importaddress` as watch only and give them out over `getnewaddress`? Do you try to missuse bitcoind as a address database (`importaddress` = store | `getnewaddress` = retrieve)?

If you need endless amounts of addresses, you probably like to switch to Bip32 (a.k.a HDWallets). There is a experimental patch for bitcoin-core (<https://github.com/bitcoin/bitcoin/pull/6265>) which would allow you to call `hdgetaddress` without having the master seed (private key) in the wallet.


---

### Answer by username_0 on 2015-07-24. Score: 0

I was attempting to use an existing script which requests "getnewaddress" from bitcoind when it wants a new address. Sure, I could pre-generate keys.. but this script has no method to store them. It relies upon bitcoind. However, this means that the private keys are stored on the bitcoind server. I was attempting to avoid this.

Is this not a valid scenario I am describing ?


---

