hd-auth-wallet/lib/commands/show-keys.js

18 lines
459 B
JavaScript
Raw Normal View History

2019-11-23 22:34:59 +02:00
const persistence = require("../core/persistence/persistence");
module.exports.description = "Show the keys we have instantiate"
module.exports.builder = (yargs) => {
}
module.exports.handler = (argv) => {
console.log("Show the keys we have instantiate");
persistence().LoadDB()
.then(db => {
db.Key.findAll()
.then(keys => {
console.log("Keys: ", keys.map(k => k.name));
})
})
}