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?

1 Answer 1

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.

1
  • My setup is generating a unique address for each user where they control the private keys. So having just 1 private key I control isn't going to work even if I issue a payment id for each user. My app involves working with a "shared" private key. Commented Jan 6, 2018 at 19:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.