Closed mrx23dot closed 3 years ago
First of all, new_address()
is not a random but sequential address generator. It appends a new address to the list of already generated ones in the wallet, increasing the minor index. Since the OfflineWallet
doesn't connect to any real wallet, there's no such list.
Please keep in mind that every wallet software checks for payments only those addresses that have been generated already (and sometimes a handful of future ones, in sequential order).
You may, of course, implement your own backend that manages the list of subaddresses and implements new_address()
. Remember to keep the list in persistent storage, or every time you restart the program, it would generate addresses starting again from minor=1
.
Thank you!
Why can't I generate random new_address() subaddresses for OfflineWallet? For random address generation collision is less likely.
Currently it requires open wallet file in RPC. Offline example uses get_address(major, minor) https://monero-python.readthedocs.io/en/latest/backends.html