UNPKG

@bioneisme/greenfield-cli

Version:
50 lines (49 loc) 2.13 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 }); const commander_1 = require("commander"); const changeRpcUrl_1 = require("../commands/system/changeRpcUrl"); const changeChainId_1 = require("../commands/system/changeChainId"); const systemInfo_1 = require("../commands/system/systemInfo"); const changePrivateKey_1 = require("../commands/system/changePrivateKey"); const changeSP_1 = require("../commands/system/changeSP"); const system = commander_1.program.command("system").description("system settings"); system .command("rpc-url <url>") .description("change rpc url") .action((url) => { (0, changeRpcUrl_1.changeRpcUrl)(url); }); system .command("chain-id <id>") .description("change chain id") .action((id) => { (0, changeChainId_1.changeChainId)(id); }); system .command("set-key <public> <private> [password]") .description("set public and private key") .action((pub, priv, password) => __awaiter(void 0, void 0, void 0, function* () { yield (0, changePrivateKey_1.changePrivateKey)(pub, priv, password); })); system .command("sp-address <address>") .description("set sp address") .action((address) => __awaiter(void 0, void 0, void 0, function* () { yield (0, changeSP_1.changeSP)(address); })); system .command("info") .description("show system info") .action(() => { (0, systemInfo_1.systemInfo)(); }); exports.default = system;