StratisBitcoinFullNode icon indicating copy to clipboard operation
StratisBitcoinFullNode copied to clipboard

Add getnewaddress API

Open thecrypt0hunter opened this issue 6 years ago • 3 comments

We have /api/wallet/unusedaddress, but I would like to guarantee a new unique address every time I call this API.

thecrypt0hunter avatar May 31 '19 16:05 thecrypt0hunter

That isn't really workable with an HD wallet, as the default address gap limit means that the wallet won't detect incoming transactions for address indexes that are too far away from the last used one.

To get around that you could create multiple accounts & use the unusedaddresses endpoint instead (to keep the address gap manageable), or derive your own addresses from the extPubKey (which would have the same gap limit limitation if you were relying on the wallet to detect payments made).

zeptin avatar May 31 '19 16:05 zeptin

I was thinking that this would be useful for generating a new unique address for the ColdWalletHotAddress on a remote server.

thecrypt0hunter avatar Jun 14 '19 17:06 thecrypt0hunter

Isn't this an issue on Bitcoin or don't they need to worry about an HD wallet - https://bitcoincore.org/en/doc/0.17.0/rpc/wallet/getnewaddress/

thecrypt0hunter avatar Jun 14 '19 17:06 thecrypt0hunter