Skip to content

Instantly share code, notes, and snippets.

@Jaxkr
Created January 4, 2018 23:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jaxkr/91141d012b35bd7dcd9c7941ac77a064 to your computer and use it in GitHub Desktop.
Save Jaxkr/91141d012b35bd7dcd9c7941ac77a064 to your computer and use it in GitHub Desktop.
let lotion = require('lotion');
let os = require('os');
let fs = require('fs');
let app = lotion({
initialState: {
},
logTendermint: false,
createEmptyBlocks: false,
});
async function getNodeInfo() {
let GCI = app.listen(3000);
GCI.then(function(data) {
displayKeys(data);
});
}
function displayKeys(GCI) {
let validatorKeyInfo = JSON.parse(
fs.readFileSync(GCI.lotionPath + '/priv_validator.json')
);
fs.writeFileSync('keys.json', JSON.stringify(validatorKeyInfo));
console.log("Your keys have been saved to keys.json. Keep this file as you will need it later.");
console.log("Your pubkey is: " + validatorKeyInfo.pub_key.data);
console.log("Send your pubkey (and only pubkey) to jackson on lisk.chat");
process.exit(0);
}
getNodeInfo();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment