10 sats \ 0 replies \ @nullcount 31 Jul 2022 \ parent \ on: How can I create a bot to automatically sweep a list of private keys? bitcoin
Pick up a copy of @jimmysong 's Programming Bitcoin. It breaks down the math behind all the cryptography and encoding schemes.
Then you use something like electrum server to index your local copy of the Blockchain and parse all the UTXO scripts and check if any of them can be unlocked by the signatures derived from your list of private keys.
You only have to scan the whole chain once, then you check every new block.
Run your script with cron for every hour. Or set up some trigger that runs when a new block is added (that's your best bet if you want be the first to sweep it)