UNPKG

@kba-tools/genesis-tool

Version:

A forked repo from ConsenSys which helps to generate genesis block for Besu Network with xemptyBlockPeriod field.

67 lines (64 loc) 4.16 kB
"use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.rootQuestion = void 0; const ibft1 = __importStar(require("./ibft1Qs")); const ibft2 = __importStar(require("./ibft2Qs")); const qbft = __importStar(require("./qbftQs")); const clique = __importStar(require("./cliqueQs")); const raft = __importStar(require("./raftQs")); const bannerText = String.raw ` ___ / _ \ _ _ ___ _ __ _ _ _ __ ___ | | | || | | | / _ \ | '__|| | | || '_' _ \ | |_| || |_| || (_) || | | |_| || | | | | | \__\_\ \__,_| \___/ |_| \__,_||_| |_| |_| / ___| ___ _ __ ___ ___ (_) ___ | | _ / _ \| '_ \ / _ \/ __|| |/ __| | |_| || __/| | | || __/\__ \| |\__ \ \____| \___||_| |_|_\___||___/|_||___/ _____ _ |_ _|___ ___ | | | | / _ \ / _ \ | | | || (_) || (_) || | |_| \___/ \___/ |_| `; const leadInText = ` \nWelcome to the Quorum Genesis Tool. This tool can be used to rapidly generate genesis, account keys, and configs for Besu and GoQuorum. To get started, be sure that you have read Besu and GoQuorum documentation regarding genesis config options, then answer the following questions.\n\n`; exports.rootQuestion = { name: "consensus", prompt: `${bannerText}${leadInText}Which consensus algorithm will you use? Default: QBFT`, options: [ { label: "IBFT1", value: "ibft" /* Consensus.ibft */, nextQuestion: ibft1._chainIDQuestion }, { label: "IBFT2", value: "ibft2" /* Consensus.ibft2 */, nextQuestion: ibft2._chainIDQuestion }, { label: "QBFT", value: "qbft" /* Consensus.qbft */, nextQuestion: qbft._chainIDQuestion, default: true }, { label: "Clique", value: "clique" /* Consensus.clique */, nextQuestion: clique._chainIDQuestion }, { label: "RAFT", value: "raft" /* Consensus.raft */, nextQuestion: raft._chainIDQuestion } ] }; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvcXVlc3Rpb25zL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBRUEsaURBQW1DO0FBQ25DLGlEQUFtQztBQUNuQywrQ0FBaUM7QUFDakMsbURBQXFDO0FBQ3JDLCtDQUFpQztBQUdqQyxNQUFNLFVBQVUsR0FBRyxNQUFNLENBQUMsR0FBRyxDQUFBOzs7Ozs7Ozs7Ozs7Ozs7OztDQWlCNUIsQ0FBQztBQUVGLE1BQU0sVUFBVSxHQUFHOzs7OztpRUFLOEMsQ0FBQztBQUVyRCxRQUFBLFlBQVksR0FBaUI7SUFDeEMsSUFBSSxFQUFFLFdBQVc7SUFDakIsTUFBTSxFQUFFLEdBQUcsVUFBVSxHQUFHLFVBQVUsdURBQXVEO0lBQ3pGLE9BQU8sRUFBRTtRQUNQLEVBQUUsS0FBSyxFQUFFLE9BQU8sRUFBRSxLQUFLLDZCQUFnQixFQUFFLFlBQVksRUFBRSxLQUFLLENBQUMsZ0JBQWdCLEVBQUU7UUFDL0UsRUFBRSxLQUFLLEVBQ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