Just a caveat ... it's not that hard for a script to do something you didn't intend for it to do. Bitcoin transactions are non-reversible, as you likely know, ... so a script doing something dumb like forgetting to calculate the change amount properly would result in the change going to the miner.
So, ... use testnet if you are developing a script, and have a second set of eyes on a script before you run it live on bitcoin main.
Well, you wouldn't have to learn very much python to do it. Might be half a dozen lines code to figure out.
A small bounty would probably get you 90% there. If somebody knew the electrum API, I'm sure it's like a half hour chore for them. But, could be 12h+ for a n00b.
Is the list of keys static? Or manually maintainable?
If I wasn't traveling this week, I could do it for you.
The list is manually maintainable. That is the only thing that would need maintenance, besides OS upgrades. I could pay you via lightning for assistance whenever you are done traveling, no rush or pressure.
The instructions are written to target testnet. You can get testnet bitcoins from a faucet on google. Remove --testnet from all commands after you have something functioning on your machine.
I tested it with 1, 2 and 3 funded addresses on testnet. Note that the fee is static. I'm sure it'll work with infinite addresses.
This will involve at the very least, setting a static port. Choose ports that aren't in use. No need to expose these ports externally, unless you know what you're doing.
Run the following. It will list the addresses with balances, pull out the private keys, format them ready for the sweep command, prepare and sign a transaction, then broadcast it.
Run the commands from 3, 4 and 5 on startup of the server. Alternatively, you can run them before each command, but you would need to shut down the daemon if you did that.
This always boggles my mind. I get the math, but still I feel that there's a chance that I find a key with coins in it. Or that someone guesses my key. It's a infinitesimally small chance, but there's a chance. If someone is lucky enough, they might stumble on it.
The odds are orders of magnitude better to win the mega millions. You're better off buying $5 lottery tickets than spending $5 on power so your computer can make trillions of guesses for private keys. Even if you find a key, relatively few keys have multiple millions of USD worth of BTC. Many many more keys have less than 1 BTC. You're also better off putting that computational energy through an ASIC. Which is how BTC defends itself from this. But the existence of a state run lottery also helps punish those who are poor at math.
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)
I’ve thought through this a bit. If you’re talking about checking wallets for balances by enumerating private keys, you’d need to generate public keys and check it against the ledger as you enumerate through the list of all possible seed phrases. Keep in mind a private key can generate numerous public keys.
If you run that bot on the world’s best computers, you might get lucky after a few thousand years. But probably not.
Kinda hard to answer that without writing the code to create the bot, but the summarized steps are in the original comments.
You’re not going to be able to generate all private keys, so you’d have to check them as they’re enumerated. Most likely would need a loop function that generates a private key, then the public keys, then searches for the public key in the ledger, and repeats for all possible private keys.
возьми все адреса с балансом 0.000001 и выше. и даже те адреса на которых были переводы. и проверяй ключи во времени. все просто. но на это уйдёт 100ккк лет
Pre-amble
--testnet
from all commands after you have something functioning on your machine.1 Setup Server
sudo apt-get install jq
)export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
2 Configure Electrum
2 B - Daemon
electrum setconfig rpcport 7776 --offline --testnet
2 - B Use Electrum UI to Setup your Wallet
electrum --testnet
3 Run the Daemon
electrum daemon -d --testnet
4 Configure your Environment
5 Load the wallet
electrum load_wallet -w $WALLET -W $PASSWORD --testnet
6 Get Addresses with Balances, Sweep & Broadcast
7 Schedule
8 Reboot