@hashgraph/hedera-local
Version:
Developer tooling for running Local Hedera Network (Consensus + Mirror Nodes).
60 lines • 3.42 kB
JavaScript
;
// SPDX-License-Identifier: Apache-2.0
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());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const Bootstrapper_1 = require("./services/Bootstrapper");
const yargs_1 = __importDefault(require("yargs"));
const helpers_1 = require("yargs/helpers");
const StateController_1 = require("./controller/StateController");
const CLIService_1 = require("./services/CLIService");
/**
* This script is the entry point for the Hedera Local Node CLI.
* It provides several commands to manage the local Hedera network.
*/
(0, yargs_1.default)((0, helpers_1.hideBin)(process.argv))
.command("start [accounts]", "Starts the local hedera network.", (yargs) => {
CLIService_1.CLIService.loadStartupOptions(yargs);
}, () => __awaiter(void 0, void 0, void 0, function* () { return yield new StateController_1.StateController("start").startStateMachine(); }))
.command("stop", "Stops the local hedera network and delete all the existing data.", (yargs) => {
CLIService_1.CLIService.loadStopOptions(yargs);
}, () => __awaiter(void 0, void 0, void 0, function* () { return yield new StateController_1.StateController("stop").startStateMachine(); }))
.command("restart [accounts]", "Restart the local hedera network.", (yargs) => {
CLIService_1.CLIService.loadStartupOptions(yargs);
}, () => __awaiter(void 0, void 0, void 0, function* () { return yield new StateController_1.StateController("restart").startStateMachine(); }))
.command("generate-accounts [accounts]", "Generates the specified number of accounts [default: 10]", (yargs) => {
CLIService_1.CLIService.loadAccountOptions(yargs);
}, () => __awaiter(void 0, void 0, void 0, function* () { return yield new StateController_1.StateController("accountCreation").startStateMachine(); }))
.middleware(Bootstrapper_1.Bootstrapper.initialize)
.demandCommand()
.strictCommands()
.recommendCommands()
.epilogue(`
Requirements:
- Node.js >= v20.11.0
Node version check: node -v
- NPM >= v10.2.4
NPM version check: npm -v
- Docker >= v27.3.1
Docker version check: docker -v
- Docker Compose => v2.29.7
Docker Compose version check: docker compose version
* Ensure the gRPC FUSE for file sharing setting is disabled in the docker settings and VirtioFS is enabled
* Ensure the following configurations are set at minimum in Docker Settings -> Resources and are available for use
CPUs: 6
Memory: 8 GB
Swap: 1 GB
Disk Image Size: 64 GB`)
.parse();
//# sourceMappingURL=index.js.map