hey @jabo38
I had a quick look at it, but I don’t publish it because I have strange results (but maybe there’s an explanation) : when I generate addresses from random private keys, I can generate keys that start with NB
or NC
but no matter how long I let it run, I don’t get any address starting with NE
or NG
. Maybe someone can spot an error in this code?
var regex = new RegExp("^N"+upCaseStart);
exec("openssl rand -hex 1000000", {maxBuffer: 8000000},(error, stdout, stderr) => {
if (error) {
console.log(`error: ${error.message}`);
}
if (stderr) {
console.log(`stderr: ${stderr}`);
return;
}
var startIndex=0;
var random= stdout.trim();
while (random.length - startIndex >= 64) {
var key = random.substr(startIndex, 64)
var account=Account.createFromPrivateKey(key, NetworkType.MAIN_NET);
var plain = account.address.plain();
if (regex.test(plain)) {
console.log(plain);
}
startIndex++;
}
})