forked from WaveringAna/EquihashVanityGenerator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
40 lines (32 loc) · 946 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
var bitcore = require('zcash-bitcore-lib'),
cluster = require('cluster'),
numCPUs = require('os').cpus().length;
if (cluster.isMaster) {
// Fork workers.
for (var i = 0; i < numCPUs; i++) {
cluster.fork();
}
cluster.on('exit', (worker, code, signal) => {
console.log(`worker ${worker.process.pid} died`);
});
} else {
var arg1 = process.argv[2].toString();
var arg2= arg1.length + 2;
console.log('Looking for '+ 't1'+ arg1)
console.log(arg1.length)
console.log('')
while (1) {
var privateKey = new bitcore.PrivateKey();
var address = privateKey.toAddress().toString();
console.log(address);
console.log(privateKey.toWIF());
if (address.substring(2, arg2) == arg1){
console.log("Address found!");
console.log(''); console.log(''); console.log('');
console.log(address);
console.log(privateKey.toWIF());
process.exit()
}
console.log(address.substring(2, arg2).toString());
}
}