opts.keyPath and opts.genesisPath
Opened this issue · 0 comments
nullart2 commented
Hi,
I'm using lotion with coins for the first time using the code below. On initial run, where can I get the keys.json and genesis.json?
let app = lotion({
initialState: {
count: 0
},
keyPath: './keys.json', // path to keys.json. generates own keys if not specified.
genesisPath: './genesis.json', // path to genesis.json. generates new one if not specified.
peers: [],
logTendermint: true
})
function transactionHandler(state, transaction) {
if (state.count === transaction.nonce) {
state.count++
}
}
app.use(transactionHandler)
app.start().then(appInfo => console.log(appInfo.GCI))
this is the error when specifying a "keys.json" and "genesis.json":
Error: ENOENT: no such file or directory, open './config/genesis.json'
(node:96079) UnhandledPromiseRejectionWarning: Error: no keys file found at ./keys.json