3

I'm creating a tipping type app where I issue unique monero private keys for all my users like how an exchange has a different monero address for each user. I'm sure they are just using a payment id for each user while all funds goto the same wallet.

But in my case, I'm not using a payment ID. How can I sweep all coins from these addresses to my own without a rescan of the blockchain for each address? FYI, I also have a copy of the private keys for my users.

  • Scanning for an updated balance takes awhile. Can this be skipped?
Patoshi パトシ
  • 4,608
  • 4
  • 27
  • 69

1 Answers1

1

To be able to make a transaction, the wallet must know how much it contains.

The approach for you would be to only scan from when the user made the transaction by specifying a restore height or date. Allowing you to only scan i.e. the last 10 blocks.

This technique only works if you are sure that each user only used an address from a specific moment. You can couple it with a remote node to allow multiple scans from multiple wallets without being bothered by the download speed.

However, I still would advise you to really consider the option of a single address as this entire process becomes automated.

Keep yourself informed you still use separated addresses as sub-addresses may be useful for your case once these become a thing.

Maxithi
  • 577
  • 2
  • 15