Bobtimus should store unspent outputs and local addresses in a local file.
This will allow Bobtimus to:
be ready as soon as the software is started (no need to wait for a scan)
ensure that addresses are not re-used
When starting, the data from the local file should be loaded in memory. Such file should be updated on a regular basis.
I suggest JSON file for now (one or two separate files).
If there are no file present, then a scan of first 100 (what bitcoind do by default, can be configured) derive addresses should be done to check if they are used. Please note that scantxoutset does not help with that as it only provide UTXOs.
If the 100th address is used then a second scan should be done to ensure that all used addresses are found and saved.
Once all used addresses (with a GAP of 100 addresses) then an UTXO search can be done from address 0 to i+100th (i being the index of the last used address).
If using Bitcoin Core RPC, then it should be done by passing the exact addresses directly and not a key that bitcoind uses to derive.
Bobtimus should store unspent outputs and local addresses in a local file. This will allow Bobtimus to:
When starting, the data from the local file should be loaded in memory. Such file should be updated on a regular basis.
I suggest JSON file for now (one or two separate files).
If there are no file present, then a scan of first 100 (what bitcoind do by default, can be configured) derive addresses should be done to check if they are used. Please note that scantxoutset does not help with that as it only provide UTXOs.
If the 100th address is used then a second scan should be done to ensure that all used addresses are found and saved.
Once all used addresses (with a GAP of 100 addresses) then an UTXO search can be done from address
0
toi+100th
(i
being the index of the last used address). If using Bitcoin Core RPC, then it should be done by passing the exact addresses directly and not a key that bitcoind uses to derive.