1.0.0 • Published 6 years ago

node-lisk-vanitygen v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

Node LISK Vanitygen

Fast Vanity LISK address generator.

Getting Started

Install node-lisk-vanitygen into your project:

$ npm install node-lisk-vanitygen --save

Create a app.js file and add the following:

const LiskVanitygen = require('node-lisk-vanitygen');

let liskVanitygen = new LiskVanitygen({
    pattern: 123456
});

liskVanitygen.run((data) => {
    console.log('found: ', data);
}, (data) => {
    console.log('status: ', data);
});

Run your app.js file:

$ node app.js

API

let liskVanitygen = new LiskVanitygen(config);

config properties:

NameDefaultTypeRequiredDescription
pattern-number or array of numbersYesPattern(s) to find.
continuetruebooleanNoShould continue after first found?
messageInterval1000numberNoInterval in ms between status callback.
liskVanitygen.run(foundCallback, statusCallback);
NameTypeRequiredDescription
foundCallbackfunctionYesCallback when key was found.
statusCallbackfunctionNoCallback with status information.

Example

const LiskVanitygen = require('node-lisk-vanitygen');
const fs = require('fs');

let liskVanitygen = new LiskVanitygen({
    pattern: [123456, 987654, 555555],
    continue: true,
    messageInterval: 5000
});

liskVanitygen.run((data) => {
    let txt = `
Pattern:    ${data.pattern}
Address:    ${data.address}
Passphrase: ${data.passphrase}
`;

    fs.appendFileSync('found.txt', txt, (error) => {});
}, (data) => {
    let txt = `\r\rCount: ${data.count} | Time: ${data.time} s. | Avg: ${data.avg} keys/s | Found: ${data.foundCount}`;
    process.stdout.write(txt); // to back cursor to the start of the line (in console.log doesn't work)
});

License

MIT © Radosław Wiliński