3
1
Is there a PHP script where it validates a bitcoin private key and also gets the public address from the key?
My goal was to:
- verify the private key
- Get the public address using that private key
- Check the balance using an external api
- Sweep if balance > 0
I know I can test it by sending some bitcoins to it, or use electrum to attempt the sweep, but let's say I have 100 private keys I need to verify, how would I go about that?
What do you define as a valid private key in step 1.? When the key is in the secp256k1 ECDSA range? That would be nearly all 256-bit numbers. (https://en.bitcoin.it/wiki/Private_key#Range_of_valid_ECDSA_private_keys)
– 0xb10c – 2018-07-05T14:31:47.750What format do your private keys have? – 0xb10c – 2018-07-05T14:59:46.757
1Question title edit: How do I empty the accounts of 100 people who's private keys I've hacked – JBaczuk – 2018-07-10T14:48:40.523