Created
January 4, 2018 23:25
-
-
Save Jaxkr/91141d012b35bd7dcd9c7941ac77a064 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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