UNPKG

xud

Version:
33 lines 1.88 kB
"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.handler = exports.describe = exports.command = void 0; const xudrpc_pb_1 = require("../../proto/xudrpc_pb"); const command_1 = require("../command"); const utils_1 = require("../utils"); const formatOutput = (response) => { const { seedMnemonicList } = response; utils_1.showSeed(seedMnemonicList); // The mnemonic won't be the same as was returned for the `xucli create` call. // xud uses aezeed which is salted with random bytes, xud does not store the // salt or the mnemonic words. Each time xud regenerates the mnemonic, it // uses a new salt so that the mnemonic is different. console.log(` Note that this mnemonic changes each time it is regenerated by xud, but it \ still restores the same xud node key and underlying wallets. `); }; exports.command = 'getmnemonic'; exports.describe = 'show the master xud seed mnemonic'; exports.handler = (argv) => __awaiter(void 0, void 0, void 0, function* () { (yield command_1.loadXudClient(argv)).getMnemonic(new xudrpc_pb_1.GetMnemonicRequest(), command_1.callback(argv, formatOutput)); }); //# sourceMappingURL=getmnemonic.js.map