StratisBitcoinFullNode
StratisBitcoinFullNode copied to clipboard
Add getnewaddress API
We have /api/wallet/unusedaddress, but I would like to guarantee a new unique address every time I call this API.
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).
I was thinking that this would be useful for generating a new unique address for the ColdWalletHotAddress on a remote server.
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/