I need to create addresses, given a creation range, that are essentially sequential.
I realize that the addresses themselves will not be sequential... It is the keys. Where they are valid.
The purpose is so that I can re-create a series of addresses, without having to worry about losing the wallet due to corruption, theft, or any other act of nature. I do understand the implications that if I can recreate them, that anyone-else can, if they know the sequence.
I have used the "
bitcoinjs-min" v0.2.0 for a test-run, but I can not get it to create anything sequential. (Even when I give it a specific value, it just dies and doesn't create anything at all.)
I don't need or want any fancy salt or super-finder or other interfering code, since that will be added later. I just need it pure KISS.
rawPrivKey = MakePrivateKey(X); // Raw key "X" being the specific value to use, or find the first valid key from there.
myPrivKey = MakePrivateKey(rawPrivKey); // WIF Uncompressed
myPubKeyU = GetPublicKeyU(rawPrivKey); // Address Uncompressed
myPubKeyC = GetPublicKeyC(rawPrivKey); // Address Compressed
Simplified:
ValidValues = new GetValidSet(X); // Returns the first valid value and the actual set data, from X-???
MySet = ValidValues.Set(); // "WIF-Private-Key, Address-Uncompressed, Address-Compressed"
LastValue = ValidValues.Last(); // This would be X+whatever, if it was 2000 values before a valid one was found, X+2000
(For wallet compatibility I need both compressed and uncompressed output for addresses. This is because not all wallets check both unless you explicitly add the other one also, on import.)
That will be used in a loop, so I can generate the sequence of addresses. X = 1-100, 594-694, 23953223193478-23953223193578 etc...
The code I use now is this...
rawPrivKey = new Bitcoin.ECKey(); // Generates a random private key *** Need this specific range
myPrivKey = rawPrivKey.toWif(); // Converts raw private key to WIF format
myPubKeyU = rawPrivKey.getPub().getAddress(); // Gets uncompressed public address from raw private key
myPubKeyC = rawPrivKey.getPub('compressed').getAddress(); // Gets compressed public address from raw private key
*** The use for Bitcoin.ECKey();, shows that I should be able to use a value in the brackets, but there is no functioning documented code I could find, indicating what it allows for a valid value. Tried raw numbers, HexToBytes, BytesToHex, 'strings'... anything I place in the brackets just cause it to crash and the code never executes beyond that point. The actual code does not help. There is so much bloat in there to handle every browser and every possible font/iso-format/unicode/variable/object/error... yet it just dies. xD So much for effective bloat.
Anyone think they can help?
Major bonus points if you can do this in VB6, or make this a simple 32-bit DLL file. xD